My humble DIY weather station

2021-09-22 | 394 words

I built my weather station a few years ago, but only now do I dare to write an article about it. The weather station is open source, but there is no documentation or anything like that. You can find it on GitHub for inspiration. It’s really just a project for fun.

The basis is Raspberry Pi. Originally, I used 3B, then 4B, and finally I put in a Zero W. It costs about 300 CZK, has only one core and 512 MB of RAM, but it’s completely sufficient. The only trouble is that besides power, it has only one micro USB port. I elegantly solved this with a reduction and splitter:

The Raspberry Pi serves as the central hub - two webcams and two Arduino Micra (of course, clones for a few tens of crowns) are connected to it as sensors.

On the Raspberry, a cron (Python script) runs, which takes a picture of my palm and the outdoor view from my office every minute. It also checks the CPU usage, free RAM, temperature, etc. But mainly, it communicates with two Arduinos - the indoor and outdoor ones - via a serial interface. It saves the data to a MySQL database and finally creates the resulting JSON file, which it uploads along with the photos via SSH to the hosting. There, a dashboard (Vue.js) displays the data. There are also nice temperature graphs, minimum, maximum, and average values. You can see it in action here:

On the indoor Arduino, the following sensors are connected:

Note that three sensors measure the temperature there. The final temperature is their average.

The outdoor Arduino measures a little less. I have a barometer, thermometer, and humidity sensor there, but in addition to the indoor one, there is also a rain sensor. That’s the strip sticking out of the box:

I was surprised at how well it works. Even in summer heat and winter cold, the Arduino runs in its little booth and obediently measures and sends data via a USB cable inside. I repeat that it’s just a Chinese clone, so the quality and durability pleasantly surprised me.