PWM: The Secret to "Dimming"
Digital chips can only be ON (3.3V) or OFF (0V). So how do we make a light look dim or a motor run at half speed? We cheat using Pulse Width Modulation (PWM).
"PWM is like flipping a light switch on and off thousands of times a second. Do it fast enough, and your eyes just see a steady, dim light."
See it in Action
Use the slider below to change the Duty Cycle. Watch how the waveform changes and how the result "looks" to the human eye.
PWM Controller
The LED isn't actually dimmer, it's just blinking so fast your brain sees the average brightness!
Why Use PWM? (Efficiency)
The Old Way
Using a Resistor to block power.
The resistor "soaks up" the extra energy and turns it into HEAT. This wastes battery life and can burn components!
The PWM Way
Switching ON and OFF rapidly.
When the switch is OFF, no power is used. When ON, power flows freely. No energy is wasted fighting resistance!
Real-World Examples
Computer Fans
Your laptop controls fan speed using PWM to keep quiet when cool and blast air when gaming.
E-Scooters
The throttle doesn't control voltage nicely; it sends a PWM signal to the motor controller.
Smart Bulbs
LEDs can't be dimmed by lowering voltage easily. PWM makes smooth dimming possible.
Servo Motors
We also use PWM to control Robot Arms! But instead of controlling speed, the "width" of the pulse tells the motor exactly what angle to point to.