Simple watering system based on RPi, relays and solenoid valves. In this repo you will find a single python script for switching relays connected to RPi. This script can be installed as a CRON job to turn your pile of wires and parts into industry standard watering scheduler with basically unlimited schedules.
Here should be some elegant wiring diagram, but all I have right now are a bunch of photos I made when assembling the thing.
The solenoid valve I found had a 3/4" threading, so I had to reduce it to my 1/2" garden hose I had in my garage. I found a 3/4" thread reducer to 1/2 garden hose quick coupler for cheap so I took a handful of those. Also, it's worth using the teflon tape to make a good, sealed connection on plastic threading.
I connect the valves in parallel, and I'm planning to open one-at-a-time tops. My water pressure suck balls, so it's the best I can go with. The 3-way joints will be connected using small pieces of my garden hose, but I recon using some rubber seals or clamp band of some sorts on the joint. Zip tie will be fine as well.
I've finished the valve series with end cap to make it easily extendable.
Now the fun part. I've started the wiring with a common connections. The valves will have one pin
soldered together (not visible on this picture yet - the short wires will be connected to next valve)
and the relay module has its relays connected together in the same manner. Common wire on valve
series will be connected to +12V
and the common wire on relay module will be connected to -12V
(or the other way - doesn't matter)
Each valve has to be driven by separate relay, and those needs to be connected together. I've used ~10m wires since I will keep my relay module and RPi in a dry room and the valves will be kept outside where will be exposed to high humidity environment.
- Raspberry Pi Zero W link
- Solenoid valve - SparkFun ROB-10456 - 12V, 3/4" link
- Relay Hat for Raspberry Pi - Waveshare 15423 link
- Impulse power supply - Huntkey 12V/2A with DC 5,5/2,1mm link
- Raspberry Pi power supply - 5V/2,5A link
- DC 5,5x2,1mm socket link
- Garden hose 1/2"
- Quick coupler: from 3/4" thread to garden hose 1/2"
- Teflon tape
- 3-way joint for 1/2" garden hose
- End-cap for 1/2" garden hose