I'll start off by saying that I'm a software guy, so I'm sure there's plenty I'm doing wrong here (and I appreciate the pointers).
I live in the city, and the only garden access I have is a 6' x 1' flower bed I built on my roof deck. Watering is a pain, so I put together a controller that waters only when necessary. At first, I tried to put together a resistive moisture sensor, using galvanized nails and an h-bridge to flip polarity and stave off corrosion. That lasted an entire week, and then was utterly eaten by oxidation (it was pretty neat seeing a 4" of a 6" nail disappear over the course of a week). Then, I shelled out $30 on a Vegetronix capacitive sensor. That, coupled with a latching solenoid (important!) and a SparkFun Arduino Pro Micro resulted in the attached. I'm still running tests, but in the worst case scenario (with the solenoid being actuated as often as the code will allow it), the battery recharges quickly enough to last indefinitely. While sleeping, this setup draws ~3mA + the quiescent current of the power controller (which is another mA or so). The solenoid I use draws about 300mA for the switching pulse.
The full BOM (aside from passives):
- Latching pulse solenoid (www.ebay.com/itm/120886526629
... fairly sure I paid ~$15 for this, not the $599 the auction lists now. I'm sure you can find something similar in that price range)
- Pololu 6V step-up controller (http://www.pololu.com/product/2566
- Adafruit solar LiPo charger (http://www.adafruit.com/product/390
- Adafruit weatherproof enclosure (http://www.adafruit.com/products/905
- Adafruit weatherproof 4-pin cable for moisture sensor (http://www.adafruit.com/products/744
- 2x Adafruit weatherproof dc cable (http://www.adafruit.com/products/743
) for solenoid and solar panel
- 2x SparkFun momentary push button (pick your color https://www.sparkfun.com/products/11967
- SparkFun 10 segment led bargraph (https://www.sparkfun.com/products/9937
) with paired resistor network (https://www.sparkfun.com/products/10855
- mosfet h-bridge (www.diodes.com/datasheets/ZXMHC6A07N8.pdf
- 2 TI HC595 shift registers, SOIC
- SparkFun Arduino Pro Micro or Pro Mini (pinout adjustments need to be made in the source for this)
The source code and eagle files are available here:https://github.com/kolosy/irrigation
The main issue I'm currently aware of in the design is that I'm using the arduino's output pins to push a 6V signal down to ground, which is about a half volt above it's maximum rating (this is on the P-channel side of the half-bridge). The right thing to do would be to use a BJT per P-channel (there's two of them) instead, but it seems to be working for now (YMMV).
Other input/advice is greatly appreciated.