First test your shield without the valves or valve power supply. Plug the shield into your Arduino. Make sure the male header on the shield goes into the correct Arduino pins. Look between the two and make sure that no connections from the bottom of the shield are touching anything on the Arduino. If they are, you’ll need to put some insulating electrical tape to prevent that from happening.
Connect your Arduino to a USB port on your computer and look for the Arduino ON LED. If it’s off, it means that you have a short circuit, and that your computer has protected itself by turning off the USB port. Unplug the USB cable and find the problem before going further.
Next you can plug in and test the relays. Remember that they are polarized and that the stripe indicates pins 8 and 9. Upload the Blink example, each time testing a different relay. Test the relays one at a time to verify that each is working.
Next we’ll test the water valve power supply and indicator LED. We’ll do the valves last.
Connect the water valve power supply to the proper screw terminals. If the water valve system is a DC system, pay careful attention to the polarity.
Again upload the Blink example and test each relay in turn. This time, the appropriate LED should come on.
Now add the valves and check them, again using Blink for each valve.
Next let’s check the RTC and the DHT11. Plug in the RTC to the header, making sure the RTC pins are in the right place. Use the RTC example to test.
Before you test the DHT11 sensor, add the long wires that will reach outdoors. Use the same colour wires as you did on the shield for consistency. Use stranded wires for this part because stranded wire is more flexible (Figure 8-31). For a more professional look, slip six short pieces of heat shrink tubing over the wires (two on each wire) before you solder. After you solder the wires to the headers and sensor, slide the tubing over the solder joints and shrink the tubing to hold it in place. I like to use clear tubing so that I can see if a solder joint breaks, and the clear tubing seems to be more in the spirit of “open”.
WARNING
Solid-core wire should be used only in places where it will never move, i.e., when both ends are soldered to the same board.
Stranded wire should always be used between things that move relative to each other, such as between boards, or from a board to a connector.
I have seen many projects fail due to broken solid core wires that were moved too often.
Plug the male header from the DHT11 sensor into the corresponding female header, again paying careful attention to getting the right pins in the right place. Test using the DHT test example.
Leave a Reply