What is PWM Duty Cycle?
Pulse Width Modulation (PWM) is a powerful technique used to control the average power delivered by an electrical signal. By switching a signal between high (on) and low (off) states rapidly, we can simulate varying voltage levels. The "Duty Cycle" is the percentage of one period in which a signal is active (high).
A 0% duty cycle means the signal is always off, while a 100% duty cycle means the signal is constantly on. For example, in LED dimming, a 50% duty cycle results in the LED being perceived at half brightness because it is only receiving power half of the time.
How to Calculate PWM Duty Cycle
The calculation for duty cycle is straightforward. It requires knowing the amount of time the signal is in its "high" state versus its "low" state. The formula is as follows:
- Total Period (T): Time High + Time Low
- Duty Cycle (D): (Time High / Total Period) × 100%
- Frequency (f): 1 / Total Period
Common Applications of PWM
PWM is ubiquitous in modern electronics. If you are working with microcontrollers like Arduino, Raspberry Pi, or ESP32, you are likely using PWM for:
- Motor Control: Adjusting the speed of DC motors without losing torque.
- LED Dimming: Controlling brightness levels in smart lighting and displays.
- Audio Signal Generation: Creating sound waves or controlling buzzers.
- Power Supplies: Switching regulators use PWM to maintain constant output voltage.
- Servo Motors: Precise positioning of robotic arms and steering mechanisms.
Frequently Asked Questions
What unit should I use? Our calculator supports Seconds (s), Milliseconds (ms), and Microseconds (µs). Most high-frequency PWM signals operate in the millisecond or microsecond range.
How does Frequency relate to Duty Cycle? Frequency is how many times per second the signal repeats its cycle. Duty cycle determines how much of that cycle is 'active'. While they are calculated using the same time components, they control different aspects of the signal's behavior.