40 Thermistor Linearization
More
Depth: Practitioner
Progress saves as you read. Mark sections complete as you go; your progress appears in the sidebar.
A thermistor channel reports a warmer room when the reference thermometer cools. The temperature formula may be correct while the resistance calculation uses the opposite divider orientation. Check the physical circuit before adjusting calibration coefficients.
40.1 Start With the Measurement Story
This section: Start With the Measurement Story — Picture a small bead whose electrical resistance changes with heat.
Turn a Curved Reading Into a Useful Temperature
-
A small heat sensor changes resistance along a curved path.
-
One straight rule may turn the same step into the wrong temperature.
-
Check cold, middle, and warm points against a trusted tool.
-
Use the simplest curve that still meets the real error limit.
Illustrated scene: A small heat sensor changes resistance along a curved path.
Picture a small bead whose electrical resistance changes with heat. This part is called a thermistor. It is cheap and sensitive, but its change is curved rather than even. The same resistance step does not mean the same temperature step across the full range.
Begin with the temperature range that matters. An analog-to-digital converter is a part that turns the sensor voltage into a number. It is often shortened to ADC. Take the measured resistance and apply a stated conversion. Compare the result with a trusted reference at several points, not only at room temperature. Keep the units and the test conditions beside each result.
Check a cold point. Check a warm point. Check the middle. Repeat each test. Let the part settle. Note the supply value. Note the reference tool. Keep the raw reading. Keep the final value. Set a clear pass limit.
A simple straight-line rule may work across a narrow range. A wider range needs a curve, a table, or more than one line. The best choice is the least complex method that still meets the error limit for the real decision.
The simple story has limits. Part tolerance, self-heating, wire resistance, age, and poor contact can shift the answer. A neat formula cannot remove those physical effects.
Use Practitioner to choose and test the conversion. Use Under the Hood to derive the curve and track the full error.
A thermistor gives a curved resistance story, not a neat straight line. Start by mapping temperature to resistance and ADC counts, then choose a linearization method that is accurate enough for the control decision.
40.2 Learning Objectives
This section: Learning Objectives
After this page, you should be able to:
- Explain why NTC thermistors need nonlinear conversion instead of slope-and-offset calibration.
- Convert divider voltage into thermistor resistance before applying a temperature model.
- Use the Beta equation for a focused range and know when Steinhart-Hart or RTD-specific models are needed.
- Identify self-heating, ADC reference drift, lead resistance, leakage, and coefficient mismatch as temperature-measurement errors.
40.3 Why This Follows Temperature Sensor Labs
This section: Why This Follows Temperature Sensor Labs — Temperature Sensor Labs introduces common temperature devices, wiring patterns, lab exercises, and debugging values.
Temperature Sensor Labs introduces common temperature devices, wiring patterns, lab exercises, and debugging values. This page narrows in on analog temperature channels where the circuit produces resistance or voltage before firmware can report degrees Celsius.
Use it when a project uses an NTC thermistor, PT100/PT1000 RTD, divider, ADC, or reference resistor and the main risk is a plausible-looking temperature number from the wrong model.
40.4 Cheap Nonlinear Thermistors
This section: Cheap Nonlinear Thermistors — Before modelling temperature, inspect Figure 40.2 to anchor the nonlinear curve in the two-lead sensing element.
Before modelling temperature, inspect Figure 40.2 to anchor the nonlinear curve in the two-lead sensing element. The device exposes resistance only; the divider and firmware must create and interpret the measurable voltage.
A green disc-shaped NTC thermistor is soldered upright on a circuit board beside a blue cylindrical capacitor. Its two short legs enter the board at the bottom of the disc, and faint part markings are visible on the green face.
Read Figure 40.2, begin with the bead that changes resistance, then follow its two leads into the divider implied by the next discussion. Heating an NTC lowers resistance nonlinearly, connecting a cheap physical component to the need for Beta or Steinhart-Hart linearisation rather than a simple slope and offset.
The NTC thermistor is the most common temperature sensor in low-cost electronics: it is a resistor whose resistance falls steeply as it warms. That steep response makes it sensitive — small temperature changes give large resistance changes — but it comes with a catch. The resistance-versus-temperature relationship is not a line; it is an exponential curve. A thermistor that reads 10 kΩ at 25 °C might be 4 kΩ at 50 °C and 30 kΩ near freezing.
Not every thermistor behaves this way. The “NTC” in the name marks it as negative-temperature-coefficient: resistance falls as it warms, which is the behavior modeled below. Its counterpart, the PTC (positive-temperature-coefficient) thermistor, does the reverse — resistance climbs as it warms — and that reversal changes its job entirely. A PTC is rarely read as a continuous temperature value; wired in series with a circuit, its resistance stays low until self-heating from excess current pushes it past a switching temperature, then it snaps to a high-resistance state and throttles the current down to a safe trickle. That makes a PTC a resettable fuse rather than a sensor, and it is why “thermistor” on a datasheet is not automatically synonymous with the NTC curve this page linearizes.
Because of that curvature, you cannot convert resistance to temperature with a simple slope-and-offset. You need a linearization equation that models the curve. This is the defining difference from an RTD or a silicon IC sensor, which are far more linear but less sensitive and more expensive. That behavioral gap traces back to materials: an NTC thermistor's sensing element is a sintered ceramic or polymer semiconductor, while an RTD's element is a coil or film of pure metal, almost always platinum. A calibrated NTC can be very sensitive over a narrow interval, while a platinum RTD offers better repeatability and accuracy across a much wider temperature range.
In a lab, the sensor choice starts with the temperature window and the kind of error that matters. A 10 kΩ NTC is excellent for battery packs, enclosures, and short-range environmental checks because it is cheap, small, and responsive around room temperature. A PT100 or PT1000 RTD is slower and needs a cleaner analog front end, but it is easier to calibrate over a wide range. A digital IC is often the best choice when you want repeatable board temperature without doing analog conversion at all.
Reference points turn that physics into usable numbers. An ice-water bath near 0 °C, a room-temperature reference, and a warm-water point expose whether the curve is being modeled or merely guessed. If the reading is right at 25 °C but wrong at both ends, the wiring is probably fine and the equation is the weak link. If every point is offset by the same amount, the issue is more likely a reference, divider, or ADC calibration error.
Intuition: a thermistor is a magnifying glass for temperature — wonderfully sensitive in a narrow window, but the view is warped. The linearization equation is the prescription that un-warps it back into real degrees.
40.4.1 Overview Knowledge Check
40.5 Practitioner: The Beta Equation, Worked
This section: Practitioner: The Beta Equation, Worked — Before working the NTC Beta equation, look at this bare wire-wound PT100 element as a contrast.
Before working the NTC Beta equation, look at this bare wire-wound PT100 element as a contrast. Notice its white body and two leads. The photo shows an element, not a complete field probe or a temperature scale.
Real photograph of pt100 platinum rtd
The two leads take this small element into a measurement circuit, but the photo gives no evidence about enclosure, cable length, or installed accuracy. The next photo shows a finished metal probe with a different lead arrangement. Compare the visible construction before using the PT100 as a reference contrast to the NTC model below.
Before working the Beta equation, inspect Figure 40.3 to contrast the NTC model with a more nearly linear platinum reference sensor. The three-wire construction also makes lead resistance part of the measurement design.
A short stainless-steel PT100 resistance-temperature probe lies beside a ruler for scale. Its coiled red-and-black cable ends in several exposed leads at the upper right; the photo does not identify which leads form a compensation connection.
Read Figure 40.3, trace the metal probe to its three leads and note that the extra conductor supports compensation for wiring resistance. That construction contrasts with the two-lead NTC and clarifies the running choice: inexpensive sensitivity with nonlinear modelling versus a characterised platinum element and cleaner wide-range calibration.
The simplest usable model is the Beta (B-parameter) equation, which needs one reference point (R0 at T0) and the datasheet Beta constant:
1/T = 1/T0 + (1/B) × ln(R / R0) (all temperatures in kelvin)
Worked example: 10 kΩ NTC, B = 3950
Datasheet: R0 = 10 kΩ at T0 = 25 °C = 298.15 K, B = 3950
You measure R = 4.0 kΩ. Find T.
ln(R/R0) = ln(4000/10000) = ln(0.4) = -0.9163
1/T = 1/298.15 + (1/3950)(-0.9163)
= 0.0033540 - 0.0002320
= 0.0031220
T = 1 / 0.0031220 = 320.3 K = 47.2 °C
Compare that with an RTD, which barely needs linearizing at all. A PT100 follows R = R0(1 + αT) with R0 = 100 Ω and α ≈ 0.00385/°C, so at 100 °C it reads 100(1 + 0.385) = 138.5 Ω — almost a straight line.
Before trusting the 10 kΩ, B = 3950 example, use Figure 40.1 to test its calculated points inside a calibration-and-validation record rather than accepting a merely plausible temperature.
A five-step sensor calibration flow pairs reference and raw readings, diagnoses error shape, chooses a correction, then tests an unused point before accepting coefficients.
Read Figure 40.1 from reference standards to raw readings. Pair known heat points with voltage or resistance across the full range. The error view then separates a shift, a gain error, and a bent curve. This matters because a new Beta value changes curve shape. It does not move every result by the same amount. Compare the ideal and real curves before choosing a fit or lookup table. The 25 °C point checks the stated resistance. Cold and hot holdouts then test whether B = 3950 works over the planned range.
The electrical measurement comes before the temperature equation. In a common divider, the thermistor and a fixed resistor split the supply voltage; the ADC measures the middle node. With the fixed resistor tied to VCC and the thermistor tied to ground, R_thermistor = R_fixed * Vout / (Vin - Vout). Reversing the divider reverses the formula, so the first debug step is to confirm the schematic before blaming the math.
A practical calibration run records the raw ADC code, computed resistance, reference temperature, and model temperature in the same table. That table shows whether the error is random noise, a single-point offset, or a curve-fit problem. It also catches unit mistakes: the Beta equation uses kelvin, while lab notes and most datasheets report degrees Celsius.
Field tip: the Beta value itself is specified between two temperatures (e.g. 25/85 °C). Using a Beta calibrated for one range far outside it adds error, because Beta is only an approximation of the true curve.
40.5.1 Practitioner Knowledge Check
40.6 Under the Hood: When Beta Isn’t Enough
This section: Under the Hood: When Beta Isn’t Enough — The Beta equation is a two-parameter fit, so it matches the true curve well near its calibration range and drifts away from it at the extremes.
The Beta equation is a two-parameter fit, so it matches the true curve well near its calibration range and drifts away from it at the extremes. When you need accuracy across a wide span, you move to a richer model.
Steinhart-Hart equation
The three-term form 1/T = A + B·ln(R) + C·(ln R)^3 fits the thermistor curve across a wide range far better than Beta, typically to a small fraction of a degree once A, B, C are calibrated from three points.
RTDs curve too, just gently
Even a PT100 is not perfectly linear. High-accuracy work uses the Callendar–Van Dusen equation, adding second- and higher-order terms to the simple R0(1 + αT) approximation.
Sensitivity is not uniform
A thermistor is most sensitive near its nominal temperature and flattens far from it. Choosing the divider resistor near the thermistor's resistance at your target temperature keeps the reading in the sensitive region.
Self-heating shifts the reading
The current you push through the thermistor to read it dissipates power and warms the element slightly, biasing it upward. Keep the sense current low, especially in still air where heat cannot escape.
The coefficients also depend on the exact part, not just the sensor family. Two nominal 10 kΩ NTCs can share the same resistance at 25 °C yet diverge outside that point because their Beta values and tolerances differ. That is why production systems either buy a specified tolerance class, store per-device calibration constants, or calibrate the whole assembled channel rather than the bare component alone.
Model error and measurement error stack. Lead resistance is usually negligible for a 10 kΩ thermistor but can matter for low-resistance RTDs. ADC reference drift changes the computed divider ratio. Moisture or board leakage creates parallel resistance paths that look like a warmer thermistor. Long cables add pickup, so filtering can make the trace quieter without making the physics more correct.
The through-line is that a temperature reading is only as good as its model of the sensor's curve and its measurement chain. A cheap thermistor with a well-calibrated Steinhart-Hart fit can beat a nominally better sensor read through a careless linear approximation, while a high-grade RTD still fails if its excitation current, reference resistor, or lead compensation is ignored.
40.6.1 Under-the-Hood Knowledge Check
40.7 Check Divider Direction before Applying the CurveCheck your understanding: Divider Direction before Applying the Curve
This section: Check Divider Direction before Applying the Curve — Assume a 3.3 V supply, a 10 kΩ fixed resistor above the sense node and the thermistor below it to ground.
Assume a 3.3 V supply, a 10 kΩ fixed resistor above the sense node and the thermistor below it to ground. If the node measures 1.1 V, resistance is 10 kΩ × 1.1 V divided by (3.3 V − 1.1 V) = 5 kΩ. The voltage units cancel, leaving resistance. Swapping which element sits above the node changes the conversion; the same formula cannot be kept without checking the schematic.
Use the chapter’s ideal Beta model with reference resistance 10 kΩ at 25 °C and Beta 3,950 K. Convert the reference temperature to 298.15 K. The reciprocal-temperature term is 1/298.15 plus ln(5/10) divided by 3,950, in inverse kelvin. Since ln(0.5) is about −0.69315, the result is about 0.00317854 per kelvin. Inverting gives about 314.61 K, or 41.46 °C. Rounding is shown so the calculation can be re-derived.
The result fits the curve’s direction: an NTC element has lower resistance when warmer. Predict what resistance the same divider gives at half the supply voltage, 1.65 V. It gives 10 kΩ, so the ideal model returns the 25 °C reference point. That midpoint check catches several wiring and scale mistakes before a wider calibration trial.
Read Figure 40.1 from reference standards to raw measurements and error analysis. A matching midpoint is one check, while cold and hot holdouts test curve shape. The correction model comes after those residuals are visible. A single offset fitted at room temperature cannot prove that the chosen Beta coefficient describes the whole range.
Next, increase the sense current and observe a slow upward temperature bias in still air. Self-heating can warm the actual bead, so a more elaborate curve fit does not remove the physical cause. The module’s linearization lesson joins circuit orientation, units, model parameters and calibration evidence. The ideal arithmetic needs validation with the exact part, reference and installed thermal conditions.
40.8 Release Checklist
This section: Release Checklist — Start by the schematic orientation is documented so firmware converts ADC voltage into the correct resistance.
Before relying on an analog temperature channel, confirm these points:
Start by the schematic orientation is documented so firmware converts ADC voltage into the correct resistance. Then the Beta value or Steinhart-Hart coefficients belong to the exact part and temperature range in use. Next reference measurements include the operating range, not only room temperature. After that the ADC reference, fixed resistor tolerance, lead resistance, leakage paths, and filtering are included in the error budget. Continue by sense current is low enough to avoid self-heating in still air or inside the enclosure. Finally validation records raw ADC code, computed resistance, reference temperature, model output, and residual error.
40.9 See Also
This section: See Also — Start by Temperature Sensor Labs for DS18B20, DHT22, thermocouple, humidity, and lab workflows.
Start by Temperature Sensor Labs for DS18B20, DHT22, thermocouple, humidity, and lab workflows. Then Resistive Dividers and ADC Loading for divider-to-ADC measurement boundaries. Next Sensor Calibration Techniques for reference points, coefficient storage, and validation. Finally Signal Conditioning for Sensors for analog filtering and ADC preparation.
40.10 Next
This section: Next — Return to Temperature Sensor Labs once the analog conversion model is bounded, then continue to Motion and Environmental Sensor Labs for the next lab family.
Return to Temperature Sensor Labs once the analog conversion model is bounded, then continue to Motion and Environmental Sensor Labs for the next lab family.
Explore inside a platinum RTD, an NTC thermistor, a thermocouple, a capacitive humidity sensor, a Hall-effect sensor, or a strain-gauge load cell — conceptual layers with full text versions.
Find help
3 reviewed answers.
Where should I start in a module?
Open the module page from the sidebar to see its chapters in order. Use the module map to return to a topic you need.
Modules and pathsReviewed
What can I try when a project does not work?
Check the symptom, then work through the diagnostic steps. Keep the error message and the smallest example that reproduces it.
When you are stuckReviewed
How do interactive examples work?
Use the interactive guide to check how examples and simulations work before changing your project.
Interactive examples guideReviewed
