This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
tutorials:learn:sensors:thermistor.html [2011/06/07 19:17] daigo created |
tutorials:learn:sensors:thermistor.html [2016/01/28 18:05] (current) |
||
---|---|---|---|
Line 13: | Line 13: | ||
- | Thermistors have some benefits over other kinds of temperature sensors such as analog output chips ([[http://www.ladyada.net///temp36.html|LM35/TMP36]]) or digital temperature sensor chips (DS18B20) or[[http://www.ladyada.net///thermocouple.html| thermocouples]]. | + | Thermistors have some benefits over other kinds of temperature sensors such as analog output chips ([[http://www.ladyada.net/learn/sensors/temp36.html|LM35/TMP36]]) or digital temperature sensor chips (DS18B20) or[[http://www.ladyada.net/learn/sensors/thermocouple.html| thermocouples]]. |
Line 20: | Line 20: | ||
*They work at any voltage (digital sensors require 3 or 5V logic). | *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. | *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.1°C accuracy! (Assuming you have an accurate enough analog converter) | + | *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 | *They are difficult to break or damage - they are much simpler and more reliable | ||
Line 32: | Line 32: | ||
Even if you do use a microcontroller or complex system, for the price you can't beat 'em! | Even if you do use a microcontroller or complex system, for the price you can't beat 'em! | ||
+ | |||
+ | |||
+ | <class center> | ||
+ | **[[http://www.adafruit.com/products/372|You can pick up a 10K 1% waterproof thermistor in the Adafruit shop]]** | ||
+ | </class> | ||
+ | |||
+ | ==== Some Stats ==== | ||
+ | |||
+ | [[http://www.adafruit.com/products/372|Here are technical details for the thermistor in our shop]] | ||
+ | |||
+ | * **Resistance at 25°C:** 10K ±1% | ||
+ | * **B25/50:** 3950 ±1% | ||
+ | * **Thermal time constant** <= 15 seconds | ||
+ | * **Thermistor temperature range** -55°C to 125°C | ||
+ | * **Wire temperature range** -55°C to 105°C | ||
+ | * **28 AWG PVC Wire** | ||
+ | * **Diameter: 3.5mm/0.13in** | ||
+ | * **Length: 18in/45cm** | ||
+ | * [[http://www.adafruit.com/datasheets/103_3950_lookuptable.pdf|Resistance/Temperature table]] | ||
+ | |||
+ | Note that even though the thermistor can go up to 125°C the cable itself maxes out at 105°C so this thermistor is not good for measuring very very hot liquids | ||
+ | |||
+ | ====Testing your thermistor==== | ||
+ | |||
+ | |||
+ | Because thermistors are simply resistors, its easy to test it out. Simply measure the resistance using a multimeter: | ||
+ | |||
[[http://www.ladyada.net/images/sensors/thermistormeasure.jpg|{{ http://www.ladyada.net/images/sensors/thermistormeasure_t.jpg?nolink&500x356 |}}]] | [[http://www.ladyada.net/images/sensors/thermistormeasure.jpg|{{ http://www.ladyada.net/images/sensors/thermistormeasure_t.jpg?nolink&500x356 |}}]] | ||
Line 57: | Line 84: | ||
Say the fixed resistor is **10K** and the variable resistor is called **R** - the voltage output (**Vo**) is: | Say the fixed resistor is **10K** and the variable resistor is called **R** - the voltage output (**Vo**) is: | ||
+ | <class center> | ||
**Vo = R / (R + 10K) * Vcc** | **Vo = R / (R + 10K) * Vcc** | ||
+ | </class> | ||
Line 66: | Line 94: | ||
Now we want to connect it up to a microcontroller. Remember that when you measure a voltage (**Vi**) into an Arduino ADC, you'll get a number. | Now we want to connect it up to a microcontroller. Remember that when you measure a voltage (**Vi**) into an Arduino ADC, you'll get a number. | ||
+ | <class center> | ||
**ADC value = Vi * 1023 / Vcc ** | **ADC value = Vi * 1023 / Vcc ** | ||
+ | </class> | ||
So now we combine the two (**Vo** = **Vi**) and get: | So now we combine the two (**Vo** = **Vi**) and get: | ||
+ | <class center> | ||
ADC value = ** R / (R + 10K) * Vcc * 1023 / Vcc** | ADC value = ** R / (R + 10K) * Vcc * 1023 / Vcc** | ||
+ | </class> | ||
What is nice is that if you notice, the Vcc value cancels out! | What is nice is that if you notice, the Vcc value cancels out! | ||
+ | <class center> | ||
ADC value = ** R / (R + 10K) * 1023** | ADC value = ** R / (R + 10K) * 1023** | ||
+ | </class> | ||
It doesn't matter what voltage you're running under. Handy! | It doesn't matter what voltage you're running under. Handy! | ||
Finally, what we really want to do is get that **R** (the unknown resistance). So we do a little math to move the **R** to one side: | Finally, what we really want to do is get that **R** (the unknown resistance). So we do a little math to move the **R** to one side: | ||
+ | <class center> | ||
**R = 10K / (1023/ADC - 1)** | **R = 10K / (1023/ADC - 1)** | ||
+ | </class> | ||
Great, lets try it out. Connect up the thermistor as shown: | Great, lets try it out. Connect up the thermistor as shown: | ||