PDA

View Full Version : PWM vs CCPWM



wikitjuggla
12-15-2013, 12:48 AM
what is the essential difference between the two? From what i can find online, ccpwm sounds like the lazy man's pwm who don't want to install an ammeter into their system and watch the amp gauge. People trying to sell ccpwm just made it sound like an over-glorified current limiter in my opinion. Someone factually correct me if i am wrong. I was thinking i'd build my own pwm controller with a couple of mosfets and an arduino for under $30 bucks and when you already have all the parts lying around....its free. Also, what is the benefit of frequency control? I get the concept and operation of it, i just don't know why we implement it into the system. Would pulse control by itself be sufficient?

Stevo
12-16-2013, 03:11 PM
I've already done this successfully: /entry.php?4-Arduino-Controlled-PWM&bt=7 (http://www.hhoforums.com/entry.php?4-Arduino-Controlled-PWM&bt=7). This was being hosted over at hodinfo.com, but I think I'm going to have to copy it over where I wish to share it.

wikitjuggla
12-16-2013, 03:49 PM
looks like a really complex system you built. I've got a thread going in the arduino forum http://forum.arduino.cc/index.php?topic=204623.15 but its hard to get straight answers out of everyone who has posted. I'm not even sure what mosfets to use and finding a code to control the pwm frequency is even more difficult which is why I wanted to know if a frequency controller is even that important compared to just pulse control

Stevo
12-16-2013, 04:49 PM
Here is where I will explain the how: http://www.hhoforums.com/entry.php?5-Recreate-the-Arduino-Powered-PWM

wikitjuggla
12-16-2013, 05:12 PM
will that library let me control pwm frequency using a POT? would a couple of those sparkfun mosfets work better than a couple of these mosfets http://uk.farnell.com/nxp/buk652r3-40c/mosfet-n-ch-40v-120a-sot78/dp/1863285 and a gate driver? I want to use multiple in parallel to reduce heat and enable me to use a smaller heat sink

Stevo
12-16-2013, 05:46 PM
I use 3 of the FQP30N06L MOSFETS in parallel at the moment with the unit I have installed and have tested up to 20 amps @ 14.5VDC with little to no heat using a small 45mm cubed heat sink and same sized slim 12V fan.

The issue (if any) with the BUK652R3-40C you listed are the "On Characteristics" such as "Gate Threshold Voltage" which is rather low in the FQP30N06L and one of the main selling points. This comment thread helped me to understand this better: https://www.sparkfun.com/products/10213#comment-4eaad848757b7fd351004ebb. Other than that, if you do end up choosing to use a gate driver I would be interested in hearing what your thoughts are after implementing. This might help me make a decision on the bigger unit I have sitting around.

When it comes to controlling the frequency with the POT, in void setup you have to set the frequency like so:

//sets the frequency for the specified pin
bool success = SetPinFrequencySafe(PWMPin, frequency);

//if the pin frequency was set successfully, pin 13 turn on
if(success) {
pinMode(13, OUTPUT);
digitalWrite(13, HIGH);
}

which I have not timed yet or tested during the main loop(). I am unsure as to how much delay calling this method might introduce or if doing so is even possible. This could be a good bench test though..

Edit: PWMPin is 3 and it's the ATMega 328 Nano.

wikitjuggla
12-17-2013, 01:39 AM
I think I will go with the mosfet you suggested. It's cheaper, easier to get and doesn't require a gate driver (though i was kinda lookin forward to soldering that to a pcb). Now what do they mean in that comments thread about bringing the gate voltage above the rail voltage to get it to fully turn on? I'm not sure what rail voltage means. I have an arduino uno rev 3 and according to their website, pins 5 and 6 have a 980hz frequency and the rest of the pwm pins are 490hz. I'm not real knowledgeable at the technical details of this stuff. Used to be better with the code side of things but haven't touched my arduino in months so i forgot most of it. Can you tell me what the benefit of frequency control is? think i'm just gonna leave that part out, which frequency should i use, the 490hz pin or the 980hz pin?

Stevo
12-18-2013, 12:09 AM
Now what do they mean in that comments thread about bringing the gate voltage above the rail voltage to get it to fully turn on? I'm not sure what rail voltage means. I have an arduino uno rev 3 and according to their website, pins 5 and 6 have a 980hz frequency and the rest of the pwm pins are 490hz. I'm not real knowledgeable at the technical details of this stuff. Used to be better with the code side of things but haven't

According to what I've read, rail voltage is basically the voltage read at the filtering or stiffening cap(s) connected to the source pin and +. In this case it would be ~14VDC.

This document is super informative: http://www.fairchildsemi.com/Assets/zSystem/documents/collateral/onlineSeminars/Understanding-Modern-Power-MOSFETs-PPT.pdf

wikitjuggla
12-18-2013, 12:55 AM
I had a feeling thats what rail voltage was. Do you use a gate driver on your module or just an arduino pin? what is the current draw per mosfet on the gate pin? That document helped a little bit but all those symbols are just really confusing. Looking at a mosfet datasheet gives me a pretty good idea of what it must feel like to be dyslexic. For such a tiny little thing, they are ridiculously complex

Stevo
12-18-2013, 02:31 PM
Do you use a gate driver on your module or just an arduino pin? what is the current draw per mosfet on the gate pin?

No, I don't use a gate driver. Not yet..

http://www.hhoforums.com/entry.php?5-Recreate-the-Arduino-Powered-PWM#comment16

Stevo
12-18-2013, 03:22 PM
Can you tell me what the benefit of frequency control is? think i'm just gonna leave that part out, which frequency should i use, the 490hz pin or the 980hz pin?

There is no benefit from dynamically controlling the frequency (as far as I can tell) and I'm not a believer of this "magic resonance" that some speak of, but there is plenty of benefit from dynamically controlling duty cycle. I use pin 3 with my Nano and this library https://code.google.com/p/arduino-pwm-frequency-library/.

During initial install, you want to be able to adjust the frequency to the optimal setting for the reactor you have built. Size, shape, plate gap will partially determine what that final number is. I actually go about it in a course manor once the reactor is at normal operating temps (~95 - 100*F):

1) From 1 Hz, make course frequency adjustments (1 KHz at a time) upwards until amp draw ceases to increase
2) One a course number is defined, then move on to fine tuning (100 Hz decrements/increments)

By doing this, I determined that the correct frequency for my reactor is approximately 16,500 Hz and I could probably continue to do more fine tuning. No magic here though :)

Interesting side note:

It seems that the larger the reactor plate dimensions, the lower the optimum pulsing frequency. The smaller the reactor plate dimensions, the higher the optimum pulsing frequency.

wikitjuggla
12-19-2013, 12:30 AM
I'm way too much of a noob at arduino for that kind of complexity. I'm still trying to figure out how to implement millis() into a sketch so I can use the same arduino that will be controlling my PWM to also control my headlights and make them turn on/off automatically and stay on for 2 minutes after I turn off the car at night

freetv6969
01-11-2014, 07:30 PM
it looks like no one has explane to you wat you want
the normal pwm was made to control electric motors, and this motors has the same amperes all the time. when you use it on a drycell you now that electrolize makes the water get hot, and hot water is more conductive, so you will have to make adjusts all the time if want to keep the AMPS at certain point. wit the ccpwm you don´t have this problem, you adjust to an AMP you want and if the water get´s hoter you will have all the time the same AMPs even if you raise the voltage.
this is very important to new cars that don´t want big variation on the gas production because of the CPU´s they use.

wikitjuggla
01-12-2014, 06:45 AM
Thank you for that answer. Well those ccpwm units cost about 70-150 plus, let's say 150-200 for a homemade dry cell unit. Does the gas money saved justify $350? Once the water has reached the temp you want it at, shouldn't the pwm amps level off? Probably not reasonable for short trips to the store but still would work for long trips

nutgone
01-17-2014, 02:37 PM
Is Arduinio really all that necessary for a basic, adjustable PWM? Surely you can make one with adjustable frequency & mark space (pulse width/duty cycle, whatever) with a simple 555 (or double 555 or 556) circuit & some powerful MOSFETs (or even old fashioned transistors, FETs, IGBTs or IGTs)??? It appears to me that using Arduino for a basic PWM is just making things unnecessarily complicated, but that's only my view of it. Not being well versed on Arduino I can only say it as I see it.

I haven't got into Arduino yet myself as my workshop is more mechanical than electronics based. Until I get a bigger workshop I am stuck with the basic stuff (I'm not even printing my own PCBs yet, still using veroboard). I would be interested to know what the advantages are.

I'm also interested in the difference between basic PWMs & Constant Current devices. I am thinking about making a large cell for my workshop to use with a blow torch & maybe a cutting torch. I plan to use my modern TIG/MMA welder which is an inverter based DC power supply with current variable from 10-150 amps. I'm guessing this is a constant current machine? (as MMA & TIG welding call for CC, whereas MIG welding needs constant voltage). I still don't know enough about the differences between these power supplies though, surely constant voltage would be useful in an HHO cell, to maintain the ultimate "volts per cell" figure?

myoldyourgold
01-17-2014, 11:13 PM
Simply stated a CCPWM automatically controls the duty cycle to maintain a given amp draw. As a reactor heats up the resistance of the electrolyte is lowered allowing more amps to flow if not controlled. A PWM requires you to adjust the duty cycle manually to maintain a given amp draw. The advantage of the CCPWM is you can set it and forget it. It is the best way to go if you are going to use a PWM at all.

nutgone
01-18-2014, 08:23 AM
Thanks for clearing that up. Unfortunately my funds are very limited, so until the Chinese start producing CCPWMs for peanuts I'm stuck with the normal, old fashioned PWM.

I guess, in use, you just set the old fashioned PWM to the amp draw you want when the cell is up to working temperature & leave it there. I don't envisage having to constantly make adjustments to it. Of course a CC device would be better & give you more constant cell output.

Are there any circuit diagrams out there (not including Arduino) for CCPWMs using common (easy to obtain) components??? I have had a look but most CC supplies are or LED drivers, which require a fraction of the current we are after.

Stevo
02-19-2014, 05:28 PM
Is Arduinio really all that necessary for a basic, adjustable PWM?

Manual adjustment? No

Constant Current? No

Dynamic duty cycle/frequency control based external sensor input or OBD data from the computer? Yes




It appears to me that using Arduino for a basic PWM is just making things unnecessarily complicated, but that's only my view of it. Not being well versed on Arduino I can only say it as I see it.


That depends on what you are trying to achieve. Was pretty simple for me and I am not a certified EE.