Show by Label

Tuesday, August 11, 2015

Controlling a temperature driven Fan with PWM

Because I need a fan for my power supply project, I started a little project to do that.
I don't like noise or hum, so I wanted to use a fan that would be off when not needed.

Typically, by using Pulse Width Modulation (PWM), rather than a voltage, you can precisely control the speed of the fan, and ramp it up when needed.

I was able to find some clever methods to implement this, and pieced together this design:

The building blocks are relatively simple. I use a DC-DC convertor, not a linear one, to bring the 24V DC to 5V, because a linear LM7805 would get too warm burning off the excess voltage.
I use a comparator with hysteresis to determine the starting point of the fan, based on the temperature reading (in ohms) of a thermistor that is mounted on the heat sink. I don't have the datasheet for the thermistor, but found that it gets from 10K at room temperature to about 5K when the heat sink is getting really hot.

I need 5V for the fan, because I have one that is only 10mm thick, and that is what I have room for.

The clever trick of this circuit lies in the fact that the Control Voltage (CV) input from a 555 timer is used to control the PWM.

The 555 is producing pulses, and the pulse width, and also a bit of the frequency is varied by applying a voltage to the CV input. The output of the 555 goes to a FET that drives the fan.

The whole thing works very well, although the low pulse frequency can be heard from the fan, so I needed to use C4 and C5 to remove that chirping sound.

There are two disadvantages of this design.
One is that you cannot regulate the full 100% of the pulse width. The minimum is OK at about 30%, it let's the fan spin very slowly, but the maximum is only about 70%.
The other disadvantage is that you cannot increase the frequency of the pulses above the hearing frequency of 20KHz, because then the effect of the thermistor on the PWM range is greatly reduced. 

In my application, that is not good enough, I need to be able to get to the maximum fan speed in order to keep things cool.

There are special fan/motor controllers that allow you to do that, so I have a couple of TC648VPA chips on order. Stay tuned.

The chips arrived and I made two different circuits. One for a 12V DC Fan I also ordered, and one for the 5V DC fan.  I used an Excel spreadsheet that is available on the MicroChip website to calculate the resistors (R1 and R2) to get the best starting and maximum fan speeds.




The TC648 works really well, and is a nice addition to my toolbox. Next step is to put the circuits on vero board and install them in the power supplies.

After playing and experimenting, I decided to make a few changes to the circuit. First, I implemented the VAS  pin. The explanation says to set the Auto-shutdown threshold with this pin, but it also sets the turn-on threshold. The nice thing is that the fan will be driven to full speed for a short period, making sure it turns on right away. This was a problem I noticed with the earlier circuit.

Second, I deleted the resistor that was in parallel to the NTC. I felt that with a 10K NTC, it didn't do much. I also experimented with C7, which sets the frequency to see if I could remove the audible noises at lower speeds. That only worked with a 10nF cap, but then the PWM spread is limited and therefore also the speed control. So I resorted to using the 1uF value.

BTW, after a lengthy search, I found the information about the NTC I was using, because I wanted to know the temperature curves. Unfortunately, the shop I got them from didn't mention the type or manufacturer. I have the TDK B57045K0103K000.

I also found a much more elaborate data sheet for the device here: http://ww1.microchip.com/downloads/en/DeviceDoc/21755c.pdf

And here is the latest version of the schematic:


3 comments:

  1. I would like to use this circuit but I have a few questions since I am not EE. Q1. Datasheet says nothing about C7. What is PWM frequency for 1 uF? When did you hear noise? Q2. I need to use this in my car. Input voltage fluctuates. Would you recommend 7805? Q3. My circuit will not have MOSFET because I have a dedicated motor driver (a physically separate package). When temperature is below the threshold, what happens to Vout? Does it float or go to ground? Thank you.

    ReplyDelete
  2. Hi Rupert,
    Lets see if I can help you a bit.
    Because you are referencing VOUT, I'm assuming you want to to use the circuit with the TC648, not the 555 circuit.

    Q1 Paragraph 2.2 of the TC648 datasheet mentions C7 and the frequency. You should also look at that for your Q3 answer.
    When the fan is switched by PWM, the coil is protesting, resulting in a whine. A capacitor across the pins will dampen the switching, or a higher frequency will move it out of your hearing range.

    Q2 If all you need to power is the TC648, a 7805 will do just fine, you can even go to the 100mA version.

    ReplyDelete
  3. This comment has been removed by a blog administrator.

    ReplyDelete