Installation and Integration of a Hydreon RG-11 Optical Rain Sensor with a PLC

This is an article I have been meaning to write for some time. I guess I haven’t as this sensor has been something that has just worked out of the box and hasn’t skipped a beat in almost 2 years.

I have written about integration between OpenSprinklerand Homevision Pro in this article. Just a refresh, OpenSprinkler is a commercial irrigation controller based on an Arduino platform. It is controllable by a web-interface or a HTTP based API.

It is pretty good and I think I would rate it an 8/10, its the best controller on the market for the modern age for stand alone control but there are limitations. Do I just want to water based on a schedule (No). Do I want to water when its raining (Maybe).

The problem with OpenSprinkler is that it has no context of how much rain has fallen. If we receive 50mm of rain yesterday and its sunny today do we need to irrigate? Here lies the problem and hence why I utilise a Hyrdeon RG-11 in my house.

The task this sensor performs is to measure rain-fall and the whole process looks something like this

Hydreon RG11 –> PLC (HomeVision Pro) Input Port –> PLC Logic –> OpenSprinkler

You can buy cheaper sensors but the reason why I bought the Hydreon RG-11 is simple. Reliability. It has no moving parts and if my automation journey has taught me anything it is that things with moving parts will eventually break. The Hydreon RG-11 Rain Gauge senses water hitting its outside surface using beams of infrared light. It uses the same sensing principle used in millions of automotive rain sensing windshield wiper controls.

Being optical (and not mechanical, chemical, or conductive) it’s far more rugged, sensitive and reliable than other offerings. Leaves cant clog its mechanism and it just works. In the last 2 years I have no experienced any false positives

rg11-home-sm

Enough about the sensor, lets get started

Bill of Materials
– 1 x Hyrdeon RG-11 ($99AUD)
– 1 x 12VDC 500ma PSU ($0AUD – Leverage existing PLC PSU)
– 1 x Galvanised L Bracket ($8AUD)
– 1 x Quad Core Cable Between Hyrdeon RG-11 And PLC ($15AUD)

Total Cost = $122AUD

Tools used
– Pliers
– Screw Driver
– Electric Drill

Step 1: Configure the Hyrdeon RG-11
The device includes a series of dip switches that allows it to be set up for the mode of operation that best matches the application. The output is a NO/NC which can interpreted by your application. Depending on your mode selected the output will vary

rg-cb

Tipping Bucket – Replace your tipping bucket with a low maintenance alternative
It’s Raining – Close a skylight at the first sign of rain, and open it when it stops raining
Condensation Sensing – In this mode, the Rain Gauge continuously monitors the clarity of the sensing surface.
Wiper control – This mode will control the wipers from off through intermittent and steady-slow speeds.
Irrigation Control – This mode will measure both rain accumulation and rain intensity.
Drop Detection – Use this mode if you want to do your own external data interpretation.

So for my use case given I want all of the logic to be controlled by the Homevision Pro I have gone for “Drop Detection” with the NO/NC pulsing every time 1mm of rain is detected.

Step 2: Mount The Device
It should go without saying but this device needs to be mounted in a position that isn’t susceptible to shade by buildings. I have chosen to mount this off my garage using a galvanised L bracket to distant it even further from the house.

DSC_1068

DSC_1075

Step 3: Connect It All Up
Following the instruction push your cable through the cable gland, wire up your power (get the right polarity) and PLC input settings, validate your dip switches and grease the O-ring before sealing it all up. Connect the PLC end, enable your port if you need to and away you go.

rg-11-parts

HomevisionInputPorts

Step 4: Test and Add Your Logic
That’s it, simple. You now need to add your logic. My logic is to
– track the total rain fall (mm) stored in a variable
– roll up to a per hour (mm) stored in a variable
– graph rainfall by the minute using the Google Graph API
– display data via NetIO on a phone (see below)
– Depending on the maximum temperature of the day subtract 3-5mm from total rainfall, when rainfall is at 0mm fire OpenSprinkler early in the morning and again at night if outside temp was greater than 25C and send push notification to state what happened.

IOUpdateIMG_1259

 

 

 

 

 

 

 

Shane Baldacchino

Leave a Reply

Your email address will not be published. Required fields are marked *