Arduino thermometer

Two kinds of temperature sensor: the LM35 turns temperature into voltage (10 mV/°C), while a thermistor's resistance changes. Connect them to Arduino and read the temperature in the Serial Monitor.

Convert the analog reading to °C, sort it into cold, normal and hot, and raise an alarm when it overheats. Build a device that turns a fan on by itself when it gets warm.

In this lab

  • LM35 and thermistor
  • T = A0 · 500 / 1023
  • threshold alarm
  • automatic fan

What you learn

Temperature is the most commonly measured quantity: thermometers, air conditioners, fridges, incubators and greenhouses all track it. This lab has two sensors: the LM35 turns temperature into a voltage (10 mV/°C), and a thermistor's resistance changes with temperature. The aim is to measure temperature and control a device automatically from it.

Tasks

  1. Wire the LM35 correctly and print the temperature to Serial
  2. Convert the analog value to °C: T = A0 · 500 / 1023
  3. Raise an alarm at a threshold (overheating)
  4. Tell states apart with several conditions: cold, normal, hot
  5. Switch a fan automatically by temperature; build a divider with a thermistor

What you can build

  • Room thermometer — Temperature on the serial monitor or an LED bar.
  • Incubator controller — Below 37 °C the "heater" (LED) switches on; above, it switches off.
  • Fridge alarm — If the door is left open and it warms up, the buzzer sounds.
  • Automatic fan — Turns itself on when hot and off when cool.
  • Greenhouse monitor — Cold blue, normal green, hot red.
  • Temperature bar — The warmer it is, the more lights.

Virtual Lab › Robotics

Related labs

  • Robotics basics
  • Arduino
  • Arduino LED
  • Arduino sensors
  • Arduino servo
  • Arduino LCD