NED UNIVERSITY OF ENGINEERING AND TECHNOLOGY
CEP REPORT
COURSE: : INSTRUMENTATION AND MEASUREMENT
COURSE CODE: EE-223
DEPARTMENT: ELECTRONICS
SEMESTER: SPRING (4th)
SUBMITTED TO: MISS UROOJ FAIZ
SUBMITTED BY:
AYMEN KHAN (EL-23087)
ZEHRA FATIMA (EL-23119)
LAIBA KHAN (EL-23120)
MARIUM SAJID (EL-23121)
SECTION: C
OBJECTIVE:
To design and implement a hardware based application of instrumentation and measurements.
TOPIC:
Measurement of Temperature using LM-35.
COMPONENTS USED:
COMPONENTS
DESCRIPTION
LM 35 Sensor
An analog temperature sensor that outputs
voltage linearly proportional to the temperature
(10 mV per °C).
A microcontroller board based on the
ATmega328P, used to read sensor data, process it,
and control outputs like a buzzer or display.
An audio alert device that produces sound when
activated, used to signal high temperature
conditions.
A solderless platform for prototyping and
connecting components quickly without
permanent connections.
Used to make temporary electrical connections
between components on the breadboard and
Arduino.
Provides 5V regulated power to the Arduino and
connected components, usually via a USB port or
9V adapter.
Arduino Uno
Buzzer
Breadboard
Jumper Wires
Power Supply
WORKING PRINCIPLE:
The LM35 sensor outputs a voltage proportional to the temperature (10 mV/°C), which is read by the
Arduino’s analog pin. The Arduino converts this voltage to a temperature value using a simple formula
and displays it. If a buzzer is used, it activates when the temperature exceeds a set limit.
ARDUINO CODE:
const int sensorPin = A0;
const int buzzerPin = 8;
float voltage, temperature;
const float threshold = 21; // Set your desired temperature limit
void setup() {
Serial.begin(9600);
pinMode(buzzerPin, OUTPUT);
digitalWrite(buzzerPin, LOW);
}
void loop() {
int analogValue = analogRead(sensorPin);
voltage = analogValue * (5.0 / 1024.0);
temperature = voltage * 100.0;
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println(" °C");
// Check temperature and activate buzzer
if (temperature >= threshold) {
digitalWrite(buzzerPin, HIGH); // Turn on buzzer
} else {
digitalWrite(buzzerPin, LOW); // Turn off buzzer
}
delay(1000); // Wait for 1 second
}
CALIBRATION:
TEST NO.
1
2
3
4
5
TEMP(°C)
35.64
24.41
25.39
23.44
23.93
CALCULATION:
Room Temperature: 26.8°C
LM-35 Temperature: 25.88°C
THRESHOLD TEMP
(°C)
BUZZER
25
ON
25
25
25
25
OFF
ON
OFF
OFF
RESULTS:
Circuit Picture:
Behaviour of Buzzer:
When the temperature goes above the threshold temperature mentioned in the code , the buzzer starts
to beep and when it goes below the threshold temperature, the buzzer stop beeping.
APPLICATIONS:
Room temperature monitoring
Fire alarm system
Weather stations
Medical incubators
CONCLUSION:
The LM35-based temperature monitoring system successfully measured temperature, displayed values,
and optionally triggered alerts. Calibration ensured improved accuracy.
REFERENCES:
LM35 Datasheet: file:///C:/Users/Dell/Downloads/LM35.PDF