ARDUINO > My First Arduino Project - LCD Ambient Temperature Digital Monitor
My First Arduino Project - LCD Ambient Temperature Digital Monitor PDF Print E-mail
(11 votes, average: 3.73 out of 5)

arduinologo1This is my first attempt to get into the Arduino world. Being an old ATMEL AT90 fan I found the Arduino project to be very intriguing to me cause it makes developers life so much easier then old school 8bit assembly and C tyranny.


So this first attempt had two directives.
1. To use the AVR's AD converter,
2. To drive and 2x16 LCD display.
So as a simple project I decided to do the following project.
Read the ambient temperature using an LM35 sensor do some math to calculated current ,average, minimum and maximum temperature and display all these to an HD44780 2x16 LCD display.
More specifically one temperature measurement is taken about every second and displayed as current temperature. Every 8 measurements an temperature average of those is calculated and displayed as Av.T. The same time a calculation about the min and max average temperature is done (displayed as Min and Max) for all the Power On period of Arduino board. The program also send the previous measurements to the Arduino's Serial Monitor.


The whole attempt took no more than two hours to complete.
Here is a video of it working.

Parts.
1. Arduino Board (mine is a Duamilavone)
2. LCD 2x16 screen (Hitachi HD44780 compatible)
3. 10K ponteciometer
4. LM35 temp sensor
5. Breadboard
6. Connection wires


THE CIRCUIT
To connect and use the LCD Display with arduino I followed the Hello world example
from the Arduino Library Examples (http://arduino.cc/en/Tutorial/LiquidCrystal). While the LCD has an 8bit parallel connection it is possible to display almost everything with just 4bits! That way you are using 4 less Arduino digital ports.
This example shows how to make use of the extremely easy to use LiquidCrystal.h library.
To wire your LED screen to your Arduino, connect the following pins:
• LCD RS pin to digital pin 12
• LCD Enable pin to digital pin 11
• LCD D4 pin to digital pin 5
• LCD D5 pin to digital pin 4
• LCD D6 pin to digital pin 3
• LCD D7 pin to digital pin 2
Additionally, wire a 10K pot to +5V and GND, with it's wiper (output) to LCD screens VO pin (pin3).

LCD_bb LCD_schem

 

 

 

 

 

 

 

 

To connect the LM35 to Arduino circuit board I followed the instructions from this page (http://pscmpf.blogspot.com/2008/12/arduino-lm35-sensor.html) where Arduino is used as complete PC logging system. A really neat and nice job by those guys!

Here is a picture illustrating how to connect the LM35 temperature sensor.

How to connect the LM35 to Arduino

We used the on board power source (5v and Gnd) to power the LM35 and analog pin 0 (zero) to read the analog output from the sensor.
Here a photo of my breadboard circuit.

mycircuit_web


Arduino is power supplied from its USB port while the LCD and LM35 are both powered by the +5Volt power supply of Arduino. So practically one supply is enough for everything and that's perfect for small projects like that!
Here you will find my code for making this possible.
Download Link
Note: the code it's not very refined but I have tried to comment it so that is makes sense

Note: that u may find a constant deviation between real room temperature and that measured by the LM35. Possibly this is because u have not set up correctly the supply voltage value of LM35 at the conversion equation (see code).


Hope u find it all useful.
Mentzik.

 

Add your comment

Your name:
Subject:
Comment:

Anti-spam: complete the taskJoomla CAPTCHA
Comments (6)
Good.
6Friday, 06 June 2014 14:36
Uzi Moshel Lev
Hey, the process that you use is too tedious. Can't you simplify it a bit?
congratulations
5Sunday, 11 May 2014 03:26
Milton Rodriguez
thank you for you skecht
hello...
4Friday, 12 October 2012 18:36
JOHN GLEN A. PONCIANO
I have watched your video and i was amazed of what youve done. i am an Electronics Engineer student and i want to ask something about my project for Arduino using LM35 temperature sensor and LCD 16x2. My Project title is a FAN and Aircon control through microcontroller.. i want to display the temperature on my lcd display which read by the LM35 temp sensor. The fan and the aircon will be on high in state whether the temperature varies..Can you help me pls
blah
3Wednesday, 03 October 2012 00:34
jesus
TO open the code just use Notepad++
copy schetch
2Wednesday, 27 June 2012 09:33
johntheradioguy@yahoo.com
I downloaded schetch but dont know how to open it so I can copy and paste it into a new schetch to run it
problems with the code
1Thursday, 14 June 2012 21:08
carlos
hi buddy, im trying to make this for university proyect but i couldn't open the code, only appears as symbols, not like arduino code, please can you send me the code to my e-mail please?? i will apreciate my e-mail is carloscr16@hotmail.com thank you
What do you want from my site?