Feed on

OpenSprinkler v1.0 Build Instructions

(Note: all images below are ‘clickable’, in order for you to see the full resolution details. )

To Begin: Parts Check
If you haven’t done so already, check your kit against the parts list. The picture on the left shows the PCB, bags of components, and the project case with screws. You can click on the image to see an enlarged view. The component bags are: bag 1 contains ICs and sockets; bag 2 contains diodes, resistors, capacitors, pushbuttons, pin headers, inductors, crystals, and Ethernet jack; bag 3 contains triacs, terminal blocks, screws, 16×2 LCD.
Additionally, you need a sprinkler valve transformer (rated at 24VAC) and one or more sprinkler valves (24VAC as well). These are not included in the kit, hence you need to purchase them separately. If you have set up a watering or irrigation system in your garden, you should have these parts already; if not, you can purchase them in a variety of brands (Orbit, Hunter, Rainbird…) at a variety of places (Lowes, Home Depot, Amazon…). Check the F.A.Q. page for some suggestions.

Part 1: Power Supply
The first step is to solder the power supply section, which provides power to the LCD (+5V) and the microcontroller (+3.3V). To begin, place the PCB onto the holder (vise), and turn on the soldering iron. The components in this part are all located at the lower-left corner of the PCB. Note that components should be inserted from the front side of the PCB and soldered at the back side.

The first component to solder is D1, which is a 1N4001 diode. It looks very similar to D2 (1N5819), so read the label on the diode to distinguish between them. Use pliers to gently bend the two leads of the diode so that it fits the holes nicely. Before inserting, note that diodes have polarity, allowing current to flow in only one direction. Check the diode and identify the end with a white stripe (the negative lead). This stripe should match up with the silkscreen on the PCB. Again, when in doubt, click on the images to get an enlarged view.

At the back side of the PCB, bend the leads to the side, so that you can flip the PCB and the diode will stay in place. Solder the leads to the board. Each solder joint should be smooth and fill the entire hole.

To make sure the component lies tightly on the PCB, you can solder one lead first, then keep the solder join melt while pushing the component against the PCB at the front side. Once it’s in place, you can proceed to solder the second joint. This can prevent the component from falling out during soldering.

The next step is to use a diagonal cutter to clip leads just above the end of the solder joints. After clipping, there should be almost no leads sticking out.

To improve productivity, you can insert more than one components together, bend theirs leads, and solder them at once. But keep in mind that the more components you insert, the harder it is to make sure they all stay in place.

Next, solder D2 which is a 1N5819 (or SB160 depending on your batch) Schottky diode, and D3 which is a 1N4148 diode (it looks red and is much smaller than the other two diodes). Again, follow the stripes on the diodes to make sure you insert them in the right direction. After soldering and clipping away excessive leads, they should sit on the PCB like the picture shown on the left.

Now you should solder the green LED. LED is essentially a diode so it too has polarity. The longer lead of the LED is the positive lead, and should go into the hole marked with a + sign, as shown in the picture.
Next, solder R1, which is a 1K resistor. Be careful that in the package you will find two resistors with very similar looks, but they are different. One has a red ring and is what you should solder here; the other has an orange ring and it is a 10K resistor that you will solder later. If you are unsure, use a multimeter to measure the resistance! Resistors are non-polar, so they don’t have a direction and you can insert them either way.

Update: the package now has three resistors, two 10K, and one 1K.

Moving on, now let’s solder C1, a 100uF electrolytic capacitor. It’s a relatively large component and is easy to locate on the PCB. Electrolytic capacitors are polarized, so make sure the longer (positive) lead goes into the hole marked with a + sign. As a double check, there is a white stripe on capacitor body which points to the shorter (negative) lead, and that should go into the other hole.
Now, solder C4, a 0.1uF ceramic capacitor. Be careful that in the package you will have two sets of similar ceramic capacitors, they are small and are yellow colored. One set contains six five in a stripe, all at 0.1uF; the other set contains two 18pF ones. If you look closely at the marks on the capacitors, the 0.1uF one should read ‘104’.

Ceramic caps are non-polar, so insert them any direction you want.

Next, solder C2 and C3, they are identical 220uF electrolytic capacitors. Make sure that you insert them by aligning the longer lead with the + sign.
Next, move on to IC2, an MCP1700-33 linear regulator (from the IC bag). It outputs +3.3V regulated voltage. It has 3 pins and is shaped like a half cylinder, similar to a transistor. Be careful not to confuse it with LX807DE, which are also shaped like transistors but come in strips of five in a different bag.

Align it such that the semi-circle matches the silkscreen on the PCB. Insert the leads as deep as you can into the PCB, but don’t use too much force.

Now it’s time to solder the IC socket for IC1. The socket protects the chip and allows you to replace it if anything goes wrong. This is an 8 pin (2×4) IC socket. Note that every socket has a small notch (see the picture on the left) to help identify its orientation. This notch must match up with the silkscreen on the PCB.

The leads on the socket are curved, so it will stay in place when you insert it to the PCB. The picture on the left shows the solder joints after soldering.

Moving on, let’s solder L1, a 1000uH inductor. It’s black colored and the marks on its body read ‘102’. Inductors are not polarized, so insert them any direction you want.
After this step, you can compare your soldered components with the picture on the left.
We are almost done with this part. The last step is to solder J0 (terminal block), J1 (power barrel), and J2 (slider switch). Either J0 or J1 can provide input power, and the choice depends on what type of sprinkler transformer you have. If the transformer comes with a power plug, insert it to J1; otherwise, if it has two terminal wires, insert to J0 and tighten the screws. Examples can be found below. J2 is a power switch. Sliding it up turns off power; and sliding it down turns on power.

If you have difficulty holding the components in place while soldering, use a tape to tape them in place.

The PCB holes for J1 are quite large. You don’t have to fill the entire holes with solder — as long as solder fills one side of the pin it should be fine. Make sure each solder joint creates good contact of the pin and the pad. Refer to the picture on the left.

Also check to see there is any solder debris that may short the circuit. If a solder joint is too large and seems to be touching other joints, use a solder pump to suck away excessive solder.

Before moving on, insert IC1 into its socket. This IC is an LM2574N switching regulator. It outputs regulated +5.0V from a wide range of input voltage (up to 40V). Make sure that its notch matches the notch on the socket. If you are not sure, refer to the picture on the left.
Now it’s time to test the power supply section. First, slide the switch (J2) up to turn off power; then, insert the 24VAC sprinkler transformer, if it comes with a power plug, insert it to J1 (power barrel); finally, slide J2 down, you should see that the green LED lights up.

Important: (although this is unlikely) if anything burns or smokes, immediately turn off power. Check to see if there is any component visibly damaged. If you can’t figure out the problem, post a message in the forum and we will help you.

Tip: For testing, you can substitute the 24VAC adapter with a DC adapter, as long as its output voltage is above 6V. For example, a standard 6V or 9V DC adapter can be used for testing. Using a low-voltage adapter reduces the possibility of electric damage in case things go wrong.

Voltage check: use a multimeter, measure the voltage between ground (GND) and the fourth to last pad of the 16×2 LCD. It should read about +5V. This is the voltage required to drive the LCD.

Next, measure the voltage between GND and VCC, it should read about +3.3V. This is the voltage supplied to the MCU, Ethernet controller, and anything other than the LCD.

Important: It’s crucial to check that these voltage readings are correct, otherwise your controller may not function later.

Note: after testing the voltages, please disconnect the power before continuing.

In case your sprinkler transformer comes with two terminal wires instead of a plug, you can insert the wires to the terminal block J0, and tighten the screws.

Part 2: MCU and Ethernet Controller
This part includes all components relevant to the microcontroller and the Ethernet controller. Start by soldering the IC sockets for IC3 (2×4 pin), IC4 (2×8 pin), IC5 (2×14 pin), and IC7 (2×14 pin). Again, make sure the notch on each IC socket matches the silkscreen on the PCB.
Next, solder R2, a 10K resistor. Recall that this is the one that looks much alike the 1K resistor, the only difference being that it has an orange ring instead of a red ring.
Now solder X1, an 8 MHz resonator. This component provides clock frequency for the MCU. It has 3 pins and is symmetric, so it doesn’t matter which direction you insert it.
Next is RN1, a 1K ohm resistor network. It has 8 pins and consists of 4 isolated resistors. The label should have number 102 in it, indicating its value is 1K ohm (10x10^2). This component is also symmetric so you can insert it either direction.
This is also the time to solder RN2 and RN3, two 470 ohm resistor networks. They are similar to RN1, but the label should has number 471 in it, indicating its value is 470 ohm (47*10^1).

Update: RN2 and RN3 are now replaced by two 330 ohm resistor networks. The labels should read 331.

At this point, the PCB should look like this.
Now you need to solder some resistors. The first is R7, a 2.32K resistor. There is only one resistor at this value, so it should be easy to identify. Bend the leads close to the resistor body, so that it can go through the PCB holes comfortably.
Next are R3, R4, R5, R6, four 49.9 ohm resistors. They come together on a strip so it’s easy to identify.
Moving on, let’s solder L2, a ferrite bead. It’s a dark, cylindrical element. It has no polarity, so insert it any direction you want.
Now solder C10, a 10uF capacitor. This is a electrolytic capacitor, so remember that the long lead must match the + mark.
Now solder X2, a 25 MHz crystal. It has 2 pins, no polarity, so direction doesn’t matter.
Moving on, you need to solder severn ceramic capacitors. These are small and yellow colored. C5, C6, C7, C8, C9 are all 0.1uF, and C11, C12 are two 18pF (these two are next to the 25 MHz crystal). Each set comes together on a strip, so it should be easy to identify. If you happen to mix them, you can use a magnifying glass to check the text on the cap body. The 0.1uF ones should read ‘104’ and the 18pF ones should read ’18J’. After this step, the PCB should look like the picture on the left.
Update: C7 is now replaced by a 10K resistor. In the kit you should have two 10K resistors. Solder one of them in the place of C7. Check picture on the left.
Next, solder B0, a small upright push button, and B1, B2, B3, three right-angled push buttons. Also solder the RJ45 Ethernet jack.
This is what the PCB should look like at this point.
The last step is to solder JP2, an 1×6 FTDI pin header. This header is necessary if you want to re-program the MCU using the Arduino software. This pin header is located at the top-left corner of the PCB, right above the slider swtich.

Part 3: LCD and Valve Driver
Now it’s time to assemble the LCD. Take out the LCD, 1×16 male header, and 1×16 female header.
Insert the male header into LCD, and solder all 16 pins. Note that the male header should be roughly perpendicular to the LCD surface. To do so, solder the first pin, and keep the solder joint melt while adjusting the header until it makes roughly a right angle with the LCD.
Now move on to solder the remaining pins.
Next, solder the female header onto the PCB.
Now it’s time to insert IC3, IC4, IC5, IC7 into their sockets. IC3 (24LC128) is a 16KB EEPROM; IC4 (74HC595) is a shift register providing control signals to the valve drivers; IC5 (Atmega328) is the MCU; and IC7 (ENC28J60) is the Ethernet controller.
For each IC, bend its pins slightly inward on a hard flat surface, then insert it carefully into the socket. Check that there are no pins left out or got twisted. For example, I unfortunately twisted a pin on IC7 (see picture). If this happens, use a flat screwdriver to carefully pry the IC out, straighten the pin using pliers, and then insert the IC back in.
Insert the LCD into the female header. It may feel a bit tight, but that’s all right.
Now it’s time to solder T1–T5 (LX807DE or MAC97 triacs) and the corresponding terminal blocks S1–S5. These are all from the same plastic bag. The triac is shaped like a transistor and they come in strips of five. Use pliers to bend the two pins on the side slightly inward, then insert it to the PCB. Don’t push it in too hard.

Note: If you are planning to use the controller to switch DC components, you should not solder these triacs because they only work for AC components (e.g. sprinkler valves). You should replace them with transistors. See the Other Uses Page for information.
The terminal blocks are located at the bottom edge of the PCB. S1 is by itself. Insert it to the PCB and solder it.
And S2–S5 are located next to each other, so you need to hook them up together, by following the hooks and grooves on the side of the terminal block.

The soldering part is now all done! Relax and take a moment to admire your achievement. The circuit board should look like the picture on the left.

At this moment, please double check the back side of the PCB: see if there remain any un-clipped wires, and check if all solder joints are ok (i.e. no shorted or connected solder joints).

Note that S6–S8 and T6–T8 are left unused for the moment. If needed (say, you have more than 5 watering stations), you can buy extra triac-terminal block pairs to populate them. Alternatively, you can extend the functionality of these three ports in other ways.

The slot IC6 is also unused and is reserved for the RFM12B wireless transceiver. Its function will be made available soon.

Part 4: Project Case

Here we show how to install the circuit board into the project case that comes with the kit.

First, check the parts, including the top, bottom, four long (#4-40 1.5″) screws, four short (#4-40 3/16″) screws, and four nuts.
Next, fix the PCB to the case bottom using the four short screws. You will need to pull out the LCD momentarily to reach the two top screws.
Put the LCD back in. Now you can install the top of the case. Slide the case in from the right hand side, because the holes on the right have to go through the pushbuttons and the Ethernet jack. Then press the cover down and make sure it is in good contact with the bottom.
The last step is to fix the top and bottom using the long screws and nuts. To do so, insert the screws into the holes through the top cover, and insert the nuts through the bottom. Note that one end of the nut looks smooth, and that’s the end you should insert from. Otherwise the nut won’t go into the hole.

Now simply use a screwdriver to rotate each screw clockwise. As the screws are tightened, the nuts will gradually go up into the holes on the bottom, and stay there. Hence even if you loosen the screws, the nuts will not fall out.

That’s it! Now you can use the controller with the case. Note that the back panel is wall mountable, so you can easily put it up on a wall.

Some notes about usage:

  • Every time you insert wires to terminal blocks, you need to take off the top cover first;
  • Important: the case is not waterproof. While it can protect the circuit from accidental water splashes, it is by no means meant for outdoor use. DO NOT leave it outside unprotected. It should be placed in a garage or shelter that won’t catch rain or flood. If you must place it outdoors, either enclose the circuit completely inside a waterproof case, or use waterproof spray/gels to seal it. It’s your own responsibility to protect it properly!

Leave a Reply