In time for the end of Summer…

So a month or so ago I finally setup an automated sprinkler to soak the grass between the neighbours house and ours, where we had no sprinkler system already.  Once I had a little time, this surprisingly easier than I expected.  Basically it required a water solenoid to control the flow of water, some adapters from the 3/4″ standard hose to the 1/2″ of the solenoid, and 12V power to trigger opening the solenoid (by default closed).  Using the previous code I used for a rain by-pass, I used it to do the opposite: open the solenoid when there was no rain in the forecast vs the bypass which would break the circuit of the sprinkler when there was rain in the forecast.

This was the setup, the only thing missing here is the source of water which goes into the gold fittings:


The two white wires leading away from the solenoid are in series with the 12V power supply and out of the picture they lead into a relay attached to a Raspberry Pi.  The Pi controls the relay, which in turn completes the circuit with the 12V supply and the solenoid, thus opening it, and allowing water to flow through the soaker hose.

This was a fun little project, the wiring being the messiest part, but it’s worked well for the past month without intervention from me.  Of course it’s end of summer and fall now so I don’t need this any longer but it’s all ready for next year!  The next thing will be to integrate it with the HomeKit project so that I can see it in the new Home app and know when it’s working (with pop-ups on the phone).

Advertisements