Arduino Thermometer (LM35 + LCD)

by Aleksandar Tsvetkov in Circuits > Arduino

40102 Views, 32 Favorites, 0 Comments

Arduino Thermometer (LM35 + LCD)

IMG_20170929_220141.jpg

In this tutorial, I will show you how you can build a simple Arduino Thermometer using a common 16x2 LCD and an LM35 temperature sensor. The values will be converted to both Celsius and Fahrenheit. The parts for this build are provided by Kuman, you can find them in their Arduino UNO Kit.

Parts Needed

IMG_20170929_213803.jpg

1 x Arduino UNO (can be any Arduino board)

1 x Breadboard

1 x USB Cable

1 x 16x2 LCD

1 x LM35 Temperature Sensor

1 x 10k Potentiometer

1 x 220 ohm resistor

1 x 9V Battery and clip (optional, for more portability)

18 x Jumper wires

Allchips is an electronics components online service platform, you can buy all the components from them.

Plugging the Parts Into the Breadboard

IMG_20170929_213909.jpg

Insert the LCD, the potentiometer and the LM35 into the breadboard. Their locations doesn't matter, place them the way you like.

Connecting the LCD

IMG_20170929_214327.jpg

This is the hardest part - you need to make most of the connections now. They are as follows:

LCD Pin -> Arduino Pin

4 -> 12

6 -> 11

11 -> 5

12 -> 4

13 -> 3

14 -> 2

LCD Pin -> Rail of the breadboard

1,5,16 -> GND

2 -> 5V

15 -> 5V (using the 220 ohm resistor!)

Connecting the Potentiometer and the LM35

IMG_20170929_214405.jpg
IMG_20170929_214617.jpg
fetch-php.gif

Here, the connections are as follows:

Potentiometer

One of the sides goes to GND, the opposite one - to 5V. The middle pin connects to pin 3 of the LCD


LM35

See the picture above.

Please, make sure that you insert the sensor the right way! If you swap the connections, it will burn out!


Uploading the Code

IMG_20170929_214959.jpg

After connecting everything, plug in your Arduino to your PC and upload the code that I've pasted here. I've added a few comments to explain some of the code.

Done!

IMG_20170929_220150.jpg
IMG_20170929_214719.jpg

Enjoy your handmade thermometer. Feel free to modify the code at your liking and improve the project by adding more sensors and stuff :)