Introduction: Weather Station With Arduino/Genuino , ESP8266, BMP180, DHT22 and Thingspeak
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
- BMP180 - Barometric Pressure/Temperature/Altitude Sensor
- DHT22 - temperature-humidity sensor
- ESP8266 - WiFi Module
- LM317 - Voltage regulator
- 10-100 μf
- 100 nF = 0,1pF
- 510 Ω
- 370 Ω
- 1K Ω
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: https://create.arduino.cc/editor/Tittiamo/7e4b0e1b-ffd9-4ab7-b007-8c24c063c152/preview, 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 (https://thingspeak.com/) 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 "https://create.arduino.cc/editor/Tittiamo/37999913-81ae-4a32-a79d-cc68b18c5c72/preview" 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 https://thingspeak.com/channels/125766 or visit my site in https://sites.google.com/site/tittiamo68/MeteoTitti