Found a circuit on the net that should do exactily what I want (control a cooling fan) but it is 'on' all the time. Not sure if there is an error with the schematic or if there is something else I've missed.

If the thermistor is 'cold' the fan should be off. As it heats the fan should come on. At the moment the fan is always on. I've double checked my wiring etc and am sure I have it as per pic. I have substituted R4 for a 10K trimmer to allow temp trigger adjustment.

Here is the circuit diagram: Circuit Diagram

Here is the article I'm working from.

UPDATE: Made a simulation (using Qucs) to see how the circuit should behave. I used the resistor's actual values I measured with the multimeter (see discussions below). Here is a screenshot:

enter image description here (note: I could not find a fan in the parts bin so I inserted a diode for effect)

Could there be a terminal problem with the op-amp that is messing up the voltage levels? It is brand new, but it is not to say it hasn't been static zapped.

ANOTHER UPDATE: Decided to use Qucs to see what the circuit might do if the thermistor was 'heated'. Picking a value for R1 at random, it came up with this: enter image description here This simulation shows the op-amp bias changing to produce a 'low' output, however, Q1's base is still high and causing approx 2.4V drop on the fan. For those following the conversation with @vicatcu below, this suggests that there may be a design floor in the circuit. Anyone know what else could be holding Q1 in the 'ON' position?

741 OP-AMP datasheet

UPDATE #3: Using some of the pointers given, I managed to make a working simulation of the circuit. enter image description here

The top circuit is with the thermistor 'cold' and other than the leakage current, the fan is practically 'OFF'! The bottom circuit shows the thermistor 'hot' with a comfy 11.4V driving it. The trick now is how to achieve this using a single power source! I intended to use a single 12V power pack to drive the circuit. These circuits have dual supplies. I tried simulating with a voltage divider to split the voltage from a single source, however, when the thermistor drops when 'hot' it drags the voltage across the circuit to about 2V and the fan gets about 0.8V. Not exactly 'ON'. I do have some spare 9V power packs, so can use a 12V and a 9V pack to power the circuit in the above configuration, but if I can get away with a single source, that would be ideal. Especially if people in the future wish to build the circuit themselves.

UPDATE #4: Here is a rough plot of the thermistors resistance as temperature changes (in degrees celcius) Thermistor Vs Temperature Chart

  • \$\begingroup\$ and of course you've adjusted the pot and checked all of the resisters values with an ohm meter? \$\endgroup\$
    – kenny
    Commented Jan 28, 2012 at 15:30
  • 1
    \$\begingroup\$ What is the voltage on pins 2, 3, and 6 of the op-amp? \$\endgroup\$
    – user3624
    Commented Jan 28, 2012 at 17:48
  • 1
    \$\begingroup\$ Using a diode instead of a fan is the wrong thing to do. Use a resistor instead. That's why the voltage at the fan doesn't vary that much between the two simulation runs. \$\endgroup\$
    – user3624
    Commented Jan 31, 2012 at 23:09
  • 1
    \$\begingroup\$ @AndrewHeath I think that clabaccio has the rest of the answer. To test his suggestion, power just the op amp off of +15v while keeping everything else at +12v. \$\endgroup\$
    – user3624
    Commented Feb 1, 2012 at 16:00
  • 1
    \$\begingroup\$ @clabacchio - Thanks for adding a link to the 741 datasheet. I often add links to exotic parts' datasheets myself, but I'm not sure it's really necessary for a commodity part like the 741. You don't add datasheets for resistors either, do you? \$\endgroup\$
    – stevenvh
    Commented Feb 3, 2012 at 12:16

3 Answers 3


I would add a couple of suggestions for the design:

  1. You are using 741 OP-AMP, which is not rail-to-rail, and you're using it for driving the base of a transistor: what happens is that when the output of the 741 is high, it will be at about Vcc - 1V, that is enough to keep the transistor on. I would suggest using a rail-to-rail OPAMP or adding a small resistance to the emitter of the transistor to limit the current when the input is high (could be even better because you mantain the fan at a slower speed but still cooling).

  2. When designing with sensors, such as photoresistors or thermistors, it's better to - first know the value at room temperature of these sensors - and then picking a potentiometer just bigger to simulate the behavior of this sensor, and check that the circuit is working.

UPDATE: from the datasheet, the typical voltage swing is 13-14 V (you can measure the exact maximum value just measuring the positive saturation voltage), and by design the lose in the range tends to be more in the upper rail, because the output stage has a \$ {V_{CE}}^{sat} + {V_{BE}^{ON}} \simeq 0.2 + 0.6 \simeq 0.8 V \$.


UPDATE 2: Now I see that you are powering your circuit at +12V / 0V, that is NOT the exact supply voltage specified for the 741 OPAMP: it requires a dual-rail, \$ \pm 15V \$ fix this as the first thing.

You can see as your OPAMP is outputting 10 V instead of 12, and 1.2V instead of 0; the first, with the drop over the resistor, makes the transistor always on, as you can see that the base voltage is 11V, enough to keeping it on.

And...why did you use a diode to simulate a fan??? Seems a quite different load.


I'm glad that it works, at least the simulation: however, you are still using a single rail supply (+12:0, +15:0). The 741 wants +15:-15, so the best thing to do is CHANGING THE OPAMP. It's not expensive at all and you can use a rail-to-rail (again), that is better for single supply applications, down to 3.3V if you need that; or, for your case, +12 or +5.

This is an option, here there is plenty, you have only to choose, based primarily on availability for your purpose. For the simulator, you can also find many options.

  • \$\begingroup\$ Could changing the current limiting resistor R5 help the transistor to bias OFF? \$\endgroup\$ Commented Jan 30, 2012 at 4:08
  • \$\begingroup\$ I don't think so, because when the Output of the OP-AMP is high, if the transistor is not completely off, will absorb a little current pulling up the base of the transistor, but it's a weak effect and probably not enough to turning it off \$\endgroup\$
    – clabacchio
    Commented Jan 31, 2012 at 13:33
  • \$\begingroup\$ are you able to provide an example of what you're describing (ie, how you would change the circuit using a rail-to-rail op-amp? \$\endgroup\$ Commented Feb 3, 2012 at 9:19
  • \$\begingroup\$ I think I know what you mean, but I need more info - like a suggestion on what op-amp I should use. I got the 741 from the original circuit, I'm not up on all the different op-amps available. I assume I should be able to 'plug and play' an appropriate alternative into the current circuit design and be all systems go!? Please also give thoughts if you thing the transistor should change too. \$\endgroup\$ Commented Feb 5, 2012 at 14:08
  • \$\begingroup\$ @AndrewHeath you can find many OPAMPS, for any purpose (check answer): what you need is rail to rail, 12V voltage span (you will find many different ranges, just check that it falls in) and don't worry about speed and current, because your application doesn't have particular requirements. \$\endgroup\$
    – clabacchio
    Commented Feb 5, 2012 at 14:58

What you've got here is basically a comparator driving the base of a PNP BJT.

A simplistic explanation is that the fan should turn ON when the BJT sees a "low" from the comparator and turn OFF when the BJT sees a "high" from the comparator.

The comparator outputs a "low" when the negative terminal (pin 2) voltage is above the positive terminal (pin 3) voltage, and a "high" when the positive terminal voltage is above the negative terminal voltage.

R3 and R4 form a voltage divider that sets the voltage on the negative terminal to a fixed value. With R3 and R4 both valued at 10kOhm, the voltage at the negative terminal will be Vcc/2.

Likewise, R2 and R1 (the thermistor) form a voltage divider that sets the voltage on the positive terminal, and that voltage consequently varies with temperature.

Update In summary:

  • Voltage at the negative terminal is: Vcc * R4 / ( R3 + R4 )
  • Voltage at the positive terminal is: Vcc * R1 / ( R1 + R2 )
  • Fan turns on when: R1 < R4 * R2 / R3
  • \$\begingroup\$ What positive feedback? Having positive feedback to create hysteresis is probably a good idea in this application, but I don't see it in the proposed circuit. \$\endgroup\$
    – The Photon
    Commented Jan 28, 2012 at 19:37
  • \$\begingroup\$ @Photon, I wasn't saying that positive feedback is a bad thing, just one of the hallmarks of a comparator configuration \$\endgroup\$
    – vicatcu
    Commented Jan 28, 2012 at 21:53
  • \$\begingroup\$ @Photon, on second thought you're right, there's no positive feedback in this particular circuit. \$\endgroup\$
    – vicatcu
    Commented Jan 28, 2012 at 22:01
  • \$\begingroup\$ Do you guys think reducing the value of R2 (say to 8.2K) would help bias the + input such that when the thermistor is 'cold' and around the 10K mark it will ensure the fan is OFF? \$\endgroup\$ Commented Jan 30, 2012 at 4:05
  • \$\begingroup\$ @AndrewHeath it totally depends on the measured resistance of your thermistor... \$\endgroup\$
    – vicatcu
    Commented Jan 30, 2012 at 7:06

Using the advice and information people have given me, I have ammended the circuit and used an LM339 Op-Amp which is a rail-to-rail Op-Amp. As it has 4 amps in the one package, I have added additional fans etc to compliment cooling. Here are the circuits:

Fan Off Fan Off

Fan On Fan On

Fan On - Using all 4 Op-Amps Fan On - Using all 4 Op-Amps

  • \$\begingroup\$ The LM339 is an open-collector comparator, not an op-amp. \$\endgroup\$ Commented May 28, 2013 at 8:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.