Tools / NTC thermistor and ADC reading
How to work out an NTC thermistor reading on an ADC
A thermistor's resistance falls as it warms. A fixed resistor turns that into a voltage your ADC can read.
R = R25 × e^(β(1/T − 1/298.15)); Vout = Vcc × Rfixed ÷ (Rfixed + R)
Result
- Ntc resistance
- 5.301 kΩ
- Divider output
- 2.157 V
- Adc code
- 2,676
- Sensitivity
- 30.1 mV per °C (rises as it warms)
- Degrees per count
- 0.02677
Step by step
The working with your numbers
- Change to kelvin
T = 40 + 273.15 = 313 K - Beta equation: resistance at this temperature
R = R25 × e^(β × (1/T − 1/298.15)) = 10,000 × e^(3,950 × (0.0031934 − 0.003354)) = 5.3 kΩ - Divider: thermistor on top, fixed resistor to ground
Vout = Vcc × Rfixed ÷ (Rfixed + R) = 3.3 × 10,000 ÷ 15,301 = 2.16 VWith the thermistor on top the voltage rises as it warms. Swap them and it falls. - What the ADC reads
code = floor(Vout ÷ Vcc × 2^12) = floor(0.6535 × 4,096) = 2676 - Sensitivity here
dVout/dT = 30.1 mV per °C, so one count is 0.0268 °C - Going back: temperature from a reading
R = Rfixed × (Vcc − Vout) ÷ Vout, then 1/T = 1/298.15 + ln(R ÷ R25) ÷ β
Does the answer make sense?
- OK: At 25 °C the resistance equals R25 = 10 kΩ. At 40 °C it is 5.3 kΩ.
- OK: Vout is 65.4 % of the supply. Keep it between 10 % and 90 % for good resolution.
- OK: Self-heating: the thermistor dissipates about 247 µW. Under 1 mW keeps the heating error small; a thermistor in air warms by about 1 °C per mW.
Pick a real part
- 10 kΩ with beta 3,950 is the common 10 kΩ NTC. The beta equation is accurate to about ±1 °C over a ±25 °C span around 25 °C. For wide ranges use the Steinhart-Hart equation with three calibration points.
- Use a 1 % resistor equal to the thermistor's value near the middle of your range, and a 0.1 µF capacitor at the ADC pin to cut noise.
Common mistakes
- Forgetting kelvin. The beta equation uses absolute temperature.
- Using a fixed resistor far from the thermistor's value. The output then barely changes over your range.
- Ignoring self-heating when you pass too much current through the thermistor.
Learn it, try it, build it
Calculated, not measured. Check the exact part datasheet and your real circuit before powering anything.
Common questions
How do you work out the temperature from an NTC thermistor?
Find its resistance from the ADC reading, then 1/T = 1/T0 + ln(R ÷ R0) ÷ β, with T0 = 298.15 K and R0 the resistance at 25 °C. A 10 kΩ, β = 3950 NTC reading 5 kΩ is about 41.5 °C.
What fixed resistor should I use with an NTC?
Use the same value as the thermistor at the middle of the range you want to measure. For room temperature that is its 25 °C value, such as 10 kΩ, which puts the output near half the supply and gives the best sensitivity.
