How to use the ntc thermistor temperature calculator
- Choose what to find: temperature from a resistance with the beta or Steinhart-Hart equation, resistance from a temperature, or the divider and ADC reading at a temperature.
- Enter the thermistor values from the data sheet: the resistance at the reference temperature and the beta value, or the A, B and C coefficients.
- Enter the measured resistance or the temperature.
- For the divider, enter the fixed resistor, which side the thermistor is on and the ADC resolution, and read the output share and the count.
Formula
Beta equation: 1/T = 1/T0 + ln(R / R0) / B, with temperatures in kelvin
Resistance from temperature: R = R0 x exp(B x (1/T - 1/T0))
Steinhart-Hart: 1/T = A + B ln(R) + C ln(R) cubed
Divider output (thermistor to ground) = supply x R / (R + fixed); ADC count = output share x (2^bits - 1)
The beta equation is a two point fit that works best near the reference temperature. The Steinhart-Hart equation uses three coefficients and fits a wider range.
A 10 k thermistor with a beta of 3950
A reading of 5,000 ohms gives 1/T = 1/298.15 + ln(0.5) / 3950, so T = 314.61 K, which is 41.46 C or 106.63 F. At 60 C the resistance is 2,486.16 ohms, which is 0.24862 of the 10 k reference.
With the common coefficients A = 0.001129148, B = 0.000234125 and C = 8.76741e-8, 5,000 ohms is 41.572 C. With a 10 k fixed resistor and the thermistor to ground, a 10-bit ADC reads 204 of 1,023 at 60 C, where the divider output is 19.911 percent of the supply, or 0.99557 V on 5 V. With the thermistor on the high side at 0 C and a 12-bit ADC the count is 939 of 4,095.
Beta or Steinhart-Hart
The beta value in a data sheet is usually quoted between two temperatures, such as 25 C and 85 C, so the equation is most accurate in between. Away from them the error grows, and the three coefficient form is better. The default coefficients here are an example that fits a common 10 k part, so use your own.
The voltage divider calculator gives the divider alone, the ADC resolution calculator shows the size of one count, and the op-amp gain calculator helps if the signal must be amplified.
Getting a clean reading
Pick the fixed resistor close to the thermistor resistance at the middle of your range, which gives the largest change in output. Keep the current small to avoid self heating, and remember that the tolerance of the thermistor and the resistor adds to the error. To go from a count back to a temperature, find the resistance from the count and use the temperature mode.
Assumptions and limits
- The thermistor is an NTC type, whose resistance falls as the temperature rises.
- The ADC uses the supply voltage as its reference, so the count is the output share times the full scale.
- The beta and the Steinhart-Hart coefficients come from the data sheet. The values shown are examples.
- Self heating, lead resistance and tolerances are not modeled.
Frequently asked questions
How do I convert thermistor resistance to temperature?
Use 1/T = 1/T0 + ln(R / R0) / B with temperatures in kelvin. A 10 k thermistor with a beta of 3950 reading 5,000 ohms is 41.46 C.
What is the Steinhart-Hart equation?
It is 1/T = A + B ln(R) + C ln(R) cubed, with T in kelvin. It fits a wider range than the beta equation.
Which side should the thermistor go on?
Either works. With the thermistor to ground the output rises as the temperature rises, and with it on the high side the output falls. The page handles both.
How accurate is the beta equation?
It is best near the reference temperature and between the two temperatures used to set the beta value. Outside that range the error grows.