This project is a continuation of my earlier weather station project. It was quite popular on the web, people around the globe made their own by following it and given valuable feedback for improvement. By taking consideration of the comments and Q&A section of my earlier project, I decided to make this new version Weather Station. I also made a custom PCB for this project, so anyone with little knowledge on electronics circuit can also make this project.
My V-2.0 PCB can also be used for any application in the Arduino platform. Following are the salient features of the new weather station.
1. Connect to Wi-Fi, and upload the data to the web ( Blynk App and Thingspeak)
2. Monitoring Weather parameters like Temperature, Pressure, Humidity, altitude and UV level, etc.
3. Extra ports to add more sensors
4. Remote Battery Status Monitoring
5. Uses a powerful Li-Ion Battery ( 3400 mAh ) and Solar Panel (1W)
Only monitoring the weather data ( Temperature, Humidity,Pressure and Altitude ) is not so interesting. So my friend 3KU_Delta thought to implement the forecast algorithm in to the Software.
The only algorithm that fulfill our purpose is the Zambretti algorithm. The Zambretti Forecaster is a weather forecasting tool in the form of a circular slide rule that was introduced by the company Negretti and Zambra in 1920. A more detailed description about the functionality of the Zambretti Forecaster and how to put it into code can be found here. The input parameters of the algorithm are season, sea-level pressure, barometric tendency, hemisphere and wind direction. The algorithm is empirical and created for the northern hemisphere and more specifically Great Britain.
The algorithm conclude, that wind direction has little effect to the final result, which is a good thing because wind direction sensor is still not used . We get the temperature, humidity and station pressure from the sensor, but the relative pressure should be derived from the station pressure. The output of the Zambretti Forecaster is one of 26 different weather conditions.
My earlier enclosure design was a decent looking enclosure but it was not ideal for the weather station. The ideal enclosure for keeping the weather sensors is the Stevenson Screen.
A Stevenson screen is an enclosure for weather sensors against rain and direct heat radiation from outside sources, while still allowing air to circulate freely around them.
The Stevenson Screen for Solar Weather Station V2 is designed by my friend Glen. This has a simple wall mount and a 2 part cover to isolate the heat transfer from the solar panel. I really appreciate his work.
To use Wemos D1 with the Arduino library, you'll have to use the Arduino IDE with ESP8266 board support. If you haven't already done that yet, you can easily install ESP8266 Board support to your Arduino IDE by following this tutorial by Sparkfun.
Following settings are preferable :
PU Frequency: 80MHz 160MHz
Flash Size: 4M (3M SPIFFS) – 3M File system size 4M (1M SPIFFS) – 1M File system size
Upload Speed: 921600 bps
Before uploading the code install the following libraries :
You can read thistutorial by Sparkfun to install the Arduino libraries.
In my earlier version, there are two separate codes for Blynk and Thinspeak but in this version, we have written a single peace of code. The user have to only comment out a single line of code for Blynk or Thingspeak.For example, if you are using it for Blynk App, the code should be as below:
const String App = "BLYNK"; // alternative is line below
// const String App = "Thingspeak"; // alternative is line above
Cedit: I want to give lot of credit to Keith Hungerford, who have guided me to make this project more powerful. The software library for BMP280 is also written by him.You can read his Instructable on BMP280 power saving mode.
Note: Before using the deep sleep feature, Wemos D0 pin must be connected to the RST pin. This can be done by shorting the jumper JP2.
Note : When you place an order, I will get 10% donation from PCBWay for contribution to my work. Your little help may encourage me to do more awesome work in the future. Thank you for your cooperation.
I have drawn the schematic by using EasyEDA online software after that switched to PCB layout.
All of the components you added in the schematic should be there, stacked on top of each other, ready to be placed and routed. Drag the components by grabbing on its pads. Then place it inside the rectangular border line.
Arrange all the components in such a way that the board occupies minimum space. Smaller the board size, cheaper will be the PCB manufacturing cost. It will be useful if this board has some mounting holes on it so that it can be mounted in an enclosure.
Now you have to route. Routing is the most fun part of this entire process. It’s like solving a puzzle! Using the tracking tool we need to connect all the components. You can use both the top and the bottom layer for avoiding overlap between two different tracks and making the tracks shorter.
You can use the Silk layer to add text to the board. Also, we are able to insert an image file, so I add an image on of my website logo to be printed on the board. At the end using the copper area tool, we need to create the ground area of the PCB.
From the previous step, it is concluded that the average current consumption is 9.3 mA
Required Current for running the device for the whole day = 9.3mA x 24 Hours = 223.2 mAh
There is no current gain in the linear regulator used in the WeMos, so any current used at 3.3V results in the same current at 3.7V or whatever voltage the battery is at.
The amount of solar insolation varies according to which part of the globe you are located at. To find out the amount of solar insolation in your area, you can use the Global Solar Atlas. By taking consideration into minimum 1 hour of full sunlight, we are going to select the solar panel.
So, our target is to generate 223.2 mAh in 1 hour.
To charge a 3.7V Li-Ion battery, a solar panel of voltage 5 to 6V is adequate.
Required Solar Panel rating = 223.2 mA at a voltage of around 5 to 6 volts.
Solar panel rating = 223.2mA x 5V = 1.1W
Solar Panel Selected : 1W / 5V to 6V
In this project, I have used a 5V,200mA Solar Panel ( 99 x 69 mm)
So a 1W panel should be enough the run the project even in winter in places with a high latitude.
Note:If your location receiving ample amount of sunlight, then a 0.66W solar panel which I have used in my earlier version also work.
The heart of the Wemos Board used in our Weather Station is an ESP8266 SOC which is a power hungry chip. Our objective is to run the device by using a 18650 battery but the demand for power usually makes battery operation impractical.
Another problem is that as the device will run continuously, it is quite obvious that the device will experience warming, and therefore the measured temperature will be higher than the ambient temperature.
From the above, it is clear that we have to lower the power consumption of the ESP8266 WiFi chip. To do that, we’ll use the Deep Sleep mode which is the most power efficient option for ESP chip. It allows to put the ESP8266 into hibernation and saves the battery. You can wake up it at regular intervals to make measurements and publish them.
Component Operation mode ----- Sleep mode
1. ESP8266 170 mA -------- 10 uA
2. CH340 12 mA --------- 50 uA
3. Built in LED 3 mA ----------- 0 uA
4. Voltage monitor 0.006 mA ----- 6 uA
Total185 mA ---- 66 uA
If the sleep-wake cycle is 10 minutes, with a 30 second wake time, the energy consumption budget looks like this:
Wake time 185 mA for 0.5 minutes = 92.5 mA-minutes
Sleep time 0.066 mA for 9.5 minutes = 0.627 mA-minutes