The first step of any project is to figure out the top level layout. I have added the arbitrary constraint that this design will not use a microcontroller or any other high level component. Just want to do something more.... analog. Previously we figured out the building blocks, and actually worked off of a mental layout that is pretty much shown below.
It's really quite basic, but shows each part in need of design. I did add the Fan Driver as an afterthought because we will need a means of driver large current to the fan. But this shouldn't be too complicated, probably just a MOSFET. Actually, we might as well knock this part out first since it will be simple.
OK, so slightly more than just a MOSFET. Barely. A diode is placed in parallel with the fan to prevent a small catastrophic catastrophe. Let's consider this simplified model:
The fan has been replaced by an inductor and our PWM source (V2) is 100Hz with a 50% duty cycle. On the right I'm showing conceptual ON and OFF state circuits where our MOSFET goes between a very small and very large impedance.
Pushing current through an inductor is a lot like starting your bike from a stop while in a high gear. If you apply some pretty stiff force you can actually accelerate pretty quickly though you will feel quite a bit of resistance from the bike. And as you get up to speed you'll start to approach a steady velocity, and the bike will feel much easier to pedal. The inductor behaves somewhat similarly. When a voltage is applied, the current has to "accelerate" over time to a steady state. The graph below shows an inductor being charged then discharged several times.
Unfortunately the bike analogy falls a little short because charging and discharging the inductor has the behavior. You can coast on a bike to a stop, or apply brakes, but neither reflects the behavior of pedaling. The important thing to grasp here is that current through an inductor can not change instantaneously, even though the voltage applied can (in an ideal world). It's almost like the current has a momentum.
So what happens when a branch get stuck in your spokes? You flip over the handle bars. The bike has stored up energy while at speed, and when the wheel is suddenly stopped it is dissipated in the form of you flying through the air and landing on the pavement. This is the same as the MOSFET turning off. An open circuit is basically an infinite resistance, or in my little example above, a very large resistance. Let's suppose the device is switched on, given our values we'd see 24A flow once the inductor is charged up (I = 12V / .5Ω). Now the MOSFET is suddenly turned off. We know that the current through the inductor won't change immediately, so what happens to voltage across the MOSFET? Well, Ohm's law: V = 24A * 5MΩ. That's 120 megavolts! Where there's smoke, you're spending a buck on a new transistor. My example is totally unrealistic for many reasons, but the concept is there. The circuit above simulated with the an IRF510 and with the fan inductor having a series resistance of 10Ω yielded this result:
Sure enough, there are voltage spikes. The green signal is our PWM signal that turns the MOSFET on and off; the blue is the Drain pin of the MOSFET. And as predicted, when turned off there is a very large but brief voltage.
Back to the backwards diode. Now when the MOSFET turns off, the current has somewhere to go. It just cycles back through the motor until the stored up energy is depleted. No more voltage spikes.
This is commonly known as a freewheeling diode or a flyback diode. It is good practice to throw them on any inductive load being driven by a switched DC source, such as relay coils, solenoids, and DC motors in general. That's enough for the Fan Driver circuit. Next time we'll start to figure out how to control it.












