Progress Bar

Skip to main content

Jaycar
...

Personal Weather Station

Personal Weather Station

Difficulty
TEST & TOOLS

Summary

This project utilises the Temperature & Humidity sensor (XC4520), together with the ESP8266, a OLED display is included in the project to make it more useful if you want to read the temperature and humidity locally. Otherwise the display may be omitted if you just want to take environmental readings via the Weather Underground website.


Materials Required

1Wi-Fi Mini ESP8266 Main BoardXC3802
1Arduino Compatible Wi-Fi Mini Prototyping ShieldXC3850
1Arduino Compatible Monochrome OLED Display ModuleXC4384
1Arduino Compatible Temperature and Humidity Sensor ModuleXC4520

It is assumed you already have installed the Arduino IDE (arduino.cc), and you have also installed the hardware support for the ESP8266 (github.com/esp8266/Arduino).

You will need to have an account at weatherunderground.com, this is free and easy to set-up. Once you log into your account you will need to create your new weather station. From the top menu choose More and Add Weather Station, as shown below:

Weather Station

Follow the on-screen instructions, as the bear minimum you will need to enter a station description, such as "My Bedroom" (or anything else that best describes where you are monitoring the environment), and for device type just choose 'other'. At the end of this process you will be allocated a station ID and password, record this information because you will need it later on in the programming section.


station ID and password

Once you have this information, write it down and you're ready to start constructing and coding your project.


This project is relatively easy to build, as per the wiring diagram below.


wiring diagram

We used the Mini Prototyping Shield (XC3850) to put all the components together. But feel free to construct your project according to your specific style, you could of course follow what we did below.

Mini Prototyping Shieldstackable boards


The final construction is neatly stackable boards, with the main ESP8266 main board at the bottom, followed by the D1 Mini Prototype Board (with all the wiring connections), and the OLED display mounted on top (using the additional headers that come with the D1 Mini Kit).

First unzip the code file, you'll see three files which are to be located under the same directory in order for the code to compile.

Personal_weather_station.ino This is the Arduino IDE source code file

Locate the WiFi SSID and password settings in the code, and change the values to match your WiFi network settings:

cost char* ssid ="<your WiFi SSID"
cost char* password ="<your WiFi password"

Locate the ID and PASSWORD variables below, and change the value inside the quotation marks to your station ID and password settings, that you recorded when you created the station (see above):


char ID [] = "your Weather Underground Station ID"
char PASSWORD [] = "your Weather Underground Station password"

That is all you need to do. Now simply download the code to your ESP8266 D1 Mainboard. You should see the display come on with the message "connecting to WiFi...", once the unit is connected to your WiFi network, there will be a short time when the unit synchronises to the network time. Then the display will show the date, time, temperature, and humidity readings. Note that when you first power on the unit the temperature and humidity readings will display '0' for about twenty seconds, until the sensor starts to record actual readings.

You should have your personal weather station now running at the location where you wish to monitor the temperature and humidity. Next, log into your Weather Underground account, and navigate to MY Profile and My Weather Stations:


Weather Underground account

You will be presented with a screen that shows all the weather stations that you configured under your profile, which may look something like the below screen. Our Personal Weather Station appears under the name we gave it, "ESP8266", and the green dot besides it means that it is online and successfully reporting measurements to Weather Underground.


Personal Weather Station

You can click on your weather station to view the detailed weather patterns and readings for your Personal Weather Station:


weather station to view

As you can see we are only reporting Temperature and Humidity. You can add more measurements like UV light readings, barometric pressure, etc. by simply connecting the respective sensor to your Personal Weather Station.


Similar projects you may be interested in

TEST & TOOLS
How to remove Header pins
Difficulty

TEST & TOOLS
Transistor Tester
Difficulty

Installing and Setting Up the XC0440 Weather Station
TEST & TOOLS
Installing and Setting Up The XC0440 Weather Station
Difficulty

TEST & TOOLS
IR Helper
Difficulty