# Is this the correct way to make a temperature activated fan?

This circuit is being used outside a PC.

simulate this circuit – Schematic created using CircuitLab EDIT: @SupaNova The speed will increase with temp and the cutoff temp is 75℉.

• I don't think so. Are you looking for on/off control or variable speed control? Apr 22 at 21:38
• do this experiment ... connect the fan to 12 V power supply (use no resistor) ... it should start spinning ... what happens to fan speed when you connect PWM to GND? Apr 22 at 21:51
• How much does the resistance of the thermistor change over the range of temperature you expect? Given some nominal current drawn by the fan, how much voltage drop would you see across the thermistor over the given range of temps? Do you think this would accomplish your goal? More important point: the fan is not just a simple DC brushed motor with a blade, it contains other electronics that might require a relatively stable 12V supply. Lowering the voltage might have unpredictable results. The correct way to control this fan is to use the PWM input. Apr 22 at 21:53
• Another thing to consider is that the thermistor itself will heat up as current goes through it so it will end up at a much higher temperature than ambient. A simple way to do this with PWM would be to knock up a triangle wave generator with two op-amps (lots of schematics available for this) and have that feed into a comparator with your thermistor controlling the other input.
– vir
Apr 22 at 22:52

The average PC fan is not a simple motor that can be controlled by changing the supply voltage. The speed is varied by using a pwm signal. There should be plenty of examples on the interwebs on how to vary the speed based on temperature etc using an Arduino or suchlike. Note that this site is for Q and A and not a design on request service.

4-wire computer fans have been around for a long time. Most of them function according to a standard written by Intel (available here.) Having a standard means that any fan from any manufacturer can be controlled in the same way. In a nutshell, VCC and GND are power inputs with VCC usually being 12V. TACH is an output that pulses twice per revolution, and PWM is an input that is used to control the speed of the fan. Usually, the PWM pin has an internal pull-up which means that if you disconnect it, it will rise to 5V by itself. In the disconnected state the fan will run at full speed. If you connect the PWM pin to GND the fan will stop. Speeds between 0% and 100% can be achieved by applying a 25kHz Pulse Width Modulated (PWM) signal to the PWM pin. You didn't ask about controlling the speed of the fan, only turning it on and off, so I won't explain how to generate a PWM signal; there are many web sites explaining how to do it with an Arduino or similar.

So the right way to turn the fan on and off is to measure the temperature. If the temp is below some threshold temperature, then connect the PWM pin to GND. If it's above the threshold, then disconnect the PWM pin. There are MANY ways to accomplish that.

The circuit below uses a LM393 open collector comparator. A NTC thermistor and a fixed resistor form a voltage divider that depends on temperature; the output voltage rises as the temperature goes up. The LM393 compares this voltage to the output of a potentiometer used as a voltage divider. If the thermistor voltage is lower than the pot voltage, then the LM393 "turns on" connecting the PWM pin to GND. If the thermistor voltage is higher, then the LM393 turns off and disconnects the PWM pin.

This circuit can be improved in many ways, but the simplicity seems appropriate here.

• Accepting the simplicity idea, the circuit should always use hysteresis for the very slow moving input. Otherwise, this recommended/illustrative circuit has a known defect. Please can you edit to include these. It's adding two resistors (pull-up, feedback with realistic values), swapping the op-amp input pins and inverting the thermistor divider. Thanks. Apr 23 at 8:54
• EDIT: @SupaNova
– user279966
Apr 23 at 11:10
• @TonyM, I agree that hysteresis should always be part of a practical implementation, but this circuit is intended to be more illustrative. The LM393 is not an opamp, it's an open collector comparator with the output emitter connected directly to the negative supply (GND in this case.) A feedback resistor is not used here; it's not a linear circuit, it's simply on or off. As for the pull-up resistor, it's built in to the fan. 4-wire, 12V fans have internal circuitry that includes a 5V supply. There is a pull-up on the PWM pin to that supply. I did have the +/- pins on the comparator backwards. Apr 23 at 13:22
• (a) Unfortunately, it illustrates how to generate a noisy output with a slow-moving input so it's still bad advice. Why not advise a good circuit that coveres everything, it's a short easy step. Downvoting until modified, I'm afraid. (b) Ignore my op-amp typo, meant to say 'comparator' (have designed LM393 with hysteresis for mass production). (c) Pull-up is needed for hysteresis and for stand-alone testing/fault-finding without the fan, which is a practical consideration. Apr 23 at 13:31
• @TonyM, I've thought carefully about your comments, and while I respect your opinion I choose to not make the changes you are asking for. I understand that you don't find my answer as useful as you would like it to be, but I feel that it serves the purpose of illustrating how to control a 4-wire fan. Of course, you should feel free to provide your own solution. Apr 24 at 16:41