Introduction to Pulse Width Modulation (PWM)

Motivating the use of Pulse Width Modulation (PWM)

The world of computers and digital electronics is the world of ones and zeros, of on and of off. The world in which we live is comprised of "analog" quantities that can take on any value. Consider, for example a Light Emitting Diode (LED) or some other electrical load (a motor, a heater...). It is easy to design a circuit that turns the load on and off; one is shown to the right with a voltage source, a load, and a switch. If the switch is open (which we could represent by a "0") no current flows, and the light is off. If the switch is closed (represented by "1"), current flows and the light is on.


The circuit works, but what happens if we want to have the light at some intermediate brightness? We could build a control circuit (which could be as simple as a resistor) that reduces the current through the LED to reduce the brightness.

The ability to control the intensity of the LED (or speed of a motor...) has obvious advantages over digital (on/off) control. However there are two disadvantages.

In a Pulse Width Modulated system the transistor is turned on and off rapidly (we will define "rapidly" in the next page). In the case of an LED we blink the light rapidly (in this case "rapidly" means much faster blinking than the human eye can perceive). If the light is on (switch is closed, current is flowing) 10% of the time and off (switch is open, no current flows) 90 % of the time, it will appear to be dim. If the light is on 90% of the time, and off 10% of the time, the light will be brighter. If it is on 50%, and off 50%, it will be at an intermediate brightness. The percent of time that the load is on is called the "duty cycle" and varies from 0% to 100% (or 0 to 1).

A brushed DC electric motor, on the other hand, has a response time that depends on the inductance (L) and resistance (R) of the wires that make up the electromagnetic coils in the motor. We build a circuit that places either a large voltage, or 0 voltage across the motor (somewhat different than the picture above), and switch rapidly compared to the L/R time constant of the motor. The result is that the current through the motor is practically constant.

Most microwaves have an ability to set the power from 1 to 10 (or some other range). If we set the power at 5, this corresponds to a 50% duty cycle, and food will take longer to cook than if we use full power (i.e., set it to 10). If you listen carefully you can often hear the transmitter in the microwave turning on and off with a period of about 10 seconds. This tells us that the "response time" (i.e., how long it takes the food to heat up) is likely much longer than 10 seconds, so that the on-off cycle is "rapid" compared to how long it takes the food to heat up.

Moving on