ESP32 3.3V NTC Thermistor Divider & Lookup Table Calculator

Design an NTC voltage divider tailored to ESP32 12-bit ADC linearity (11 dB attenuation), with R-T curve, mV/°C sensitivity and C99/Python code.

Jump to results

Inputs

Thermistor parameters
Divider & firmware LUT
Match R25 near your primary target temperature.

Results

Estimates
Resistance at 30 °C8.04 kΩ
Divider output voltage
1.83 V
Expected 12-bit ADC code
2,270 / 4,095
Voltage sensitivity
35.04 mV/°C
Resolution at spot temp
0.023 °C/LSB
Self-heating power
0.416 mW
Firmware LUT entries
65 × int16_t (130 bytes)
NTC resistance & ADC divider voltage curve (−40 °C to 125 °C)
-40°C 0°C 25°C 60°C 100°C 125°C10^6Ω10^2ΩIndigo: log R(T) · Amber: V_adc(T)
Temperature vs. resistance & ADC curve
Temp (°C)NTC ResistanceV_adc (V)12-bit ADC
-40 °C401.86 kΩ0.0899
-25 °C144.32 kΩ0.214265
-10 °C58.25 kΩ0.484600
0 °C33.62 kΩ0.757939
15 °C15.84 kΩ1.2771,585
25 °C10 kΩ1.652,048
40 °C5.3 kΩ2.1572,676
55 °C2.98 kΩ2.5433,155
70 °C1.76 kΩ2.8063,482
85 °C1.09 kΩ2.9773,694
100 °C697.52 Ω3.0853,828
125 °C358.83 Ω3.1863,953
Generated C99 firmware LUT & Python converter
#include <stdint.h>

/* OhmBitLab NTC LUT: R25=10000 ohm, B=3950 K, R_pullup=10000 ohm, ntc-high, 12-bit ADC */
#define NTC_LUT_SIZE 65U
#define NTC_ADC_SHIFT 6U
#define NTC_ADC_STEP (1U << NTC_ADC_SHIFT)

/* Temperature in tenths of deg C (e.g. 250 = 25.0 C) indexed by (adc >> NTC_ADC_SHIFT) */
static const int16_t ntc_temp_c_x10[NTC_LUT_SIZE] = {
   -500,  -460,  -364,  -302,  -256,  -218,  -186,  -157,
   -132,  -108,   -87,   -66,   -47,   -29,   -11,     6,
     22,    38,    53,    68,    83,    97,   111,   125,
    139,   153,   167,   181,   195,   208,   222,   236,
    250,   264,   279,   293,   308,   323,   338,   354,
    370,   386,   403,   421,   439,   458,   477,   498,
    520,   543,   567,   593,   621,   652,   685,   722,
    764,   811,   867,   934,  1017,  1129,  1296,  1614,
   1500
};

int16_t ntc_adc_to_c_x10(uint16_t adc) {
  uint16_t idx = adc >> NTC_ADC_SHIFT;
  if (idx >= NTC_LUT_SIZE - 1U) return ntc_temp_c_x10[NTC_LUT_SIZE - 1U];
  int32_t t0 = ntc_temp_c_x10[idx];
  int32_t t1 = ntc_temp_c_x10[idx + 1U];
  uint16_t frac = adc & (NTC_ADC_STEP - 1U);
  return (int16_t)(t0 + (((t1 - t0) * (int32_t)frac) >> NTC_ADC_SHIFT));
}
import math

R_PULLUP = 10000
ADC_MAX = 4095
TOPOLOGY = "ntc-high"
R25 = 10000
BETA = 3950

def adc_to_temp_c(adc: int) -> float:
    if adc <= 0 or adc >= ADC_MAX:
        raise ValueError("ADC reading saturated at rail")
    ratio = adc / ADC_MAX
    r_ntc = R_PULLUP * ratio / (1.0 - ratio) if TOPOLOGY == "ntc-low" else R_PULLUP * (1.0 - ratio) / ratio
    inv_t = (1.0 / 298.15) + math.log(r_ntc / R25) / BETA
    return (1.0 / inv_t) - 273.15

# Example spot check at 30 C -> ADC ~ 2270
print(f"{adc_to_temp_c(2270):.2f} C")

Choose a bias resistor near the NTC resistance at your most critical temperature to maximize mV/°C sensitivity and minimize quantization error.

Keep ESP32 NTC voltages inside the linear ADC sweet spot

Classic ESP32 ADCs exhibit strong nonlinearity near 0 V (<150 mV) and above ~2.6 V even at 11 dB attenuation. Selecting a divider resistor that centers your target temperature range between 0.5 V and 2.4 V keeps raw readings inside the cleanest calibration zone.

In NTC-high topology (NTC to 3.3 V, pull-down to GND), output voltage rises with temperature—matching intuitive positive-slope telemetry while keeping the thermistor isolated from ground loops.

Formulas

  • NTC-high V_adc = 3.3 V × R_pulldown ÷ (R_ntc + R_pulldown)
  • Mid-band target: 0.4 V ≤ V_adc ≤ 2.4 V
  • Use esp_adc_cal / adc_cali_raw_to_voltage() before lookup

Worked example

With a 10 kΩ B3950 NTC wired NTC-high over a 10 kΩ pull-down at 30 °C, R_ntc = 8.06 kΩ and V_adc = 1.827 V (ADC code 2,267)—squarely in the ESP32 ADC linear band.

Frequently asked questions

Why does ESP32 NTC readings jump when Wi-Fi transmits?

Wi-Fi TX bursts cause brief 3.3 V rail dips and ground bounce. Add a 100 nF C0G cap at the ADC pin, use ADC1 (not ADC2), and average 16 samples.

Should I feed calibrated millivolts or raw ADC counts into the LUT?

On classic ESP32, convert raw counts via `adc_cali_raw_to_voltage()` and map `(mv * 4095) / 3300` into the LUT for best linearity; ESP32-S3/C3 ADCs are much more linear natively.

Does NTC-high vs NTC-low change self-heating?

No. Total divider current and I²R power dissipated inside the thermistor depend only on Vref, R_bias and R_ntc, regardless of which resistor sits on top.