10k NTC 3950 Steinhart-Hart & 12-Bit ADC Lookup Table Generator

Generate a 10 kΩ NTC B3950 resistance table, 3.3 V 12-bit ADC voltage curve and copyable C99 int16_t firmware lookup table.

Jump to results

Inputs

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

Results

Estimates
Resistance at 25 °C10 kΩ
Divider output voltage
1.65 V
Expected 12-bit ADC code
2,048 / 4,095
Voltage sensitivity
-36.66 mV/°C
Resolution at spot temp
0.022 °C/LSB
Self-heating power
0.272 mW
Firmware LUT entries
33 × int16_t (66 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Ω3.223,996
-25 °C144.32 kΩ3.0863,830
-10 °C58.25 kΩ2.8163,495
0 °C33.62 kΩ2.5433,156
15 °C15.84 kΩ2.0232,510
25 °C10 kΩ1.652,048
40 °C5.3 kΩ1.1431,419
55 °C2.98 kΩ0.757940
70 °C1.76 kΩ0.494613
85 °C1.09 kΩ0.323401
100 °C697.52 Ω0.215267
125 °C358.83 Ω0.114142
Generated C99 firmware LUT & Python converter
#include <stdint.h>

/* OhmBitLab NTC LUT: R25=10000 ohm, B=3950 K, R_pullup=10000 ohm, ntc-low, 12-bit ADC */
#define NTC_LUT_SIZE 33U
#define NTC_ADC_SHIFT 7U
#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] = {
   1500,  1293,  1016,   866,   763,   685,   621,   567,
    520,   477,   439,   403,   369,   338,   308,   278,
    250,   222,   194,   167,   139,   111,    82,    53,
     22,   -12,   -47,   -87,  -132,  -186,  -257,  -365,
   -500
};

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-low"
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 25 C -> ADC ~ 2048
print(f"{adc_to_temp_c(2048):.2f} C")

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

Build a zero-float firmware LUT for a 10 kΩ B3950 NTC thermistor

The 10 kΩ (R25) B3950 NTC paired with a 10 kΩ 1% pull-up resistor is the universal baseline temperature sensor across battery packs, power supplies and IoT hardware. At 25 °C the divider sits right at mid-scale (Vref / 2), giving maximum sensitivity across ambient and warm operating temperatures.

Switch between the Beta model and three-term Steinhart-Hart coefficients, inspect the R-T curve SVG, and copy the generated 33-point or 65-point C99 lookup table directly into your embedded firmware.

Formulas

  • R(T) = 10,000 × exp[3950 × (1/(T+273.15) − 1/298.15)]
  • ADC_code = round(4095 × R_ntc ÷ (10,000 + R_ntc))
  • LUT index = adc >> 7 (for 33-point 12-bit table)

Worked example

At 25 °C, R_ntc = 10.00 kΩ, V_adc = 1.650 V (ADC 2,048), sensitivity is −36.5 mV/°C and each 12-bit LSB resolves ~0.022 °C.

Frequently asked questions

How accurate is a 33-point C99 linear-interpolated LUT for a 10 kΩ NTC?

Between 0 °C and 85 °C, a 33-point power-of-two LUT typically interpolates within ±0.15 °C of the continuous equation; choose 65 points to stay within ±0.04 °C.

Why store temperatures as int16_t tenths of °C (c_x10)?

Fixed-point tenths of °C cover −3,276.8 °C to +3,276.7 °C in just 2 bytes per entry without pulling floating-point math libraries into flash.

Does Vref accuracy affect a ratiometric NTC voltage divider?

No! Because both the NTC pull-up and the ADC reference share the same Vref rail, supply voltage variations cancel out completely in the ADC count.