Arduino WiFi Wireless Weather Station Wunderground




In this Instructable I am going to show you how to build personal wireless weather station using Arduino

A Weather station is a device that collects data related to the weather and environment using many different sensors. We can measure many things like:

  • Temperature
  • Humidity
  • Wind
  • Barometric Pressure
  • UV index
  • Rain

Mine inspiration to create this weather station is Greg from Davis anemometer, wind speed and rain meter Arduino code copyright rights belong to him.

I'm using Arduino Uno as main board.

ESP8266 WiFi module will send data to

Weather Underground is a commercial weather service providing real-time weather information via the Internet.

I will use these sensors:

  • Temperature - Dallas DS18B20
  • Humidity, Pressure - BME280
  • UV, Solar - ML8511
  • Anenometer and wind direction - Davis 6410
  • Rain gauge - Ventus W174

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Parts

The parts needed in order to build this project are the following:

  1. Arduino Uno
  2. ESP8266 ESP-01 or ESP-12
  3. BME280
  4. ML8511
  5. Davis 6410
  6. Ventus W174

Step 2: Schematic and Wiring Diagram

Step 3: PCB Arduino Uno Weather Station Shield

Design printed circuit board (PCB), I was used ,,Sprint-Layout" software. Exported to Gerber files.

To create this Arduino Uno weather station shield you will need:

  1. ML8511 UVB UV Rays Sensor Breakout UV Light Sensor Analog Output for Arduino Ebay
  2. Waterproof Digital Thermal Probe or Sensor DS18B20 Arduino Sensor Ebay
  3. JST-XH Kit 4Pin 2.54mm Terminal Housing PCB Header Wire Connectors Ebay
  4. Atmospheric Pressure Sensor Temperature Humidity Sensor Breakout BME280Ebay
  5. 1x ESP8266 ESP12F Ebay
  6. 1x 1k 0805 resistor
  7. 1x 120R 0805 resistor
  8. 8x 0R 1206 jumper ( resistor)
  9. copper board
  10. 2x 4.7K resistor
  11. 1x 10k resistor
  12. 1x 3mm led
  13. 1x RJ45 socket Ebay
  14. 1x 47uF electrolytic capacitor
  15. 1x 40pins header pins Ebay
  16. 1x Voltage Regulator Sot-223 Ams1117 Ams117-3.3 3.3V 1A Ebay
  17. 1x 2.54mm Pitch Switch DIP 2 Ebay

Step 4: Arduino Sensors Libraries, Manual and Other Information

1) Arduino weather station project

2) Davis 6410 anemometer manual

3) Adafruit BME280 Driver (Barometric Pressure Sensor) library

4) ML8511 UV Sensor Library

5) Arduino Library for Maxim Temperature Integrated Circuits DS18B20 DS18S20 - Please note there appears to be an issue with this series. DS1822 DS1820 MAX31820

6) Library for Dallas/Maxim 1-Wire Chips

7) Wunderground (Personal Weather Station Upload Protocol)

8) NodeMCU weather station

Step 5: Soldering PCB

Weather station shield I was ad in to Raspberry Pi case. I think it looks better.

Step 6: Installing Personal Weather Station

The location weather station is the most important part of
installation. If weather station is located under a tree or an overhang, the rainfall data measured by the station will not be correct. If you place your weather station in an alley, you could very well get a wind tunnel effect on the anemometer, resulting in erroneous wind data. Weather station should have good "fetch", or distance from any other tall object.

The standard wind measurement should be taken at 10 meters above the ground. A roof-top works the best for me.

Weather station is powered from solar panel. So it is autonomous.

The most common error in installing a weather station is associated with misplacing the thermometer sensor. Meteorologists define temperature as the temperature in shade with plenty of ventilation. When placing weather station, make sure:

  • The thermometer sensor never receives direct sunlight.
  • The thermometer receives plenty of ventilation and is not blocked from the wind.
  • If the thermometer is placed on a roof-top, make sure it is at least 1.5 meters above the roof-top.
  • If the thermometer is placed above grass, again, it should be at least 1.5 meters above the grass surface.
  • The thermometer is at least 15 meters from the nearest paved surface.

So I'm using weather shelter. I made it from PVC tube. This way, weather station can be placed in direct sunlight, with the thermometer located inside the shelter.

More information about installing weather station here

Step 7: ESP8266 AT Commands

First it need prepare ESP8266 wifi modulle. Change CWMODE into 1 = Station mode(Client) and connect ESP8266 to your WiFi router.
I'm using usb to ttl serial adapter. Its need only connect 4 wire ( +3.3V, GND TX,RX)

Or you can use Arduino to send AT comands to ESP8266.

AT commands:




AT+CWJAP="your ssd","password"

more AT commands here

Step 8: Arduino Code

    1. Before upload code into your Arduino Uno register in to obtain a WU station ID and key/password

    2. Change this ID and key/password into your weather station Arduino code.

    • char ID [] = "xxxxxxxx"; //wunderground weather station ID
    • String PASSWORD = "xxxxxxxx"; // wunderground weather station password

    3. Change altitudepws to get relative pressure meters (m)

    4. #define DEBUG 1 // if you only check sensors data.

    5. I'm using 30 second loop time sending data to 25 seconds I will take to measure wind speed. Other time is for read sensor data.

    Step 9: Result

    It is working and sending sensors data to I'm very happy ;)

    Step 10: New Version



      • Indoor Lighting Contest

        Indoor Lighting Contest
      • Make It Fly Challenge

        Make It Fly Challenge
      • Growing Beyond Earth Maker Contest

        Growing Beyond Earth Maker Contest

      51 Discussions


      2 months ago

      Having trouable using esp01 for upload. What do I need to do to the esp01 to get it to upload data to wunderground?

      1 reply

      4 months ago

      Is the NodeMCU better than this setup? If so how and why?

      1 reply

      Question 9 months ago on Step 7

      Should I connect the shiel only to the usb dongle for programming or the shield must be connected to both arduino and usb stick?

      3 answers

      Answer 9 months ago

      If you didn't have usb serial ttl adapter, you can use Arduino as programmer. You have to use this code.

      #include <SoftwareSerial.h>

      SoftwareSerial esp8266(10,11); // make RX Arduino line is pin 10, make TX Arduino line is pin 11.
      // This means that you need to connect the TX line from the esp to the Arduino's pin 10
      // and the RX line from the esp to the Arduino's pin 11
      void setup()
      esp8266.begin(115200); // your esp's baud rate might be different

      void loop()
      if(esp8266.available()) // check if the esp is sending a message
      // The esp has data so display its output to the serial window
      char c =; // read the next character.

      // the following delay is required because otherwise the arduino will read the first letter of the command but not the rest
      // In other words without the delay if you use AT+RST, for example, the Arduino will read the letter A send it, then read the rest and send it
      // but we want to send everything at the same time.

      String command="";

      while(Serial.available()) // read the command character by character
      // read one character
      esp8266.println(command); // send the read character to the esp8266


      Reply 9 months ago

      I might have expressed myself wrong. I already have this usb dongle:
      The doubt is: My ESP8266 is already soldered into the shield board. To program it, should I connect the shield to the USB dongle only? Or should I have the shield connected to arduino and then also connect the USB dongle for programming it?
      Also, doesthat dongle is compatibe?


      Reply 9 months ago

      There are two ways to program ESP8266 . Usb dongle connect to ESP8266 and send AT commands via serial monitor or Arduino Uno connect to ESP8266. and send AT commands via serial monitor. Usb dongle is compatible.


      Reply 9 months ago

      Dip switch used for enable or disable ESP-12 wifi modulle. If you want to use ESP-01, turn off dip switch.


      Question 9 months ago on Step 8

      Kan ik er ook een Wemos Di voor gebruiken.
      In plaats van een ESP8266 ESP12F of ESP8266 ESP 01 ?

      1 answer

      Reply 9 months ago

      Yes you can use Wemos. At this moment I am creating another weather station based on ESP8266 as main board. So wait if you can.


      Question 9 months ago

      Hello. I saw another Wifi microboard in the pictures that have all sensors and boards (one board ESP8266 and another ESP8266/ESP12F). Do I need both or only one of them? I saw the first connected in the USB programming slot in one of the pictures and had the doubt. Thanks.

      2 answers

      Reply 9 months ago

      Hi, you only need one WiFi module. You can use ESP8266 ESP01 or ESP12.


      10 months ago

      I was having issues with WiFi in your project very good work,but WU upload routine in your project is not working
      The exit of the serial port
      DS18B20 = 25.06 C
      BME280 = nan C 77.11 F 0.00 % nan hPa nan inHg
      ML8511 = Solar = 0 W/m^2 UV = 0.00
      WindSpeed = 0.00 mph 0.00 knots 0.00 m/s
      Wind_min = 0.00 mph WindAvg = 0.00 mph WindGustAvg = 0.00 mph WindGust = 0.00 mph
      Wind_Direction = N
      WindStrength = Calm
      Rain Tip Count = 22
      Precip. Rate = 0.44 in
      Precip Accum. Total: 0.44 in
      Connection closed
      The connection to the router is interrupted after the serial output, and you come back again and again if I can static IP (esp8266)
      (the exit of the windshield is zero because I have it in the house for testing)
      Where is the problem and does not send the data, I would appreciate it especially if you could help me (I do not have a lot of programming knowledge)
      Friendly Gregory

      3 replies

      Reply 10 months ago

      Hello Gregory,
      Do you have connected your ESP8266 to your router? Code it used a lot of memory. Try disable ,, serial monitor" Debug 0.


      Reply 10 months ago

      The esp-01s is connected one after a while it stops resuming to be reconnected
      GPIO0 is High
      #define DEBUG 0 serial is not connected only debug 1 working
      Serial works continuously
      Using Port : COM2
      Using Programmer : arduino
      Overriding Baud Rate : 115200
      AVR Part : ATmega328P
      Chip Erase delay : 9000 us
      PAGEL : PD7
      BS2 : PC2
      RESET disposition : dedicated
      RETRY pulse : SCK
      serial program mode : yes
      parallel program mode : yes
      Timeout : 200
      StabDelay : 100
      CmdexeDelay : 25
      SyncLoops : 32
      ByteDelay : 0
      PollIndex : 3
      PollValue : 0x53
      Memory Detail :
      Block Poll Page Polled
      Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
      ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
      eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
      flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
      lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
      hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
      efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
      lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
      calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
      signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
      Programmer Type : Arduino
      Description : Arduino
      Hardware Version: 3
      Firmware Version: 4.4
      Vtarget : 0.3 V
      Varef : 0.3 V
      Oscillator : 28.800 kHz
      SCK period : 3.3 us

      Reading | ################################################## | 100% 3.51s
      avrdude: verifying ...
      avrdude: 24730 bytes of flash verified

      I'll be crazy (I'm heartbroken) if it's not done I'll keep it, very good work you do


      Reply 10 months ago

      Good morning
      Everything is done as you are running smoothly, it only does not send the data to the WU (#DEBUG 0 does not send data to the serial only with #DEBAG 1 sends.
      We have gotten past and I have changed them (as in the photo).
      After an intense search I found this
      (,(Take a look so you will understand something)
      I did not of course know if it is at this point the error that does not send the data to the WU.
      I do not want to tire you another last message I'm sending you, thank you for being a unique one, he continued