Tips on using a salvaged temperature sensor for a project.

I'm working on a project which monitors the temperature inside a media center cupboard, when a certain temp threshold it reached the fan turns on.

I managed to salvage a thermistor from an air condition unit. Could you please suggest on how I can check the accuracy of it and how can I make sure that its good to work with my project. (The thermistor seems to be in working order - the resistance changed with change in temperature).

I'll do a voltage divider and use an analog pin to read the temperature. How do I choose the resistor value, do I use the thermistor as R1 or R2?

Thanks in advance

For best accuracy response and sensitivity, choose a resistor that matches the resistance of the thermistor in the middle of the temperature range of interest.

do I use the thermistor as R1 or R2?

Either way. The code depends on which way you choose.

Accuracy isn't particularly relevant here is it? So long as it works its going to be able to turn a fan on
when its too hot.

Measure its resistance at a variety of known temperatures, plot the curve - its quite likely to
be a standard curve (what's its resistance at 25C?).

Pick a resistor of about the same resistance in the temperature range of interest.

You could simply wire up with a resistor and print the value of analogRead while heating the thing
to the temperature you want the fan to switch on at. Then use that value in your code without
the code ever having a notion of a temperature reading.

MarkT:
You could simply wire up with a resistor and print the value of analogRead while heating the thing
to the temperature you want the fan to switch on at. Then use that value in your code without
the code ever having a notion of a temperature reading.

Yep true, but I've included a bit of code where the user can monitor the current temp of the cupboard.

MarkT:
Pick a resistor of about the same resistance in the temperature range of interest.

Could you please explain why the resistor value have to be the same range as the thermistor.
Thanks

The output of the voltage divider is most sensitive to changes in the thermistor resistance, if the fixed resistor has approximately the same value.

For accurate temperature data of the thermistor you need to know the actual response of it - this varies a lot between parts.

As you don't have that, your best bet is to calibrate yours. As it's highly non-linear you're going to need a good number of data points, preferably 10 or more, all in the range of your interest, say 10-30 C. That's the only way. When that's done, you can get highly accurate temperature data from your thermistor.

Do get a resistor with low temperature coefficient (<50 ppm/C) as otherwise that will mess up your readings. Good metal film type (light blue package) will work; carbon film (beige package) definitely not.