PWM Demo
v1.0 simulatorVisualize Pulse Width Modulation signals
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.