Arduino Digital Thermometer

Digital Thermometer Prototype

1. Introduction

Temperature measurement is one of the most common and important applications in electronics. In this project, we build a Digital Thermometer using Arduino and LM35 sensor, which can measure temperature accurately and display it in real time.

The LM35 sensor provides an output voltage directly proportional to temperature in Celsius, making it very easy to interface with Arduino without complex calculations.


2. Components Required

  • Arduino Uno / Nano
  • LM35 Temperature Sensor
  • 16x2 LCD Display (optional but recommended)
  • 10k Potentiometer (for LCD contrast)
  • Breadboard
  • Jumper Wires
  • USB Cable / Power Supply

3. Circuit and Connections

Arduino Uno Pinout Diagram
Pinout Diagram of Arduino Uno

LM35 Pinout Diagram
LM35 Pinout Diagram
16X2 LCD Pinout Diagram
Pin-out Diagram 16X2 LCD
LM35 Connections

  • VCC → 5V (Arduino)
  • GND → GND
  • OUT → A0 (Arduino)

LCD Connections (Optional)

  • VSS → GND
  • VDD → 5V
  • V0 → Middle pin of potentiometer
  • RS → Pin 7
  • EN → Pin 6
  • D4 → Pin 5
  • D5 → Pin 4
  • D6 → Pin 3
  • D7 → Pin 2
  • RW → GND

4. Detailed Step By Step Circuit Working

  1. The LM35 sensor senses ambient temperature.
  2. It outputs an analog voltage (10mV per °C).
  3. Arduino reads this voltage using analog pin A0.
  4. The analog value is converted into temperature in Celsius.
  5. The calculated temperature is:
    • Displayed on Serial Monitor
    • Shown on LCD (if connected)

5. Libraries to be Included

For LCD display:

#include <LiquidCrystal.h>

6. Code

#include <LiquidCrystal.h>

LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

int sensorPin = A0;
float temperature;

void setup() {
lcd.begin(16, 2);
Serial.begin(9600);
}

void loop() {
int reading = analogRead(sensorPin);

float voltage = reading * (5.0 / 1023.0);
temperature = voltage * 100; // LM35 conversion

Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println(" C");

lcd.setCursor(0, 0);
lcd.print("Temp: ");
lcd.print(temperature);
lcd.print(" C");

delay(1000);
}

7. Detailed Step By Step Code Working

  • analogRead(A0) reads sensor value (0–1023)
  • Convert to voltage using:

    voltage = reading × (5.0 / 1023.0)
  • LM35 gives 10mV per °C, so:

    temperature = voltage × 100
  • Data is displayed on:
    • Serial Monitor
    • LCD Display
  • Loop runs every 1 second

8. Testing and Calibration

  • Upload the code to Arduino
  • Open Serial Monitor
  • Observe temperature values
  • Compare with room thermometer
  • Slight variations are normal
  • Avoid touching sensor directly (body heat affects reading)

9. Applications

  • Room temperature monitoring
  • Weather stations
  • Industrial temperature measurement
  • HVAC systems
  • Laboratory instruments

10. Advantages

  • Simple and low cost
  • No calibration required (factory calibrated)
  • Direct Celsius output
  • Easy interfacing with Arduino

11. Disadvantages

  • Limited temperature range
  • Not waterproof
  • Less accurate than digital sensors (like DHT22)
  • Affected by noise if wiring is long

12. Future Improvements

  • Add IoT monitoring (ESP8266/ESP32)
  • Use OLED display for better UI
  • Add data logging (SD card)
  • Use multiple sensors for area monitoring
തുടക്കക്കാർക്കായി ഇലക്ട്രോണിക്സ് ലളിതമായി പഠിക്കാം.

Empowering students in Kerala with hands-on technical skills.