Automated Plant Watering System - Sensors, by Rosa Slack and Leila Watson

by PHS_Engineering in Circuits > Arduino

54 Views, 1 Favorites, 0 Comments

Automated Plant Watering System - Sensors, by Rosa Slack and Leila Watson

Screenshot 2024-06-12 at 10.17.02 AM.png
download.jpg

We made an automated plant watering system, inspired by a "cloud watering can" (shown above). In short, our project has a metal ball, attached by string to a servo motor, which will spin according to the water sensor which tells the Arduino when the sensor is dry (which means the soil is dry). The sensor and the servo motor pulls the string which lifts the ball and lets water out of the hole in the bottom of the plastic bottle we used to hold the water. When the sensor is wet (soil is wet) the servo motor will stop spinning and plug the hole, with the metal ball, as to not allow any more water out. We also attached an LED to allow any viewers to visually tell if the water was coming out or not.

Supplies

DD50CDB7-DC5F-4F78-B08D-E290DDCA6BC7.jpeg
  • Arduino UNO board
  • breadboard
  • LED
  • wires - round tips
  • wires - F-M
  • servo motor
  • 220ohm resistor
  • water level detection sensor
  • bolts
  • nuts
  • metal base plate
  • metal 3 sided pole
  • O ring
  • Plant
  • USB cable
  • Angle gusset
  • vitamin water bottle
  • hot glue gun
  • string
  • soil

Write Code

int blue = 11;

int baud = 9600;

int waterLevel = A0;  // variables for code

int sensor;

int pos = 0;

int wait = 500;


#include <Servo.h>  //importing Servo information


Servo myservo;


void setup() {

 // put your setup code here, to run once:

Serial.begin(baud);

pinMode(blue, OUTPUT); // LED to show when plant it wet or not

pinMode(waterLevel, INPUT); // water sensor

myservo.attach(9); 

}


void loop() {

 // put your main code here, to run repeatedly:


sensor = analogRead(waterLevel);

Serial.println(sensor); / / This prints the water levels coming from the sensor


if(sensor>130){

 digitalWrite(blue, LOW); // if the waterLevel is high, the light will be off and the marble will stay down


}

else {

 digitalWrite(blue, HIGH); // if the waterLevel is low, the light will turn on and the motor will lift the marble up from the cup(watering the plant)

  for (pos = 0; pos <= 179; pos += 1) {

  myservo.write(pos);

 }

 delay(wait);

 for (pos = 179; pos >= 0; pos -= 1) {

  myservo.write(pos);

 }

 delay(wait);

 }


}


Gather Materials

IMG_1764.jpg

took some time to gather materials we might need that weren't available in the classroom. such as, plants, pots, bottles.

Build Circuit

IMG_1124.jpeg
IMG_0988.jpeg
unnamed.png
unnamed.jpg

Put wires, LED and resistors in the right spots.

Build Bottle Frame

IMG_2362.jpg

build a frame to hold the bottle over the plant for easy watering. we built the frame out of metal plates and poles with an adjustable section to easily get the bottle in and out.

Ball Seal

IMG_1125.jpeg

We used an O ring and some hot glue to put a hole in the cap of our bottle that perfectly fit the ball and didn't allow any water out while it was down.

Attach String

IMG_1126.jpeg

we securely attached the string to the ball and fit it through a hole in the top of the bottle and tied it to the servo motor.

Attach Servo Motor

Screenshot 2024-06-12 at 11.07.24 AM.png

We added a platform to put the servo motor on and tied/taped it down.

Set Up

IMG_1162.JPG
Rosa Leila Arduino project

we finished our project by setting it up for success! we put the sensor in the soil. we tightened all the nuts and bolts. we taped our wires and secured anything that might be loose. we added water to the bottle and tested it out.

Downloads