This is the first version of my Weather Pi for the Raspberry Pi.
I've built 4 Pi setups that have included various weather monitoring hardware - light, temperature, humidity, pressure, wind speed, water detector etc. Each has been slightly different - like GPIO pins used and style of connectorss. Each has required custom software to make it run unfortunately which has meant simple things took longer. I thought it was time to make a standard platform that I could quickly build and use.
Introducing the Weather Pi prototype:-
The initial design was done using an open source program called Fritzing (http://fritzing.org/home/). Once the Adafruit extensions are installed you can design a circuit board fairly easily. Unfortunately there isn't an Adafruit Raspberry Pi Proto plate in the library so I had to kind of make one up. Unfortunately the Pi connector on the Pi proto plate takes up more room than my design.
I like to use Molex connectors on my project to allow sensors to be replaced easily. Rather than having to unsolder a sensor I can just unclip it, and clip in a new one. This has saved so much time over the years.
Using Fritzing allowed me to minimise the amount of space used on the board for future use. Hadn't noticed I'd basically used all the GPIO's so this was fairly pointless.
The Stand (white pipe)
In the past I've built wooden frames for my projects. This takes a bit to design, paint and maintain. As this project could live outside, I decided to use 40mm white drain pipe and connectors. This pipe should be joined using welding glue but I'll probably just use hot glue.
Using existing code I was able to set up the scripts quickly.
- Get-Weather.py - gather the data from the sensors and upload to MySQL database hosted on the web. Run via a CRON automated job every 10 minutes
- Rain.py - this script runs continuously waiting for the rain gauge to "flip". Once it's flipped it inserts a line in to a database hosted on the web.
- Wind.py - This script runs for 1 minute and counts the number of times the wind sensor spins. This data is uploaded to a separate table in the database. The script then starts for the next minute and starts again. This effectively means it's only uploading 30 times an hour given the time it takes to upload.
- Take-Photo.py - take a photo on the Raspberry Pi Camera and upload to the web. Run via a CRON automated job every 15 minutes
- Monitor.py - Check networking and if there is no networking, try and start it. Also checks the Get-Weather script is running, reboots if not.
It wasn't till I tried to plug the Molex connectors in that I realised you can't put 4 connectors side by side. There just isn't room. This meant that one of the 4 temperature sensor sockets couldn't be used.
This was the first time I've used a wind direction sensor and it turns out it's an analogue device that returns a different resistance depending where the wind direction is. I put this through the same kind of circuitry as the Light Sensor (LDR). Unfortunately I can't get repeatable values out of this. Will need to see how it is long term.
Next step will be to design a PCB and have it manufactured, then further testing. I may try redesigning this to use an MCP23017 IO Expander to handel the "switch" type devices (wind speed, rain gauge, 3 push buttons) and an MCP3008 analogue to digital converter for the LDR and wind direction sensor.
Once it's all perfected I'm looking to sell kits of the main PCB.