PWM Interactive Demo

Set VCC, target voltage, duty cycle, and frequency, then watch how PWM drives an LED and a motor.

Suggested duty: 50%
Average Voltage 6.00 V
Voltage Error 0.00 V
ON Time / Cycle 1.00 ms
OFF Time / Cycle 1.00 ms

PWM Signal

PWM digital pulse Average voltage Target voltage

Energy Efficiency Sankey Diagram

Estimated energy distribution from source to useful load and losses.

Input (VCC) 100.0% Useful Output 0.0% Switching Loss 0.0% Heat / Other Loss 0.0%
Model assumption: normalized input power = 100%.

LED Load (Persistence of Vision)

Brightness: 50%

Motor Load (Inertia)

Speed: 50%

PWM Principle

PWM (Pulse Width Modulation) controls power by switching ON and OFF very fast. The key is the ON-time ratio, called duty cycle.

If supply voltage is VCC, average output is approximately VCC multiplied by duty cycle. So even with digital pulses, the load receives a controllable analog-like average power.

  1. Inertia: A motor rotor has mechanical inertia, so it cannot instantly stop in every OFF interval. It responds to average energy, making speed smooth.
  2. Persistence of Vision: Human eyes integrate rapid LED flashes. At high PWM frequency, flashing is not obvious, and we perceive a stable brightness level.

In this demo, low frequency shows stronger flicker behavior on the LED, while motor speed changes more gradually to illustrate inertia.