Level 1 · Design Scenario 2

Design a temperature warning system.

This project combines the thermistor voltage divider, Serial Monitor, variables, comparisons and several LED outputs. The focus is the design process: turn a brief into a circuit, plan the logic, build it, code it and prove that it works.

The customer brief

Design a simple temperature warning unit for an equipment enclosure. A green lamp should show normal conditions, amber should warn that the enclosure is becoming warm, and red should show an over-temperature condition.

Requirements

  • Use a thermistor in a manual voltage divider.
  • Show one clear status at a time: green, amber or red.
  • Print the raw sensor value to Serial Monitor while calibrating.
  • Allow threshold values to be edited in the sketch.
  • Use straightforward Level 1 code only.
▶ YOUTUBE DESIGN WALKTHROUGHSuggested title: “Arduino Temperature Warning System — Design, Build, Code and Test”

1. Identify the input and outputs

10 kΩ NTC thermistor divider→Arduino A0→Compare with limits→Green / Amber / Red LEDs
HOT
WARM
NORMAL

2. System plan diagram

Temperature→Thermistor resistance changes→Divider voltage changes→A0 reading→Threshold decision→Status LED

3. Circuit diagram

Thermistor divider5V10 kΩ NTCA010 kΩGNDStatus outputsPin 8 → resistor → green LED → GNDPin 9 → resistor → amber LED → GNDPin 10 → resistor → red LED → GNDUse 220–330 Ω for each LED.
Direction check: with the NTC at the top of the divider as shown, warming the thermistor should increase the A0 reading. Verify this first. If you wire the divider the opposite way, your readings will move in the opposite direction and your comparison signs must change.

4. Breadboard build plan

Thermistor divider
5V → 10 kΩ NTC → A0 junction → 10 kΩ → GND
Green LED
Pin 8 → resistor → LED → GND
Amber LED
Pin 9 → resistor → LED → GND
Red LED
Pin 10 → resistor → LED → GND

Keep all LED cathodes on the common ground rail. Before adding the decision logic, upload a tiny sketch that prints A0 and warm the thermistor gently between your fingers. Record a few typical readings.

5. Pseudocode

START
Set green, amber and red pins as outputs
Start Serial Monitor
Set two threshold values

REPEAT FOREVER
Read thermistor value
Print value

IF value is below warm limit
  Green ON, amber OFF, red OFF
ELSE IF value is below hot limit
  Green OFF, amber ON, red OFF
ELSE
  Green OFF, amber OFF, red ON
END IF
Wait briefly
REPEAT

6. Arduino code

const int thermistorPin = A0;
const int greenLed = 8;
const int amberLed = 9;
const int redLed = 10;

int warmLimit = 500;
int hotLimit = 700;

void setup() {
  pinMode(greenLed, OUTPUT);
  pinMode(amberLed, OUTPUT);
  pinMode(redLed, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  int temperatureValue = analogRead(thermistorPin);
  Serial.println(temperatureValue);

  if (temperatureValue < warmLimit) {
    digitalWrite(greenLed, HIGH);
    digitalWrite(amberLed, LOW);
    digitalWrite(redLed, LOW);
  }
  else if (temperatureValue < hotLimit) {
    digitalWrite(greenLed, LOW);
    digitalWrite(amberLed, HIGH);
    digitalWrite(redLed, LOW);
  }
  else {
    digitalWrite(greenLed, LOW);
    digitalWrite(amberLed, LOW);
    digitalWrite(redLed, HIGH);
  }

  delay(200);
}

Important: the example threshold numbers are not universal temperatures. They are raw ADC values used to teach the system. Calibrate your own warm and hot limits by observing Serial Monitor readings. Converting a thermistor reading into degrees Celsius can be taught later once the learner understands the basic divider and decision process.

7. Test plan

TestInput / conditionExpected resultActual resultPass?
1Sensor value below warmLimitGreen only
2Sensor value exactly at warmLimitAmber only
3Value between warmLimit and hotLimitAmber only
4Sensor value exactly at hotLimitRed only
5Sensor value above hotLimitRed only
6Warm thermistor graduallyStatus progresses green → amber → red
7Allow thermistor to coolStatus returns red → amber → green

8. Evaluation questions

  • Were the chosen warm and hot limits sensible?
  • Did only one LED illuminate at a time?
  • Were the status changes repeatable?
  • What happens if the thermistor is disconnected?
  • Would a real product need an alarm, display or fail-safe state?