Community
OpenEnergyMonitor

Community

Rain Gauge - how to process input

Tags: #<Tag:0x00007f15cd814ae0> #<Tag:0x00007f15cd814a18> #<Tag:0x00007f15cd814950>

Can anyone advise how best to process the input from a rain gauge?

I have a rain gauge connected to an Wemos D1 - it’s counting pulses and uploading the data to my emoncms installation.

Logging the input, I get a feed of an ever increasing count, but I’m struggling to convert that to a usable “rain/hour” feed.

The processing I’m doing to the input is as follows:

  1. Log to Feed (rain_raw) // this accumulates nicely
  2. Rate of change // flatlines
  3. Allow positive // incase the Aurunio resets
  4. x (0.36128564) // conversion for my tipping bucket
  5. Log to Feed (rain_60s) // flatlines

What am I doing wrong?

Welcome, Luke, to the OEM forum.

What I think you need to do is use the Wemos to calculate the time between pulses and relate that to an hourly rate, then send it as a number to emonCMS as well as the pulse count.

Hi Robert,

Thank you for replying.

The Wemos doesn’t have a realtime clock, and it could be seconds or days between a pulse. I could change the sketch to either return just a pulse or a time interval - I’m not sure it would generate a useful “rate”.

I was hoping that there is some input configuration which takes an accumulating counter and converts it into a rate.
I can see the “Wh increments to kHh/d” feed but this doesn’t take an accumulating count and I would want a shorter period than days (probably hourly - in which hour did it rain?)

In blue the count of pulses,
In red the “Rate of Change”
In yellow the rate multiplied by the conversion factor

Luke

Does it not have some means of generating or recording time intervals? I wouldn’t have thought you needed a true real-time clock, surely you only need repeatability (not absolute accuracy) to determine a pulse rate. As long as you can do that, you subsequently introduce a calibration constant to provide the absolute accuracy.

FWIW, here’s a link to an article titled
Estimating Rain Rates from Tipping-Bucket Rain Gauge Measurements

N.B.
The math gets quite involved. :wink:

Ref: https://www.science.gov/topicpages/t/tipping-bucket+rain+gauges#