Duty Cycle Calculator – Calculate PWM Duty Cycle
Calculate duty cycle, on-time, and off-time for PWM signals. Essential for motor control and power regulation.
How to Use This Duty Cycle Calculator
Enter on-time and period values
Input the on-time (how long the signal is high) and the total period time. Both values should be in the same units, typically seconds or milliseconds.
Or use frequency and duty cycle
Alternatively, enter the frequency and desired duty cycle percentage. The calculator will determine the on-time and off-time for you.
Click Calculate to see results
You will see the duty cycle percentage, signal frequency, period, and the on-time and off-time durations for your PWM signal.
Common Duty Cycle Applications
| Application | Typical Duty Cycle | Purpose | Frequency Range |
|---|---|---|---|
| LED Dimming | 1-100% | Brightness control | 100 Hz - 1 kHz |
| DC Motor Speed | 10-90% | Speed regulation | 1-20 kHz |
| Servo Control | 5-10% | Position control | 50 Hz (20 ms period) |
| Buck Converter | 10-90% | Voltage step-down | 50-500 kHz |
| Boost Converter | 10-80% | Voltage step-up | 50-500 kHz |
| Class D Audio | Variable | Audio amplification | 200-500 kHz |
Note: Duty cycle determines the average power delivered. Higher duty cycle means more on-time and higher average output.
Understanding Duty Cycle and PWM
What Is Duty Cycle?
Duty cycle is the percentage of time a periodic signal is in its active (high) state. A 50% duty cycle means the signal is high for half the period and low for the other half. A 25% duty cycle means the signal is high for one-quarter of the period. Duty cycle directly controls average power delivery.
PWM Basics
Pulse Width Modulation (PWM) varies the width of pulses while keeping frequency constant. By changing the duty cycle, you control the average voltage or power without changing the supply voltage. This is highly efficient because the switching element is either fully on or fully off.
Duty Cycle Formula
Duty cycle equals on-time divided by period, multiplied by 100. D = (T_on / T) × 100%. The period is the inverse of frequency: T = 1/f. Off-time equals period minus on-time: T_off = T - T_on.
Frequency Considerations
PWM frequency affects performance. Too low and you get visible flicker in LEDs or audible noise in motors. Too high and switching losses increase. For motors, 1-20 kHz works well. For LEDs, 100 Hz minimum to avoid flicker. Power supplies often use 50-500 kHz.
PWM Design Tips
Choose the Right Frequency
For motor control, use 1-20 kHz to avoid audible noise. For LED dimming, use at least 200 Hz to prevent visible flicker. For power converters, higher frequencies allow smaller components but increase switching losses.
Mind the Dead Time
In H-bridge and half-bridge circuits, add dead time between switching transitions. This prevents shoot-through where both transistors conduct simultaneously, causing high current spikes and potential damage.
Use Proper Filtering
PWM outputs often need filtering. Motors have inherent inductance that smooths current. LEDs may need current-limiting resistors. Power supplies require LC filters to convert PWM to smooth DC voltage.
Consider Minimum On/Off Times
Some loads need minimum on-time or off-time. Motors need minimum pulse width to overcome friction. Switching power supplies have minimum on-time limits. Ensure your duty cycle range accounts for these constraints.
Frequently Asked Questions
What does a 100% duty cycle mean?
A 100% duty cycle means the signal is always high (on) with no off-time. The output delivers full continuous power, equivalent to a direct connection to the supply. There is no PWM effect at 100% duty cycle since the signal never switches off.
How do I calculate duty cycle from frequency?
First find the period: T = 1/frequency. Then duty cycle = (on-time / period) × 100%. For example, at 1 kHz (1 ms period) with 0.25 ms on-time, duty cycle = (0.25 / 1) × 100% = 25%.
What frequency should I use for PWM motor control?
For DC motors, 1-20 kHz is typical. Below 1 kHz, you may hear audible whining. Above 20 kHz, switching losses increase without benefit. Small motors can use higher frequencies. Large motors often work well at 2-8 kHz.
Why does my LED flicker with PWM?
Flicker occurs when PWM frequency is too low. The human eye can detect flicker below about 100 Hz, especially in peripheral vision. Use at least 200 Hz for general lighting, 1 kHz or higher for camera applications to avoid banding in video.
What is the difference between duty cycle and frequency?
Frequency is how many complete cycles occur per second. Duty cycle is what percentage of each cycle the signal is on. You can change duty cycle without changing frequency, which is how PWM controls power while maintaining constant switching rate.
Other Free Tools
Pwm Frequency Calculator
PWM Frequency Calculator – Calculate PWM Output Frequency
Frequency Calculator
Frequency Calculator – Calculate Frequency from Period and More
Rc Time Constant Calculator
RC Time Constant Calculator – Calculate RC Circuit Time Constant
Rl Time Constant Calculator
RL Time Constant Calculator – Calculate RL Circuit Time Constant
Rlc Resonance Calculator
RLC Resonance Calculator – Calculate Resonant Frequency
0 100 Acceleration Estimator
0-100 Acceleration Estimator – Calculate 0 to 100 km/h Time