How to Build An Arduino Weather Station

By Manas Manohar and Ajay Narayanan


Arduino weather station


How cool would it be to have your own Arduino weather station right in your backyard? Sounds fun? Geeky? Having your own weather station means that you don’t need any more inaccurate results from the weather channel! You can even log the data and play around with it. Set mood lighting according to the weather? Why not? This tutorial will get you kick-started with your own DIY Weather Box to chart out local weather. What are you waiting for? Let’s get started!

Bill of Materials

Arduino weather station components

  1. Arduino Uno
  2. DHT11 (Temperature and Humidity Sensor)
  3. 16*2 character LCD display
  4. Potentiometer
  5. Jumper Wires (Male to Female(MF) and Female to Female(FF))
  6. Header Pins
  7. Glue gun

How Does it Work?

So we’ve got this ultra-low-cost sensor called the DHT11. It uses a capacitive humidity sensor and a thermistor to measure the surrounding air and spits out a digital signal on the data pin. Since the output data isn’t analog, it requires some coding to get the data, but don’t sweat it. It’s got its own library that takes care of the hard parts. It’s fairly simple to use but requires careful timing to grab data. You can only get new data from it once every 2 seconds, but that’s more than enough for our Arduino weather station.

dht11 sensor

Connecting the Headers for the Arduino Weather Station

Since you’re going to be using an LCD display for your Arduino weather station, you’ll need to solder the pin headers onto the LCD. The best way to do this is to affix header pins onto the Arduino and use jumpers to connect it to the LCD display.

  1. Place the header pins onto the ports of the Arduino, and make sure that there’s contact and that the header pins are not loose.
  2. Carefully, using a glue gun, glue the header pins onto the Arduino, keeping sure that it doesn’t get loose while you’re doing it.
    Arduino weather station

    Image courtesy:

  1. Now solder the LCD display onto the header pins after aligning it on top of the LCD display.


Arduino weather station LCD

Wiring the Circuit for the Arduino Weather Station

Connect the Arduino, LCD display, DHT11 sensor, and potentiometer as shown in the connection diagram below.


Arduino weather station Connection diagram                                                                             Image courtesy:


LCD connections

LCD D6 –> 3
LCD D5 –> 4
LCD D4 –> 5
LCD E – > 11
LCD RS –> 12

LCD VO –> Potentiometer Middle Pin

Installing the DHT11 Library for Arduino

Download the Arduino DHT11 library.

Next, open Arduino IDE, Go to Sketch –> Include Library –> Add Zip File and then close the Arduino IDE and open it again. After doing this, you will find the library included.

For more info on how to add libraries, visit the Arduino website.

Uploading the Code for the Arduino Weather Station

Copy and paste the code below into your Arduino IDE and save the sketch. Next, upload the code to your Arduino.



//led blink tutorial!
//Get more tutorials on --> --> -->

#define dht_dpin A1 //no ; here. Set equal to channel sensor is on
dht DHT;

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup(){
  ;lcd.begin(16, 2);
  lcd.print("TEMP HUMIDITY");
void loop(){
  lcd.print("C  "); 
  lcd.print("%   "); 

Finding an Enclosure for Your Arduino Weather Station

  1. Take an old plastic box or container. Since we are going to place it outside, don’t use stuff like thermocol that easily wears out.
  2. Cut holes for the LCD Screen and the DHT11 sensor carefully using a paper knife. If you are using a battery to power the Arduino, make sure there’s space for that. If you’re going to use an adapter, cut a hole for the wire as well
  3. Place the Arduino circuit inside the Box and make sure nothing obstructs the display and DHT11 sensor
  4. After going outside, calibrate the contrast of the display so that you can easily see the output

That’s it! Your very own Arduino weather station is ready for use!


Arduino weather station                                                                      Image courtesy:

Recommended Posts
Showing 12 comments
  • Ben

    code wasnt working for me had to change to the below

    #include “DHT.h”

    #define dht_dpin A1
    #define dht_type DHT11

    DHT dht(dht_dpin, dht_type);
    LiquidCrystal lcd(13, 11, 5, 4, 3, 2);

    void setup(){

    lcd.begin(16, 2);
    lcd.print(“TEMP HUMID”);

    void loop(){

    int myTemp = dht.readTemperature();
    lcd.print(“C “);

    int myHum = dht.readHumidity();
    lcd.print(“% “);


  • Ojay

    Your first and second lines of codes are not having header file names…#include…?

  • skjdbf

    You shouldn’t use DHT11, it’s really not reliable, worst case scenario maybe DHT22. A better choice is DS18B20 for temperature, also waterproof, and a separate capacitive for humidity.

  • vat

    vat de fak

  • Internet of Things

    You shouldn’t use DHT11, it’s really not reliable, worst case scenario maybe DHT22. A better choice is DS18B20 for temperature, also waterproof, and a separate capacitive for humidity.

    • Amer AlKinani

      I’ve compared the DHT11 to a regular thermometer and it seems to be pretty accurate.
      The DS18B20 would be better but wouldn’t make a drastic difference

  • Linear Servo

    Great Project, Thanks!

  • Kevin

    Yo, Code isn’t working? Got any tips. Copy/Pasted the code and it says: #include expects “FILENAME” or

  • Nath

    What Potentiometer do? and What size Potentiometer ?

  • Nathan Crout

    my computer is having trouble verifying the code is there any simplified version of the code?

  • pet shop

    That is very interesting, You’re a very skilled blogger.
    I’ve joined your feed and sit up for looking for extra of your wonderful
    post. Additionally, I have shared your web site in my social networks!

    • Manas Manohar

      Thanks Buddy!
      Follow me on fb

Leave a Comment

+ 69 = 73

Start typing and press Enter to search