PWM Duty Cycle Calculator Formula
Understand the math behind the pwm duty cycle calculator. Each variable explained with a worked example.
Formulas Used
Average Voltage
v_average = v_amplitude * duty_fractionAverage Power
avg_power_w = pow(v_amplitude, 2) * duty_fraction / load_resistance_ohmPeak Current
peak_current_a = v_amplitude / load_resistance_ohmVariables
| Variable | Description | Default |
|---|---|---|
v_amplitude | PWM Amplitude(V) | 12 |
duty_cycle_pct | Duty Cycle(%) | 75 |
load_resistance_ohm | Load Resistance(Ω) | 10 |
duty_fraction | Derived value= duty_cycle_pct / 100 | calculated |
How It Works
PWM Duty Cycle
Formulas
V_avg = V_amplitude x D
P_avg = V^2 x D / R
Where D is the duty cycle (0 to 1). PWM is used for motor speed control, LED dimming, and switching power supplies.
Worked Example
12 V PWM at 75% duty cycle driving a 10 ohm load.
v_amplitude = 12duty_cycle_pct = 75load_resistance_ohm = 10
- 01D = 75 / 100 = 0.75
- 02V_avg = 12 x 0.75 = 9 V
- 03P_avg = 144 x 0.75 / 10 = 10.8 W
- 04Peak current = 12 / 10 = 1.2 A
Frequently Asked Questions
What frequency should I use?
Depends on application. Motors: 1-20 kHz. LEDs: above 200 Hz to avoid flicker. Switching regulators: 100 kHz to several MHz.
Is average voltage the same as DC?
For resistive loads with filtering, yes. Without filtering the load sees pulsed voltage.
How does PWM save power vs. linear?
The switch is either fully on or off, so it dissipates minimal power compared to a linear regulator which drops voltage as heat.
Ready to run the numbers?
Open PWM Duty Cycle Calculator