Rain Gauge

written by hek

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.

Big thanks to BulldogLowell and PeteWill for creating and documenting this great project. You can read the background story on the forum.

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

Demonstration

A video showing how to setup your own rain gauge.

Wiring Things Up

Parts

  • 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
  • LED
  • 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

Example

/mysensors/MySensorsArduinoExamples/examples/RainGauge/RainGauge.ino
Last updated by mfalkvidd, 6 Mar 2019, "Replace MY_RADIO_NRF24 with MY_RADIO_RF24"

*Unable to fetch code from github*

Troubleshooting

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.

Hardware Debounce

If you use hardware debouncing change this line:

pinMode(TIP_SENSOR_PIN, INPUT_PULLUP);

To this (the internal pullup resistor is no longer necessary):

pinMode(TIP_SENSOR_PIN, INPUT);

Shopping Guide

100pcs LEDs
LEDs with assorted colors
24 available - $4.50   Buy
undefined   Buy
100pcs electrolytic capacitors
Assorted values. 0.1uF-100uF. Use capacitors to stabilize power to the radio.
39 available - $4.65   Buy
undefined   Buy
10pcs 2 Pole Screw Terminal Block
2 pole screw terminal block. 300V 10A
1210 available - $3.89   Buy
Stock unknown   Buy
10pcs Female pin header
2.54mm Single Row Straight Female Pin Header strip
344 available - $2.65   Buy
In stock - $0.62   Buy
10pcs NRF24L01+ 2.4GHz Wireless Transceiver
This is what enables your sensors to communicate wirelessly across a nominal range of 60 meters.
103 available - $13.00   Buy
In stock - $12.32   Buy
10pcs Prototype PCB
50mmx70mm
5391 available - $4.37   Buy
undefined   Buy
1500pcs Assorted Resistors
1 ohm ~ 10M ohm. 1/4W. +-1%. 75 different values.
152 available - $6.98   Buy
undefined   Buy
20pcs 662K 5V-3.3V Step Down Regulator
Inexpensive regulator for adjusting the power to the radio when using 5V Arduino Pro Minis. Warning! Very small and hard to solder.
842 available - $0.99   Buy
In stock - $1.33   Buy
40pcs Dupont jumper cables Female->Female 20cm
Cables used for connecting radio and sensors.
6313 available - $1.12   Buy
undefined   Buy
Arduino Pro Mini Compatible 5V
This is probably the cheapest module. You can connect 5V sensors directly but for powering the radio you'll also have to buy a step-down regulator
2772 available - $2.36   Buy
Stock unknown   Buy
BH1750FVI Digital Light intensity Sensor Module
0-65535 lx. I2C interface.
264 available - $2.12   Buy
Stock unknown   Buy
DHT22 Module
Humidity range: 0%-100%RH (±2%RH). Temperature range: -40-80°C (±0.5°C).
1721 available - $3.40   Buy
undefined   Buy
FTDI USB to TTL Serial Adapter
For the Pro Minis you'll need one of these to program the module from a PC or MAC. Handles both 3.3V and 5V!
3969 available - $6.95   Buy
Stock unknown   Buy
Rain Sensor
Tippling Bucket rain sensor hardware. Output pulses when a bucket has been filled.
517 available - $11.69   Buy
In stock - $11.69   Buy

Gateways

Sensors & Actuators

Related Content

Comments