What is PWM (Pulse Width Modulation)?
As we all know, there are two main types of electrical signals i.e. AC and DC. Both of these signals are used as a power source for different types of electrical appliances. Now if we have a look at these electrical appliances, they operate at different voltage levels and may also need variable voltage supply(as in fan dimmers). So, there was a need to generate variable voltage supplies with minimal power losses, as other methods(i.e. step-down transformers etc.) dissipates energy and thus wasn't that effective. Different techniques were designed for achieving variable voltage levels and one of them is called PWM(abbreviation of Pulse Width Modulation), which is considered to be the most effective one.- In PWM, we simply turn on and off our power supply at equal intervals and thus reduces the average power of the signal.
- As shown in the below figure(A), I have taken a 5V DC signal and divided it into three equal intervals, each interval representing one cycle.
- In figure(B), for each cycle, the power is ON for the first half, while it's OFF for the second half.
- So, we can say that we are simply switching our DC supply at equal intervals(in this case interval is 50%).
- If we perform this switching using a manual switch(which must be really slow), we will get 5V when the switch is ON and 0V when the switch is OFF, the circuit is shown in figure(D).
- But, if we replace this manual switch with an automatic switch(i.e. Mosfets, IGBTs, FETs etc.), we can achieve fast switching in the range of nanoseconds.
- This fast switching of the electrical signal will reduce its average power but the output will remain continuous and for the 50% ON/OFF cycle, the output of 5V signal will be around 2.5V, as shown in figure(C).
- In figure(C), the output signal is shown in blue color, which is of 2.5V but the actual PWM signal is switching ON/OFF and shown in orange color.
- The percentage for which signal remains in ON state in one cycle is called the duty cycle(we will discuss it in detail later).
- In the above example, the duty cycle of the PWM wave is 50%, that's why its output is exactly half, as we are turning it OFF for the remaining 50%.
PWM Definition
- PWM(short for Pulse Width Modulation) is a modulation technique, used to step down the voltage level(average power) of electrical signals(both AC & DC) by varying their width(ON duration) using fast-switching.
- If a voltage source is
PWM in DC Signals
- Switching Frequency.
- Duty Cycle.
Switching Frequency
The frequency(or rate) at which the transistor is operating is termed as switching frequency. Normally microcontrollers are used to generate the PWM pulse but in small circuits, 555 Timer is also used. A normal 8-bit microcontroller can generate a PWM pulse ranging from 4MHz to 80MHz, let's say if we are generating a PWM pulse of 20MHz:t = 1/f
t = 1/20MHz
t = 0.066us
So, the time period of a single PWM pulse is 0.066us, that's how fast it's switching.Duty Cycle
In one cycle of PWM pulse, the ON period of pulse is termed as duty cycle. So, if the transistor is switching at 50%. If you have ever worked on a DC Motor, you must have noticed that its speed varies as we change its input voltage. If I am working on a 12V DC motor and it's rotating at 500RPM(let's say), so if I reduce its voltage from 12V to 6V, its RPM will reduce from 500RPM to 250RPM(ideally). In the PWM technique, electrical signals are passed through a fast switching device(i.e. FETs, MOSFETs, IGBTs etc.), these transistors are programmed to chop off the electrical signal at equal intervals. PWM is a process mainly used for getting an analog signal using a digital source.- It is nothing but a controller that controls and handles the input current applied to the load.
- PWM technique can be easily defined in terms of duty cycle and the frequency it takes to repeat the duty cycle per second. The duty cycle highlights the amount time the signal switches between ON and OFF position. It is described in percentage. If the signal remains ON half of the total duty cycle and remains OFF in another half, then the duty cycle will be 50%.
- The PWM controls the duty cycle of the signal which consequently controls the speed of the motor.
- The frequency requires for PWM process will vary as per the nature of the applications. Some require fast duty cycle for controlling the load at a faster pace while some need a low duty cycle in order to keep the process smooth and away from power losses. More often than not, the response time of the load sets the pathway for the frequency required for the PWM.
- Using PWM for controlling the motor has a leg over the simple varying the analog signal to the motor. As the analog signal applies the power to the motor with continuous variation, failing to keep the motor terminals completely OFF or ON, as a result, power loss occurs during this process, however, PWM delivers the power in pulses that keep the motor terminals either in fully ON or OFF state.
LED Example
Controlling the RGB LED is a perfect example for understanding the concept of PWM. By varying the amount of duty cycle of each color and playing around with their brightness will give a specific color every time. Avoid adjusting the duty cycle with the same magnitude for every color, doing this will give a white light. If you are applying red light with 10% duty cycle at 2 MHz speed, then most of the time red light will appear OFF as you see. Yes, it will turn on for the small amount of time but it appears as it is not taking part in the flash created by RGB LED. Similarly, applying red light with 10% duty cycle at 100 MHz will increase the contribution of the red light in the LED as it will turn on will greater pace as compared to applying it with lower frequency.Computer Motherboard
The computer motherboard is another example that requires PWM signals for its fan to be running with the power pulses. If power is given continuously without PWM, it may cause a severe harm to the board, as the board will run with full speed without any pause. Pulses of power keep the board in a constant loop, where power signals are given in quick successions that keep the fan running. If you buy a new computer, you may notice a 4 pin PWM header is added in the fan that controls the cooling process of the board. The point worth mentioning here is that the PWM generated with sloped duty cycle is preferred over generating it with a flat one. As the later one is more vulnerable to creating a clicking sound when the fan runs at low speed. Similarly, when the duty cycle approaches 100%, the fan will run with full speed, creating an unpleasant ticking sound. In order to alleviate the bothering sound, some quality fans come with IC drive chips, allowing the fan to run smoothly without creating any sound. You may need extra bucks for buying the quality PWM fans that not only retain the quality but also help in increasing the overall lifetime of the board.Applications
- DC and Servo Motors
- Heating systems,
- Hydraulics
- Control valves,
- Pumps
- Telecommunication
- Computer applications