Weather Station With Arduino/Genuino , ESP8266, BMP180, DHT22 and Thingspeak




About: Passionate about electronics and Arduino

It's a bit of years that "game" with Arduino / Genuino and, when I saw what he could do a ESP8266, I wanted to build a small weather station.

This is the evolution of my Weather Clock


  • Arduino/Genuino
  • BMP180 - Barometric Pressure/Temperature/Altitude Sensor
  • DHT22 - temperature-humidity sensor
  • ESP8266 - WiFi Module
  • LM317 - Voltage regulator
  • Capacitor:
    • 10-100 μf
    • 100 nF = 0,1pF
  • Resistance
    • 270Ω
    • 510 Ω
    • 220Ω
    • 370 Ω
    • 1K Ω
  • Card 1000 holes
  • electric wires

Step 1: Set the ESP8266-01

Connect the ESP to Arduino following the pattern in the figure, be sure to fuel the ESP with a voltage of 3.3 volts using a voltage regulator (I used an LM317) powered by an external source, because needs a lot of energy that arduino can not give.

Upload to Arduino / Genuino the code:, open the serial monitor and give the command "AT" followed by ENTER, if nothing appears you need to set the speed of the serial monitor, make several attempts until you see "OK".

Now type the command "AT+CWMODE=1" to set the ESP as "Client"
Give the command "AT+CWLAP" to see which WiFi networks are nearby, with the command "AT+CWJAP="SSID","password" " you connect the ESP to your WiFi network, to check if it is well connected, type "AT+CIFSR". Now that the ESP8266 has been set, you can switch to connect other components

Step 2: Prototyping

Connect the rest of the components following the Fritzing scheme.

Record a "thingspeak" account ( and create a new channel, give it a name and description.

Field 1: Temperature

Field 2: Humidity

Field 3: Pressure

Save and open the API Keys tab, and store the "api_key reading".

Load the "" code in Arduino, by replacing line 35 with your api_key, in line 26 to replace the altitude with that of your location, load the design, and enjoy the card's results: "Private View" into thingspeak.

If you want to publish your channel, go to settings and give the flag to "make public"

Step 3: Assembling

Tested that everything worked, I built the circuit on a breadboard a thousand holes

For personal enjoyment I also built an Arduino Standalone.

In order to replicate the work, I have attached the designs made in Excel.

As container I used a metal box I had at home, the DHT sensor was put externally to box while the BMP inside

To feed the weather station I used an old telephone charger

Step 4: My Channel

I positioned the weather station below the balcony of my house and if you want to know the climate of Bussero, just go in or visit my site in



    • Backyard Contest

      Backyard Contest
    • Colors of the Rainbow Contest

      Colors of the Rainbow Contest
    • Beauty Tips Contest

      Beauty Tips Contest

    11 Discussions


    Reply 1 year ago

    You have to write the apiKey on line 34 as per the image I attached to you.

    At line 25 (I'm wrong 26) you must enter your altitude in meters.



    2 years ago

    Dear Tittiamo,

    I receive in my Serial Monitor message "AT+CIPCLOSE" after every Temp, Hum and Pressure reading. This means (I think) that the data is NOT uploaded to thingspeak (I see no data there). Can you help me out ?

    regards, Tom

    5 replies

    Reply 2 years ago

    I too, at times, I get the message, but then operate normally.


    Reply 2 years ago

    Again . . . the station works fine, but there is only data visible in my SerialMonitor but NOT on Thingspeak. I think it has to do with the settings of the BaudRate but I am to unfamiliar with this technique to get it right. Can you help me out, regards Tom.


    Reply 2 years ago

    You have verified that ESP8266 is connected to the router?

    You've put your api_key to line 34 (apikey String = "your channel's thingspeak API key";)?

    Let me know...


    Reply 2 years ago

    Yes and Yes . . .

    I noticed that ESP8266's baudrate is 115200.
    In you ino-file you are using 9600 . . . can that be the problem ?

    regards, Tom


    Reply 2 years ago

    Try changing the speed, the line 45. From ser.begin (9600); to ser.begin (115200);