17
\$\begingroup\$

I have a TTC103 NTC thermistor. It has zero-power resistance of 10 kΩ at 25°C and B25/50 value of 4050. How do I use it to measure temperature?

\$\endgroup\$
  • \$\begingroup\$ Hey, I have the exact same thermistor :) \$\endgroup\$ – abdullah kahraman Oct 6 '12 at 8:51
12
\$\begingroup\$

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".

\$\endgroup\$
  • 1
    \$\begingroup\$ All three answers look good, but this one helped me the most. \$\endgroup\$ – AndrejaKo Jan 8 '11 at 20:30
  • 1
    \$\begingroup\$ How did you deal with the \$ln\$ ? \$\endgroup\$ – abdullah kahraman Oct 6 '12 at 10:45
  • 2
    \$\begingroup\$ Why do I have to go to Wikipedia for the equation? Can't you give it here? \$\endgroup\$ – Federico Russo Oct 6 '12 at 14:01
  • \$\begingroup\$ You talk about the manufacturing tolerance. But how can I devise the tolerance if I only have B, tolerance of B, tolerance of R25? Like the NTCLE203 \$\endgroup\$ – thexeno Oct 16 '17 at 14:39
  • \$\begingroup\$ @thexeno plug the maximum and minimums into a spreadsheet and calculate it over the temp range you want. \$\endgroup\$ – Nick T Oct 16 '17 at 15:10
13
\$\begingroup\$

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.

\$\endgroup\$
  • 1
    \$\begingroup\$ Yeah, I have to ask :) How do you do those calculations using an 8-bit microcontroller? \$\endgroup\$ – abdullah kahraman Oct 6 '12 at 11:11
  • 2
    \$\begingroup\$ @abdullahkahraman you'd use a combination of a look up table and interpolation between look up table values. Say you have a 10 bit ADC; that's 1024 possible values from the ADC. You could store 1024 converted values in memory, or you could store 512 (every other) or 256 (every 4th) etc. depending on memory. Interpolation is a large subject, as is oversampling or "banding", which you can use to increase the accuracy. \$\endgroup\$ – akohlsmith Oct 6 '12 at 15:53
  • \$\begingroup\$ @AndrewKohlsmith how does oversampling increase resolution? \$\endgroup\$ – abdullah kahraman Oct 6 '12 at 19:13
  • \$\begingroup\$ @abdullahkahraman your lookup table sampling could be non-uniform over the domain of the input... storing more samples of the curve where it is "curvier" and applying interpolation can give you a better error characteristic \$\endgroup\$ – vicatcu Oct 7 '12 at 18:36
  • 1
    \$\begingroup\$ @thexeno ask a new question. \$\endgroup\$ – Nick T Oct 16 '17 at 15:34
6
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ Don't linearize unless you're using analog-only circuits! \$\endgroup\$ – Jason S Jun 18 '11 at 16:16
  • \$\begingroup\$ And please edit your post for accuracy: the relationship does not become a simple linear equation. The relationship approximates a linear equation over a particular range of temperatures. \$\endgroup\$ – Jason S Jun 18 '11 at 16:17
  • 4
    \$\begingroup\$ Jason: can you elaborate? Why not linearize in digital circuits? \$\endgroup\$ – Stephen Collings Jul 16 '12 at 13:44
  • \$\begingroup\$ App note says that this configuration will suffer from sensitivity a little. \$\endgroup\$ – abdullah kahraman Oct 6 '12 at 8:50
  • 2
    \$\begingroup\$ @abdullah - I meant that ironically :-). But apparently more users seem to prefer the more complex situation, which I don't mind, but then the only reason I can think of to dismiss the more simple solution is that the resistor would too expensive. :-) \$\endgroup\$ – stevenvh Oct 6 '12 at 9:54
4
\$\begingroup\$

An NTC has a non-linear response to temperature.

You can work out the resistance of a thermistor by measuring the voltage across it in a potential divider circuit. Then, you can get a resistance \$R\$ from this using Ohm's law.

For example, say you have a 5V supply use a 1k resistor in series with the NTC and if you measure 0.5V, just divide 1k by 0.5V and get 10k ohms as the resistance.

You also need, \$T_0\$ and \$R_o\$, a 'fixed' temperature in kelvins and at that temperature, its resistance. It's usually given at room temperature.

Then, given these details, put it into this equation to get T, the temperature.

\$T=\dfrac{1}{\dfrac{1}{T_o} + (\dfrac{1}{B} * \ln\dfrac{R}{R_o}) }\$

\$\endgroup\$
  • \$\begingroup\$ Please confirm that I have correctly re-wrote the equation. \$\endgroup\$ – abdullah kahraman Oct 6 '12 at 12:18
3
\$\begingroup\$

There are a number of ways (both in terms of analog circuits and in terms of software computation) to use thermistors to measure temperature.

The short answer, is roughly as follows:

  • Use the thermistor and a reference resistor to make a voltage divider.
  • Take the middle of the voltage divider and feed it into an analog-to-digital converter.
  • Measure the ADC voltage in software.
  • Using your knowledge of the reference resistance, and the thermistor's R vs. T curve, convert from ADC counts to temperature.

There are a number of subtleties here, so for further reading you may want to check out this article of mine on thermistor signal conditioning -- hope this helps!

\$\endgroup\$
  • \$\begingroup\$ The article does look good! \$\endgroup\$ – AndrejaKo Jun 16 '11 at 6:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.