Project still in process
In this Instructable I'm going to show you how to build personal wireless weather station using NodeMCU (ESP12)
One year ago I was create weather station based on Arduino. But always there are ways how to improve things to be better.
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:
- Barometric Pressure
- UV index
Step 1: Types of Sensors Used for Weather Station
The following is a list of measurement devices that are used in weather stations:
1) NodeMCU (ESP12) main board
2) Thermometer Dallas DS18B20 thermometer measures temperature. You can measure both the temperature indoors and outdoors, record highs and lows, show trend arrows to indicate temperature rising or falling, and even predict short-term future temperature ranges.
3) Hygrometer (BME280)- A hygrometer measures relative humidity. Relative humidity is the quantity or percentage of water vapor (water in gas form) in the air. Humidity influences environmental factors and calculations like precipitation, fog, dew point and heat index.
Barometer (BME280) – A barometer measures atmospheric pressure. A barometer can help to forecast upcoming weather based on the changes it measures in the atmospheric pressure.
4) Davis 6410 anemometer measures how fast the wind is blowing, or wind speed.
ESP8266 weather stations can display wind speed in MPH, KPH or knots, and record current, peak and average wind speed readings.
Wind Vane – A wind vane, or weather vane, is an instrument that determines which direction the wind is blowing.
5) Ventus W174 rain gauge measures rainfall or liquid precipitation
Step 2: Schematic and Wiring Diagram
Step 3: NodeMCU PCB Weather Station Shield
Design printed circuit board (PCB), I was used ,,Sprint-Layout" software. Exported to Gerber files. PCB was made https://jlcpcb.com
To create this NodeMCU ESP12 weather station shield you will need:
- NodeMcu Lua CH340G/CH340/ ESP8266 Wireless WIFI Internet Devolop Module Ebay
- Waterproof Digital Thermal Probe or Sensor DS18B20 Arduino Sensor Ebay
- JST-XH Kit 4Pin 2.54mm Terminal Housing PCB Header Wire Connectors Ebay
- Atmospheric Pressure Sensor Temperature Humidity Sensor Breakout BME280Ebay
- 2x 1K 0805 resistor
- 1x 120R 0805 resistor
- 2x 4.7K 0805 resistor
- 1x 10K 0805 resistor
- 1x RJ45 socket Ebay
- 1x 47uF electrolytic capacitor
- 1 x 40pin 2.54mm Female Single Row Breakaway Pin header Ebay
Step 4: Arduino Code
- Instal ESP8266 board into Arduino
- Enter your's Wifi router ssid and password.
- Before upload code into your NodeMCU you will need register in wunderground.com to obtain a WU station ID and password.
- Change this ID and password into your weather station Arduino code.
char ID  = "xxxxxx";
char PASSWORD  = "xxxxxx";
5. Register in weathercloud.net to obtain ID and key.
- char ID2  = "xxxxxxxx";
- char Key  = "xxxxxxxxxxx";
6. Change altitudepws in meters (m) to get relative pressure.
I'm using 30 second loop time sending data to wunderground.com. And 10 minutes loop time sending data to weathercloud.net
Project still in process
Last edit: 2019 06 18
Step 5: Testing Weather Station
NodeMCU ESP12 is sending sendors data to wunderground.com and weathercloud.net. So it looks everything it's working. Job done ;)
Step 6: OTA Over-the-air Programming
OTA (Over the Air) update is the process of loading a new firmware to
ESP8266 module using WiFi connection rather than a serial communication. This type of functionality is extremely useful in case of no physical access to the ESP module.
Uploading a new sketch wirelessly from Arduino IDE is intended for the following typical scenarios:
- during firmware development – as a quicker alternative to uploading a new sketch over a serial
- for updating the firmware of multiple ESPs in your network
Prepare for OTA capability
- Install Python on Your System
You need to install python27 on your system in order to program ESP8266 from your system you need to run OTA script. Install python27 on System from where your going to upload firmware.
- Download and Install Arduino OTA Library Download The library and tools required for OTA
- Install "ArduinoOTa.zip" in arduino library.
- Go to Tools to select your ESP board model. You also have to choose your ESP’s COM port
Open the BasicOTA.ino example: File > Examples > Arduino OTA > BasicOTA.ino
- Press the “Upload” button in the Arduino IDE and wait for the “Done uploading” message
Uploading a new sketch OTA (Over the Air)
Now your ESP8266 is ready to receive OTA firmware updates. You can
unplug your ESP8266 from your computer and power it through any power source. If your ESP8266 has a wireless connection to your router, you should be fine to upload new firmware.
- Go to your Arduino IDE. Open Tools tab select the Port option and you should see something like this: esp8266-xxxxxx at your_esp_ip_address
- Open your modified Nodemcu_weather_station.ino and upload over the air.
Info is taken from (Rui Santos)
Step 7: Making Solar Radiation Shield
Solar Radiation Shield is made from flower pot lower pad
Step 8: 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. Solar Radiation Shield is made from flower pot lower pad. 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 9: Info Is Taken From:
- Cactus.io http://cactus.io/projects/weather/arduino-weather...
- Jakub Nagy https://www.instructables.com/id/Arduino-Weatherc...
Jordan Blanchard http://chynehome.com/web/station-meteo-a-base-de-e...
- Wunderground.com PWS Upload Protocol https://feedback.weather.com/customer/en/portal/ar...
- Davis 6410 vane manual https://www.davisinstruments.com/product_documents...