Now a days we can see the difference in
the climate due to the ozone depletion and global warming.we can see very hot
climate during the summers and in rainy seasons ,we are also not able to see
that much of rain.
My only concern is that I wanted to
build something which will be able to show how hot it really was, and here I m
providing you that mini desktop thermometer which will be able to show the
temperature.
Now I am going to teach you how by
using some components you can have an accurate mini desktop thermometer.
![]() |
Arduino Thermometer |
Step 1: Components needed …
The various components
that are needed to make this project are :
1. LM35
sensor
2. Plastic Tupperware(you can easily get this
from your kitchen)
3. Breadboard
4. 9v Battery and Arduino
9v clip
7. Wires
Now you can see that
we don’t require that much of components to make this project, most of the
components are used in our house so you can get it from there.
Step 2: Test The
LCD
|
![]() |
Arduino Thermometer |
First of all,we have to test and see if
the LCD we are using working or not and after that we have to wire it .Here,I
have shown you how I wired it.
1...... GDN
2...... 5V
3...... GDN
4...... PIN 8
5...... GDN
6...... PIN 9
7...... –
8....... –
9...... –
10...... –
11...... PIN 4
12......PIN 5
13......PIN 6
14...... PIN 7
15...... 5V
16...... GDN
Step 3: Add in the LM35!
First of all, take the LM35 as LM35 series
are precision integrated-circuit temperature devices with an output voltage
linearly-proportional to the Centigrade temperature.
(Ignore the periods)
____________
[ LM35 (Front) ]
[...................... ]
[___________]
I............I...........I
I............I...........I
I............I.......... I
(5v)....(A0).....(GDN)
Step 4: Now,check your wiring
You have to make sure to double check
your wiring because if wiring are not done right then we are not able to get
desired result.So,double check your wiring to get appropriate result.
In the above image,I have shown
schematic view.
Step 5: Code!
// Program: LCD_temperature
#include
<LiquidCrystal.h>
// Arduino pins used for
LCD
LiquidCrystal
lcd(8,9,4,5,6,7);
void setup() {
lcd.begin(16, 2);
}
void loop() {
float temperature = 0.0; // stores the calculated temperature
int sample; // counts through ADC samples
float ten_samples = 0.0; // stores sum of 10 samples
for (sample = 0; sample < 10; sample++)
{
// convert A0 value to temperature
temperature = ((float)analogRead(A0) *
5.0 / 1024.0) - 0.5;
temperature = temperature / 0.01;
// sample every 0.1 seconds
delay(100);
// sum of all samples
ten_samples = ten_samples +
temperature;
}
// get the average value of 10 temperatures
temperature = ten_samples / 10.0;
// display the temperature on the LCD
lcd.setCursor(0, 0);
lcd.print("Temperature:");
lcd.setCursor (0,1);
lcd.print (temperature);
lcd.print((char)223);
lcd.print(" F ");
ten_samples = 0.0;
}
No comments:
Post a Comment