Вы находитесь на странице: 1из 5

King Abdulaziz University

Faculty of Engineering
Department of Electrical and Computer Engineering
EE306 – Electrical Engineering Technologies

Lab-9

Building an Arduino based temperature


sensor using LM35

Objective:
 To demonstrate on how to interface LM35 and Arduino along with its program.

 After successfully interfacing Arduino and LM35, the objective is to build a temperature
display using Arduino and a 16×2 LCD module which constantly monitors temperature
around the measurement field/range of LM35 and displays the same on LCD module.

Components
 1* Arduino Uno board
 1*Breadboard
 1*USB data cable
 1*LM35 Temperature Sensor
 1* LCD1602
 1*Potentiometer
 Several jumper wires

Experimental Principle
The output voltage of the LM35 is proportional to Celsius temperature. When placed in 0 0C
ambient temperature, it will output 0V. As the ambient temperature increases by 1 0C, its
output voltage will increase 10mV. The calculation formula is as follows:
Background
ARDUINO

Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino
boards are able to read inputs – light on a sensor, a finger on a button, or a Twitter message – and turn
it into an output – activating a motor, turning on an LED, publishing something online. You can tell your
board what to do by sending a set of instructions to the microcontroller on the board. To do so you use
the Arduino programming language (based on Wiring), and the Arduino Software (IDE), based on
processing. The software is free to download and can be found
at https://www.arduino.cc/en/Main/Software.

Fig.1: Arduino UNO board

LM35

LM35 is an analog, linear temperature sensor, produced by national semiconductor, whose output
voltage varies linearly with change in temperature. LM35 is three terminal linear temperature sensor
from National semiconductors. It has very high operational accuracy and wide operating range. With
small size, low cost and reliability, LM35 is widely applied in engineering. Since it uses internal
compensation, so the output can begin with 0 0C. It can measure temperature from-55 degree celsius to
+150 degree celsius. The voltage output of the LM35 increases 10mV per degree Celsius rise in
temperature. LM35 can be operated from a 5V supply and the stand-by current is less than 60uA. The
pin out of LM35 is shown in the figure below.

Fig. 2: LM35 temperature sensor


The interfacing of LM35 temperature sensor, 16x2 LCD with Arduino Uno is shown below:

Fig.3: Interfacing LM35 temperature sensor with Arduino Uno

Fig.4: Interfacing 16x2 LCD with Arduino Uno


Fig.5: Circuit connection of Arduino based temperature sensor using LM35

Fig6: schematic diagram for Arduino based temperature sensor using LM35

Experimental Procedures

Step 1: Build the circuit as per Fig.5.


Step 2: Program (Please refer to the example code given in this lab sheet).
Step 3: Compile the code.
Step 4: Upload the sketch to the Arduino Uno board.
Now, you can see the current temperature displayed on the LCD1602.

Code

Lab Report:

In your report, include the working of the LM35 based temperature sensor. Also, list its different
applications and its limitations.

Вам также может понравиться