Rain Sensor?

Does anyone know of a solution for getting the rainfall quantity into a PI?

I have an old commercial (cheap) weather station which displays wind, rain, inside and outside temp, However the rain data stopped displaying so I took the gauge apart. It is a seesaw of two small cups, the count of ‘oscillations’ against time provides the measurement.
If there isn’t a ‘new’ solution available I might try and convert my old bought gauge.

I do believe they call that a tipping bucket rain gauge
https://www.weathershack.com/static/ed-tipping-bucket-rain-gauge.html
Maybe this will help.
https://pi.gate.ac.uk/posts/2014/01/25/raingauge/

Thanks for the links, that is what it is, a tipping bucket.
RIP Maplin!
The one I have is a magnet and reed switch but I think it is the RF section that has failed.
If I am to get it working with a PI I will need to send the pulses by WiFi, either as they happen or the count for the last minute or five. All working off a couple of AA cells.
This could keep me busy!

An Arduino or Feather may be a better choice for this. They will use less power and be power failure tolerate. Feathers have a LIPO battery connector and charge circuit built in.
Anything like a Pi won’t work very well off of 3 AA’s. You’ll get constant undervolt warnings. And using 4 AA’s will fry it.

Alternatively I could use the old fashioned system, cable.
Cable from the gauge to a little electronics to interface with the PI and count pulses against time, correct for collection area.

Something like the Automation Hat or pHat may be the way to interface to the Pi.


Thanks, yes they would do it, I’ll start designing!

OK now ready to add the Rain Sensor to my setup. Currently I have this output from my tweaked version of nopheads code,


I have also managed to get the data to Grafana via InfluxDB, makes very pretty visuals and I am still learning how to set it up. This is an example of the Particle data graphed.

For connecting my tipping bucket rain sensor I found this useful link: https://projects.raspberrypi.org/en/projects/build-your-own-weather-station/8
The python code it suggests is:

from gpiozero import button
rain_sensor = Button(26)
bucket_vol = 10.0 #10ml
bucket_size = 0.12732395 #mm of rainfall
count = 0

def bucket_tipped():
global count
count = count + 1
print (count * bucket_size)

def reset_rainfall():
global count
count = 0

rain_sensor.when_pressed = bucket_tipped

Which seems to be a good starting point.
Has any on else gone down this route and have some advice/tips?
Thanks

The above seems to work if the import button is changed to import Button.
I will see how well tonight with the forecasted rain!