Using a tipping bucket rain gauge

Which rain gauge do you use? I have one in the UK but for some reason it is not very consistent. I have been checking it against a simple manual rain guage. Any information on your setup (software and hardware) would be appreciated.


I am not actually measuring rain with it, just the output from my dehumidifier. This is the one I am using:

I have an older version of it that I used outside, it has a bigger collection system and a removable screen. I don’t know that they make it anymore. It worked quite well as far as I knew.

For my dehumidifier, I took apart the gauge part and soldered a three conductor cable, +power, gnd, and switched side of the reed switch. I hooked these up to a NodeMCU that is running Tasmota

The reed switch goes to one of the digital inputs, where I have it set up as a pulse counter. Every 30s it uses MQTT to send information about its sensors. I have POW that measures the power and energy used by the dehumidifier and sends it to MQTT. It too is running Tasmota.

I have NodeRED running and there is a flow on it that subscribes to the topic and gets the updates. It parses the string into JSON and then grabs the counter. There is some math to figure out the starting counter and power and then the ending one and calculate the efficiency.

Here is the dehumidifier one:

And the measuring one:

And here is what the power and energy efficiency graph looks like:

it took me a little while to get to the point where I had good and efficient control. The graph is telling, you can see when the compressor starts (zooming in shows the fan too). Notice how the compressor has to run for several mins before any water starts coming out. Also note that the efficiency droops on some of the runs. The coils are probably starting to ice there. What is more interesting is how long it takes for all the water to come out and be counted. The compressor typically runs for about 30min. It takes about that long again before all the water it created makes it out. The typical control for one of these would basically short cycle the compressor, i.e. it is on for about 5-10min and then off for the same amount. The fan would be running the whole time (it uses about 60-80W) and it would be blowing much of the condensed water back into the air, so the temperature of the room would increase significantly too. (All that energy has to go somewhere.)

The rain gauge has 200 bucket tips per cup, so right now I am getting about 3.2 cups/KWhr (about 0.75liter/KWh). It is about 18C and I aim to keep the humidity below 60% on average to keep mold from growing.

Here are the temps and humidity of the input air:

There is a Heat Pump Water Heater in a nearby room and it cools the space. This is why there was a rise from just before 02:00 to 07:00. The HPWH was off then. It is typically on for 18 hours a day, but it only draws about 500W in heat pump mode, so it is much less energy usage in total than when it uses its element.

1 Like

Thank you very much. That is really helpful.

I already use Tasmota and Wemos D1 but had not realised they had a counter input.
I will try my rain gauge connected to the Wemos and see if I still have problems.

Did you just direct connect reed switch or did you fit any resistor or capacitor in or across the circuit?


1 Like

Definitely somewhat off topic for here. But, the rain gauge already had a built-in pull-up, so I didn’t add one. I tried adding a capacitor (various ones actually). I don’t recall it helping much. But Tasmota has a setting for debounce, which did. Since the bucket is unlikely to tip more than once a second, you can use a long time for debounce.

Since this has been broken out into its own thread, I’ll just add that I built my own DIY weather station using Arduino pro mini’s and NRF24L01 radios. For the tipping bucket rain gauge (and the wind vane/anemometer) I used the Davis Vantage Pro 2 spare parts. Both have been reliable and accurate for at least 18 months now with one exception when the rain gauge got blocked by small leaf matter (Jacaranda leaves) that had slipped through the filter. If I’m honest, it had probably been many months since I checked the filter on it too!
This is the one I have: but I notice it is now discontinued and replaced with AeroCone® with Flat Base for Vantage Pro2™ & EnviroMonitor® (spoon) — Davis Instruments
Both have 0.01" or 0.2mm / tip

Just for completeness, the anemometer was Anemometer for Vantage Pro2™ & EnviroMonitor® — Davis Instruments

Neither of them were cheap, but they are excellent quality, and you can easily (and cheaply) get hold of new cups for the anemometer (not that I’ve needed to yet!)

Both include de-bounce circuitry, but I added my own R/C filter at the Arduino end because I was very occasionally getting noise from the included 12m cables running through my house. I also added debounce in the firmware on the Arduino, just as an extra precaution.

The Davis instruments are indeed of good quality.

They are what the National Weather Service issues to their co-op weather observers.
The lion’s share of US weather data comes from those instruments, vice airports and other
local/state and federal government sites.

1 Like

If you had the money, I’m not sure why you’d buy anything else TBH.
Personally, I couldn’t justify spending the money on the Vantage Pro 2 along with the additional USB linker product required to get the data onto my computer. It was going to cost me upwards of $2k AUD.

As it is now, I’ve got the same wind and rain accuracy for about $400 AUD total along with the flexibility to make it do exactly what I want :slight_smile:

My anemometer does better than the Davis ISS too, I can measure down to 0.375 mph (0.6 km/h) wind speed, the Davis ISS considers anything less than 1 mph as “0”.
Why? because I can :smiley:
The Davis sensor suite is limited by its 2.5 second transmit interval, whereas my sensor transmits every 2 seconds but continues to track wind speed between transmits waiting up to 6 seconds before transmitting a “0” wind speed.

If I had the money :wink: I’d run the same sensors the NWS runs. i.e Vaisala or R.M. Young. :grin:
But the price for that gear is several times that of the Davis equipment. :scream:

Yikes! I can see why you went the route you did.
The cost in USD for the Vantage2 ranges from 624 to 1380, which isn’t what I’d call affordable,
but is still considerably less than the >2k AUD you mentioned.


Very nice!

Having just established that the reliability problems I have been having are almost certainly the rain gauge I have been using I have ordered the Davis rain collector. Is possible for you to provide details of the R/C filter you built? I am connecting to an ESP which is 3.3 volt inputs.



If your ESP is relatively close to the rain collector, I would suggest you don’t need any further filtering. I put a 'scope on the rain collector and the anemometer to see what sort of waveform they produced when they “pulsed” and it was extremely clean out of the box. If you have to run your cable from the collector to the ESP past a lot of noise (such as electrical wiring etc.) as I had to, then perhaps it is worth adding a filter.

The Pro mini I’m running is also at 3.3V but I’ll have to climb into my roof space to see what RC values I used. I’ll try and get up there tonight when it has cooled down a bit. This time I’ll write them down!


I should have warned you that the rain collector is MUCH larger than the cheaper ones that provide 0.5mm / tip. Expect a reasonable sized box to turn up!

Fair call :smiley:

It’s finally cooled down enough to venture into my roof space…
The R/C filter I’m using is a low-pass using 220Ω and 0.22μF, which according to a few calculators I used provides a cutoff frequency of 3.3kHz (anything greater than 3.3kHz should be attenuated below 0.7 x Vin which is under the “HIGH” threshold for an ESP8266)
I just happened to have those kicking about and didn’t get too precious with it, I could probably have used a larger resistor (2.2kΩ would cut off >328Hz) and still been perfectly fine.
I’ve got a 0.5 second de-bounce in software for the rain gauge as well to give me a 1440mm/hr rain rate maximum. (The world record rain rate ever recorded is actually 305mm in 42 minutes = 215mm/hr or 8.4in/hr)

Many thanks. Davis rain gauge has arrived. It is big!


Make sure you count the tips that it’s calibrated for - it will be either 0.2mm or 0.01" (which is 0.254mm, not 0.2mm)

@Greebo just came across this thread about your weather sensor setup. I’m wondering if you are able to share your Arduino sketch? And details of wiring? As this is exactly what Id like to do. Thanks

Hi Matt, which portions are you interested in particularly? The setup I’ve created isn’t what I would call “straightforward” by any stretch. It consists of:

  • an outdoor sensor node (pro mini, NRF24L01, si7021 temp/humidity sensor, LiFePo4 battery)
  • an indoor sensor node (pro mini, NRF24L01, si7021 temp/humidity sensor, BMP280 barometric sensor, LiFePo4 battery)
  • a wind/rain sensor node (pro mini, NRF24L01, Davis anemometer and rain gauge, LiIon battery, charging + BMS module and 5V USB power supply)
  • Raspberry Pi with NRF24L01 connected by SPI, running a custom written Python driver for WeeWx

The outdoor and indoor sensors sleep for about 30 seconds each between readings and their 700mAh batteries last about 6 months before needing to be recharged. The wind/rain sensor is permanently powered with the battery as a power failure backup option. The Pi also runs via a UPS based on a 10Ah LiPo battery and associated power switching circuit.

Mine has no connection/integration whatsoever with EmonCMS or with my EmonBase.

@Mattpitts74 here is a sketch I am using to log temp/rain using a ESP8266 based arduino clone (includes Wifi and available on fleabay for $5)

rain_temp.ino (2.5 KB)

However, please see this other thread, I’m struggling to work out how to process the input in emoncms from this:

@lukew151 thanks for sharing. i’m wanting to use the data in my home automation system home assistant. still trying to figure all this out, but thanks for sharing your sketch.

wow thanks @Greebo for sharing. it sounds good. i’ve played around with the mysensors project in the past. which used those radios.

i’m trying to setup a stand alone weather station, just using the higher quality sensors from davis. but can not afford their prices. and like tinkering. also would like to try and pull weather data into my home assistant home automation if possible.