PWM Duty Cycle Calculator
Calculate PWM duty cycle percentage and frequency from on-time and off-time.
Essential for motor speed control, LED dimming, and switching power supplies.
PWM (Pulse Width Modulation) is a technique for controlling the power delivered to a device by rapidly switching it on and off. The duty cycle is the percentage of time the signal is ON within one complete period. It is fundamental to motor control, LED dimming, power supplies, and audio amplifiers.
Formulas:
Duty Cycle = (Pulse Width ON Time ÷ Total Period) × 100% Duty Cycle = (t_on ÷ T) × 100% Period = 1 ÷ Frequency (T = 1/f) Pulse Width = Duty Cycle × Period Average Voltage = Supply Voltage × Duty Cycle RMS Voltage = Supply Voltage × √(Duty Cycle)
What each variable means:
- t_on — the duration the signal is HIGH (on) in one period, in seconds or microseconds.
- T (Period) — total duration of one complete cycle (on + off time).
- Frequency — how many cycles per second (Hz). PWM frequencies typically range from 1 kHz to 100 kHz.
- Average Voltage — the effective DC voltage seen by a load (motor, LED) due to PWM switching.
Worked example: A motor controller operates at 20 kHz. The pulse is on for 35 microseconds per cycle.
Period = 1 ÷ 20,000 = 50 microseconds Duty Cycle = (35 ÷ 50) × 100 = 70% Average Voltage (12V supply) = 12V × 0.70 = 8.4V effective RMS Voltage = 12V × √0.70 = 12V × 0.837 = 10.04V
Duty cycle effects:
- 0% duty cycle = device fully OFF
- 50% duty cycle = half power (LED at half brightness, motor at half torque)
- 100% duty cycle = device fully ON
Common applications: Arduino LED dimming, servo control (1–2 ms pulse within 20 ms period = 5–10% duty cycle), HVAC fan speed control, laptop power adapters.