Tools

NTC thermistor calculator

With the thermistor from the pin to ground and a fixed resistor from the bias to the pin, the pin sits at Vbias × RNTC / (Rfixed + RNTC), and the thermistor follows R = R25 × eB(1/T − 1/298.15 K). A 10 kΩ thermistor with B = 3970 K and a 10 kΩ resistor on 3.3 V gives 2.547 V at 0 °C and 0.997 V at 45 °C.

Design a thermistor divider for a charger’s cold and hot limits or an ADC reading. Add the tolerances of the thermistor, the resistors and the threshold to see the range of temperatures at which each threshold really trips.

How the divider is configured

Thermistor divider with optional series and parallel resistorsA fixed resistor runs from the bias voltage to the pin, which goes to a comparator or ADC input. From the pin, an optional series resistor leads to the NTC thermistor, which runs to ground. An optional parallel resistor sits across the thermistor.BiasRfixedPINTo a comparator or ADCRseries (optional)Rparallel(optional)NTCThermistor to ground shown

The fixed resistor runs from the bias to the pin and the thermistor network from the pin to ground. The pin voltage is a fraction of the bias:

V = Vbias × Rnet / (Rfixed + Rnet), with Rnet = Rseries + (RNTC ∥ Rparallel)

With the two swapped, thermistor at the top, V = Vbias × Rfixed / (Rfixed + Rnet), and the voltage rises with temperature instead of falling.

Thermistor

kΩ
K

From the datasheet. It does not change the math; it flags thresholds more than 10 °C outside that range.

%
%

Divider

kΩ
V
%

Applies to each fixed resistor.

Thresholds

A temperature, such as 0 °C and 45 °C for a lithium charger, or a charger’s fixed comparator level. Leave one blank for one threshold.

A comparator’s band from the charger datasheet (a 72.4 to 74.2 % threshold is ±0.9 % of bias), or the ADC’s error at that voltage.

With the same source the bias error cancels. With a separate reference, enter the combined worst case of the bias and the reference.

More options: extra resistors, ADC, self-heating, a reading
kΩ
kΩ

A resistor across the thermistor flattens the curve at the cold end; one in series keeps the pin off the rail at the hot end. Leave them blank if the design has none.

bits
V
mW/°C
V

The dissipation constant, from the thermistor datasheet, is the power that warms it by 1 °C. “Convert a reading” turns a pin voltage into a temperature, with its worst-case band.

Result

Threshold voltages and slopes, and the shift in trip temperature from each tolerance alone

Each alone, ± °C. The band takes them all at their worst.

Design help: fixed resistor and divider current

Fixed resistor

Divider current

It flows whenever the divider is powered, which matters for battery drain; powering the divider only while reading saves it.

Pin voltage against temperature

Pin voltage Where each threshold can trip, worst case

Table of values
Thermistor resistance and pin voltage every 5 °C

A worked example

A 10 kΩ thermistor with B25/85 = 3970 K, from the pin to ground, with a 10 kΩ resistor from 3.3 V, read by an ADC referenced to the same 3.3 V. By the Beta equation the thermistor is 33.8 kΩ at 0 °C, putting the pin at 2.547 V, and 4.33 kΩ at 45 °C, at 0.997 V. With 1 % parts and a ±0.5 % threshold error, the 0 °C threshold trips within about ±1.1 °C of 0 °C, and the 45 °C threshold within about 1.3 °C either side. The threshold error is the largest term at both. The maker’s table for this part gives 32.5 kΩ at 0 °C, not 33.8 kΩ; switch to three points to use it.

A charger with fixed comparator thresholds is different: the thresholds are set, so the network has to fit them. The charge temperature limits article works through one, a 5.21 kΩ resistor from the bias and 29.87 kΩ across a 10 kΩ, B = 3435 K thermistor. The comparator’s ±0.9 % band at the 0 °C edge alone puts that edge anywhere from about −2 °C to +2 °C (the 45 °C edge’s band is about ±1 %).Load that network here, then add the other tolerances to see the full band. To start from a chip’s comparator levels instead, choose “% of bias” beside a threshold and enter the level; the calculator gives the temperature it trips at. With two levels, “Design help” solves the fixed resistor and a parallel or series resistor for the two temperatures you need.

Beta or three points

The Beta equation, R = R25 × eB(1/T − 1/T25), with T in kelvin (the temperature in °C plus 273.15) and T25 = 298.15 K, is a straight line in ln R against 1/T, drawn through two points of the thermistor’s curve, usually at 25 °C and 50 °C or 85 °C. It is exact at those two and drifts away from the real curve outside them. For one published 10 kΩ table with B25/85 = 3970 K, the Beta equation gives 33.8 kΩ at 0 °C against 32.5 kΩ in the table, enough to read about 0.8 °C off.

The Steinhart-Hart equation, 1/T = A + B ln R + C (ln R)3, follows the curve much more closely. The calculator solves A, B and C from three points of the thermistor’s table; for the same table, three points at −10 °C, 25 °C and 85 °C reproduce it to within about 0.03 °C at 0 °C, 10 °C, 45 °C and 60 °C. Choose points that span your thresholds.

How the worst case is found

Each tolerance moves the trip temperature one way or the other, so the extremes lie where every tolerance is at one end of its range. The calculator tries every combination of ends and reports the lowest and highest trip temperature. It is a worst case, not a statistical spread: most boards land well inside it.

The thermistor’s tolerances combine as (1 + δR) × R25 × (R/R25)1 + δB: the R25 tolerance scales the whole curve, and the Beta tolerance widens it away from 25 °C, where the resistance is specified. That is how many thermistor makers build their minimum and maximum columns, so the band grows with distance from 25 °C. The resistance tolerance is often specified at 25 °C only; check the datasheet.

Choosing the fixed resistor

At a given temperature, the slope is greatest when the fixed resistor equals the thermistor network’s resistance. For one threshold, that is the value to use. For two, the usual rule of thumb is the geometric mean of the two resistances. The calculator suggests the value that gives the less sensitive threshold the steepest slope it can have. For a thermistor on its own with well-separated thresholds, that is where the two slopes come out equal, below the geometric mean because the thermistor’s curve is steeper at the cold end. With close thresholds, or a network flattened by a parallel or series resistor, the best value can sit at one threshold’s resistance, or above the geometric mean; the result says which. A steeper slope turns the same voltage error into fewer degrees. With fixed comparator levels the levels are set, so changing the resistor moves the trip temperatures instead.

Slope is not the only consideration. A smaller fixed resistor draws more current, which warms the thermistor, and a parallel resistor changes what an open thermistor reads as.

Self-heating

The current through the thermistor warms it above its surroundings by its power divided by its dissipation constant. It then reads warmer than the thing it measures, so both thresholds trip at a slightly lower real temperature. Datasheets give the dissipation constant in still air; the way the part is mounted changes it, so treat the result as a rough guide. With microwatts in the thermistor it is negligible.

Open and shorted thermistors

A thermistor that comes unplugged or shorts should read as a reason to stop. An open thermistor reads as cold and a short as hot, but a parallel or series resistor limits how far the pin can go, and can leave a fault reading close enough to a threshold that, at the worst tolerances, it may not trip. The calculator gives where each fault puts the pin, nominally, and whether it is past the threshold on its side at every tolerance; check it, too, against how the chip treats a pin near the bias or near ground.

Reading it with an ADC

The ADC sees the divider as a source with a resistance of the fixed resistor in parallel with the thermistor network. At the cold end it approaches the fixed resistor’s value, or Rfixed ∥ Rparallel with a parallel resistor, which can be more than a successive-approximation ADC can settle through in its sampling time. A capacitor from the pin to ground supplies the sampling charge; check the source resistance limit in the ADC’s datasheet. Leakage current on the pin flows through the same resistance and adds an offset.

Hysteresis

Comparators usually have hysteresis: once a threshold trips, the pin has to come back past a second level before it releases. Check the recovery temperature as well as the trip temperature. To find it, add the hysteresis to the threshold voltage, in the direction of recovery, and enter the result under “Convert a reading”.

Common questions

What is the Beta value of a thermistor?

Beta describes how steeply the resistance falls with temperature, fitted between two temperatures, usually 25 °C and 50 °C or 85 °C (written B25/50 or B25/85). The Beta equation is exact at those two temperatures and drifts away from the real curve outside them.

What value of fixed resistor should I use with a thermistor?

For one threshold, a fixed resistor equal to the thermistor network’s resistance at that temperature (the thermistor’s own, if there are no series or parallel resistors) gives the steepest slope there. For two thresholds, the calculator finds the value that gives the less sensitive one the steepest slope it can have; for a thermistor on its own with well-separated thresholds, that is where the two slopes are equal.

Why does a thermistor threshold trip at the wrong temperature?

Every part in the divider has a tolerance, and the thermistor’s curve turns each one into degrees. Where the curve is flat, as with a parallel resistor at the cold end, a small voltage error becomes a large temperature error.

Want a second look at your design?

If you have a design heading toward a board order and want a second set of eyes, get in touch.

Based in southern Indiana. Working with clients anywhere, including companies across the Midwest.