Go Down

Topic: Automatically turning a water valve on and off (Read 2018 times) previous topic - next topic


Mar 25, 2012, 12:01 pm Last Edit: Mar 25, 2012, 12:07 pm by pengyou Reason: 1
I am looking for ways to automate my first hydroponic garden. I have many trays of plants in my garden.  Each tray is either a different kind of plant or the same kind of plant at a different phase of growth.  Each tray requires more or less water/nutrient, or requires more frequent delivery of the water/nutrient mixture (more times per day).   I have two options to choose from, or a combination of both, in trying to automate this.  The first option is to have a separate pump for each tray that is controlled by a timer.  The timer would have to not only be set for x number of times per day, but the frequency per day is going to change also.  The water would be pumped into the trays.  The water would drain out of the bottom of the tray and into a sump, where the pumps are stored.  The second option is to place the water/nutrient tank a couple of feet above the plant trays.  The water would be gravity fed to the tray.  A valve would be opened or shut (relay or solenoid?) to allow the nutrient mix to flow for the prescribed amount of time and the required frequency each day.  Additionally, for some plants, a valve will be placed on the drain to allow water to store in the tray for a while.

Before I go any farther I would like to get an idea of how much this is going to cost.  The timers that I have found for option 1 are way too expensive, at more than $100 each.  How much is a regulated water valve going to cost - valve plus control?  It is low pressure - only a few psi.  It can be 1/4", 5/8" or 1/2" depending on which size is going to be cheaper.  Are there other options than the sprinkler systems?  $5 per unit or less would be a low enough price at this point for me to go ahead with the next step of the design. 


One Arduino UNO has several IO lines (12-20 depending how you count) to control valves. but you can easily multiplex them e.g. - http://macetech.com/store/index.php?main_page=product_info&cPath=4&products_id=23

So for ~1 uno and 2 centipede shields (~70$) you can control 100+ valves. Assuming you have 2 valves per plant this costs $1.40 per plant ex valves cables and wires and power supply.

Valves are different in price but as you can see the controlling unit is not the price. Assume they costs $5 a piece and you need $5 for cabling the costs will go around $20 per plant. But that is only a rough estimate. You might need $10-20 for an RTC too to keep the time synced.

WRT the program
An UNO has enough RAM to hold a table with 10 feeding times for 100 plants. The trick is to use a fixed duration per feed. With 10 feeds that is easy to be done.

uint8_T plants[100][10];  // == 1000 bytes

possible schema:
a feeding time is a number between 0..239.  24 hour in 240 parts ==> can start every 6 minutes e.g. for 10 seconds.
the number 255 can be used for NOFEED. the number 240-254 are free for other purposes.

a more complex schema could be:
uint8_T plants[100][5][2];  // == 1000 bytes
==> 5 feeding times per day, but per feeding time you have a duration byte 0..255 seconds.

every feeding time extra would imply 200 bytes extra.
uint8_T plants[100][6][2];  // == 1200 bytes

Another way to handle the feeding schema would be a file on an SD card. Then you don't need to declare the array in front you just read the feeding scheme from disk. And you can edit the scheme on your PC and reinsert it in the Arduino.

Hopes this helpes.
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)


Can anyone recommend a source of reasonably priced water valves?  Ideally ones which don't consume too much power, and connect nicely to standard plastic tubing.  I'm also on the look out for some weather-proof connectors.
EU companies if possible.


Not EU but good postage rates..


Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131