/**/ $category = "projects";
/**/ $noUpdateTime = 0;
/**/ $title = "OCSoft - RS-232 Sprinkler Controller";
$head = <<
.red, .green, .blue {
font-weight: bold;
}
.red {
color: #b00000;
}
.green {
color: #008000;
}
.blue {
color: #0000b0;
}
.black {
color: #000 !important;
}
HEAD;
$title = "OCSoft - RS-232 Sprinkler Controller";
$pixedit = $_SERVER['SCRIPT_FILENAME'];
include 'prefix.php';
?>
Projects:RS-232 Sprinkler Controller
We wanted a sprinkler controller that could be tied in to our home automation system, but could also work on its own in place of an off-the-shelf sprinkler controller.
The sprinkler controller that we replaced was a basic Rain Bird model that had no way of being controlled by a computer.
Although our current sprinkler system has 7 zones, the controller was built to handle up to 16.
We started the circuitry for the controller on a breadboard, connecting all of the components to each other. After the breadboard was configured, we wrote the software that's contained in the Main Board's Microchip PIC18C452 microprocessor.
With the breadboard layout and software complete, we were ready to create a Printed Circuit Board (PCB). A PCB can be thought of as a permanent circuit. Before we laid out the PCBs in software, we needed to know their dimensions so we found some ideally sized plastic enclosures and used those for reference. We used CadSoft's EAGLE Layout Editor 4.0 to layout the PCBs. After everything was laid out in EAGLE, we sent the layout files to AP Circuits and had them fabricate the PCBs for us. The PCBs have no silkscreening or soldermask because they were done as prototypes.
AP Circuits delivered the boards and it was time to solder in the components. We had 3 types of PCBs made:- Main Board
- Handles/controls the watering schedule, RS-232 communications, Grayhill keypad, and the back-lit 24x2 (24 character x 2 line) LCD.
- Relay Communication Board
- Receives instructions from the Main Board via I2C for which sprinkler valve(s) to open. For this modular PCB to operate the sprinkler valves, it needs at least one Relay Module connected to it. When it receives an instruction, it toggles the appropriate relay on one of the Relay Modules connected to it.
- Relay Module
- Each contains 4 OMRON Electronics Solid State Relays. The screw terminals connect to the sprinkler valve wires. Up to 4 of these modules can be connected to the Relay Communication Board, providing control of up to 16 sprinkler valves.
As the project grows, we hope to add support for remote temperature and rain sensors that can be used by the controller to automatically determine if the sprinklers should be started.
|
The original breadboard layout of the Main Board. |
|
|
The sprinkler controller, as it is installed today.
The large black box is the relay box. It has a Relay Communication Board and 2 Relay Modules installed in it.
The main control unit (below the relay box) is shown with the Main Board, LCD, and keypad installed. |
|
|
Same picture as above, but with the relay box's cover off. |
|
|
The main control unit, backlight off. |
|
|
The main control unit, backlight on. |
|
|
The keypad, in its finished state. |
|
|
Another view of the main control unit.
Note: The keypad in some of the pictures has hand-drawn text on the buttons. These pictures were taken before the keypad was finished. |
|
|
Adjusting the contrast.
The backlight brightness is also adjustable. |
|
|
The relay box.
The Relay Communication Board is at the top left.
The plastic conduit (bottom) is feeding in all of the sprinkler valve wires. Each wire coming in joins a smaller, stranded wire in a wire nut. The smaller wire connects to a screw terminal on one of the Relay Modules, which in turn, connect to a relay. |
|
|
DIN connector going to the relay box's Relay Communication Board from the main control unit's Main Board. This is the I2C bus. |
|
|
A close up of the Relay Communication Board (front). |
|
|
A close up of the Relay Communication Board (back). |
|
include 'suffix.php' ?>