Arduino Forum

Topics => Science and Measurement => Topic started by: Rodimet on Aug 16, 2017, 04:54 pm

Title: Rain gauge with arduino GSM
Post by: Rodimet on Aug 16, 2017, 04:54 pm
I want to build a rain gauge with arduino shield GSM in ordre to send rain data automatically by SMS. I've conceive the rain gauge classically with a magnet to créate reed switch but I dont know wow and where I can connect the câble coming from the magnet to the arduino GSM. Theorocally, the oscillations of the tipping bucket may create an electric effect the arduino have to understand and count as a quantity of rain fall.
Could somebody help me please?
PS: I'm not a specialist.
Title: Re: Rain gauge with arduino GSM
Post by: dannable on Aug 16, 2017, 09:50 pm
Something like this (https://www.maplin.co.uk/p/maplin-replacement-rain-gauge-for-n25frn96fyn96gy-n77nf)?

"Each 0.011" (0.2794 mm) of rain causes one momentary contact closure that can be recorded with a digital counter or microcontroller interrupt input. The gauge's switch is connected to the two center conductors of the attached RJ11-terminated cable." Manufacturer's data sheet
Title: Re: Rain gauge with arduino GSM
Post by: MarkT on Aug 17, 2017, 12:34 am
Reeds need debouncing to avoid multiple counts, but the delay can be small, a couple of ms may be enough.

So adapt code for reading a button switch debounced.
Title: Re: Rain gauge with arduino GSM
Post by: Rodimet on Aug 17, 2017, 12:51 pm
Thank you very much I will try to ordre that gauge.
But as the terminal of the gauge is in rj11 where shoud I plug it on the arduino? Or should i ordre an other arduino with an rj11 câble?
Title: Re: Rain gauge with arduino GSM
Post by: dannable on Aug 17, 2017, 12:59 pm
It appears to be a reed switch that is operated by a magnet when the bucket tips. See MarkT's comment about needing to debounce.

You connect one of the middle two wires of the plug to GND and the other to the digital input pin of your choice... Personally I would remove the connector - once I have established that it works!
Title: Re: Rain gauge with arduino GSM
Post by: Rodimet on Aug 17, 2017, 04:01 pm
Thank you all!!!
Title: Re: Rain gauge with arduino GSM
Post by: Paul_KD7HB on Aug 17, 2017, 10:04 pm
If the magnet is a bar magnet and is oriented in the same plane as the reed switch, there will not be a bounce. But check when you calibrate the thing for more rain that really fell.

Paul
Title: Re: Rain gauge with arduino GSM
Post by: MarkT on Aug 21, 2017, 11:46 pm
I'd suggest get a push button example working first, then you'll be ready.  Are there going to
be long cables to the guage?