RS-485 Sprinkler Control: Scaling Irrigation Across The Farm

RS-485 Sprinkler system
Building your own sprinkler system controller isn’t that difficult on the face of it, but what happens when your system starts to grow, adding more distant areas? To tackle this, [Vinnie] leveraged the tried-and-true RS-485 differential pairs to communicate reliably with ever-more-spread-out valves on his farm’s irrigation system.

The system uses a Raspberry Pi to control when each valve turns on and for how long. It does this via a custom RS-485 valve master board, whose code and design files are on GitHub. The master board communicates with the Pi over I2C and issues RS-485 commands while controlling the 12V line to the valves. Toggling the 12V supply is a smart move it lets [Vinnie] save power by not keeping the valves energized when idle.

At the valves themselves lives a valve node board (also on the GitHub repo). Each node has a unique address so it knows when its name is called to open or close a valve. The valves are latching solenoids, ideal because they don’t require constant current during the watering cycle. The Valve Nodes also support their own protocol to report state, firmware version, and allow in-situ configuration.

Be sure to head over to [Vinnie]’s project page and check out all the work that went into this great DIY irrigation control system, along with the thoughtful boards and tools he made to help others set it up. This is a welcome addition to the sprinkler-related projects we’ve seen.

4 thoughts on “RS-485 Sprinkler Control: Scaling Irrigation Across The Farm

  1. A co-worker of mine, while he was on a kibbutz around 1980, recognized the need for some automation for the farm irrigation, and saw the problem was going to be wiring. He designed a valve and control system that used only two wires, and ran on 24 Vac: Power and signalling ran on the same wire pair, with the signalling being low-rate serial bits carried on an audio tone. It could be wired completely haphazardly: star, daisy chain, miles long, whatever.

    Being AC and only two wires, it was impossible to wire a node with the wrong polarity, so even new people with near zero training could wire them. Each node was addressable and could independently control a valve and report its state. Pretty neat for the time.

    1. When I read the description of this project, my first thought was also “why add a separate twisted pair wire, next to the 12V wire and the water hose?”.

      I would have done the same as you co-worker. Superimpose some AC signal on the 12V power line using capacitors. If you want some sort of reliablity, you could use a modem IC (MM74HC942 for instance), basically using Frequency Shift Keying. The slower the baud rate, the less susceptible to noise FSK becomes.

      You say “pretty neat for the time”, but this is really just technology from the beginning of the 60’s… The Bell 101 modem, from 1958, already used FSK at 110 baud. :)

    2. For a two wire system, I think I would have a look at either frequency shift keying of phase shift keying. Phase shift can be done with just a low voltage mains transformer and some fast switches, phase shift can be generated by a class D audio amp.

      But overall it’s a tradeoff between the wiring cost and the modules. An RS485 transceiver is small, simple and cheap, and can have a decent baudrate. It also has bidirectional communication, so you can read back valve state, or add other sensors (flow, water level, temperature, etc).

  2. One word of caution is electro migration. Any DC will result in wire breaks after a few years. Commercial irrigation networks are designed to have no (minimal) dc bias while providing communication and power.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.