Where do I start with automated watering system for 9 plants?

I am interested in having 9 soil moisture sensors connected to (??), in order to deliver a predetermined amount of water once sensor activates. Any suggestions/links would be outstanding.

first make it work for 1 plant and then scale up using arrays
this is a framework to start with

const int pumpPin = 5;
const int sensorpin = A0;

void setup()
{
  pinMode(pumpPin , OUTPUT);
  digitalWrite(pumpPin, LOW); // stop watering
}

void loop()
{
   int level = analogRead(sensorPin);  // assuming an analog sensor
  if (level < 500) // to be determined threshold
  {
     // give water for some seconds
  }
}

If you have 9 analog sensors you might need multiplexing or use 2 Arduino UNO

You might also consider the use of a Real Time Clock to cause the sensors to read at set intervals (eg like every hour on the hour).

A circadian clock is more fun than an RTC and cheap to implement :wink:

See - http://forum.arduino.cc/index.php?topic=55920.0 -

to start, connect one plant. connect one valve.

how you water is bases on what you have. if you have a field with a water tower, you would need a way to drain water. if you have a pressurized water system, you have more options. One is to put a solenoid on for each plant then connect the hoses.
another is to have one solenoid and then connect to a sort of fire hose and rotate at so that it sprays to that plant. of course there will be mess and water will mostly go into the plant.

if you have large rows of plants the individual solenoid on each row is easier.

if you pipe up a solenoid, you can get 1/4" plastic hose, like for an ice maker and run that to each plant.

for my wife's hanging plants, I do that, and then with a thumb tack, put one small hole in the tubing, and wrap that with cloth and a rubber band. the volume that comes out in 10 minutes drenches the pot and water drips out.

not to hijack the thread.... anyone know of a simple rain sensor ?

dave-in-nj:
not to hijack the thread.... anyone know of a simple rain sensor ?

used aluminium foil strips (on a ramp) to detect it was raining. The drops rolled of the ramp but gave measurable pulses.

or do you want to measure how much it rained?

  • reservoir with a height sensor

robtillaart:

dave-in-nj:
not to hijack the thread.... anyone know of a simple rain sensor ?

used aluminium foil strips (on a ramp) to detect it was raining. The drops rolled of the ramp but gave measurable pulses.

or do you want to measure how much it rained?

  • reservoir with a height sensor

when watering plants, one method is orifice size and water pressure. a value can be determined that is close enough for plants.

the other application is to know when it rains and then to adjust how much additional water is needed (if any) since I am doing a entire garden, I do not have individual water sensors.

robtillaart:
If you have 9 analog sensors you might need multiplexing or use 2 Arduino UNO

although one could get an ADC for reading the additional sensors, it would be far easier (IMHO) to get two mini's from e-bay and connect them. that would add more analog inputs. 9 is just 1 shy of the 8 you can get on a Mini.

there is also a R/C loop that will take your analog value and turn that into pulses. then you just count frequency and you expand the analog input capability without too much effort.