A thermistor is a thermal resistor - a resistor that changes its resistance with temperature. Technically, all resistors are thermistors - their resistance changes slightly with temperature - but the change is usually very very small and difficult to measure. Thermistors are made so that the resistance changes drastically with temperature so that it can be 100 ohms or more of change per degree!
There are two kinds of of thermistors, NTC (negative temperature coefficient) and PTC (positive temperature coefficient). In general, you will see NTC sensors used for temperature measurement. PTC's are often used as resettable fuses - an increase in temperature increases the resistance which means that as more current passes through them, they heat up and 'choke back' the current, quite handy for protecting circuits!
- First off, they are much much cheaper than all the above! A bare 5% thermistor is only 10 cents in bulk.
- They are also much easier to waterproof since its just a resistor.
- They work at any voltage (digital sensors require 3 or 5V logic).
- Compared to a thermocouple, they don't require an amplifier to read the minute voltages - you can use any microcontroller to read a thermistor.
- They can also be incredibly accurate for the price. For example, the 10K 1% thermistor in the shop is good for measuring with ±0.25°C accuracy! (Assuming you have an accurate enough analog converter)
- They are difficult to break or damage - they are much simpler and more reliable
On the other hand, they require a little more work to interpret readings, and they dont work at very high temperatures like thermocouples. Without a digital-to-analog converter on board, you might be better off with a digital temperature sensor.
Their simplicity makes them incredibly popular for basic temperature feedback control. For example, lets say you wanted to have a fan that turns on when the temperature gets high. You could use a microcontroller, a digital sensor, and have that control the relay. Or you could use the thermistor to feed the base of a transistor, as the temperature rises, the resistance goes down, feeding more current into the transistor until it turns on. (This is a rough idea, you would need a few more components to make it work)
Even if you do use a microcontroller or complex system, for the price you can't beat 'em!
We can use a simple voltage divider circuit to measure the voltage across the thermistor.
Vout = Rt / (Rt + Rs) * Vin
Say the fixed resistor is 10K and the variable resistor is called R - the voltage output (Vo) is:
Vout = Rt / (Rt + 10K) * Vin
Remember that when you measure a voltage (Vi) into an Arduino ADC, you'll get a number.
ADC value = Vi * 1023 / Varef
So now we combine the two (Vout = Vi) and get:
ADC value = Rt / (Rt + 10K) * Vcc * 1023 / Varef
What is nice is that if you notice, if Vcc (logic voltage) is the same as the ARef, analog reference voltage, the values cancel out!
ADC value = Rt / (Rt + 10K) * 1023
Finally, what we really want to do is get that Rt (the unknown resistance). So we do a little math to move the Rt to one side:
Rt = 10K / (1023/ADC - 1)
We'll use the Steinhart-Hart equation , which lets us do a good approximation of converting values.
Its not as exact as the thermistor table (it is an approximation) but its pretty good around the temperatures that this thermistor is used.
|Using a Thermistor||https://learn.adafruit.com/thermistor/using-a-thermistor|