What is PWM?This info is taken with Uller's permission from http://casemods.pointofnoreturn.org/pwm
There are two ways we can reduce the fan's speed.
|The most common way, and the simplest, is to reduce the amount of torque on the fan by reducing the voltage supplied. This is called linear regulation. You can either directly change the voltage supplied (the "7 volt trick", voltage regulators, and step-down transformers - also called DC-DC regulation) or put a resistance in series with the fan, creating a voltage drop (resistors and rheostats).|
Like everything in electronics, voltage adjustment for fans has pros and cons:
- Circuitry in the fan to report RPMs or failure still work.
- There's no noisy side effects from linear regulation - no buzzing, groaning, etc from the fan.
- The torque, although less than normal, is still a steady reliable force, so you won't reduce the life of your fans.
- The excess voltage needs to be dissipated somehow - with the exception of the 7-volt trick and stepdown transformers, all of the solutions above dissipate it as extra heat in the case - and a lot of it - which defeats the purpose of fans. To compound it, it's impossible to properly heatsink a rheostat.
- A fan has a minimum torque (about 60% in most cases) needed to spin, so you can't do low speed.
- A fan pulls more current at lower voltages.
|The alternative approach is PWM which keeps the fan spinning with a rapid stream of "taps" - small hard pulses of full torque (i.e. 12V) that keep the fan's inertia up, and no power in between - instead of a low constant torque. Just like linear regulation, this has pros and cons.|
- Almost no heat is produced by the circuit - you may even be able to use it without a heatsink.
- Maximum torque is applied when it's pulsed on, so you can keep the fan spinning VERY slowly if you do wide pulses that are spread out far apart.
- Fans pull a constant predictable current when the pulse stream is "on", regardless of how long the pulse lasts.
- Since there's no constant power for the circuitry in the fan, RPM sensing/failure detection will be erratic at best.
- If the pulses are too fast or too slow, the fan may groan or whine at low speeds.
- The switching is is hard on the fan's coils, so your fan's lifetime might be very very slightly reduced. It'll change the MTBF, by a few days - but in most cases, the MTBF will actually be increased, since the decreased fan speed effects it much more than the increased winding stress. MTBF means "mean time between failure" and is a reliably statistic which expresses the average time a system will operate without a failure.
|The most important factor of a stream of pulses is the duty cycle - it's the ratio of how much time the pulse is "on". For example, 50% duty cycle means the pulse stream spends equal times on and off. 75% duty cycle means 3/4 of the time it's on, and 1/4 of the time it's off. And so on - obviously, 0% means it's off all the time, and 100% means it's full 12V all the time.|
(Remember - duty cycle is the ratio of on time to total time, and not on time to off time.)
|With that in mind, there's two things to adjust in a pulsed setup like this - the on time and the off time. It's a pain in the ass to put separate controls for both - plus, it's the ratio that matters, not the individual settings.|
In practice, what we do is adjust the on time, and regulate the off time to match - so, every pulse STARTS at a regular interval, and we just adjust how long that pulse is. The number of pulse starts per second is called the frequency. Our goal is to keep the frequency constant, and adjust the width of the pulse - this means that as we adjust the on time, the off time needs to decrease, so that they both add up to the same amount of time.
So, what frequency do we use? The lower the frequency used, the slower we can turn the fan, since pulses can be longer and farther spaced - however, fans tends to groan or whine if the pulses come too slow, since it has time to speed up and slow down between pulses. At the same time, we don't want it too fast, or the duty cycle won't be as effective, and it may be so high that you can actually hear it switch on and off as a musical tone.
For simple brushed fans, used in power drills and other machinery, you regularly see frequencies in the range of 5 kHz to 50 kHz (1 Hz = once per second, 2 Hz = twice per second, etc... 1 kHz = 1000 Hz). However, with brushless fans, the electronics inside need time to detect the fan's position and create the correct magnetic field on its coils. So, for brushless fans, we want between 20 Hz and 160 Hz.
Since we're keeping a constant frequency but allowing the length of the pulse to be adjusted, this technique is called pulse width modulation, or PWM for short.