See the Signal. Microcontrollers like Arduino cannot output a varying analog voltage; they can only output 0V or 5V. To solve this, we use Pulse Width Modulation (PWM). By flickering the pin on and off thousands of times per second, we create an “average” voltage. This lab visualizes that square wave—the wider the “pulse,” the more power is delivered.
PWM Visualizer
Analyze Pulse Width & Duty Cycle
Duty Cycle (%)
50%
10ms
Time ON
2.5V
Avg. Voltage (5V Ref)
Lab Notes:
- Duty Cycle: The percentage of time the signal is HIGH during one period. 0% is always OFF, 100% is always ON.
- Effective Voltage: Calculated as Vout=Vref×DutyCycle.
- Common Uses: LED dimming, DC motor speed control (H-Bridge), and Servo motor positioning.
