Practical Bench / Sensing, Optics & Medical · Intermediate · 60 min
Thermistor two-point calibration
Use two reference temperatures to find the Beta value of an NTC thermistor, then check the error at a third temperature using a reference thermometer.
Why it matters
Battery packs, EV chargers and medical probes measure temperature with thermistors. Calibration is what turns a resistor into a trusted sensor.
Toy or everyday hack
Thermistors are inside cheap toys, hot-glue guns, kettles and chargers; here you use a loose 10 kΩ NTC
Safety
- Use warm, not boiling, water. Hot water can scald.
- Keep the electronics dry: seal the thermistor in a bag or use a waterproof probe.
- Do not put an unsealed thermistor or wires into water while powered.
Parts list
| Part | Qty | Note |
|---|---|---|
| Arduino Uno or compatible | 1 | |
| 10 kΩ NTC thermistor | 1 | Epoxy bead or probe type |
| 10 kΩ, 1 % resistor | 1 | Fixed resistor |
| Glass of ice and water, glass of warm water (about 40 to 50 °C) | 2 | |
| Reference thermometer (digital, 0.1 °C) | 1 | Used as truth |
Tools and equipment
Connections
| From | To | Note |
|---|---|---|
| 5 V | 10 kΩ fixed resistor → A0 | |
| A0 | NTC thermistor → GND | The junction is the measuring point |
What you should see
Resistance falls as temperature rises. A common 10 kΩ NTC has a Beta of roughly 3380 to 3950 K, but your own two-point value fits your own part. The middle point shows whether the two-point model is good enough: errors of a degree or less are normal for this method over a limited range, and the reference thermometer itself limits what you can claim.
Step by step
- Measure the real value of the fixed resistor with the multimeter. Enter it as R fixed in the logbook (and in the sketch).
- Upload the sketch and note the ADC raw value at room temperature. Put the reference thermometer beside the thermistor.
- Point 1 (cold): thermistor and thermometer in a bag in ice-water. Wait until both readings stop changing. Write the temperature and the ADC raw value.
- Point 2 (room): leave both in the air for 5 minutes. Write both values.
- Point 3 (warm): put both in warm water (40 to 50 °C). Write both values.
- The logbook uses the first and last rows to calculate Beta and then predicts the temperature in the other rows. The difference to the reference thermometer is the calibration error.
- Enter T1, R1 and Beta into the sketch and check the Serial Monitor against the reference at a fourth temperature.
Challenge: Compare the Beta result with the more precise Steinhart-Hart equation using three points and see where the Beta model is weakest.
Code (Arduino Uno (or compatible), Arduino IDE)
Check pin numbers against your board. Test the sketch on your own hardware before a class demo.
// Practical 12 - NTC thermistor two-point (Beta) calibration (Arduino Uno; ESP32 notes below)
// Wiring: 5 V --- R_FIXED --- A0 --- NTC --- GND
const uint8_t NTC_PIN = A0;
const float ADC_MAX = 1023.0; // ESP32: 4095 and use GPIO34 (ADC1)
const float R_FIXED = 10000.0; // measure your resistor with a multimeter and enter the real value
// Fill these in after the logbook gives you your own numbers:
float T1_C = 25.0; // reference point 1 (deg C)
float R1 = 10000.0; // NTC resistance at T1 (ohm)
float BETA = 3950.0; // from the logbook calculation
float readOhms() {
long s = 0;
for (int i = 0; i < 32; i++) { s += analogRead(NTC_PIN); delay(2); } // average = less noise
float raw = s / 32.0;
if (raw > ADC_MAX - 1) raw = ADC_MAX - 1; // avoid divide-by-zero
return R_FIXED * raw / (ADC_MAX - raw);
}
float ohmsToC(float r) { // Beta equation: 1/T = 1/T1 + ln(R/R1)/Beta
float invT = 1.0 / (T1_C + 273.15) + log(r / R1) / BETA;
return 1.0 / invT - 273.15;
}
void setup() { Serial.begin(115200); }
void loop() {
float r = readOhms();
Serial.print("R = "); Serial.print(r, 0);
Serial.print(" ohm T = "); Serial.print(ohmsToC(r), 1); Serial.println(" C");
delay(1000);
}Readings logbook
Type your measured values. Calculated columns and the analysis update as you type, and your entries are saved in this browser.
If it does not work
| Symptom | Likely cause and fix |
|---|---|
| Raw value never changes | Thermistor wired as the other half of the divider is shorted, or the wires are loose. Measure the thermistor resistance directly. |
| Large error at the middle point | The thermistor and the thermometer were not at the same temperature. Wait longer and keep them touching. |
| Self-heating | Too much current through the thermistor warms it. Use a 10 kΩ divider from 3.3 or 5 V and sample only briefly. |
| Beta is nonsense | Rows swapped or an ADC raw value close to 0 or the maximum. Check the divider and the raw values. |