Here's one way to do this with a few transistors and resistors:
R1 is the thermistor, which goes lower in resistance as its temperature rises. When that happens, Q1 is turned on, which turns on Q2, which turns on the relay, which turns off the motor. The normally closed contact of the relay (pins 1 and 4 in this example) are in series with the motor on the hot side of the AC line.
R5 provides a little positive feedback to get snap action instead of fading the relay on and off. This is better for the relay and for overall operation.
R1 and R2 form a voltage divider. The relay will be energized (motor turned off) when the output of this divider gets to about 600 mV. In this example, that means the thermistor trip resistance is about 73 kΩ. You will need to adjust R2 to set the trip point for whatever thermistor you actually get.
Much lower thermistor values, with accordingly lower R2 values, will work, but be aware of self-heating. At the trip point, the thermistor will have about 4.4 V across it. The dissipation of the thermistor is therefore
W = 19.4 V2 / R
where R is the resistance of the thermistor in Ohms, and W its dissipation in Watts. You want to keep W below a few 10s of mW. Working backwards using 25 mW as the maximum dissipation, that means the thermistor must be 776 Ω or more at the trip point. Fortunately thermistors of a few kΩ are easy to find.
As I said above, R5 sets the hysteresis size. You probably need to experiment to find what provides snap action without causing a overly large hysteresis band. I'd start with the current thru R5 about 1% that of R2.
As others have said, use a cheap wall wart that runs from the same power the motor is driven with to get the 5 V.
You can make your circuit work with an NTC.
I was unable to get the 555 component to work in the simulator, so I built just the threshold components using an Op-amp. It was fun to get going in Circuit Lab.
The box on the left shows the components for charge/discharge of the capacitor.
R2 and R3 represent what you originally showed as a potentiometer, but in this case it's easier to test with just two resistors in the simulator.
If you make R3 the NTC, then the duty cycle increases with an increase in temperature.
If you made R2 the NTC the duty cycle would reduce with an increase in temperature.
The major problem with circuits such as this is that as the duty cycle is increased the frequency changes too. While the fan should be insensitive to the frequency, it's still a pain.
You also need to consider that this isn't exactly PID, so it won't ever increase the fan speed to overcome a temperature increase. So your PC/device will increase in temperature, you cannot maintain a fixed temperature.
simulate this circuit – Schematic created using CircuitLab
Waveforms from the simulator:
Best Answer
20°C to 100°C is a fairly wide range for a thermistor with \$\beta=4080\$- you will be dealing with a large dynamic range (about 30:1) or you will have to add some parts to sort-of roughly linearize it.
If you measure the resistance you can use the Steinhart–Hart equation to calculate the temperature from the resistance.
The resistance change of a 10K thermistor for 0.1°C at 20°C is about -58 ohms. At 100°C it is more like -1.9 ohms, so the measurement at higher temperatures will tend to be noisy or jumpy (perhaps quantization noise) if the resistance measurement is linear.
Cheap temperature meters convert the resistance into a relative frequency count (digitally) compared to a reference resistor and use an equation, however the measurement is done typically to a resolution of more than 12 bits.
The simplest way with an ADC (as in your Arduino) is to use a series resistor to Vdd close the thermistor resistance at the temperature of most interest to get a ratiometric measurement. For example, if your most important temperature is 60°C you might pick something like 2.490K (that will cause some self-heating that has to be evaluated). Then it's straightforward to calculate the resistance from the ADC count, and then use Steinhart-Hart for the temperature (or a simple lookup table is better in this particular case, which can be pre-calculated using Steinhart-Hart). You don't need the op-amp at all.