Experimenting With My Cheap Garden Irrigation System

TAGS: electronics; software; nature projects; esp8266; arduino; relays; water solenoids; irrigation

Why I Did This

I have a garden, old irrigation supplies, rain collection barrels, and wanted to see if I could apply my computer skills into creating an automated watering system.
I am hoping this system might develop to be an acceptable system for watering my plants if I'm away for like a week.

The updated setup with the components nested in a 3D printed box. A corrugated tube holds the wires to the 4-way 12V solenoids. A blue 120V cord receives power, while a yellow cord is powering the irrigation pump via single relay.

Design Walkthrough

Parts: esp8266; 4 channel relay; 1 channel relay; 12V water solenoids; 45W 120V water fountain pump; water hoses and spouts; various-leveled power supplies and wiring; rain barrels

For an initial evaluation setup, I wanted to create a system where my water pump would supply collected rainwater to up-to 4 garden bed areas using an esp microcontroller controlling the solenoid valves at timed intervals. I installed old water hoses in three of the bed areas and connected them to the solenoids using tie-straps (since I didn’t have reducers); strung the supply hose to the water pump sitting in a rain barrel; wired 18awg wire to the 12V solenoids and relays; cut and tied an extension cord to the single 120V relay; wired the 5V and 12V supply adapters; then wired the 5V signal wires to the esp controller. I programmed the esp (using Arduino IDE) to open the solenoids, one at a time, for 5 minutes each, then observed the irrigation performance.

Electronics layout: Esp8266 microcontroller, 4-channel relay for the 12V solenoid,
1-channel relay for the water pump, Blue extension cord for supplying all power, White USB plug for 5V power,
Black adapter for 12V power, and Yellow extension cord for supplying power to the water pump.

Water hose supplying the 12V 4-way solenoid; I laid it on some plant bags to absorb any potential water leakages. A black 1/4 inch line also supplies these bags (Watering Area #1).

Close up of solenoid; wiring terminals are soldered and color coded with heat shrink.

Water pump inside rain barrel.

Watering Area #2, strung with old hose that has drip spouts strewed along it.
The dark water spots can give you an idea of the trial performance of this setup.

Watering Area #3, also strung with old hose.
Spout coverage is slightly better here than #2, but I'm currently not growing anything, just testing.

Close up of a soil moisture sensor; it is normally covered from the rain using an old tupperware.

Lessons Learned and Future Changes

Go Pro. I wanted to see how the system would work with what spare parts I already had (aside from the $30 12V 4 channel solenoid I bought). The system works, but only ok in some areas; the flow is not very high, and the hoses need more positioned spouts. The wires should be up to code specs (the current wires are ok for supervised usage, but I’m not comfortable leaving it run alone), and could probably benefit from some fuses. The rain coverings are just old tupperware containers, so, I could 3D print some properly fitted ABS containers.
It plugs too easily. The rain barrel seems to collect silt and grow algae and that gets sucked into the pump, and the solenoid piece has a fine mesh screen to hold back junk so as to retain better seating of the valves; that screen plugs very quickly if the barrel experiences any turbulence. I wonder if I could 3D print an inline filter to help that mesh perform longer?
Easier monitoring wanted. Right now, the code is just simple relay timer scripts, but it would be nice to add this system to an online server where I could program schedules; maybe I will program that manually or find an MQTT service that can do that.

UPDATE: 3D printed component box. I found a nice customizable box by 'Bruners_' on Thingiverse. It's quite large for a 3D printed item (about 20cm x 20cm x 10cm), but is still too small/snug of a fit for the components; it barely fits everything in there. We will have to see how water-resistant it is; if it isn't very water resistant, then maybe I can coat the box with some PVC glue (which is basically PVC chips dissolved in acetone). Otherwise, it looks much better than before (when it was poorly covered by a plastic bin).

Much cleaner (externally) containment; internal is somewhat tight. We will have to see how waterproof it is.

References

4-valve water solenoid on Amazon: https://www.amazon.ca/dp/B085DTGWBM
Customizable 3D printed box by 'Bruners_' on Thingiverse: https://www.thingiverse.com/thing:4666908

Home Page

Let's go to the start page.

Featured Articles

Let's see what I've experienced lately.

Archived Articles

Let's see ALL of what I've experienced.