Introduction: Arduino Uno DHT11 LCD Weather Station DIY

Picture of Arduino Uno DHT11 LCD Weather Station DIY

This is DYI on how to make your Weather Station using Arduino Uno, DHT11 temperature and humidity sensor, LCD DFRobot 2x16 screen with keypad. Usually you can buy Arduino, DHT11 and LCD separately and since every device hs it's own libranry and example code I have not found code where DHT11 and LCD would be connected. Togeather with PS we have changed code so it shows temperature and humidity on lcd screen. It required some code work to join two examples into one. During the work itself - we decided to go with new code. Enjoy below as it works really well.

Step 1: Before You Start

Picture of Before You Start
1. Do buy ORIGINAL Arduino UNO R3. You can find info in References section of this webpage.2. Next thing you need is 2x16 LCD DFRobot screen with keypad. We won't be using keypad but it's possible to map some actions to buttons.3. Last thing you need is DHT11 temp and humidity sensor. There is DHT22 version of this one but have not tested it so it's up to you.4. Case ? - I used LEGO to make one. Daughter was not happy but managed to take few and build something that is enough for scope of this project :)

Assumptions:

1. You have necessary tools to solder three wires to LCD shield.

Deliverables (from me):

1. Screenshot where solder three DHT11 pins to.2. Code of Arduino Station (example, used by me)

Instructions:

1. Download necessary libraries for DHT11 and LCD DFRobot (all links below in References section)2. Connect LCD shield to ARDUINO by pushing pins into sockets. Ensure all are in and stable.3. Time for some soldering.

Step 2: Soldering - Info and How to Connect "wires" ;)

Picture of Soldering - Info and How to Connect "wires" ;)
 This is CRITICAL PART of whole job so pay 200% attention to it please. Mistake here - and it's fried. GND - Ground pin goes to GND socket on - LEFT BOTTOM PART OF BOARD (4th from left. First is RESET, Second 3.3V, Third is 5V. You are interested in 4th). Solder it to hole over there. It has been prepared for this. See Image for reference. - DATA PIN from DHT11 - goes to A0 on LCD DFRobot. It is located on BOTTOM RIGHT section (left part of it). Since there is no hole to solder to - solder it to existing element on board. A0 has been dedicated for keypad data. Since we're not using keypad - we will use this one. You can solder it to A1 as well but it requires modification in code from A0 to A1 (need to find it in code on your own - very simple though). - Last but not least - VCC pin from DHT11 should be soldered to 5V on LCD DFRobot. It's next to GND that we already had soldered before. Look at board and you can't miss it. There is hole for this so use it.

4. Ensure that soldering was clean and wires are not "touching" each other or any part on board. All should be stable and well connected. If not - loose cable can cause serious damage to whole device.

5.Once above is done and you have doublechecked it - connect Arduino UNO to USB, load code (see atached code in next step or e-mail me if something is wrong) and send it to device. (You do not know how to connect USB to your PC/Mac ? - go to Arduino webpage for tutorial. Links in next step).

6. Wait until it boots and you should see Arduino Station message as a welcome screen. After 10seconds you should see some blinking info (this was done mainly for LCD test purpose and you can change it if needed)

7. Once blinking is done - you should see Temp: and Humid: info WITH REAL DATA. There is no delay for REAL DATA. It should appear immediately with Temp and Humid info. Note that instead of Humidity you can get "Wilgotnosc" as this is PL version of code.

8. It refreshes every 60 seconds giving you info "Refresh" before new data is displayed.

9. I've used some LEGO to cover it and double-side tape to stick it to wall next to my ipad charger (works well :)

Step 3: Congratulations - It's All Done :)

Picture of Congratulations - It's All Done :)

That's it :) Comments and Questions here - crackopl@gmail.com Major changes to code, suggestions etc. - use above to share please :) See links below for more info and useful hints.
Code is attached.

Few links below:


http://arduino.cc/en/Main/arduinoBoardUnohttp://www.dfrobot.com/index.php?route=product/product&product_id=51http://dx.com/p/arduino-digital-temperature-humidity-sensor-module-121350

Comments

GerhardS2 made it! (author)2016-04-29

Thank you, it was fun and easy .....

dht.h was changed:
#include <dht.h>

#include <LiquidCrystal.h>

yaser ha (author)2016-04-18

Enter the code here, please

it Doesn't open with me

crackopl (author)2016-04-13

Brando5641 - basics. read how to add libraries

Brando5641 (author)2016-01-31

C:\Users\Brandon\AppData\Local\Temp\arduino_f9cc66e4bc034c9a8dd3420704a87b1c\sketch_jan31c.ino:2:17: fatal error: dht.h: No such file or directory

#include <dht.h>

^

compilation terminated.

exit status 1

Error compiling.

jerry.ericsson2 (author)2015-09-06

Hi, I built one like this but no lego's I used an old leather pouch from a PDA to hold 3 18650 batteries put the arduino in a plastic case built for that purpose and glued my DHT33 to the top of the leather case. Now I have a portable accurate system we take along in our camper to keep up on temps.

hi jerry how did you get the dht33 to work i cand seam to get the dht22 to work i get 2c temp showing but not moving up or down

jerry.ericsson2 (author)2015-09-06

TabletaU (author)2015-08-30

I made it, but the code works only if I change "DHT dht;" into "dht DHT;" !

Thank you!

crackopl (author)2015-08-14

Good point. Thanks :)

crackopl (author)2015-08-14

Good point. Thanks :)

ydoucare (author)2015-06-21

The only suggestion I have is to spend a couple more bucks and get a DHT22 or better sensor with higher precision. The DHT11 is going to give you readings with a resolution of 1C.

crackopl (author)2014-12-31

Hi all

sorry for delay.

I will share the code (will appear in links).

stay tuned and Happy New Year :)

bdunlap1 (author)2014-12-06

hello the link is down can u send me the code

03edM (author)2014-08-24

Hi, could you please share the code again?

The link provided does not seem to be working.

Thanks in advance,

crackopl (author)03edM2014-08-29

Hi,

fixed. Check again please.

Lectric Wizard (author)2013-07-04

Case looks great ... buy the kid an ice cream !! He-He

and more Legos (to steal later).

About This Instructable

47,670views

57favorites

License:

More by crackopl:Watering Garden with GARD-A-WATER Arduino ProjectTinyduino LEGO GPS battery powered Logger DIYArduino GPS in iPhone Case - build your own ! :)
Add instructable to: