I plan to have a thermistor attached to a CPU heatsink control the speed of a computer case fan.

For temperatures below 30c (room temp) I want to stop the fan, and for temperatures at or above 60c, I want the fan to run at full.

I've heard someone tell me it's better to use PWM to control the speed since I won't be dissipating so much heat, but it feels silly to use a whole arduino to control a computer case fan. So unless you try to convince me that's a better approach, what I would like is to scale the response of the thermistor to a range of resistances that more closely approximates what the fan needs to reach those goals.

I know I can add to the resistance of a black box with a resistor in series, but I don't know how to scale the output resistance of the termistor. (note: I'm leaning towards this one)

Any advice?

(PS - this is an educational hobby project; I know I could get a simpler premade solution off the shelf)

(PPS - I'd be open to using the 3-pin "fan 2" output from my motherboard (asrock A75M mini-itx), which is already controlled by a temperature, but I don't know how to apply the pinouts to a simple DC case fan)

  • 1
    \$\begingroup\$ As it's an educational project and you seem to be familiar with the Arduino you could also take a look at using something like an ATtiny25 after getting it to work initially on an Arduino. They come in an 8-pin DIP and are only about $1. \$\endgroup\$
    – PeterJ
    Mar 25, 2013 at 6:53
  • \$\begingroup\$ The three-pin fan connectors are usually red (12V), yellow (tachometer reporting fan speed), black (ground). The fan control firmware may or may not work without a tacho. \$\endgroup\$
    – pjc50
    Mar 25, 2013 at 10:13
  • \$\begingroup\$ It is possible to make a pulse width modulator out of a couple op amps. \$\endgroup\$
    – Matt Young
    Mar 25, 2013 at 13:14

4 Answers 4


Yes it's silly to dedicate a whole arduino to running a fan. But, step back and think what a arduino really is. It's a little microcontroller with a lot of sugar coating around it. You don't need all that stuff to make a fan run, so use a microcontroller directly. There are many many small and cheap micros that are totally appropriate for dedicating to running a fan. Most arduinos use Atmel micros inside, but there are also PICs from Microchip, MSP430s from TI, etc.

You really want to use PWM because it will waste less power, making less heat, requiring less means to get rid of the heat. Even a few 100 Hz is good enough to run a fan. There are plenty of small and cheap micros with PWM generators built in. Once you set it up, you write the duty cycle value to a hardware register, and the rest is hardware that drives the fan proportional to that duty cycle value.


You need to calibrate the thermistor, which in short means taking measurements of the resistance (of your entire circuit including the thermistor and any added resistors at known temperatures). This will give you the 'scale' you are looking for. Here is a good site that explains in a bit more detail:


Obviously, this method only works if you have another 'calibrated' method of determining temperature.

Also, one major pitfall here is notice the graph of the 'typical' thermistor. Notice values outside the curve would likely not be of value. But in this case that exceeds 100 C. Just note that it is important to choose a thermistor of appropriate value.

  • \$\begingroup\$ Sorry, maybe I wasn't clear... the data sheet shows the response curve for the thermistor. I need to scale it, meaning apply a scaling factor. So that the response curve more closely matches the range of resistances that will properly throttle the fan. \$\endgroup\$
    – ColinK
    Mar 25, 2013 at 13:30

Another suggestion is an Op-Amp and 555 timer IC based circuit. We use one op-amp for knowing that when does the temp goes over 30 and another to know when it goes over 60. The circuit is shown below: enter image description here

The OP1_min output goes to high when the temp goes more than 30. At this time if temp were below 60, the OP2_max will be low (or ground) The Astable circuit will become active. We should set the needed frequency (high and low time of output) by choosing R9,R8 and C1 from wikipedia. If the temp goes more than 60, OP2_max output goes high and forced the output of the 555 to high. and the Fan speed goes max.

OK, Now we just have to know the value of R1-R5. the min voltage should be equal to sensor voltage when it is at 30 and the high voltage should be equal to sensor voltage when it is at 60.


If you throw enough current through a thermistor to drive a fan, you'll be self-heating the thermistor and screwing up your control.

I'd suggest splitting this into two or three problems

  1. sensing the temperature, using a low current circuit to generate a voltage related to temperature
  2. using this voltage to figure out how fast the fan needs to go
  3. actually driving the fan at that speed.

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