Introduction: Project Waterfall (Automatic Plant Watering System)

I always end up forgetting to water my plants. So as part as an project for the HKU University of the Arts Utrecht I decided to make a automatic plant watering system. Specifically one that looks nice and doesn't use any electric waterpumps or solenoid valves that require a lot of power. But is instead controlled by a tiny servo.

Step 1: Supplies

  • 1 meter of 2mm inside diameter / 2.6mm outside diameter silicon tubing (this size is important and can't be changed)
  • 1 meter of thicker silicon tubing for instance 5mm ID / 1mm OD (doesn't really matter)
  • Epoxy glue (Waterproof and sealing)
  • 3 bottle with caps that can be easily glued together at the bottom
  • Superglue
  • Arduino Micro or any other similar system
  • 3 types of colored LED's of choice (Optional)
  • Force Sensitive Resistor (Optional)
  • Towerpro 9g servo (Or equivalent)
  • Soil moisture sensor (I ended using a water depth sensor which is probably not ideal)
  • Lots of wiring
  • 3.3k resistor
  • 3D filament printer that can do 0.2 mm layers
  • PLA filament
  • Tiny elastic band
  • 1 Playing card (Or equivalent)

Step 2: Heron's Water Pump

Heron was a brilliant mathematician and engineer from Alexandria. And this pump is as variation of one of his designs. The way it works as that gravity force water to flow from the top bottle to the bottom bottle via the silicon tubing. This causes the water level in the bottom bottle to rise forcing air from the bottom bottle to the middle bottle which in turn increases the pressure. This pressure is then relieved by pushing water from the middle bottom to where-ever is needed. The added benefit of this is that with a significant difference in tubing size and height difference you can actually pump water way higher then the water level of the top bottle of your pump. Something that cannot be done with a simple gravity pump.

In order to this beautiful device to work you will need to drill some holes, fit the tubing as shown in the picture and make sure that everything is both watertight and just as important airtight. For this you will need to use the right glue.

Note: The cap at the top has a tiny hole in to prevent vacuum as result of water moving from the top bottle to the bottom bottle.

In order to start the flow of water you need to fill the middle bottle with water. And then simple add water to the top bottle.

Step 3: 3d Printed Servo Controlled Valve (by Mikey77) With Added Water Sensor

For this step I will direct you to another instructable for a 3d Printed Servo Controlled Valve by mikey77.

Its a very neat design but I did have to make some simple tweaks to make it work with water.

Some elastic band was needed to pull the moving components in mikey77's valve back in place when possible. And I ended cutting a tiny strip from a playing card and squeezed it next to the silicon tubing in his system to be able to completely stop the flow of water. Just for that extra squeeze. Initially I couldn't completely stop the flow of water.

After that the water sensor is simply super glued unto the valve control as shown in the pictures. And inserted into the soil of the plant.

Step 4: The Wiring

Some of these components are optional and are just there to be fancy.

Step 5: Code

const int waterSens = 9; //define water sensor
const int led2 = 2; //define blue led to pin 2 const int led4 = 4; //define red led to pin 4 const int ledA5 = A5; //define green led to pin A5 int fsr = A2; //define fsr read to pin A2 int waterVal; //define the water sensor value int fsrRead; //the analog reading from the FSR resistor divider int value = 375; //starting value for servo #include //load servo from library Servo servo1; //name the servo used for reference
void setup() {
pinMode(led4, OUTPUT); //set led as an output
pinMode(led2, OUTPUT); // set led as an output
pinMode(ledA5, OUTPUT); // set led as an output
pinMode(waterSens, INPUT); //set water sensor as an input
Serial.begin(9600); //start the serial port at 9600 bauds
pinMode(9, INPUT); // attach watersensor sensor output as an input
pinMode(A2, INPUT); // attach fsr output as an input
}
void loop() {
  waterVal = analogRead(waterSens); //read the water sensor
  fsrRead = analogRead(fsr); // read the force sensor value
  Serial.print("FSR reading = "); // for serial monitoring
  Serial.println(fsrRead); //print the value of the FSR resistor to the serial monitor
  Serial.print("WaterSensor reading = "); // for serial monitoring
  Serial.println(waterVal); //print the value of the water sensor to the serial monitor
// this if statement is for when the resevoir needs a refill
if (fsrRead >= 900) { //force sensor value should be adjusted to your own needs
  servo1.attach(A0); //attach servo to A0
  digitalWrite(ledA5, LOW); // if the water sensor senses water turn the green led off
  digitalWrite(led2, LOW); // if the water sensor senses water turn the blue led off
  digitalWrite(led4, HIGH); // if the water sensor senses water turn the red led on
  int value = 837; // set a value for the servo position (this is similar to analog outputs
  int servoPos = map(value, 0, 1023, 0, 170); // map that value to the positions of the servo
  servo1.write(servoPos); // make the servo go in position
  delay (250); // give the servo time to go into position
  servo1.detach(); // detach servo to avoid buzz noises at low voltages
  delay (10000); // delay of 10 seconds
}
else{ // this else statement is for when the resevoir has sufficient water
if (waterVal >= 500){ // this if statement is for when the soil of the plant is wet enough value can be tweaked
  servo1.attach(A0); //attach servo to A0
  digitalWrite(ledA5, LOW);//if the water sensor senses water turn the green led off
  digitalWrite(led2, HIGH);//if the water sensor senses water turn the blue led on
  digitalWrite(led4, LOW);//if the water sensor senses water turn the red led off
  int value = 837; // set a value for the servo position (this is similar to analog outputs
  int servoPos = map(value, 0, 1023, 0, 170);  // map that value to the positions of the servo
  servo1.write(servoPos);  // make the servo go in position
  delay (250); // give the servo time to go into position
  servo1.detach(); // detach servo to avoid buzz noises at low voltages
  delay (1000); // delay of 30 minutes
}
 
else{ // this else statement is for when the soil is to dry and the plant needs water
  servo1.attach(A0); //attach servo to A0
  digitalWrite(ledA5, HIGH);//if it doesn't sense anything turn the led on
  digitalWrite(led2, LOW);//if the water sensor senses water turn the led off
  digitalWrite(led4, LOW);//if the water sensor senses water turn the led on
  int value = 375; //set a value for the servo position (this is similar to analog outputs
  int servoPos = map(value, 0, 1023, 0, 170); // map that value to the positions of the servo
  servo1.write(servoPos);  // make the servo go in position
  delay (250); // give the servo time to go into position
  servo1.detach(); // detach servo to avoid buzz noises at low voltages
  delay (1000); // delay of 1 second
}
}
}