Learn Arduino UNO · Lesson 7

Wire a thermistor by hand and read temperature change.

A thermistor does not produce a voltage on its own. You will build a simple voltage divider from a thermistor and a fixed resistor, feed the centre point into A0, and watch the reading move as the sensor warms and cools.

What you need

  • Arduino UNO
  • 10 kΩ NTC thermistor
  • 10 kΩ fixed resistor
  • Breadboard and jumper wires

Goal: understand the divider before using a ready-made temperature module.

▶ YOUTUBE DEMO PLACEHOLDERSuggested: “Arduino Thermistor From Scratch — Voltage Divider + Serial Monitor”

Manual wiring

5 V → thermistor → A0 junction → 10 kΩ resistor → GND

The fixed resistor is the lower leg of the divider and pulls the junction towards ground. With a typical NTC thermistor, resistance falls as temperature rises, so this wiring usually makes the A0 reading rise as the thermistor warms.

Swap the two components and the behaviour reverses. Putting the fixed resistor at the top and the thermistor to GND will usually make the reading fall as temperature rises.

Read the raw analogue value first

const int thermistorPin = A0;

void setup() {
  Serial.begin(9600);
}

void loop() {
  int reading = analogRead(thermistorPin);
  Serial.println(reading);
  delay(250);
}

The UNO’s analogue converter returns a value from 0 to 1023. At this stage, do not rush into converting it to degrees. First prove that the divider is wired correctly and that the number changes predictably.

Experiments

  1. Pinch the thermistor gently between two fingers and watch the trend.
  2. Let it cool and see whether the reading returns.
  3. Swap the thermistor and 10 kΩ resistor and confirm the reading direction reverses.
  4. Measure the fixed resistor with a multimeter and compare its real value with the colour bands.

Challenge

Choose a threshold value from the Serial Monitor and make the built-in LED switch on when the thermistor reading crosses it.