I want to build a custom irrigation control system using the Raspberry PI. The main obstacle I have to getting started is knowing how I can use the Raspberry PI to send power to the valves to open and close them.

I currently have an existing irrigation system and control system, so everything is already wired, setup, and working.

I essentially want to write some software for the PI, remove the existing irrigation controller and replace it with the PI and drive the irrigation using the custom software.

From what I have read, I'll need an add-on board to be able to drive the valves...that's where I need the help. I'm looking for some direction on where to look next.

Thanks for the help!

  • Can you give us the specs of the valves? It helps to at least know the voltage and current required. – John La Rooy Oct 25 '12 at 23:31
  • Not sure off hand...I'm looking for a higher level explanation of what I need to do. For example do I need a relay board or something else, etc. – ctorx Oct 26 '12 at 3:18
  • Were you able to realise it? – qwerty Jan 26 '16 at 12:43

I have done what your trying to do and I used a i2c relay board and some custom software I put together to turn in on and off as needed Chris

  • So how does this connect to the RPi? A ribbon cable? Which connector on the Pi? Also, did you need an external power source to power the valves or was the PI power source sufficient? – ctorx Oct 26 '12 at 15:11

Consider using an OpenSprinker Pi.

OpenSprinkler Pi is an extension board for Raspberry Pi (RPi) (RPi 0; RPi 1 Model A+/B+; RPi 2; RPi 3). It allows RPi to directly access and control sprinkler valves. It comes with a set of laser cut acrylic enclosure.

The user manual is available here, and firmware is provided for use on the Pi.

The extension board can output between 22–30 V AC; note the requirements listed in the manual:

To ​get ​started, ​you ​will ​also ​need ​the ​following, ​which ​are NOT ​included ​by ​default ​and ​need ​to ​be ​purchased ​separately. [...]

  • 24V ​AC sprinkler ​transformer ​(output ​voltage ​22~30V ​AC, ​note ​that ​it’s ​AC, not ​DC!)
    • Note: ​if ​you ​plan ​to ​use ​RPi ​3: ​due ​to ​the ​power ​consumption ​of ​RPi ​3, ​you ​may ​need ​an ​additional ​USB adapter ​to ​power ​RPi ​3 ​directly ​through ​its ​microUSB ​port.
  • 24V ​AC sprinkler ​valves ​(note ​that ​it’s ​24V ​AC ​valve, not ​DC ​or ​latching ​solenoid ​valve!)
  • This should probably be a comment... – dlu Apr 3 '18 at 18:22
  • Doesn't look like a comment, @dlu; the question requests an addon board to control sprinkler valves, and that's what the OpenSprinkler board is. Comments are supposed to be for clarifying the question or suggesting improvements, so this is an answer that just needs a little bit of love and attention, I think. – Aurora0001 Apr 3 '18 at 19:25

I think the easiest way might be add a USB relay board. Then take your 24V AC power from the existing irrigation and wire through the relays.


Standard irrigation typically runs at 12V. It's easy to figure that out with a voltmeter. Certainly you'll need relays or MOSFETs to gate the power; you can run it on the GPIO ports.

Here are some options. It sounds like you are fairly unsure about what is necessary, so these will cut down on the learning curve compared to full DIY.

  • Standard irrigation vales, at least it the US, are usually 24V AC. Actually it might be more accurate to say that 24 V AC is common. I don't know of a standard. – dlu Apr 3 '18 at 18:21

I've actually done something similar (drive valves from a datalogger's digital IO ports). A relay is definitely necessary as most irrigation systems are AC (I used Netafim valves, 24 VAC). To drive the relay directly from the GPIO you'll need to step up the power with a transistor, e.g. a 2N2222A.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.