Back in late February I saw this post on the Raspberry Pi site.
They had created Raspberry Pi Weather Stations for Schools. I totally wanted one! But at that time (and I believe still as of writing this) they are not publicly available (you need to be in a select group of testers). Well, I wanted on and I didn't feel like shelling out hundreds of dollars for an existing 3rd party system.
So, like a good Instructable user, I decided to make my own!!!
I did a little research and found some good commercial systems I could base mine off. I found some good Instructables to help with some of the Sensor or Raspberry PI concepts. I even found this site, which was pay dirt, they had tore down an existing Maplin system:
Fast forward about a month and I have a basic working system. This is a complete Raspberry Pi Weather system with just the base Raspberry Pi hardware, camera, and some assorted analog and digital sensors to make our measurements. No buying pre-made anemometers or rain gauges, we are making our own! Here's it's features:
All of the software for record and displaying the information is in a Github, I've even done some bug tracking, feature requests in there as well:
This project was a great learning experience for me, I got to really dive into the capabilities of the Raspberry Pi especially with the GPIO, and I hit some learning pain points as well. I hope you, the reader, can learn from some of my trials and tribulations.
MCP3008 - to convert analog to digital inputs for the Raspberry Pi - https://www.adafruit.com/product/856
The main enclosure houses the PI, the Camera, the GPS and the light sensor. It is designed to be waterproof since it houses all the critical components, the measurements are taking from the remote enclosure and that one is designed to be exposed/open to the elements.
Pick an enclosure, I used an electrical junction box, various project boxes and waterproof cases will work just as well. Key point is it has enough space to hold everything.
My Enclosure contains:
There is a window in the front of my enclosure for the Camera to see out of. The case with this window protects the camera, but I did have issues where the red led on the camera (when it's taking a photo) reflects off the plexiglass and shows up in the photo. I used some black tape to mitigate this and try and block it (and other LEDs from the Pi and GPS), but it's not 100% yet.
This is where I stored the Temperature, Humidity, and Pressure sensors as well as the "hook ups" for the rain gauge, wind direction and wind speed sensors.
It's all very straightforward, pins here connect via the ethernet cables to the required pins on the Raspberry Pi.
I tried to use Digital sensors where I could and then any Analog are added on to the MCP 3008 it takes up to 8 analog which was more than enough for my needs, but gives room to improve / expand.
This enclosure is open to the air (it has to be for accurate temperature, humidity and pressure). The bottom holes are popped out, so I gave some of the circuits a spray of a Silicone Conformal Coating spray (you can get it online or a place like Fry's Electronics). Hopefully it should protect the metal from any moisture, though you have to be careful and not use it on some of the sensors.
The top of the enclosure is also where the wind speed sensor fits. It was a toss up, I could have put the wind speed or wind direction on top, I didn't see any major advantages of one over the other. Overall you want both sensors (wind dir and speed) high enough where buildings, fences, obstacles don't interfere with the measurements.
I mostly followed this instructable to make the actual gauge:
I made this out of plexiglass so I could see what was going on and I thought it would be cool. Overall the plexiglass worked ok, but combined with the Gluegun, rubber sealant and overall cutting and drilling it doesn't stay looking that pristine, even with the protective film.
This was a simple weather vane. I based the electronics off the Maplin system:
This one I once again turned to the Instructable community and found and followed this instructable:
Software is written in Python to record the data from the sensors. I used some other 3rd party Git libraries from Adafruit and others to get the information from the sensors and GPS. There are also some cron jobs that pull some of the API information as well. Most is explained/outlined in the Git documentation at docs/install_notes.txt
The web software is in PHP to display it on the webpage while also utilizing YAML for the config files and of course the RRD tool to store and graph the data.
It utilizes the Weather Underground API to get some of the interesting data that sensors can't pull: Record Hi's and Lows, Phase of the Moon, Sunset and Sunrise times, there's also Tides available on their API, which I thought was really neat, but I live in Austin TX which is very far from water.
All of it is available on Github and is actively maintained and currently being used as I further refine and calibrate my own system, so you can submit feature requests and bug reports as well.
The software goes through a theme change depending on the time of day, there are 4 stages. If the current time is + or - 2 hrs from sunrise or sunset then you will get the sunrise and sunset themes, respectively (right now just a different background, I will probably do different font/border colors in the future). Likewise outside those ranges gives the day or night theme.