Rain Gauge - how to process input

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: tipping-bucket rain gauges: Topics by Science.gov

I’m still struggling to work this out. Here’s the feed from my rain gauge, it can reset the count at random times:

This is fed from a WeMOS D1 which sends the latest count every 60s via HTTP.

What I want to do using the processing in emoncms, is convert that feed into an hourly measurement.

I’ve tried the “Rate of Change” + “Allow Positive” but that doesn’t seem to work at all (constant zero output).
I’ve tried the “Total pulse count to pulse increment” (output = input).

Any ideas? This must be the same problem as converting a gas or water meter to an hourly consumption?