The 4 pages reflects the way I like to organise code rather than there being lots of it.
There is a D1:Mini connected to the rain gauge and to an anemometer and weather vane. The code on the D1 Mini keeps a 32 bit counts of the number of pulses from the rain gauge (and the anemometer). It doesn't calculate anything from that data. Separate devices send an empty UDP packet to the D1 Mini, which responds with the counts and wind direction data along with a checksum to whichever IP address and port the request came from.
For testing purposes I am sending requests for the data every second then displaying the raw data, unprocessed on an OLED display. So the test software just displays the count, not the amount of rainfall. I am manually calculating the rainfall from the count
I do separately have something that does the calculation and displays the data as mm of rainfall, and a graph for the preceding week. I was suspicious that the amounts of rainfall shown didn't seem to reflect what I was seeing falling from the sky. I did suspect the calculation had some silly error, but now I am manually calculating from the raw count I don't think that's the problem.
I'm trying to avoid taking down the rain gauge to do some of the tests suggested, such as pouring a measured amount of water through it and checking for mechanical problems.
Is it possible that the switch on the rain gauge closes when it tips one way, opens when it tips the other way? I'm also guessing you're only counting one edge, not both edges, of the pulses. That'd be another explanation of the exact 50% missing.
Not wanting to add another possible unknown into the mix, but ...
The Sparkfun kit looks very similar to something that came up in a quick search I did from a company called MISOL - see here.
Following that lead, I arrived at a company in South Africa selling just the rain sensor - here. The description of the rain gauge says "This Rain Bucket Gauge is designed to work with the MISOL Weather Station Pro. The tip of the tipping bucket can hold up to 0.3537 mm per tip."
I wonder if it could be a bucket capacity parameter that's throwing everything out. Of course that does mean getting the damn thing down off the pole and the weather for the UK looks pretty rubbish for the next few days.
my local spiders firmly believe the tipping bucket detracts from their neighbourhood ambience.
once the housing is colonised ever effort is made to gum up the works with web.
the thing always read 10% low the web can stop it entirely eventually, i moved it to easy reach.
wvmarle:
Is it possible that the switch on the rain gauge closes when it tips one way, opens when it tips the other way? I'm also guessing you're only counting one edge, not both edges, of the pulses. That'd be another explanation of the exact 50% missing.
I agree with @wvmarle , can you measure the continuity between the two wires coming out of the gauge and tip it one way then the other?
This would make more sense as speed of tipping would then not be a factor.
Tom...
racpi:
my local spiders firmly believe the tipping bucket detracts from their neighbourhood ambience.
once the housing is colonised ever effort is made to gum up the works with web.
the thing always read 10% low the web can stop it entirely eventually, i moved it to easy reach.
That looks exactly like the one I have. The description of the volume of the bucket is a bit vague though 'the tipping bucket can hold up to 0.3537 mm per tip'.
The calibration factor I have is 0.2794mm per tip.
The other night the count from the overnight rainfall was 16 and the rainfall in my tray was 8mm.
16 x 0.2794 = 4.4704
16 x 0.3537 = 5.6592
Better, but not right.
I can see I am going to have pour some water into it and see what happens.
wvmarle:
Is it possible that the switch on the rain gauge closes when it tips one way, opens when it tips the other way? I'm also guessing you're only counting one edge, not both edges, of the pulses. That'd be another explanation of the exact 50% missing.
And TomGeorge
I am now sending both the count value and the state of the contacts in my data, so I can see if that's the case, or indeed if it is getting stuck. I set that up last night. Unfortunately, despite there being a band of rain across the UK UK rainfall radar map - Met Office, there has hardly been any rain over night. The count is now 3, from 0 when I made the changes last night. The input from the gauge is high, as it should be except briefly when it tips.
At the moment the band of rain is just south of Derby, I am just a bit north of Nottingham.
inches are not converted to millimeters where they should be, or the other way around. That's a factor 2.5,
No, 25. Centimeters to inches would be 2.5.
gum up the works with web.
Maybe they heard you wanted it to be web-enabled
@Perry, I have almost certainly the same rain gauge. Purchased years ago from Maplin on line, where it was sold as as a spare for one of the weather stations. Same for the anemometer and vane. I have never bothered to calibrate any of them! Just took the quoted numbers at face value, so interesting to hear your findings.
I seem to remember the pulse when the bucket tips was around 8ms, so 1ms debounce should be OK. And the reed switch closes only momentarily as the bucket tips, it does not stay closed when the bucket is on one side.
I know my rain gauge is reading low these days because the neighbour's bushes have grown and are sheltering the rain gauge, anemometer and vane. Need to move the whole lot to a more exposed location far from the house. WiFi won't reach there, so I plan to switch from the Wemos to a bare atmega328 with rfm95 LoRa module. With this setup I hope to have many months of battery life from 3xAAA.
PerryBebbington:
At the moment the band of rain is just south of Derby, I am just a bit north of Nottingham
I think you may need a rain simulator for testing purposes. Perhaps a watering can on some kind of pivot, pushed by a linear actuator. Of course, you would need a micro controller to manage it - how about an Arduino?
Originally the rain gauge was on the outrigger attached to the pole with the anemometer and the weather vane, however that was too wobbly and I was getting false counts when the wind blew and it wobbled about. Now you can see it is on a rigid wooden pole. Yes, there are holes to let the water out.
Top right is a WiFi kit 8, which is an ESP8266 with a display, it is showing wind speed.
The data is sent to a Nano Every with an OLED display, which acts similarly to the Arduino IDE serial monitor.
$ is the start of the data.
WWD is an identifier.
1.42 is the angle of the wind in radians.
231585 is the count from the anemometer (that's just over 12 hours worth!)
3 is the rainfall count since last night
1 is the state of the input, it should remain high except briefly when the bucket tips, I don't expect to see that as it's too fast.
0.44 is the temperature in Centigrade.
wildbill:
I think you may need a rain simulator for testing purposes. Perhaps a watering can on some kind of pivot, pushed by a linear actuator. Of course, you would need a micro controller to manage it - how about an Arduino?
URGENT ! ! ! !
I WANT CODE AND SKEEMATIK, SEND NOW AND I WLL B EVER GRATEFULLL
The blue wire goes to the top thing and the top thing connects by another blue wire to the bottom thing and the other end of the bottom thing is connected to the dirt in a flower pot. Between the two things another wire, yellow, is attached and goes to but does not quite reach the CPU thing cause the wire is to short. The cpu thing is mounted in a slice of raisin bread, for the extra current, which is on top of the dirt, proper grounding, in the flower pot.
I have no more detail of your device than the Sparkfun pictures, so I may be somewhat off-track, but it may be that your see-saw arrangement has a little wear on the bearings, to the effect that the 'return stroke' is being missed by the reed switch. The only course of action I could recommend, therefore, is to wait for the rain to stop, then shin up that pole and inspect the mechanism.
Note: Gov't restrictions mean you can meet just one other person at the top of your weather pole, keeping 2 metres apart!
take a 1 litre bottle, put a pin hole in the lid
lay chopsicks over the top of your gauge and rest the bottle on it.
put a pin hole on the top to let air in.
it needs to be slow drips, not a stream.
you know the area, you know the volume
Bob's your uncle.
R2,
I've emptied the tray and dried it and put a ceramic cat food bowl next to it. The cat food bowl has better defined edges and almost vertical sides. Rain is promised but has not materialised. I will compare the two receptacles once we've had some recent rainfall.
Dave in NJ,
From memory that looks like the inside of mine.