Here you will learn how to make your own wireless "tipping bucket" rain sensor. You can either print the 3D model yourself or MySensorize some cheap tipping bucket hardware found below.
The principle behind this is quite simple; When it rains a funnel collects water into two tiny "buckets". When one bucket is full it tips out the water and the second bucket starts to fill up. Each tip is registered and this data is transmitted to your controller.
By measuring the funnel opening and bucket size you can calculate the amount of rain that has fallen. Need help calculate your own funnel construction? Have a look here.
The DIY tipping bucket 3D model created by BulldogLowell can be found here.
The example also contains some optional light, humidity and temperature sensors that can be removed if you want to keep it simple.
Note: If you are using a Vera home automation controller you can find the required files here: https://github.com/mysensors/Vera/tree/master/raingauge
A video showing how to setup your own rain gauge.
Wiring Things Up
- Prototype Universal Printed Circuit Boards (PCB)
- NRF24L01 Radio
- Arduino (Pro Mini was used in the example video)
- FTDI USB to TTL Serial Adapter (if using a Pro Mini)
- Rain Gauge (Tipping bucket)
- Capacitors (10uf and .1uf)
- 3.3v voltage regulator
- Resistor (270 Ω)
- Female Dupont Cables
- Male Dupont Cables
- Male Pin Header Connector Strip
- Female Pin Header Connector Strip
- 2 Pole 5mm Pitch PCB Mount Screw Terminal Block
- 22-24 gauge wire or similar (I used Cat5/Cat6 cable)
- DHT-22 (optional) - humidity/temp sensor
- BH1750 (optional) - light sensor
*Unable to fetch code from github*
A few people have reported issues with false interrupt triggers (rain reported on a sunny day). This has been traced back to bad power supplies. The quickest fix is to power this sensor with a good power supply and cable/wire. An alternative fix is to use hardware debouncing. To do this, use the following wiring on your contact sensor/reed switch.
If you use hardware debouncing change this line:
To this (the internal pullup resistor is no longer necessary):