Sorry I know I've seen this here before.. But a quick search didn't yield what I wanted. (and I went looking in Phil H's book) I want to linearize an NTC thermistor (10 k ohm at 25C) What's the trick parallel R or parallel and another in series?
IIRC parallel plus series. Somewhere in my archives is a technique for fitting such situations. ...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: skypeanalog | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics
160 North State Road #203
Briarcliff Manor NY 10510
hobbs at electrooptical dot net
http://electrooptical.net
What everyone else said, plus this: you'll never completely linearize the damned thing. You can get it more linear around some range, but that's about it.
IIRC, when I did this I just used a parallel resistor to get things easily into the range of the ADC I was using, and then finished things off in software.
Whatever else you do, when you're done with the design do a sensitivity analysis on the resistor values chosen for linearization -- it's better to have lots of time to handle your disappointment.
--
Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
I've gotten good results by using a look-up table supplied by the thermistor mfr and doing interpolation. Linear interpolation might work for you if extreme accuracy is not needed, otherwise maybe cubic splines will give you what you want.
The problem is that if you want to measure temperature over a wide range you run into the exponential nature of the resistance. Simply putting a constant current through and looking for voltage, or putting a constant voltage on and looking for current without some sort of autoranging kills you dead at one end of the temperature range or another.
Regardless of what I may have said before, just using a thermistor as one element in a voltage divider may do the trick -- I think you just choose the fixed R to be the thermistor's rated resistance at the temperature where you want the most accuracy, and go from there (with the understanding that your accuracy will be diminished at the ends).
Don't just believe this -- plug some numbers into a spreadsheet and try it.
--
Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
Yeah thanks everyone. I just wanted a quick way to measure my cell heater time constants. I just drove it with a voltage source and added a series R equal to my mid point temperature... good enough.
Measure the resistance and use the Steinhart-Hart equation, or pre-calculate a lookup table.
Or if you want to do it the old-fashioned way, one way is to parallel it with a resistor equal to the thermistor value at the center of the operating range.
An easy way to combine the two methods is to series the thermistor with a resistor of value equal to the thermistor resistance at the center of the operating range (check that self-heating is okay), glomp that across your ADC reference and take a ratiometric reading from the junction. The thermistor can be grounded. Linearize with S-H or a LUT. The resolution will be maximum in the center of the operating range and will tail off on either side.
--sp
--
Best regards,
Spehro Pefhany
Amazon link for AoE 3rd Edition: http://tinyurl.com/ntrpwu8
Microchip link for 2015 Masters in Phoenix: http://tinyurl.com/l7g2k48
Last time I wanted to measure an NTC, I used a dumb voltage divider and polynomial best fit. The code is quite compact and reasonably fast (something like 60 words and 300 cycles, on AVR). The numerical fit is significantly better (< 0.1%) than the thermistor tolerance (> 1%?), and returns XXX.X digits of temperature, good enough for me.
Heh, I had also tested a pair-of-reciprocals formula, which gave comparable results to the (6th order?) polynomial. It looks pretty good on paper, doesn't it? Where division, or exponentiation, or what have you, is free, of course... ;-)
Alas, division is excruciatingly long and slow when it's not provided in the hardware. That version took more like 80 or 100 words, and 800 cycles!
A "physics based" model would use the inverse function for a reciprocal series of logs (i.e., arising from the Steinhart-Hart model). And still wouldn't be terrifically bad to compute (logs are slow but not like division slow, when you have hardware multiply handy; and at this point, you're just kind of stuck with doing division anyway..). But a ppm level model is still rather useless without ppm level calibration, and I doubt a thermistor is really that stable over time, anyway (hysteresis, drift?).
And the more accurate sensors (RTD, thermocouple) are more linear, so require less correction (usually a modest order polynomial with very slight coefficients), and may bear more heavily on the analog side (e.g., thermocouple cold junction plus uV amplifier).
You've got a copy of my 1996 paper and on page four of that I point out if you picked a series resistor that matched the thermistor resistance at 30C the sensitivity peaked at -28mV K^-1 at 30C and was down to -20.2mV at 0C and -21.2mV at 60C.
It's not perfectly linear - obviously - but linearising it more precisely doesn't take much computational effort. Newton-Raphson iteration would work fine, but our programmers just used a look-up table.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.