How to measure temperature using a NTC thermistor?

Use it as one leg (say the "upper" leg) in a voltage divider circuit with the other leg being a known resistance. Measure the voltage at the midpoint of the divider (e.g. with an analog-to-digital converter). Infer the thermistor resistance from the measured voltage as:

\$R_{thermistor} = \left(\dfrac{V_{cc} }{V_{measured}} - 1\right) \times R_{known}\$

Use the equation:

\$T = \dfrac{B}{ln \left(\dfrac{R_{thermistor} }{R_0 \times e^\frac{\large -B}{\large T_0}}\right)}\$

in your case, \$R_0 = 10000\$, \$B = 4050\$, and \$T_0 = (273 + 25) = 298\$. Plug those numbers, plus the measured resistance of the thermistor into the equation and out pops a temperature in Kelvin.

Read this wikipedia article for more details.


NTC (negative temperature coefficient) thermistors change their effective resistance over temperature. The most common equation used to model this change is the Steinhart-Hart equation. It uses three coefficients to characterize the NTC material with great accuracy.

The Steinhart–Hart equation is a model of the resistance of a semiconductor at different temperatures. The equation is:

$${1 \over T} = A + B \ln(R) + C (\ln(R))^3$$

where:

  • \$T\$ is the temperature (in kelvins)
  • \$R\$ is the resistance at \$T\$ (in ohms)
  • \$A\$, \$B\$, and \$C\$ are the Steinhart–Hart coefficients which vary depending on the type and model of thermistor and the temperature range of interest. (The most general form of the applied equation contains a \$(\ln(R))^2\$ term, but this is frequently neglected because it is typically much smaller than the other coefficients, and is therefore not shown above.)

— Steinhart-Hart equation - Wikipedia, The Free Encyclopedia

Many manufacturers provide application notes (e.g. here) detailing on how to calibrate a given NTC if you desire accuracy better than the quoted manufacturing tolerance.

The provided B-coefficient can be used in a simplified Steinhart-Hart equation as described on the Wikipedia Thermistor article under "B parameter equation".


NTCs are non-linear and you'll see rather nasty formulas expressing the relationship temperature-resistance.
Adding a pair of ordinary resistors you can linearize their behavior so that this relationship is approximated by a simple linear equation of the form \$y=ax+b\$. The following example is from this Epcos appnote.

enter image description here

enter image description here

The curve is virtually straight from 0°C to 60°C, which is sufficient for many applications.

In this answer I show how in some cases you can get an almost perfect (15 ppm) linear curve over a limited domain with just a series resistor.

edit
If you don't have the money for a resistor you'll either have to use the Steinhart-Hart equation Nick and Vicatcu refer to, or use a lookup table and interpolation. Both have the disadvantage that they need more memory: Steinhart-Hart contains a logarithm, for which you'll need a floating-point library (I assume your microcontroller doesn't have a floating-point ALU). The lookup table needs some memory as well, and may not give you a better precision than the linearized function if you have to interpolate that.

Tags:

Thermistor