Arduino Thermometer

by Constructed in Circuits > Arduino

37825 Views, 289 Favorites, 0 Comments

Arduino Thermometer

Untitled.jpg
DSC00812.JPG

Its hot here in Los Angeles! Besides the massive drought California is in, Its not as cool around here lately. I wanted to build something to see just how hot it really was, and here it is!

Read this instructable and Ill teach how you can turn just a few components you have into an accurate mini desktop thermometer!


I hope you enjoy the project and vote for it for the contests!

Lets Build It!

You Will Need...

DSC00791.JPG
DSC00792.JPG
DSC00793.JPG
DSC00794.JPG
DSC00796.JPG
DSC00797.JPG
DSC00798.JPG

If you would like to make this project, you will need:

  1. LM35 sensor (Already had)
  2. Plastic Tupperware (Free)
  3. Breadboard (Already had)
  4. 9v Battery and Arduino 9v clip (Already had)
  5. LCD 16x2 (Already had)
  6. Arduino Uno (Already Had)
  7. Wires! (Already Had)

As you can see, you dont need much. In fact I had these pieces lying around my house so this was FREE!

Test the LCD

DSC00795.JPG

I wanted to test and see if my LCD still worked. It still worked! Heres how I wired it:

LCD Arduino

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

Add in the LM35!

DSC00799.JPG

Take the LM35 and add it in! Heres a helpful guide:

(Ignore the periods)

____________

[ LM35 (Front) ]

[...................... ]

[___________]

I............I...........I

I............I...........I

I............I.......... I

(5v)....(A0).....(GDN)

Check Your Wiring

Untitled Sketch_bb.jpg

Make sure to double check your wiring!

We don't want any mistakes!

Heres a schematic I used for this project

Code!

DSC00803.JPG
DSC00801.JPG
DSC00800.JPG
DSC00802.JPG

Now its time to code!

Here the code! (Please If you see anything wrong tell me)

//----------------------------------------------------------------
  //     Program:     LCD_temperature

  //     By: Constructed   https://www.youtube.com/channel/UCD4TpqX_CJW0d4YoLLaaHYA
//----------------------------------------------------------------
#include 

// 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;
}

Downloads

Measure LCD

DSC00804.JPG
DSC00805.JPG
DSC00806.JPG
DSC00807.JPG

Now its time to make the case

Measure the LCD protruding sceen and cut a hole just big enough to squeeze over the LCD.

Your Done!

DSC00808.JPG
DSC00809.JPG
DSC00810.JPG
DSC00811.JPG

Saftly place all the electronics in the plastic container and snap the lid on!

Your DONE!

Place your thermometer near your bed like I did, whenever I wake up, I can see how hot it is!

Please Like Comment And Subscribe for more!