Wringing out thermistor nonlinearities
By Bonnie Baker -- EDN, April 12, 2007
Thermistor-temperature-sensing devices present a design challenge if you intend to use such a device over its entire temperature range. Typically, the thermistor is a high-impedance, resistive device that eases one of the interface issues as you convert the thermistor resistance to voltage. The more difficult interface challenge is to capture the nonlinear behavior of the thermistor in a digital representation with a linear ADC.
The term "thermistor" originates from the descriptor "thermally sensitive resistor." The two basic types of thermistors are negative- and positive-temperature-coefficient devices. The negative-temperature-coef ficient thermistor best suits precision temperature measurements. You can determine the surrounding thermistor temperature by using the Steinhart-Hart equation: T=1/(A0+A1(lnRT)+A3(lnRT3)). In this equation, T is the temperature in degrees Kelvin; RT is the thermistor resistance at temperature T; and A0, A1, and A3 are constants that the thermistor manufacturer provides.
|
The thermistor-resistance change over temperature is nonlinear, as the Steinhart-Hart equation describes. When measuring temperature, drive a reference current through the thermistor to create an equivalent voltage. This equivalent voltage has a nonlinear response. You can try to compensate for the thermistor's nonlinear response with a look-up table in your microcontroller. Even though you can run this type of algorithm in your microcontroller firmware, you need a high-resolution converter to capture data during temperature extremes.
Alternatively, you can use hardware-linearization techniques before digitization and a lower resolution ADC. One technique is to place a resistor, RSER, in series with the thermistor, RTHERM, and a voltage reference or the power supply (Figure 1). Setting the PGA (programmable-gain amplifier) at a gain of 1V/V, a 10-bit ADC in this circuit can sense a limited temperature range (approximately ±25°C).
In Figure 1, note that resolution is lost at high temperatures. Increasing the PGA's gain at these temperatures brings the output signal of the PGA back into a range at which the ADC can reliably provide conversions that identify the thermistor temperature.
The microcontroller firmware's temperature-sensing algorithm reads the 10-bit-ADC digital value and passes it to a PGA hysteresis-software routine. The PGA hysteresis routine checks the PGA gain setting and compares the ADC digital value with the trip points that Figure 1 indicates. If the ADC output is beyond a trip-point value, the microcontroller sets the PGA gain to the next higher or lower gain setting. If necessary, the microcontroller can again acquire a new ADC value. The PGA gain and ADC value then pass to a microcontroller piecewise linear-interpolation routine.
Obtaining data from a nonlinear thermistor sometimes can seem like an impossible task. You can combine a series resistor, a microcontroller, a 10-bit ADC, and a PGA to overcome the measurement difficulties of a nonlinear thermistor across a temperature range greater than ±25°C.
| Author Information |
| Bonnie Baker is a senior applications engineer at Texas Instruments. You can reach her at bonnie@ti.com. |
| References |
| Baker, Bonnie C, "Advances in measuring with nonlinear sensors," Sensors magazine, April 1, 2005."Introduction to NTCs: NTC Thermistors," BC Components data sheet, March 27, 2001. |
-
George writes:
> It is my experience that one can implement a much better NTC thermistor measurement than Bonnie suggests, using only the simplest circuit and without a PGA. Rather than feeding the thermistor with a current source, use it as one leg of a voltage divider, let's say the grounded leg.
Isn't that the circuit that Bonnie suggests? She starts out talking about using a current source, but then she describes the voltage divider "hardware-linearization technique." All she's suggesting is giving low voltages a boost so that a fast/cheap 10 bit ADC can give an equivalent 13 bit resolution.
That said, I might price-compare the PGA to a more expensive ADC and/or switching in a lower series resistor.
Les Hammer - 2007-17-4 15:13:00 PDT -
It is my experience that one can implement a much better NTC thermistor measurement than Bonnie suggests, using only the simplest circuit and without a PGA. Rather than feeding the thermistor with a current source, use it as one leg of a voltage divider, let's say the grounded leg. The other leg should be a temperature stable resistor fed from the same voltage reference that is used for the ADC. This voltage divider complicates the equation relating counts to temperature slightly, but it also improves the dynamic range by reducing the excessively large sensitivity at low temperatures. This method also eliminates any errors due to a current source, or to the reference voltage. Good results can be obtained over a 0 to 100C temperature range. Better than 0.5C resolution is possible when using a 10b ADC. You can get 0.2C over much of the range. Rather than implementing the Steinhart-Hart equations on the microcontroller, I suggest using a spreadsheet to compute a table with points spaced at one degree increments. Import the table into the code for the micro, and use linear interpolation between degrees if you want additional resolution.
George Pontis - 2007-17-4 13:44:00 PDT


















