Your own weatherstation
Why your own weatherstation
This project started with the search for a radio weather station that would replace my old weather station. This was still based on the s300th radio protocol and the corresponding openHAB binding has not been further developed for years. In addition, a special USB Stick is required which could only be used for this sensor type. So I set to work to find an alternative.
One of my main requirements was to rely on a radio protocol that can be used universally and at the same time offers an open API.
Find the right solution
My shortlist was finally Homematic, which I quickly discarded because it needed an additional control center.
ZigBee was also considered, which I also rejected because there were no corresponding sensors and it was too inflexible for a do-it-yourself solution. For example, it did not offer any custom value types.
Third, I evaluated Z-Wave. The first wind and rain sensors have been available here for a short time. After a brief consideration, however, I discarded finished sensors due to the price-performance ratio. During my research, I finally came across the Z-Uno. An Arduino compatible clone that brings the complete Z-Wave stack with it. So my first experiments started with this device. Unfortunately, I was quickly confronted with reality here too. There were problems with the device pairing which either did not work at all or led to a new registration, which suddenly made the device available under a new ID. Additionally, Z-Wave was never designed for custom devices. In the case of openHAB, each z-Wave device is stored in a central database in the form of an XML file, which describes the functions. Of course, this is not practical for devices you have designed yourself. Another variant was to patch the binding jar file from openHAB and simply copy your own XML file into it. In the beginning, this was my favorite route. Ultimately, however, I also rejected this solution because the Z-Wave protocol itself was not flexible. Unfortunately, it didn’t cover all of the data types I favored.
Ultimately, I came to the conclusion that only a complete do-it-yourself solution including the transmission medium would offer the necessary flexibility. The basis for this is again an Arduino Pro Mini, with which I have already had good experiences with my temperature sensors.
So all that remained was the search for a transmission path. After the first tests with a WiFi shield, which I quickly discarded due to the high power consumption (> 120mA), I came across MySensors. It is an open Arduino based software stack which is intended for exactly such things. After the first tests, I quickly realized that it fully met all of my requirements. The following properties should be emphasized here.
- Arduino based and therefore very energy efficient
- Long range thanks to 868Mhz transmission
- AES hardware encryption when using the RFM69 Transeivers
- Mesh network support to reach even distant nodes
- Support of various sensor types including custom values
- Universal gateway which forwards all sensor data to an MQTT broker
Since I didn’t want to use a separate power supply or network cable, it was also completely self-sufficient. i.e. without external power supply.
What can your own weather station do?
Station:
- Power supply via 5W solar panel with 7800mAh battery
- Battery monitoring (level indicator, charging current and voltage)
- AES (in hardware) encrypted radio transmission
Sensors:
- Amount of rain
- Rain status
- Rain heating
- Wind speed
- Wind direction
- Temperature 1 & 2
- Humidity 1 & 2
- Air pressure
- Solar power
- Brightness
- UV index
- UV A
- UV B
Challenge for solar operation
One problem I underestimated at the beginning was the self-sufficient power supply. My requirements were actually not very extensive. Still, it turned out to be difficult. It should have both a current / level monitor and an NTC sensor which interrupts the charging process if the temperature is too high or too low. Starting with a complete do-it-yourself LiPo charger, through a finished one to various solar LiPo chargers, I had tried a lot. Ultimately, I use a combination of your Adafruit solar charger together with a current sensor.
Another challenge was the power consumption of the weather station itself. A 7800mAh battery sounds like a lot at first. But in order to be prepared for extreme weather conditions, I calculated with only 40% of the capacity at low temperatures. Furthermore, one should assume in winter that no sun shines for more than 10 days at a time. Under these general conditions, the battery size relativizes itself very quickly.
The weather station currently has the following consumption
- Sleep Mode - 8mA (58 seconds per minute)
- Active mode - 12mA (0.5 seconds per minute)
- Wireless Transmission Mode 32mA (max 1.5 seconds per minute)
i.e. it should last up to 12 days without sunshine at 40% battery capacity.
Circuit plan
Webui
Software
As always, the source code for this project can be found on github.
https://github.com/HolgerHees/arduino_weatherstation
Component list
- Ansmann 1S3P Battery pack 3x18650 Li-Ion 3.7V 7800 mAh
- NTC for battery monitoring
- Current sensor INA3221
- Adafruit Solar Charger
- RFM69 Transeivers
- Pololu 5V Step-Up Step-Down Voltage Regulator S7V7F5
- 3.3V Voltage Regulator MCP1700-3302E
- Arduino pro mini 3.3v
- Solar Panel
- Windsensor Ventus W132
- Rain gauge
- NTC for temperature messurement
- Light sensor BH1750
- UV Index Sensor VEML 6075
- Air Pressure Sensor BME280
- Air Pressure Sensor Membran
- Rain Sensor / Heater
- Aluminum tubes
- Angle
- Connection box
- Hot glue
- Two-component adhesive