NTC temperature sensor module

A 10 k NTC thermistor and a 10 k resistor on a three-pin board. Aliases: KY-013, analog temperature module, thermistor module, Wokwi's NTC temperature sensor.

Pins

Pin What it does
VCC Supply.
OUT The divider's middle: half the supply at 25 C, lower as it warms.
GND Ground.

Properties

temperature is where it starts, in degrees Celsius (24). beta is the thermistor's B constant (3950).

While it runs

The slider is the temperature; the bead's color follows it.

Reading it on an Arduino

The conversion every tutorial for this module uses:

const float BETA = 3950;
int analogValue = analogRead(A0);
float celsius = 1 / (log(1 / (1023. / analogValue - 1)) / BETA + 1.0 / 298.15) - 273.15;

It turns the reading into the thermistor's resistance over 10 k, then the beta equation into degrees.

What the model gets right

The divider: 10 k from VCC to OUT, the thermistor from OUT to ground, so OUT falls as the bead warms and its resistance falls. It is driven as the divider it is, the two resistances in parallel behind its voltage, so a load on OUT pulls it.

The beta model, R = 10 k x exp(B (1/T - 1/298.15)), the same as the bare thermistor: the tutorial's formula gives the slider's temperature back to a few hundredths of a degree.

What it does not model

Self-heating, the bead's thermal lag (it follows the slider at once), and the tolerance of a real bead and resistor, a few percent each, which on a real module is a degree or two of error.

Common mistakes

Using the formula with a different BETA from the module's: the reading is right at 25 C and drifts away from it either side.

See it in action

NTC thermometer prints the temperature in degrees. Open it at /templates.