PWM Demo

v1.0 simulator

Visualize Pulse Width Modulation signals

PWM Signal Demo
ON 0.5s, OFF 0.5s, ON 0.5s, ramp 100%→10% over 3s, hold 10%. Scope-style scrolling plot (fixed 5s window). Runs 10s.
Brightness: 0%
This is what your eye would "see". It smooths PWM into brightness.
Duty: 0.0%

PWM Demo

Visualize PWM (Pulse Width Modulation) signals and understand how duty cycle affects the output.

How to use

Adjust the controls to see how PWM works:

  • Duty Cycle - The percentage of time the signal is high (0-100%)
  • Frequency - The number of cycles per second (1-10kHz)

The waveform visualization shows the resulting signal pattern.

Understanding PWM

PWM is used to:

  • Control motor speed
  • Dim LEDs
  • Generate analog-like signals from digital outputs
  • Control power delivery

The duty cycle determines the effective output level. A 50% duty cycle at 5V gives an effective 2.5V output.

Examples

Dimming an LED

  • Use PWM at 1kHz frequency
  • Adjust duty cycle from 0% (off) to 100% (full brightness)
  • Higher duty cycle = brighter LED

Motor Speed Control

  • Use PWM at 20kHz frequency (above audible range)
  • Adjust duty cycle to control motor speed
  • 0% = stopped, 100% = full speed

FAQ

Q: What frequency should I use? A: For LEDs, 1-5kHz is fine. For motors, use 20kHz+ to avoid audible noise. For servos, use 50Hz.

Q: Can PWM damage components? A: No, but make sure your components can handle the switching frequency. Use appropriate filtering if needed.