Wed 27 Jun 2007
How to make a temperature-based fan controller without a thermistor
Posted by nico under Circuits , HOWTOFrom a design standpoint, the only complaint I have about my Shuttle small form factor desktop is the extremely fragile on-board fan controllers. All three have died over the past two years after being used to regulate the single on-board fan with respect to the system temperature. The last one gave up the ghost a few days ago as my machine suddenly shut down and a red light came on inside.
Figuring that I should just go build a more substantial fan controller myself, I promptly went to the lab to look for a thermistor. Unable to find one, I settled for the next best thing: a diode. As a review, a diode is typically created by placing a volume of p-type silicon next to a volume of n-type silicon. At the interface of the two materials, the excess holes on one side and excess electrons on the other side pair up creating a depletion layer which is free of mobile charge, but has a net positive charge on the former n-type side and negative charge on the former p-type side. To complicate things, hole-electron pairs are constantly generated in the depletion region, among other places, due to thermal agitations proportionally to the junction temperature. The net uncovered charge in the depletion region generates a local electric field which forces the holes to the p-type side and electrons to the n-type side typically resulting in a measureable reverse current (since forward biasing on the diode would be conventional flow from the p to n-type side). A typical reverse current versus temperature plot is illustrated above for a 1N4148 diode.
I decided to power my device off the +12V bus in the PC using a power connector that I removed from a broken CDROM drive. I put the 1N4148 diode (in reverse) in parallel with a 100pF capacitor and then in series with a 10MOhm resistor between +12V and GND. This signal was then buffered and fed into the inverting input of a summing 0p-amp circuit. The non-inverting input was connected to a reference voltage set by a 5kOhm potentiometer between +12V and GND. An improved design would have a 20kOhm resistor between one side of the potentiometer and the +12V rail for better dynamic range. The gain of this circuit was about 100 V/V to give the proportional controller increased bandwidth. Next, the output of this stage was connected to the ADJ pin of a LM317 positive voltage regulator. Because of the LM317 design, Vout will always be ADJ + 1.25V, so the regulator would supply adequate current to the fan based on the ADJ voltage. Finally, the current return path from the fan goes through a pair of large, forward-biased diodes to facilitate a ~1.25V drop to compensate the 1.25V minimum output voltage of the LM317. This is so that when the voltage coming out of the summing amplifier is 0V, and then Vout is 1.25V, no current flows through the fan since the other side of the fan requires a voltage of greater than 1.25V for current to flow. On a final note, care should be taken in the selection of the op-amps employed here. It is important to pick CMOS devices that have rail to rail output so that zero current through the fan is possible.
After building the circuit, I tested the output with a DMM and applied various amounts of heat using a hot air gun. For the final install, I simply stuck the diode inside the CPUs heatsink/heatpipe assembly, connected the device to power and the output to the fan. I used some diagnostic software that can read mainboard temperatures to set the threshold on the potentiometer to something sensible. If you end up building this and think that the fan approaches full speed too quickly (slowly), then simply change the 50kOhm feedback resistor to something smaller (larger). Lastly, don’t forget that he heatsink clip on the LM317 is tied to Vout, so don’t let it touch the case of the PC.
( temp-fan.pdf ) <– schematic!
del.icio.us |
digg
HOW TO - Make a temperature-based fan controller without a thermistor…
Nick made a temperature-based computer fan controller that use a reverse-biased diode for temperature sensing - From a design standpoint, the only complaint I have about my Shuttle small form factor desktop is the extremely fragile on-board fan contro…
Is it possible to use a 741 op amp? (Two, in fact)
Besides a resistor in series with the pot, the first op-amp could be configured to have gain, in the non-inverting configuration, Zin would be the same. An LM335 temp sensor would have been another alternative for the sensor.
I would consider shunting the load with a fast, reversed diode. Antispiking the load should help longevity.
Using the voltage regulator as an output device is clever, and has its appeal, but similar advantages could have been achieved by using a NatSemi temperature controlled transistor from the classic era. Another choice would have been a MOSFET.
Nice! Sweet and simple, very straight-forward proportional controller… The only thing that struck me was in the schematic: You appear to be buffering and comparing the diode’s reverse voltage, not the reverse current! Shouldn’t the diode/cap be switched with the 10Meg resistor?
Dave
Thanks for the comments everyone!
I don’t think that the 741’s input bias current requirement will work well with the present sensor design. The 741 won’t do rail to rail output either, but I am not sure how much of a problem it will be in this design.
Regarding the first op amp having gain, I just got lazy and didn’t want to put extra components (resistors) on the board. You have a very valid point with the anti-spiking diode since the load will be mostly inductive. The reason that I selected a LM317 (and 1N4148 diode) is that it what was available on hand. It would have been fairly straightforward to use a Darlington pair to drive the fan with appropriate biasing.
Lastly, the diode can be treated as a current source, but I am sensing voltage, so I am really measuring the voltage across the 10M resistor due to the reverse diode current. The operational amplifier employed has effectively infinite input impedance so it doesn’t load the sensor circuit appreciably.
I’ve been using diodes for temperature sensing a lot of times, but using the forward voltage, which is much easier to sense.
Feed some tiny current (so it does not heat up it) thru the diode and measure the voltage drop, or compare it to the drop on another diode, which is located in different location.
That is right, the forward voltage drop would be easier to sense. The one saving factor is that I am operating in the 50-80C temperature range, so the reverse current is more appreciable than room temperature.