This topic contains 10 replies, has 4 voices, and was last updated by  Ray 1 week ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
  • #39609


    Anyone working on a 2-wire config solution for OpenSprinkler? I’m no engineer but I’m curious about the effort involved in order to make 2-wire a reality via OpenSprinkler.



    Hi, 2-wire system has been brought up on the forum, for example, this thread:



    I too am very interested in 2-wire system since I have a lot of valves spread over a lot of area and don’t want to run lots of wires or multiple controllers. I have lots of trees that need irrigation, and in practical terms this means one valve per tree. The number of valves add up quickly.

    First, a small amount of background on 2-wire:
    2-wire is a generic term for systems that employ a single pair of wires to drive all valves in the irrigation system. The two wires carry 60 Hz 24 VAC power. Modulated onto the 24 VAC power is signal that implements a communications protocol designed to talk to a solenoid driver located at each valve station. Some implementations clip a portion of the AC waveform to indicate a digital ‘1’ or ‘0’. For example, clip one positive cycle of the 24 VAC waveform at half amplitude for a ‘1’, clip the negative half of the 24 VAC waveform for a ‘0’. The electronics in the solenoid driver demodulate the data riding on the 24 VAC power and provide switched power to the valve when that particular solenoid driver is addressed by the system. So the solenoid driver extracts a stream of command data and 24 VAC power. Each solenoid driver has to have a unique “station address” to enable each solenoid driver to be uniquely addressed. Some method must be provided to program the station address into the solenoid controller. Commercial systems uses a dedicated (expensive) programmer for this purpose. Typical systems can address hundreds of valves. Commercial systems cost many thousands of dollars.

    I think the main problem with commercially available 2-wire systems is the high cost of components. It is ridiculous that a 2-wire valve adapter is more than $60 per valve (and often much more). Looking online, I see 4 valve solenoid driver for $240. That is nuts. The controllers themselves are over $1000. The solenoid driver programmer is $600.

    Seems to me that if OS used an existing 2-wire protocol that would work BUT adapting an exiting serial protocol to OS plus a simple/cheap design for the valve solenoid driver would be straightforward – and avoid potential patent infringement For example:

    1. Add a serial-to-modulated power interface to the OS controller hardware. Use whatever serial protocol makes sense – async serial as used in the RS-232 standard would work fine. Maybe this could simply be a serial-to-2-wire converter that could be added to the OD hardware as an option.
    2. Design a solenoid valve driver. Analog electronics to demodulate the signal from the AC carrier on the 2-wire cable that runs to all valve drivers plus digital electronics to interpret valve commands. A small/cheap microcontroller with some non-volatile, reprogrammable memory plus a few analog components. Make it small, cheap, easy to assemble. Include LEDs for: 2-wire power detected, command detected, command-to-me detected, valve on/off. Users could then assemble and pot the board in a small plastic cup (or medicine bottle, or whatever). Low cost at the solenoid is key, i.e. low cost-per-valve-station.
    3. Need to engineer the system for lighting protection. A 2-wire system could span many thousands of feet.
    4. Add support to OS firmware.

    Each valve driver would need to be programmed with a unique valve address. I think a good way to do this is to use a custom command for the driver that sets the address and have the OS firmware include a programming mode in which only a single solenoid driver is connected to the 2-wire interface. Also include a test function to check that the address was set.

    I’d love to see this feature as it really makes sense for large systems spread across a lot of area.



    OK, in the 30 min or so since I originally posted, I did more research OS and the RPi platform and my thinking is as follows:

    1. Implement the 2-wire interface as a GPIO plug in module for the RPi.
    2. Optionally implement a bidirectional valve driver interface. 3 wires would be easy (common, 24VAC/xmit, receive). Would make valve driver diagnostics easy and also support sensor networking.
    3. Look at automotive single chip solutions for distributed power control. The networked vale problem is similar to the distributed automotive “switches and loads” problem. Perhaps there is a single chip solution out there.



    Just found a low cost powerline model chip (TDA5051A) which looks pretty good. Now need to see how many can sit on a single 2-wire line.
    perhaps with his chip plus cheap microcontroller and power driver and we’re done.



    ATtiny85 for the processing at the valve controller. Program it with a USB programming adapter and put in either the application or a bootloader. usign a bootloader enables firmware updates over the 2-wire interface…



    There are many 2 wire systems out there. Not for sprinklers. The problem is energy. You cannot shove enough power over a very very very long 24ga wire to actuate a solenoid even at 24v. The people who want 2 wire want to daisy chain them from valve to valve which also means if anywhere the wire is cut it takes all the solenoids after that out of production.

    You want to do 2 wire then use 14 or 12ga romes and bury it. You wanna spend $200 on 200 feet of “sprinkler wire” then?

    The only way to get around this is raise the voltage. But above 24v requires a licensed electrician to install.

    The commercial systems have the same problem. I am sure they use remote power or power extenders (step up step down transformers) to solve this. They probably per code require licensed electricians to install.



    Actually, all major sprinkler controller manufacturers offer 2-wire systems specifically designed to drive long strings of 24 volt AC valves. The systems are in widespread commercial use and have been for many years. String length can be up to several thousand feet (some as much as 15,000 feet) long and include hundreds of valves.

    A casual Google search on “2-wire irrigation” will yield lots of information.

    Power is not an issue. Using some approximations:
    Voltage drop at 3000 feet assuming 500 ma:
    3000 ft * 6.3 ohm/1000 ft * .5 = 9.5 v.

    24V – 9.5 = 14v. This is plenty for pull in for an irrigation solenoid. This also assumes 300 ma to power all solenoid and interfaces on the string. This estimate ignores inductance and AC effects. This link: does a good job of explaining things in detail.

    The National Electric Code does not define “low voltage” per se, but 30V is generally considered the limit. No issues with licensed electricians. Also note that in general, homeowners doing improvements on their private homes are not required to use licensed electricians as long as they adhere to applicable NEC codes and have the required permits and inspections. This varies by local jurisdiction.

    So the implementation of a 2-wire system is not only practical, it has already been done – a lot.

    I am starting implementation of such a system using ASK (amplitude shift keying) to bidirectionally communicate with many (100 is design goal) valves using two wires. The challenge with is approach is the current required by each ASK modem in the valve string. If the current per station is too high, I might have to change the comm approach.

    I plan to design for cat5 wiring as it is cheap and low cost valve nodes are the goal. A node cost of $12 for control of 4 ball valves would be fine. Motorized ball valves are $15 each from China.

    As I have undergrad and graduate degrees in electrical engineering with an emphasis on embedded software and digital electronics, I expect development to be straightforward.

    I’ll let you know when I have the system finished. I might consider selling the components.



    Go ahead and try it. A couple things you might go back to Ray’s page and look at again:

    1) Inrush current. Ray mentions this on the page. The solenoid needs a spike of high current to get the slug of iron in the solenoid moving. For a very long run of wire at 18ga it’s not going to be reliable because for the few microseconds that it’s pulling 20A or more the voltage is going to be way too low. Which is why I said I’m pretty sure the commercial systems are using a boost/buck system.

    2) Regular cat-5 ethernet is 24ga not 18. Also, the jacket of regular ethernet will not remain intact in water. I’ve seen enough of it pulled out of pipes that had water in them to know what happens to regular PVC ethernet cable jackets. They make underground rated ethernet and it has the same tough PVC case that the 18ga sprinkler wire has. I think you will find underground rated ethernet to be the same cost as sprinkler wire. You are also ignoring that the largest cost in ANY sort of large distributed network is laying the wire. NOBODY in charge of a large system is going to put in an untested system that specs DIFFERENT cabling than all the other existing competitive 2 wire sprinkler systems on the market.

    3) The reason sprinkler systems don’t use motorized ball valves is so that if power is lost the sprinkler valve shuts off. Otherwise you have your sprinkler going and there’s a power failure or the controller craps out and then the sprinkler is running all night long and you just lost $200 worth of water and caused a flood. Of course that then means that the valve has to be held open by continuous current. And if you have 5-6 valves actuated at the same time you run out of current carrying capacity on the wire.

    4) Sprinkler system plumbing is organized as follows, valves are generally star topology to the water source, zones are daisy chain from the valve. In small home systems the valves are usually placed next to the water source. In large systems the valves are out in the field. Think about what happens to a daisy chain system that is mapped over a star topology – for every valve you are going to be running TWO pairs to it – one from the hub out to the valve and one from the valve back to the hub then out again to the next valve. This is because they are only going to dig 1 trench for the water pipe and the cable for the valve it’s a lot cheaper. That’s why the cable length in theses systems is so long.

    You did mention the issue of powering the controller at each valve so I’ll give you that.

    You are also ignoring the inherent flaw in a daisy chain config which I mentioned already which is if there’s a break in the system then all the valves after that are dead. If you had any experience in this sort of thing you would have known that this could be solved by creating the daisy chain in a loop with both ends of the loop terminating at the sprinkler controller.

    If I was running a golf course for me to send a tech out to replace a failed valve in a sprinkler is 2-3 hours of labor which dwarfs the piddly amount of money I might save on a cheaper node. If I buy your cheaper nodes and they have a higher failure rate my savings will be eaten up.

    I am sure that if you were to keep at this after a string of failed hardware behind you and a pile of wire pulled out from underground and a long enough time you would be able to create a running system. But in half the time a lesser schooled guy could have probably reverse engineered the most popular 2 wire commercial sprinkler system on the market and produced a compatible controller that works with all their valves, and that way the greenskeeper can buy all -their- valves and the cheapo controller and been watering his lawn by the time you get something working.

    If you absolutely must design your own then why not use the cheapest wire possible – 28ga telephone wire – and run a high frequency on it like 600 Hz AC at 200volts and then you can use tiny toroid core transformers at each valve to drop it down to 20v AC, and it’s also easy to rectify that and get as much current you want to power a controller and a valve. And you can make frequency shifts to carry data to the controller. That system probably will carry the signal a few miles….



    I’m not quite sure why you’re spending so much time giving me lots of reasons 2-wire systems are bad and don’t work. Fact is that 2-wire systems are in widespread use. The engineering is well understood. They are the preferred solution for large scale systems.

    Seems like you’re hung up on wire gauge. Use whatever you want as long as it has the current carrying ability. Personally I run wire in conduit, so other than dampness I don’t sweat mechanical issues. Yes “2-wire” wire works great.

    Personally I have no interest in system compatibility since commercial systems are expensive and not attractive for homeowners.

    If all the inrush current concerns you mention were legitimate, you’d see something other than a long wire with valve nodes attached. BTW that inrush would be an issue in a “wire per valve” system too…

    Ok, I’ll be sure to come back here if I need any help listing all the reasons something can’t be done that has already been done 🙂



    I think one obstacle to interface with a 2-wire system is I am not sure if there is any open standard for it — most companies use proprietary systems and they don’t publish any details on the inner workings of their systems. This would either require some reverse engineering (which could be very difficult) or have a way to interface with their controllers, but this sounds more like a DIY / Hack project than an elegant solution.

    It’s also possible to develop our own 2-wire system that uses open standard, but it’s likely not worth the cost — each valve adapter probably needs to have a microcontroller and power circuitry to convert 24VAC to 5VDC, as is the cost is going to be quite expensive.

    Regarding @tmittelstaedt‘s point 3: I did recently come across U.S.Solid’s motorized ball valve, 24V AC/DC 2-wire auto return type — it’s quite interesting, it has a super capacitor inside so when the power is lost, the charge in the super capacitor will be able to drive the motor back to closed position. As a result, it does shut off the water supply when power is lost. It’s completely compatible with any 24VAC sprinkler controller, so an interesting solution to keep in mind if motorized ball valve is required.

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.