Connecting a Rain Gauge

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Naesstrom
Normal user
Posts: 21
Joined: 02 Jun 2017, 21:02

Connecting a Rain Gauge

#1 Post by Naesstrom » 06 Feb 2018, 19:54

So I bought one of those really cheap rain gauges with a tipping bucket that looks like image just below, connected one wire to ground and the other to D5 on my nodemcu board but would love to get some help on the config since I can't get it working and an inch from going completely mad here... :D
This is the model:
Image

This is how I have set it up, not sure what I should select in the Counter Type and Mode Type?
Image

The result is that the Count stays at 0 and the Total just increases for each tipping but ignores the formula?
Image

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: Connecting a Rain Gauge

#2 Post by toffel969 » 06 Feb 2018, 20:03

All in all looks like it's working ok., just the formula is not working. Why I don't know.
You could work around with rules and a dummy. That would allow a local representation of rain for last h, last 24h, so on. The count value represents the count between delays. Increase delay for that purpose.
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

Naesstrom
Normal user
Posts: 21
Joined: 02 Jun 2017, 21:02

Re: Connecting a Rain Gauge

#3 Post by Naesstrom » 06 Feb 2018, 20:08

Thanks, and yes, seems to kind of work when I subbed to my mqtt
Image

I'll try and up the delay to 60s so that it doesn't spam my server every second tough. Still, would be great to know what the different "Counter Types" does!

User avatar
budman1758
Normal user
Posts: 234
Joined: 15 Apr 2017, 05:13
Location: Riverside CA USA

Re: Connecting a Rain Gauge

#4 Post by budman1758 » 07 Feb 2018, 02:37

I set up a pulse counter a while ago for fan RPM. The formula you want is the count divided by the delay time times the amount of rain is in 1 bucket.
I would set your delay time to 5 minutes or so. Assuming your rain gauge is .2794 inches per bucket (which seems like a lot to me) Then the formula would be something like this:

Code: Select all

%value%/300*.2794 << using the "Count" value
That gives you the amount of rain in the last 5 minutes. You can adjust that to any time delay you need but your reading is always going to be so much rain in such amount of time. The total will keep counting up until the next reboot. The time value I could never make sense of in my setup. It was always somewhere between 1 and 4 for me with a 60 second delay. :?:

Keep in mind that your values will be lost whenever the ESP reboots. If you are looking to track rain for any length of time you might want to consider a save mechanism of some sort.
"The glass is twice as big as it needs to be".

Naesstrom
Normal user
Posts: 21
Joined: 02 Jun 2017, 21:02

Re: Connecting a Rain Gauge

#5 Post by Naesstrom » 07 Feb 2018, 07:23

Thanks @budman1758 I'll go with that formula instead!
It's not inches but mm btw, so it would compare to 0.011" :D

Using node-red to parse the data and send it off to influxdb for storing and then Grafana to show it! This is how it looked last night when playing around with it!
https://snapshot.raintank.io/dashboard/ ... lRJyDpeTl6

User avatar
budman1758
Normal user
Posts: 234
Joined: 15 Apr 2017, 05:13
Location: Riverside CA USA

Re: Connecting a Rain Gauge

#6 Post by budman1758 » 07 Feb 2018, 08:26

Naesstrom wrote:
07 Feb 2018, 07:23
Thanks @budman1758 I'll go with that formula instead!
It's not inches but mm btw, so it would compare to 0.011" :D
That makes a bit more sense. :lol:
"The glass is twice as big as it needs to be".

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 5 guests