Steinhart-Hart Coefficients for NTC Thermistors: A Practical Guide
An NTC thermistor is a simple part: its resistance falls as temperature rises. The hard part is turning that resistance into a temperature reading you trust.
For rough projects, a lookup table or beta equation may be enough. For sensor characterization, chamber tests, battery packs, or thermal validation, you usually want the Steinhart-Hart equation because it models the curved resistance-temperature behavior more accurately across a wider range.
This guide walks through the practical workflow: measure resistance, solve coefficients, keep raw data, and decide whether the math belongs in firmware or in your logging tool.
The Steinhart-Hart Equation
The common three-coefficient form is:
1 / T = A + B * ln(R) + C * (ln(R))^3
Where:
| Symbol | Meaning |
|---|---|
T |
Temperature in Kelvin |
R |
Thermistor resistance in ohms |
A, B, C |
Coefficients for that thermistor curve |
ln |
Natural logarithm |
The Kelvin detail matters. If you measure at 0 deg C, 25 deg C, and 75 deg C, convert those to Kelvin before solving:
K = deg C + 273.15
When Steinhart-Hart Is Worth Using
Use Steinhart-Hart when:
- You need accuracy over a broad temperature range.
- You have three measured resistance-temperature points.
- You are characterizing unknown or generic thermistors.
- You want to compare raw resistance and calculated temperature later.
Use the simpler beta equation when:
- Your temperature range is narrow.
- The datasheet gives a trustworthy beta value.
- You only need approximate readings.
- You are trying to minimize firmware size.
Measure Three Calibration Points
To solve for A, B, and C, you need three temperature and resistance pairs. A common bench setup is:
| Point | Practical source | Notes |
|---|---|---|
| Low | Ice bath near 0 deg C | Stir and wait for the reading to settle. |
| Mid | Room temperature near 20-25 deg C | Measure actual room temperature, do not assume exactly 25 deg C. |
| High | Warm water bath | Use a reference thermometer and avoid boiling water near wiring. |
For each point, record the thermistor resistance with a meter or calculate it from your voltage divider. Do not use ADC counts directly in the Steinhart-Hart equation. The equation expects resistance.
Example measurements:
| Temperature | Kelvin | Resistance |
|---|---|---|
| 0.0 deg C | 273.15 K | 32650 ohms |
| 25.0 deg C | 298.15 K | 10000 ohms |
| 75.0 deg C | 348.15 K | 1480 ohms |
Those three rows are enough for a calculator or linear solver to produce coefficients. DaqSense includes a Steinhart-Hart coefficient calculator so you can enter the measured points and avoid hand-solving the system.
Convert ADC Counts to Resistance First
Most microcontroller circuits use a voltage divider. If the fixed resistor is connected to Vcc, the thermistor is connected to ground, and the ADC reads the middle node, the thermistor resistance is:
R_thermistor = R_fixed * ADC / (ADC_max - ADC)
For a 12-bit ADC:
ADC_max = 4095
For a 10-bit Arduino Uno ADC:
ADC_max = 1023
The divider direction matters. If the thermistor and fixed resistor are swapped, the formula changes:
R_thermistor = R_fixed * (ADC_max - ADC) / ADC
This is one of the easiest thermistor mistakes to make. If your calculated temperature moves the wrong direction as you warm the sensor, check the divider orientation before blaming the coefficients.
Firmware Example
You can calculate temperature directly on the Arduino:
const float A = 0.001129148;
const float B = 0.000234125;
const float C = 0.0000000876741;
const float R_FIXED = 10000.0;
void loop() {
int adc = analogRead(A0);
float resistance = R_FIXED * adc / (1023.0 - adc);
float logR = log(resistance);
float tempK = 1.0 / (A + B * logR + C * logR * logR * logR);
float tempC = tempK - 273.15;
Serial.print(adc);
Serial.print(",");
Serial.print(resistance, 2);
Serial.print(",");
Serial.println(tempC, 2);
}
That works, but it has tradeoffs:
- Floating-point logarithms cost time on small microcontrollers.
- Changing coefficients means recompiling and reflashing firmware.
- If you only log temperature, a bad coefficient ruins the run.
- Firmware math hides the raw signal that helps debug wiring and noise.
A Safer Bench Workflow: Log Raw and Calculated Values
For prototyping, a better pattern is:
- Print raw ADC counts or calculated resistance from the microcontroller.
- Apply Steinhart-Hart coefficients on the PC.
- Record both raw and calculated columns.
Example Arduino output:
time_ms,adc,resistance_ohm
1000,621,15443.21
2000,622,15478.18
3000,623,15513.25
Then DaqSense can apply the Steinhart-Hart calibration live and save:
time_ms,adc,resistance_ohm,temp_c
1000,621,15443.21,17.82
2000,622,15478.18,17.76
3000,623,15513.25,17.70
That gives you a recovery path. If you later realize the fixed resistor value was actually 9.93 kohms instead of 10 kohms, the raw run is still useful.
Common Thermistor Calibration Mistakes
| Mistake | What it causes | How to avoid it |
|---|---|---|
| Using Celsius in the equation | Completely wrong coefficients | Convert all calibration temperatures to Kelvin. |
Using ADC counts as R |
Nonphysical results | Convert ADC counts to resistance first. |
| Assuming room temperature is exactly 25 deg C | Offset error | Measure room temperature with a reference thermometer. |
| Ignoring fixed resistor tolerance | Several degrees of error | Measure the fixed resistor with a meter. |
| Logging only calculated temperature | No way to repair bad math later | Save raw ADC or resistance too. |
Steinhart-Hart is not just a formula. It is a measurement workflow. The more faithfully you preserve the raw electrical data, the easier it is to correct the math without repeating the experiment.