Temperature Measurement and Display using Arduino Uno and LM35 temperature sensor

 

 Temperature Measurement and Display Using Arduino UNO

This project demonstrates how to measure ambient temperature using the LM35 and display it on a 7-segment display using the Arduino Uno (commonly simulated in Tinkercad).

The LM35 outputs an analog voltage proportional to temperature. The Arduino reads this voltage, converts it into degrees Celsius, and displays the value on a single-digit or multi-digit 7-segment display.


 Components Used

  • Arduino Uno

  • LM35

  • 7-Segment Display (1-digit or 4-digit, common cathode/anode)

  • 220Ω Resistors (for each segment)

  • Breadboard

  • Jumper wires


 Working Principle

🔹 1. Temperature Sensing

The LM35 provides an output voltage where:

10 mV = 1°C

Example:

  • 250 mV → 25°C

  • 300 mV → 30°C


🔹 2. Analog Reading

Arduino reads sensor value using:

analogRead(A0);

Since Arduino ADC resolution is 10-bit:

  • Range: 0–1023

  • Reference voltage: 5V


🔹 3. Temperature Conversion Formula

temperature = (analogValue × 5.0 × 100) / 1024;

Explanation:

  • Multiply by 5V (reference)

  • Multiply by 100 (because 10mV = 1°C)

  • Divide by 1024 (ADC resolution)


🔹 4. Display on 7-Segment

  • Temperature value is split into digits.

  • Each digit is sent to corresponding segment pins.

  • For multi-digit display → Multiplexing is used.

  • Digits are displayed rapidly one by one to appear continuous.

Example:
If temperature = 28°C
Display shows → 2 8


Basic Connections

 LM35 Connections

LM35 PinConnect To
VCC5V
VoutA0
GNDGND

 7-Segment Display (Common Cathode Example)

  • Segments (a–g) → Arduino digital pins via 220Ω resistors

  • Common pin → GND

 For common anode display, logic must be inverted.


 Sample Code (Single Digit Example)

int sensorPin = A0;

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

void loop() {
int analogValue = analogRead(sensorPin);
float temperature = (analogValue * 5.0 * 100.0) / 1024.0;

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

delay(1000);
}

(Additional code required for 7-segment digit mapping.)


 Multiplexing (For 4-Digit Display)

Steps:

  1. Activate first digit.

  2. Display its number.

  3. Turn it off.

  4. Activate next digit.

  5. Repeat very fast (1–5 ms delay).

This creates a stable multi-digit display effect.


 What Students Learn

✅ Analog sensor interfacing
✅ ADC (Analog-to-Digital Conversion)
✅ Voltage-to-temperature conversion
✅ 7-segment display control
✅ Multiplexing technique
✅ Embedded system fundamentals


 Applications

  • Digital thermometer

  • Weather monitoring systems

  • Smart home automation

  • Industrial temperature monitoring

  • School science projects


 Possible Upgrades

 Add LCD instead of 7-segment
 Add IoT monitoring using ESP8266
 Log temperature data
 Add Fahrenheit conversion
 Add buzzer alert for high temperature
 Solar-powered weather station




BEGINNER PROJECTS (Foundation Skills)

  1. Ultrasonic Distance Measurement
  2. Traffic Light Simulation with 7-Segment Display
  3. 7-Segment Display Counter
  4. Kids Piano Circuit (8-Key Version)
  5. 16×2 LCD Display with Text Output
  6. LCD I2C to Arduino UNO
  7. Temperature Measurement using Arduino UNO
  8. LDR Controlled Street Light

INTERMEDIATE PROJECTS (Build Your Skills)

  1. Servo Motor Control Using Potentiometer
  2. DC Motor Speed Control
  3. Temperature Controlled Fan
  4. PIR Based Theft Alert System
  5. LPG Gas Leakage Detection System
  6. Automatic Door Locking System
  7. Soil Moisture Based Automatic Watering System
  8. Simple Digital Clock using Arduino UNO
  9. Automatic Voting Machine (EVM)
  10. Joystick Control using Arduino Uno
  11. RGB Lamp Control using Arduino Uno

    ADVANCED PROJECTS (Master Level)

    1. Home Automation Using Arduino UNO
    2. Bluetooth RC Car using Arduino Uno
    3. Obstacle Avoiding Robot
    4. Line Follower Robot
    5. Radar System Using Arduino UNO
    6. Automatic Parking System
    7. Bi-Directional People Counter using Arduino Uno 
    8. Automatic Plant Watering System
    9. NeoPixel LED Ring Control using Arduino Uno
    10. Smart Gloves for Bedridden People

      ROBOTICS & MOTION PROJECTS

      1. RC Car Using L293D Motor Driver
      2. Robot Arm and Leg Control Using Servo
      3. Smart Irrigation System using Arduino Uno

      Comments