EmbeddedEra EmbeddedEra

‹ Tools · Temperature sensing

NTC thermistor calculator: Beta, Steinhart–Hart, ADC divider

Give it the thermistor’s Beta or three resistance and temperature points, wire it as a divider into an ADC pin, and read off the resistance, pin voltage, code and degrees per code at any temperature, or turn a code into a temperature. It also picks the fixed resistor for your range and shows how far Beta drifts from Steinhart–Hart.

Beta model
Steinhart–Hart points
Circuit

The Beta block and the three points describe the same part, so change both together. Defaults: Vishay NTCLE100E3103, 3.3 V, 10 kΩ fixed resistor, 12 bits. The ADC reference is the divider supply.

Accepts 4k7, 4.7k, 10µ, 2R2.

NTC thermistor Live
+ − VREF — — — — — ADC pin —
Temperature — — —  
R = R25 · e^(B · (1/T − 1/T25)) embeddedera.com/tools

The equations are exact for the numbers you type. What limits real accuracy is the part: thermistor tolerance, the fixed resistor’s tolerance and drift, self-heating and the converter. For the NTCLE100E3103 the Steinhart–Hart fit through 0, 25 and 85 °C reproduces the datasheet table within 0.21 °C from −40 to 150 °C, and the Beta model within 3.0 °C over the same range.

Sources: Vishay NTCLE100E3103 datasheet (document 29049), resistance-temperature table and B25/85 of 3977 K; J. S. Steinhart and S. R. Hart, “Calibration curves for thermistors”, Deep-Sea Research 15 (1968), the three-term equation. The Beta, divider and ADC relations are the standard ones.

The formula

Beta: R = R25 · e^(B · (1/T − 1/T25)) Steinhart–Hart: 1/T = A + B·ln R + C·(ln R)³ Divider: Vpin = Vref · Rlow / (Rntc + Rfixed) Best fixed R = √(R(Tlow) · R(Thigh)) T in kelvin

When to use it

Reading an NTC with a microcontroller ADC: choosing the fixed resistor for the range you care about, checking how fine the reading is at each end, turning a raw code or a measured resistance into a temperature, or replacing a lookup table in firmware with an equation. The defaults are the Vishay NTCLE100E3103, a 10 kΩ part with B25/85 of 3977 K, on a 3.3 V, 12-bit ADC. The divider is ratiometric: the ADC reference is the same supply that drives the divider, so the code does not depend on Vref.

Pitfalls

  • Beta is a two-point fit and drifts away from those points. On the NTCLE100E3103 a Beta of 3977 K reads 3.0 °C off at −40 °C, while a Steinhart–Hart fit through 0, 25 and 85 °C stays within 0.2 °C from −40 to 150 °C. For a wide range, use three points from the datasheet table.
  • Degrees per code is not constant. A 10 kΩ NTC with a 10 kΩ resistor on a 12-bit ADC resolves 0.022 °C per code at 25 °C and about 0.25 °C at 120 °C, because the curve flattens when the part is hot. Check the table for the ends of your range, not the middle.
  • The best fixed resistor is the geometric mean of the NTC’s resistance at the two ends of the range. It gives the widest voltage swing between them, not the best resolution everywhere, so look at the table before you fix the value.
  • Self-heating adds error. The divider current warms the thermistor by its power divided by the dissipation factor, which the datasheet gives in mW per kelvin in still air. A 10 kΩ NTC on 3.3 V with a 10 kΩ resistor dissipates 272 µW and warms 0.032 °C at 8.5 mW/K, but a low fixed resistor or a higher supply raises it quickly.
  • The fixed resistor and the thermistor tolerance both move the result. A 1 % error in either is about 0.2 °C near 25 °C for a Beta of 3977 K, no matter how many bits the ADC has. Use a 0.1 % resistor, or calibrate one point, when 0.2 °C matters.
  • A divider of tens of kilohms is a high source impedance for a successive-approximation ADC input. Check the converter’s sampling time in its datasheet, or add a small capacitor at the pin.

Need a temperature measurement designed into your product, from the sensor and front end to the firmware and the test?