Inspiration
Inspiration for OpenStation came from seeing the lack of open source cheap amateur weather stations that were qualified to contribute data to NOAA's Citizen Weather Observer Program (CWOP). NOAA uses data from this program to predict the weather for millions of Americans. We decided to take initiative by building both the hardware and the software to make weather measurement more reliable and accurate in a cost effective and accessible way.
What it does
The system measures wind speed, wind gust, wind direction, pressure (adjusted to sea level), temperature, humidity, dew point and CO₂; It runs outside on battery power with access to Wi-Fi through mobile data. Data is visualized on a web dashboard and is sent to NOAA for use in their Citizen Weather Observer Program and Weather Underground (https://www.wunderground.com/) for amateur weather monitoring.
How we built it
The system uses a Raspberry Pi 5, a rotary encoder for wind direction, a magnet detector for wind speed, and a SCD41 weather module for temperature and humidity. Python reads the GPIO and I2C sensors once every second, and FastAPI and PostgreSQL to store and serve the readings. It is visualized with a React dashboard and ran on the Pi through a docker container that allows us to simulate it on a laptop without any sensors.
Challenges we ran into
We ran into many issues with sensor availability and sensor ability. It also took a large chunk of our time to get the Pi 5 GPIO and I2C devices to work inside Docker. We struggling with sensor calibration, specifically calibrating the wind sensors: setting true north for our wind vane and correcting station pressure error.
Accomplishments that we're proud of
We were able to build a full station, hardware, and software for about $150 in materials, about half what is currently on the market. We visualize data from 4 sensors on our dashboard, and push our data to public projects like NOAA’s CWOP and Weather Underground. Our system is also fully open source and runs with one command.
What we learned
During this project, we learned a whole lot about weather and how to measure it. How hall effect sensors work (and how to build alternatives). We learned a lot about sensor communication: specifically GPIO and I2C. We also learned about sharing our data to public APIs.
What's next for OpenStation
Next, we would like to create an alternative version of the same set of sensors that communicates over Ham Radio bands using the Automatic Packet Reporting System (APRS) and is powered by a solar panel when it isn’t in a commercial environment.
Built With
- alembic
- docker-compose
- fastapi
- gpio-(lgpio-/-gpiozero)
- i2c
- postgresql
- raspberry-pi-5
- react
- scd41
- sqlmodel
- weather-underground-api