Arduino 5V 10-Bit ADC 10k NTC Thermistor Calculator & C99 Code

Compute 10-bit Arduino Uno/Nano (0–1023) NTC thermistor voltage, ADC counts, °C/LSB resolution and compact 33-point C99 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
2.5 V
Expected 10-bit ADC code
512 / 1,023
Voltage sensitivity
-55.54 mV/°C
Resolution at spot temp
0.088 °C/LSB
Self-heating power
0.625 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)10-bit ADC
-40 °C401.86 kΩ4.879998
-25 °C144.32 kΩ4.676957
-10 °C58.25 kΩ4.267873
0 °C33.62 kΩ3.854788
15 °C15.84 kΩ3.065627
25 °C10 kΩ2.5512
40 °C5.3 kΩ1.732354
55 °C2.98 kΩ1.147235
70 °C1.76 kΩ0.748153
85 °C1.09 kΩ0.49100
100 °C697.52 Ω0.32667
125 °C358.83 Ω0.17335
Generated C99 firmware LUT & Python converter
#include <stdint.h>

/* OhmBitLab NTC LUT: R25=10000 ohm, B=3950 K, R_pullup=10000 ohm, ntc-low, 10-bit ADC */
#define NTC_LUT_SIZE 33U
#define NTC_ADC_SHIFT 5U
#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,
    519,   477,   438,   403,   369,   338,   307,   278,
    250,   222,   194,   166,   139,   111,    82,    52,
     21,   -12,   -48,   -88,  -133,  -188,  -258,  -368,
   -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 = 1023
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 ~ 512
print(f"{adc_to_temp_c(512):.2f} C")

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

Measure temperature cleanly on AVR 10-bit Arduino analog pins

ATmega328P boards (Arduino Uno and Nano) provide a 10-bit SAR ADC (0–1023) referenced to the 5 V supply. With a 10 kΩ pull-up and 10 kΩ NTC, each ADC count near room temperature corresponds to less than 0.09 °C—more than enough for thermostats, fan controllers and battery monitors.

Because ATmega328P has no hardware FPU and only 32 KB flash, replacing `log()` with the generated 33-entry `int16_t` lookup table saves over 1.5 KB of program memory and runs in microseconds.

Formulas

  • ADC_10bit = round(1023 × R_ntc ÷ (10,000 + R_ntc))
  • Self-heating at 25 °C, 5 V = 2.5² ÷ 10,000 = 0.625 mW
  • LUT step = 1024 ÷ 32 = 32 counts (adc >> 5)

Worked example

At 25 °C on a 5 V Arduino, V_adc = 2.500 V (ADC code 512) with −55.3 mV/°C sensitivity and 0.088 °C/LSB quantization resolution.

Frequently asked questions

Does 5 V self-heating skew a 10 kΩ NTC reading?

At 25 °C, 0.625 mW on a small bead with a 2 mW/°C dissipation constant adds ~0.3 °C in still air. You can drive the pull-up from a GPIO pin and power it only during sampling to eliminate self-heating.

Can I store the generated C99 LUT in PROGMEM on AVR?

Yes—add `PROGMEM` to the array declaration and read entries with `pgm_read_word(&ntc_temp_c_x10[idx])` to keep SRAM completely untouched.

Is 10-bit resolution accurate enough at 85 °C?

Yes. At 85 °C a 10 kΩ B3950 with 10 kΩ pull-up still delivers ~0.2 °C/LSB resolution on a 10-bit ADC.