Arduino LCD Thermometer

by Gaige Kerns in Circuits > Arduino

2913 Views, 13 Favorites, 0 Comments

Arduino LCD Thermometer

GIF.jpg
GIF2.jpg
GIF3.jpg

Hey guys this is Gaige TheEngineer here to give you a basic arduino project: The Arduino LCD thermometer

This is something a 12 year old can do pretty easy. So please enjoy and check out my Youtube Channel (even if there is nothing on there yet! There will be videos soon!!!)

Please subscribe and I will do many more projects, Please also if you have any suggestions on projects, please comment on my Channel as well.

What You Will Need

download.jpg
JUmper.jpg
download.jpg
download.jpg
images.jpg
download.jpg

This simple Project Requires A couple thing You might have if you have the arduino kits or parts.

Components

  • Arduino Uno R3
  • Jumpers
  • LCD Liquid Crystal Display 16x2
  • Potentiometer
  • LM36Gz
  • Bread Board, or PCB if your making this permanent( but I recommend bread board prototype first!)
  • 9V Power Source

Putting It Together

A.jpg

LCD Pins connections:

Pin 1 to Arduino GND

Pin 2 to Arduino 5V

Pin 3 to wiper ( this is the middle pin of the 10k potentiometer )

Pin 4 to Arduino pin 12

Pin 5 to Arduino GND

Pin 6 to Arduino pin 11

Pin 11 to Arduino pin 5

Pin 12 to Arduino pin 4

Pin 13 to Arduino pin 3

Pin 14 to Arduino pin 2

The Temperature Sensor is easy: Just connect the Middle To Arduino Analog Pin A0

and the Positive to one side and negative to the other. CAUTION IF YOU CONNECT THE GND AND + PINS WRONG ON THE TEMP SENSOR IT WILL GET VERY HOT> USE AT YOUR OWN RISK AND YOU WILL BREAK THE SENSOR.

The temp sensor isn't shown on the picture.

CODE

Here is the code.

Author: Gaige Kerns

Author: Gaige Kerns
--------------------------------------------------------------*/ #include

// Arduino pins used for LCD LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() { // initialize the LCD display 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 // take 10 samples from the MCP9700 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.print(" deg. C "); ten_samples = 0.0; }