Introduction: Arduino Thermometer

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!

Step 1: You Will Need...

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!

Step 2: Test the LCD

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

Step 3: Add in the LM35!

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)

Step 4: Check Your Wiring

Make sure to double check your wiring!

We don't want any mistakes!

Heres a schematic I used for this project

Step 5: Code!

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

Step 6: Measure LCD

Now its time to make the case

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

Step 7: Your Done!

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!

Comments

author
ddibling made it! (author)2017-04-03

I used an LCD shield for arduino, which simplified wiring, and a DHT22 sensor, which gives me both temperature and humidity. I changed the code to alternate between displaying the temperature and the humidity. I still need to make an enclosure for it, but I have a 3D printer arriving tomorrow, so I thought I would print one. Nice project!

17675434_119422025264060_8204316463771680768_n.mp4
author
VampieC (author)2017-02-10

This looks clean. I like it.

Can you tell how long a batterij lasts?

author
IndiaSp (author)2016-11-18

So I made this and used your code and the only thing that displays is 3 zeros on one side of the screen and 2 on the other? What happened.

author
PlaidPete (author)2016-10-24

Has anyone made a clock/thermometer?

author
VictorG9 (author)2015-05-26

It doesn't work, why? :'( I've checked 3 times the wires

20150526_190123.jpg
author

Same problem i am facing....

author
Joe_barhouch (author)VictorG92016-03-07

be sure that you are using the correct pins for the lcd.

when it does this that means that u should change the pins

author
JeysonMg (author)VictorG92015-12-28

First, you need a potentiometer to regulate the contrast on screen if you still having troubles, check if you add the library of the Lm35, if you want some help with the code send me a msg we'll find it out, good day!

author
VictorG9 (author)VictorG92015-05-27

Someone help me pleasee

author
nooraimanr (author)VictorG92015-11-04

Usually you need to add a variable resistor and connect its output to the contrast pin which is the 3rd pin from the left. Google "liquidcrystal arduino". Hope that helps

author
JohnL197 (author)2015-12-06

You never set pin A0 as input.

author
MichaelH51 (author)JohnL1972016-07-19

how would you do that?

author
R Jordan Kreindler (author)2016-07-11

Nice work on this interesting Instructable.

author
Varen Greycloak (author)2015-11-26

First I just got black boxes, now I get a blank screen. Help?

author
Briand60 (author)2015-11-09

my programming doesn't work can somebody help me?

author
偉達郭 (author)Briand602015-11-15

what happend?

author
Constructed (author)偉達郭2015-11-15

It might be a defective part. I had to buy three sensors before one worked

author
CreativeCreator (author)2015-07-16

Can i use a tmp 36GZ that came with the arduino starter kit instead of the LM 35?

author
aliifrq (author)2015-06-27

Nicely done

author
seamster (author)2015-05-05

Nice work! I like the clean and tidy finished look.

About This Instructable

28,008views

279favorites

License:

Bio: Maker from USA. Follow me to stay up to date on my projects and possible kickstarters! Business email: constructed@mail.com
More by Constructed:How to Make a Remote Controlled Spy RoverWrist Mounted Laser Gauntlet PrototypeLED Aquarium Light Conversion
Add instructable to: