What Is PWM? Pulse Width Modulation Explained

PWM, or pulse width modulation, is a technique for controlling power by rapidly switching a signal on and off. Instead of reducing voltage to dim a light or slow a motor, PWM delivers full voltage in short pulses, and the ratio of “on” time to “off” time determines how much power reaches the device. It’s one of the most widely used methods in electronics, found in everything from phone screen brightness to electric vehicle motors.

How PWM Works

Imagine flipping a light switch on and off hundreds of times per second. If the light is on for 60% of each cycle and off for 40%, it receives 60% of the total possible power. Your eye can’t detect the flickering at that speed, so the light simply appears dimmer than full brightness. That’s the core idea behind PWM: you control the average power delivered to a device by changing how long the signal stays “on” during each cycle.

A PWM signal has a fixed period (the total time of one on-off cycle) and a variable pulse width (how long the “on” portion lasts). The key measurement is called the duty cycle, which is the on-time divided by the total period. A 100% duty cycle means the signal is always on. A 0% duty cycle means it’s always off. A 50% duty cycle means the output averages exactly half the supply voltage. This relationship is remarkably clean: the average output equals the duty cycle multiplied by the maximum voltage. So a 12-volt supply at a 75% duty cycle delivers an effective 9 volts to the load.

Why Not Just Lower the Voltage?

The traditional way to reduce power to a device is with a linear regulator, which works by converting excess voltage into heat. If you need 5 volts from a 12-volt source, a linear regulator burns off the remaining 7 volts as waste heat. That approach is simple but typically only 30 to 40% efficient.

PWM-based switching power supplies avoid this problem entirely. Because the transistor doing the switching is either fully on (very low resistance) or fully off (no current flowing), it wastes very little energy in either state. Modern switched-mode power supplies using PWM commonly achieve 70 to 85% efficiency, with high-end designs reaching 98 to 99%. That efficiency gap is why virtually every laptop charger, phone charger, and computer power supply uses PWM-based switching rather than linear regulation.

Common Applications

PWM shows up across a huge range of devices, and the switching frequency varies dramatically depending on the job. Electric stoves may only switch a few times per minute because the heating element responds slowly. Lamp dimmers typically operate at 100 or 120 Hz (twice the frequency of your wall outlet). Motor drives in appliances and tools run between a few kilohertz and tens of kilohertz. Audio amplifiers and computer power supplies push into the hundreds of kilohertz range, where the rapid switching is completely inaudible and produces very smooth output.

LED dimming is one of the most visible everyday uses. Rather than reducing voltage to an LED (which changes its color), PWM switches the LED on and off so quickly that your brain perceives a steady, dimmer light. This preserves the LED’s color accuracy across the full brightness range. The same principle controls screen brightness on phones and laptops, fan speeds in computers, and the position of servo motors in robotics and RC vehicles.

Resolution and Precision

When a microcontroller generates a PWM signal, its resolution (measured in bits) determines how finely you can adjust the duty cycle. An 8-bit PWM module offers 256 distinct duty cycle steps, meaning you can set the output to roughly 0.4% increments. A 10-bit module provides 1,024 steps, giving much finer control at about 0.1% increments. For applications like LED dimming, higher resolution translates to smoother brightness transitions. For simple on-off heating control, even low resolution works fine.

The Tradeoff: Electrical Noise

PWM’s rapid switching is its greatest strength and its main drawback. Every time a signal snaps from off to on (or back), it creates sharp voltage and current spikes. These fast transitions are the primary source of electromagnetic interference, or EMI, in PWM circuits. The noise can travel along wires and affect nearby components, which is a particular concern in sensitive environments like vehicles with multiple electronic systems running in close proximity.

This interference takes two forms. Differential-mode noise travels along the power wires themselves, affecting the quality of the power signal. Common-mode noise radiates outward through cables and metal enclosures, potentially disrupting other electronics nearby. Both get worse at higher switching frequencies, where the transitions happen more often and the energy spreads across a wider frequency band.

Engineers manage this noise with filters placed between the PWM source and the rest of the circuit. More advanced PWM techniques also help: instead of simple on-off switching, sophisticated controllers use optimized switching sequences that smooth transitions between states, reducing voltage spikes and spreading noise energy more evenly. Dead-time compensation (brief pauses during switching transitions) further reduces the sharp spikes that generate the worst interference.

How PWM Differs From Other Modulation

PWM is one of several pulse-based modulation methods, and they differ in which property of the pulse carries the information:

  • Pulse amplitude modulation (PAM) keeps pulse width constant but varies the height (voltage) of each pulse.
  • Pulse width modulation (PWM) keeps pulse height constant but varies the width (duration) of each pulse.
  • Pulse position modulation (PPM) keeps both height and width constant but shifts the timing of each pulse forward or backward.

PWM’s advantage for power control is that the transistor is always either fully on or fully off, never operating in a partial state. PAM requires the switch to operate at intermediate levels, which wastes energy as heat, much like a linear regulator. This is why PWM dominates power electronics while PAM is more common in communication systems where efficiency at the transmitter matters less than signal fidelity.