Steinhart-Hart for thermistor
prof_braino
Posts: 4,313
I'm working on a spreadsheet http://propforth.googlecode.com/files/Steinhart-Hart20131121-1805.xlsx
for calculating a table off thermistor reading that coorespond to degrees centigrade.
But the spreadsheet chokes on the inverse equation, due to square root of negative numbers.
Any ideas on the right way to do this? Right now I just guestimate each value,, it take a long time.
http://code.google.com/p/propforth/wiki/ThermistorTempSensor
http://code.google.com/p/propforth/wiki/ThermistorRawLogger
Thanks!
for calculating a table off thermistor reading that coorespond to degrees centigrade.
But the spreadsheet chokes on the inverse equation, due to square root of negative numbers.
Any ideas on the right way to do this? Right now I just guestimate each value,, it take a long time.
http://code.google.com/p/propforth/wiki/ThermistorTempSensor
http://code.google.com/p/propforth/wiki/ThermistorRawLogger
Thanks!
Comments
I'm trying to create the lookup table of RC values that coorespond to temperatures, so I can put this into the prop. I think I can use Steinhart-Hart to build this table. I don't want to execute Steinhart-Hart on the prop, I want to pre-calculate the values using this spreadsheet.
The purpose of the spread sheet is to create a lookup table in prop. There are 100 entires in the table, one for each degree contigrade between zero and 100 C. The table contain time counts, if the RC time is close to one of the table entries, the temperature in C should be close to that entry's index.
I could only get a stable temperature at three points: freezing, ambient, and boiling. I couldn't read the resistance directly (at ambient my meter reads 10.2 k ohms for these 10K thermistors). But I could read the RC time. My experiement is to see how well it works to use RCtime counts instead of direct rresistance readings. I've heard this meethod works realy well for two points (upper and lower threshold). But of course I have to do it the hard way and try to make a full range general purpose thermometer.
So. I'm fairly confident about the Steinhart-Hart coefficeints; if I put in the RCtime values (instead of resistance values) for freezing, ambient, or boiling, I get out the temperature I expect.
Now I just have to figure out the other 97 table values. But the inverse equation doesn't work for me. Instead I have to start plugging in values until each temperature comes out. It only takes about half an hour. Once I build the table, I think I can use that thermistor as a thermometer. I havent checked it again the meter yet. Problem is each thermistor is a little different. I'm looking for a better way to fill in the table.
Thanks
I've never tried to compute an inverse of Steinhart-Hart, but I'm surprised that any term would end up with a negative value under the square root. The Wiki shows a nasty inverse that involves the exponential of the difference between two cube roots, and one of the terms up top does involve a square root. Is that the formula you are trying to put into Excel? I always wonder about trust in Excel, too.
I recently had to do a thermistor in Spin, but with a voltage divider into a standard ADC, reading the voltage, then calculate the resistance.
Yes the wiki page is my reference. I got the impression the equation shuld just work, and I was hoping I just have something wrong. I guess its just funky. No biggie, just tendious.
Maybe over a narrow range you can use the simpler beta form,
RT = R0 * exp(