View Full Version : PWM vs Duty

James Newman
04-03-2009, 09:04 AM
Hey, been away for a bit, and trying to get back on the prop train.

I was wondering, the PWM of the prop counters seems to be just adjusting frequency. For something like (dc) motor control, I don't understand how changing the frequency will affect the amount of current going to the motor. (At reasonable frequencies, ofcourse really low ones will have the affect of just on/off). What I'm trying to say is that wouldn't the amount of current going to a load be proportional to the duty cycle?

Now, the prop has a Duty Cycle counter mode, and this seems to me to be what I would expect... but the 'AN001 Propeller Counters v1.0' document lists 'PWM motor control, LED dimming' under PWM not Duty.

A random search for PWM information gives stuff like www.netrino.com/Embedded-Systems/How-To/PWM-Pulse-Width-Modulation (http://www.netrino.com/Embedded-Systems/How-To/PWM-Pulse-Width-Modulation) which is saying that PWM is changing the Duty Cycle. It's waveforms are also the same as the Duty Cycle ones for the prop...

So... I'm confused... http://forums.parallax.com/images/smilies/tongue.gif
Educate me please.

04-03-2009, 10:49 AM
There are two basic digital (on/off) methods of controllingthe power going to a load, pulse width modulation and pulse frequency modulation.

Pulse width modulation keeps the frequency of the pulses constant and varies the on/off time. As the on time increases the off time decreases to keep the frequency constant, and since the on time is longer the average current and power to the load is higher.

Frequency modulation keeps the pulse width constant and varies the number of pulses in a given time, which also increases the average power as the frequency increases.

Both pulse and frequency modulation are forms of duty cycle control, and both can be used simultaneously as is often done in variable frequency inverters for 3 phase motors.

If you were to send 10V pulses at a frequency of 10 Hz and an on time of 10mS (on 10mS, off 90mS) to a 10 ohm resistor the total power would be 10V x 1A x 10% = 1W.
If you increased the on time to 20mS (on 20mS, off 80mS) the total power would be 10V x 1A x 20% = 2W
If you kept the pulse width constant at 10mS and increased the frequency to 20 Hz (10mS on, 40mS off) the power would be 10V x 1A x 20% = 2W