The main ingredients for this are dirt cheap, no need for arduino or raspberry pi.
Step 1: About This Project
For the past two weeks I have just used the timer, pump on for 15 seconds, then 2 hours 40 minutes later it resets to the first timer and the process starts over again. In basic terms, my plants got watered 15 seconds every 2 hours and 40 minutes. That has worked great so far, but on another project I did I had a problem with the seedlings "damping off", a term used for basically saying the medium (rapid rooter pellets) were too wet and fungus killed the plants. I was worried about that on this project as well. The way I have it set now takes all the guesswork out of the process.
The timer is now set to water 15 seconds once every two days. The soil moisture relay trips the timer on if the rapid rooter gets too dry and the plant gets a drink, resetting the timer back to its 15 seconds pump on, 48 hours pump off. The timer is set to loop infinitely as long as there's power but by setting it for two days, it allows the moisture relay to kick on whenever the plants need it which is a better system considering there's always factors that change, low humidity, rainy days etc etc.
Step 2: Inventory List
1) Timer Module (link below)
2) Soil Moisture Relay (link below)
3) 12v Power Supply ( you can do this multiple ways, I chose a 12v 7ah SLA battery, a solar charge controller, and a small solar panel).
Misc Items and Tools:
1) Soldering Iron
2) Rosin Core Solder
3) Shrink Wrap
4) Extra Wire (speaker wire, or harvest some wire from an old 12v transformer like one from an old modem etc).
5) Small Phillips and Flat Head Screwdrivers.
Step 3: Extend the Sensor Wire
Step 4: Connect the Sensor to 12v
Step 5: Calibrate the Sensor
Step 6: Figuring Out the Relay Ports
Tin the wires and trim them to length needed for the screw down terminal connections. Tinning wires is simply applying heat with the soldering iron, then applying just enough solder that it flows into the open spaces in the wire. You don't want a big glob of solder on the wire, if you get one simply apply heat and quickly tap the glob off the wire with the iron tip. Tinning and trimming the wires creates a much stronger, nicer looking connection to the terminal block.
Step 7: Connect to the Timer
You want to connect your wires from the relay to the (+) and the CH1 terminals of the timer. It doesn't matter which wires you wire to these two ports. Essentially the NO and COM ports from the soil relay are just creating a short circuit to the (+) and CH1 ports on the timer to reset it.
Program the timer to use function 6. Hint, when you get to the NX function settings, the first two digits are the multiplier for the first timer, the last two digits are the multiplier for the second timer. I set mine to 15 secs timer one and 48 hours on timer two. Timer one is pump on, timer two is pump off. When you get the timer, it's default NX setting is 0101. Mine is set to 0120, which translates to timer1, one second per timer setting i.e. 15 seconds. The second timer is set with a multiplier of 20. So here's the math.
Timer one setting 15 with NX value of 01 = 15 seconds so (15 x 1 = 15)
Timer two setting 8640 with NX value of 20 = 172800 seconds so (8640 x 20 = 172,800)
We know there are 60 seconds per minute so 60 x 60 = 3600 seconds per hour
I wanted 48 hours so 48 x 3600 = 172,800 seconds per 48 hours
If each tick on the timer is 20 seconds, then 172,800 / 20 = 8640 timer ticks of 20 seconds each to reach 48 hours.
Hope this is helpful, it should become clear as you play with the timer, that plus the instructions on thingiverse should get you where you need to be in the setup of the timer.
There are other ways to set the timer, this was just the way I picked...I like knowing my plants will still get some water every two days if the sensor fails for some reason.
Step 8: Place the Sensor
Step 9: Final Notes
After thinking about this particular sensor relay, you could use it as a direct relay to control a pump for watering without the timer. This would cut the price down to less than $5.