Pulse width modulation for driving motor

sreedev

Member
hi,
I do not much about driving motors. But I have read something about the use of PWM for controlling the speed of motors. How is that done and why is PWM used for the purpose.
Thanks.
 

bluejets

Senior Member
Pulse Width Modulation.

DC motor (or whatever load) has full supply voltage applied to it (usually through a mosfet) in a series of pulses.

These pulses are of a Mark and Space nature. Mark is the time ON and Space is the time OFF.

So, a mark space ratio of say 30/70 will give you theoretically 30% of normal full speed.

The reason to appply full voltage is it gives high torque AND the on/off ratio saves wasting power that would normally be associated say with using a resistor bank.

There are some power losses as the switching element turns on and off but it is usually small if the correct mosfet is used. i.e. very low turn on resistance and high speed switching.
 

sreedev

Member
As far as I know, modulation is the mixing up of two waves, one containing the information and the other which carries the wave containing the information.....Can you clarify it?
 

Dippy

Moderator
As far as I know, modulation is the mixing up of two waves, one containing the information and the other which carries the wave containing the information.....Can you clarify it?
"Pulse Width" describes the 'method'.
What you actually DO with that is up to you.

You could use it to modulate a frequency-signal onto a carrier.
e.g. IR remote control, where the Pulse Width carries the information, the 'frequency signal' could be 38Khz and the 'carrier' is the IR light.

Or you could simply modulate an RF carrier like simple OOK.

If you are powering a motor the PWM switches DC current which can be thought of as a 'carrier'.

Read the Manual to see the definitions of PWM frequency, Period and Duty.
 

hippy

Ex-Staff (retired)
As far as I know, modulation is the mixing up of two waves, one containing the information and the other which carries the wave containing the information.....Can you clarify it?
It's probably best to simply ignore the "modulation" part of the PWM terminology as with motors it's the amount of time a signal is on for against the amount of time the signal is off which is important, the "pulse width" part of the term.
 

boriz

Senior Member
The carrier is an oscillating 'square' wave. The modulation signal is the motor speed. You usually change the motor speed quite slowly, but the same technique can be used to drive a speaker coil at audio frequencies. See class-D amplifier.

The carrier frequency does not change when the motor speed changes, only the ratio of 'high time' to 'low time'. The high time is usually called the Pulse Width and expressed as a percentage of the total cycle time (frequency). A very short pulse width, say 5% will result in little average power at the motor and it will turn slowly if at all. Conversely 95% is almost continually high and the motor will be spinning almost at max speed.

The carrier frequency (PWM frequency) is chosen to be high enough that the motor itself will average the power. The inertia of the armature and the inductance of the coils does the averaging. Some applications use a PWM frequency that is within the range of human hearing. Have you ever squeezed the trigger just a little bit on a cordless drill and heard a high pitch whine? Or on an RC model?
 
Last edited:

Dippy

Moderator
"The high time is usually called the Pulse Width and expressed as a percentage of the total cycle time (frequency). "
- That may confuse the OP Boriz as it ain't entirely accurate.

The "high time" percentage of "total cycle time" is referred to as the 'Duty' (or 'Duty Cycle') in the World of PIC and "total cycle time" != "frequency".

Generally, 'duty' (or "Duty Cycle") can be on or off (high or low) , but we commonly just use the on (high) time definition with PICs.

So, whilst 'duty' is an absolute time definition, Duty% = 100 x Time_On / (Time_On + Time_Off)
and
Time_On + Time_Off = PWM 'Period'
and
Frequency = 1 / PWM Period

+ what I said in Post#4.
And whilst a PWM signal coming out of a PIC can perform actions directly it really should be considered as a 'modulating' signal and not a carrier. It's easy to get people muddled if you mix operation even if it is clear in your own mind..
 
Top