Hi Arduino Forum! I want to begin a project so I just got 5 pieces of 10K Thermistors from ebay and now I'm figuring out how to get some valuable temperature readings from the analogRead() function.
I considered the Steinhart–Hart equationSteinhart–Hart equation - Wikipedia but it sounded a bit complicated. If there is a simpler equation please suggest one
I'm hoping on getting some suggestions about how to simply get temperature readings from a thermistor. If yes, please show me how. And is temperature relation is linear to the analog readings? Because if so, it would simplify things)) Thanks!
I think it depends on the range of temperature you are looking at - the smaller the range the simpler
the curve needed to fit to the device's response over that range.
For a very small range a linear approximation might be enough, somewhat larger you could try a
quadratic curve or cubic.
For a large range of temperature the Steinhart–Hart equation will be best simply because it has the right
form and fewer parameters are needed to get a good fit - otherwise a polynomial or rational function
approximation with more parameters would be needed.
Thermistors do not show a linear relationship of temp <> resistance over their entire range.
Thermistors are either PTC (positive temperature coefficient) where R increases with T, or NTC which does the opposite.
Most PTC thermistors that can work in the ambient range - say 0C to 30C exhibit a fairly linear response, so a simple 3 point interpolation would give a fairly accurate answer. NTC thermistors generally show a significant exponential variation with temperature.
So to use your thermistors, measure resistance (or analog voltage on the Arduino) at 0C, 25C, 50C, 75C and 100C. Plot a curve and apply a little high school math to interpolate between the values.
Most folks working with temperature sensors use digital devices which are internally compensated for non-linear effects.
Look here: it's a good article about thermistors, includes math and a table as I remember... http://www.phanderson.com/picaxe/lin_thermistor.html.
This has been my Go-to for thermistors.That having been said it is very possible to use a 3 point calibration. Ends of a piecewise linear section of interest and midpoint and split the difference to the middle point...{Edit RKJ}
MarkT:
For a large range of temperature the Steinhart–Hart equation will be best simply because it has the right
form and fewer parameters are needed to get a good fit - otherwise a polynomial or rational function
approximation with more parameters would be needed.
arbutus:
So to use your thermistors, measure resistance (or analog voltage on the Arduino) at 0C, 25C, 50C, 75C and 100C. Plot a curve and apply a little high school math to interpolate between the values.
Hmm, I guess that's a good idea. I would need to break my head a little thought to figure out the numbers, but i'm sure it would be worth for killing my week-end time
Plot a curve and apply a little high school math to interpolate between the values.
Or you may use excel - it calculates the math for you. Most probably you will be not measuring the thermistor's resistance but voltage on a divider (gnd - 10k thermistor -V- 10k resistor - Vcc). So the values will differ.
(below an example only).