You are on page 1of 23

Koneru Lakshmaiah Education Foundation

(Deemed to be University)

DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

A Project Based Lab


Report On

MEASURING TEMPERATURE USING MATLAB


SIMULINK MODEL
SUBMITTED BY:
ID. NO NAME
180060004 K. KALYAN KRISHNA
180069007 CH. PRAVEEN KUMAR

UNDER THE GUIDANCE OF


Mr. K. P. PRASAD RAO

KL UNIVERSITY
Green fields, Vaddeswaram – 522502
Guntur Dt., AP, India.
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

CERTIFICATE

THIS IS TO CERTIFY THAT THE PROJECT BASELABORATORY REPORT ENTITLED


“MEASURING TEMPERATURE USING MATLAB SIMULINK MODEL” SUBMITTED BY
Mr. K. KALYAN KRISHNA (180060004) & Mr. CH. PRAVEEN KUMAR (180069007) TO THE
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING, KL UNIVERSITY.
IN PARTIAL FULFILLMENT OFTHE REQUIREMENTS FOR THE COMPLETION OF A
PROJECT BASED LABORATORY IN “TECHNICAL SKILLS-4(MATLAB)” COURSE IN II B
TECH II SEMESTER, IS A BONAFIDE RECORD OF THE WORK CARRIED OUT BY HIM/HER
UNDER MY SUPERVISION DURING THE ACADEMIC YEAR 2019 – 2020.

PROJECT SUPERVISOR HEAD OF THE DEPARTMENT

Mr. K. P. PRASAD RAO DR.S.V.N. LALITHA


ACKNOWLEDGEMENTS

It is great pleasure for us to express our gratitude to our honorable President Sri.
Koneru Satyanarayana, for giving the opportunity and platform with facilities in
accomplishing the project-based laboratory report.

We express the sincere gratitude to our principal Prof Dr. K. SUBBARAO for
his administration towards our academic growth.

We express sincere gratitude to HOD-EEE Dr. S. V. N. LALITHA for his


leadership and constant motivation provided in successful completion of our
academic semester. we record it as my privilege to deeply thank for providing
us the efficient faculty and facilities to make our ideas into reality.

We express our sincere thanks to our project supervisor Mr. K. P. PRASAD


RAO for his novel association of ideas, encouragement, appreciation and
intellectual zeal which motivated us to venture this project successfully.
Finally, it is pleased to acknowledge the indebtedness to all those who devoted
themselves directly or indirectly to make this project report success.

180060004 K. KALYAN KRISHNA

180069007 CH. PRAVEEN KUMAR

3|Page
ABSTRACT

Measuring Temperature with lm35 and Arduino using MATLAB and Simulink
model. In this project LM35 sensor plays a crucial role by detecting the
temperature. LM35 is an integrated analogy temperature sensor whose electrical
output is proportional to Degree Centigrade. LM35 Sensor does not require any
external calibration or trimming to provide typical accuracies. LM35 is used to
measure precise centigrade temperature. The output of this sensor changes
describes the linearity. The output voltages of this sensor are linearly
comparative to the Celsius temperature. The output voltage range of this sensor is
from -55˚ to +150˚C. The output came from the LM35 sensor is stored in the
analogy input of Simulink model which is the output of the Arduino board
through Arduino. The Arduino acts as a data transformer.

4|Page
INDEX
SL. NO TITLE PAGE. NO

1. Introduction 6-9

2. Aim of the project 10

3. Apparatus 11

4. Circuit Diagram 12

5. Block Diagram 13

6. Procedure 14 - 20

7. Formula Used 21

8. Output 22

9. conclusions 23

5|Page
INTRODUCTION
In this project the main component is LM35 sensor which plays a crucial role in detecting the
temperature. There are many types of temperature detecting sensors, they are as follows

TYPES OF TEMPERATURE DETECTING SENSORS


1. Resistance temperature detectors (RTDs)
2. Thermocouples
3. Thermistors
4. Infrared sensors
5. Semiconductor sensors (LM35)

RESISTANCE TEMPERATURE DETECTORS

A Resistance Thermometer or Resistance Temperature Detector is a device which used to


determine the temperature by measuring the resistance of pure electrical wire. This wire is
referred to as a temperature sensor. If we want to measure temperature with high accuracy,
RTD is the only one solution in industries. An RTD works by using a basic principle; as the
temperature of a metal increases, so does the resistance to the flow of electricity. An electrical
current is passed through the sensor, the resistance element is used to measure the resistance
of the current being passed through it.

6|Page
THERMOCOULES

A Thermocouple is a sensor used to measure temperature. Thermocouples consist of two wire


legs made from different metals. The wires legs are welded together at one end, creating a
junction. This junction is where the temperature is measured. When the junction experiences a
change in temperature, a voltage is created. What is a thermocouple and how does it work? A
thermocouple is a sensor used to measure temperature. Thermocouples are made with two
wires of different metals, joined together at one end to form a junction. As the temperature
changes, the two dissimilar metals begin to deform, causing a change in resistance.

THERMISTORS

A thermistor is a type of resistor whose resistance is dependent on temperature, more so than


in standard resistors. The word is a combination of thermal and resistor. A thermistor is a
resistance thermometer, or a resistor whose resistance is dependent on temperature. ... This
type of thermistor is used the most. A PTC thermistor works a little differently. When
temperature increases, the resistance increases, and when temperature decreases, resistance
decreases.

7|Page
INFRARED SENSOR

An infrared sensor is an electronic instrument that is used to sense certain characteristics of its
surroundings. It does this by either emitting or detecting infrared radiation. Infrared sensors are
also capable of measuring the heat being emitted by an object and detecting motion. An infrared
sensor emits and/or detects infrared radiation to sense its surroundings. ... The basic concept of
an Infrared Sensor which is used as Obstacle detector is to transmit an infrared signal, this
infrared signal bounces from the surface of an object and the signal is received at the infrared
receiver. Infrared temperature sensors sense electromagnetic waves in the 700 nm to 14,000
nm range. While the infrared spectrum extends up to 1,000,000 nm, IR temperature sensors do
not measure above 14,000 nm. These sensors work by focusing the infrared energy emitted by
an object onto one or more photodetectors.

SEMICONDUCTOR SENSOR (LM35)

Semiconductor-based temperature sensors, or integrated circuit (IC) temperature sensors,


operate with reverse bias, have a small capacitance and a low leakage current. They are formed
on thin wafers of silicon. They are compact, produce linear outputs, and have a small range of
temperature. At typical operating temperatures for semiconductors, the decreasing µ
dominates, and thus the resistance of both semiconductors and metals increase with increasing
temperature for the operating temperatures of semiconductor devices. Thus, changes in the
measured R can be used as a thermometer. The LM35 is an integrated circuit sensor that can
be used to measure temperature with an electrical output proportional to the temperature (in
°C). It can measure temperature more accurately than a using a thermistor. LM35 is used to
measure precise centigrade temperature. The output of this sensor changes describes the
linearity. The output voltages of this sensor are linearly comparative to the Celsius
temperature. The output voltage range of this sensor is from -55˚ to +150˚C. As

8|Page
the LM35 device draws only 60 µA from the supply, it has very low self-heating of less than
0.1°C in still air. The LM35 device is rated to operate over a −55°C to 150°C
temperature range, while the LM35C device is rated for a −40°C to 110°C range (−10° with
improved accuracy). The LM35 is an integrated circuit sensor that can be used to measure
temperature with an electrical output proportional to the temperature (in °C). It can measure
temperature more accurately than a using a thermistor.

9|Page
AIM OF PROJECT

To measure the temperature of any heat emitting object with the help of Arduino board using
MATLAB and Simulink model.

10 | P a g e
APPARATUS

➢ LM35 SENSOR

➢ ARDUINO MEGA 2560

➢ MATLAB SIMULINK MODEL

➢ CONNENTING WIRES

➢ ARDUINO CABLE

11 | P a g e
CIRCUIT DIAGRAM

12 | P a g e
BLOCK DIAGRAM

13 | P a g e
PROCEDURE

The following steps are to design the temperature measuring device with LM35, Arduino
Mega 2560 using MATLAB Simulink model.

Step1: CONNECTIONS OF ARDUINO AND LM35


❖ The 1st pin of LM35 is connected to +5v of the Arduino board
❖ The 2nd pin of LM35 is connected to A0 of the Arduino board
❖ The 3rd pin of LM35 is connected to the ground (GND) of the Arduino board

Step 2: Connect the Arduino cable to your laptop

14 | P a g e
Step 3: Simulink Connections

Divide the output (analogy input) by 1024

15 | P a g e
Multiply the output by 5000

16 | P a g e
Again, the divide the output by 10

17 | P a g e
Display the output which came in centigrade in display block

18 | P a g e
And then use C2F block to convert the Centigrade measurement to Fahrenheit

19 | P a g e
Again, use the display block to display the Fahrenheit measurement

Save the Simulink model and in tools option select the hardware board as Arduino mega
2560

20 | P a g e
FORMULA USED

Arduino analog pin resolution is 1023 starting from 0.


So, there are totally 1024 pin resolutions, the LM35 sensor gives the output in terms of
voltage.
Let the output of LM35 sensor be ‘K’ which is also known as the analog input
Voltage for 1024 pins = K/1024
Voltage for 5V or 5000mV = (K/1024) *5000
Temperature (T) = (K/1024) *5000/10

21 | P a g e
OUTPUT

22 | P a g e
CONCLUSION

❖ LM35 operates between -55C to 150C while LM35C operates -40C to 110C.
❖ Hence with the help of LM35 sensor detected the temperature using Arduino and
MATLAB Simulink model.

23 | P a g e

You might also like