OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Use OSPI with watermation decoders (rs485 interface) Reply To: Use OSPI with watermation decoders (rs485 interface)

#50332

Anonymous
Inactive

Hi Ray. Thanks for your reply.
There are several 2 wire systems and each brand has its specific way of controlling remotely the valves.
This system in particular is based on a well know and probably the most common 2wire system: watermation or Tonick Watering. The essence of all 2-wire systems is the ability to use solely 2 wires, through which we feed the 24VAC for power supplying of the valves. In addition, there is a switching controlling system that cuts the initial part of each sinusoidal wave of the 24VAC to send a digital command that is understood by the decoders spread along the areas to be irrigated (it is more or less like the X10 system used in domotics for houses). No matter the basics of the 2wire system, there is always a controller able to “talk” with the 2-wire system, that usually receives a set of rs485 serial commands (which I have for my controller and have successfully implemented on an Arduino platform).
Since all the 2-wire systems I know use the same principle, a controller (also know as translatior) that receives serial commands from a programmer, that in turn feeds the valves with a manipulated 24VAC supply, I think it would be interesting to introduce such method in the OpenSprinkler system (where the user would introduce the set of commands to control the translator).
For example, my system is connected using serial rs485 and commands are like (arduino example to turn off all valves):

void powerOffAll() {
byte cmd = 0x02;
byte bc = 0x00;
byte len = 0x01;
byte chk;

chk = cmd + bc + len;

digitalWrite(EN, HIGH);//Enable data transmit
Serial.write(cmd);
Serial.write(bc);
Serial.write(len);
Serial.write(chk);
}