As the name implies we are making a digital Thermometer using Arduino and LM35. This was originally implemented in Instructables by Mr wayne and called as "Waynes World Thermometer". We have tested & modified the project and presented it over here.
A LCD is used over here to display the temperature this temperature is also sent to the PC. We are displaying temperature both in Degree Centigrade and Fahrenheit Arduino updates the temperature in celcius every 500ms on PC and on LCD for 4 seconds (i.e. 8 readings) and then calculates the average temperature and then displays the average temperature both in degree centigrade & in Fahrenheit both on PC as well as on LCD. It also calculates the Maximum average & minimum average temperature and sends to PC.So basically the average temperature, minimum temperature & maximum temperature is calculated after every 5 seconds.
A LCD is used over here to display the temperature this temperature is also sent to the PC. We are displaying temperature both in Degree Centigrade and Fahrenheit Arduino updates the temperature in celcius every 500ms on PC and on LCD for 4 seconds (i.e. 8 readings) and then calculates the average temperature and then displays the average temperature both in degree centigrade & in Fahrenheit both on PC as well as on LCD. It also calculates the Maximum average & minimum average temperature and sends to PC.So basically the average temperature, minimum temperature & maximum temperature is calculated after every 5 seconds.
We are using 16x2 Alphanumeric Display which is a two line display with 16 character on each line. The display is interfaced to Arduino in 4 bit mode. Pin diagram is as follows
- LCD_RS (PIN 4) to digital pin 11
- LCD_Enable (Pin 6) to digital pin 12
- LCD_D4 (Pin 11) to digital pin 5
- LCD_D5 (Pin 12) to digital pin 4
- LCD_D6 (Pin 13) to digital pin 3
- LCD_D7 (Pin 14) to digital pin 2
LM35 Temperature controller is connected to A0 i.e. Analog PIN0 of arduino.
Circuit Diagram of Arduino Based Digital Thermometer |
Components Used
- Arduino Uno
- LM35 Temperature Sensor
- LCD Breakout Board
- 1:1 wires
- Bread Board
Implemented Circuit/Output
Serial Output on PC |
Temperature output in Degree Centigrade |
Temperature output in Degree Fahrenheit |
You can download the complete working code from HERE
/*
Arduino Based Digital Thermometer
Tested By Amol Shah from DNA Technology : http://www.dnatechindia.com/
For https://makeelectronicprojects.blogspot.in
To wire your LCD screen to your Arduino, connect the following pins:
LCD Pin 6 to digital pin 12
LCD Pin 4 to digital pin 11
LCD Pin 11 to digital pin 5
LCD Pin 12 to digital pin 4
LCD Pin 13 to digital pin 3
LCD Pin 14 to digital pin 2
Additionally, wire a 10K pot to +5V and GND, with it's wiper (output) to LCD screens VO pin (pin3).
*/
#include <LiquidCrystal.h>
float tempC = 0;
float tempf = 0;
int tempPin = 0;
float samples[8];
float maxi = 0,mini = 100;
int i;
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup()
{
Serial.begin(9600);
lcd.begin(16, 2);
lcd.setCursor(2, 0);
lcd.print(" Digital");
lcd.setCursor(3, 1);
lcd.print("Thermometer");
delay(1000); // wait 1000ms
lcd.clear(); // clear LCD display
}
void loop()
{
for(i = 0;i<=7;i++){
samples[i] = ( 5 * analogRead(tempPin) * 100.0) / 1024;
lcd.setCursor(0, 0);
lcd.print(" Current Temp ");
lcd.setCursor(4, 1);
lcd.print(samples[i]);
lcd.write(0xdf);
lcd.print("C ");
lcd.setCursor(12, 1);
Serial.print(" Current Temperature in Celcius: " );
Serial.println(samples[i]);
tempC = tempC + samples[i];
delay(500); // wait 500ms
}
tempC = tempC/8.0;
tempf = (tempC * 9)/ 5 + 32;
if(tempC > maxi) {maxi = tempC;}
if(tempC < mini) {mini = tempC;}
Serial.println("New measurement:");
Serial.print(" Average Temperature in Celcius is " );
Serial.println(tempC);//send the data to the computer
Serial.print(" Average Temperature in Farenait is " );
Serial.println(tempf);//send the data to the computer
Serial.print(" MAX Temperature in Celcius is " );
Serial.println(maxi);//send the data to the computer
Serial.print(" MIN Temperature in Celcius is " );
Serial.println(mini);//send the data to the computer
Serial.println("---------------------------------------" );
lcd.setCursor(4, 1);
lcd.print(tempf);
lcd.write(0xdf);
lcd.print("F ");
delay(1000);
tempC = 0;
}
I have read whole post & found that it is very interesting for Digital Thermostat.Very great blog & I hope that you will be posting more lots of information about this topic. Thanks for sharing this information.Digital Thermometer
ReplyDeleteAfter study a few of the blog posts for your web site now, and i also genuinely as if your method of blogging. I bookmarked it to my bookmark site list and will also be checking back soon. Pls check out my web page also and tell me what you consider. enaiL
ReplyDelete