Plants Watering Robot

by sarthakm1221 in Workshop > Home Improvement

1019 Views, 1 Favorites, 0 Comments

Plants Watering Robot

Screenshot_2021-07-13-21-50-54-347_com.google.android.youtube.jpg

Hi there, I am sarthak mishra.

I have made a project named plants watering robot, it is quiet autonomous as all you need to turn on the switch and after that leave the remaining work on it.

You also can subscribe my youtube channel from here-Khurafati BABA

Now let's talk about the working of this robot-

Initially it will be moving forward in a straight line, it'll stop whenenver detects the flowerpot from the ultrasonic sensor which is placed on the sideways of the wooden block.

After that the arm will start moving downward untill it finds the soil in the flower pot.

whenever the ultrasonic sensor reached the soil then the moisture sensor will start working and give the moisture value to the arduino, according to that value it will give water to the plant.

If the soil is not having the enough moisture- It'll give water to the soil untill the moisture level reached the optimum level. when the moisture is good enough then the robot will leave the flower pot and will start checking the another one.

If the soil is having the enough moisture- Then the robot will ignore that flowerpot and start checking the another flower pot.

Components Needed-

Screenshot_2021-07-13-21-51-11-378_com.google.android.youtube.jpg
Screenshot_2021-07-13-21-52-20-000_com.google.android.youtube.jpg
Screenshot_2021-07-13-21-52-36-169_com.google.android.youtube.jpg
Screenshot_2021-07-13-21-52-40-735_com.google.android.youtube.jpg
Screenshot_2021-07-13-21-52-24-155_com.google.android.youtube.jpg
Screenshot_2021-07-13-21-52-44-745_com.google.android.youtube.jpg
Screenshot_2021-07-13-21-52-12-074_com.google.android.youtube.jpg
Screenshot_2021-07-13-21-51-17-908_com.google.android.youtube.jpg
Screenshot_2021-07-13-21-51-26-929_com.google.android.youtube.jpg
Screenshot_2021-07-13-21-51-32-844_com.google.android.youtube.jpg
Screenshot_2021-07-13-21-51-43-968_com.google.android.youtube.jpg
Screenshot_2021-07-13-21-51-55-195_com.google.android.youtube.jpg
Screenshot_2021-07-13-21-51-49-581_com.google.android.youtube.jpg
Screenshot_2021-07-13-21-52-01-739_com.google.android.youtube.jpg
Screenshot_2021-07-13-21-52-06-525_com.google.android.youtube.jpg
Screenshot_2021-07-13-21-52-57-231_com.google.android.youtube.jpg
Screenshot_2021-07-13-21-53-03-627_com.google.android.youtube.jpg

1- Arduino UNO

2- 100RPM geared motor

4- Wheels

5- Screws

6- Clamps

7- Plastic rod

8- Battery holder

9- L293D sheild

10- SG90 servo motors

11- Dc pump

12- Ultrasonic sensors

13- TP4056 charging module

14- Moisture sensor

15- Jumper wires

16- Li-on batteries

17- Wooden box

18- Plastic container

Make Holes in the Box to Fix the Clamps

Screenshot_2021-07-13-21-53-35-498_com.google.android.youtube.jpg
Screenshot_2021-07-13-21-54-03-263_com.google.android.youtube.jpg
Screenshot_2021-07-13-21-54-20-090_com.google.android.youtube.jpg
Screenshot_2021-07-13-21-54-24-869_com.google.android.youtube.jpg

Tightens the screws, makes the clamps fixed

Fix the Motors in the Clamps

Screenshot_2021-07-13-21-55-49-740_com.google.android.youtube.jpg

Place the motors in between the clamp and then tight the motor's screws

Fix the Wheels in the Motor

Screenshot_2021-07-13-21-56-10-359_com.google.android.youtube.jpg

Tightens the wheels' screws to fix the wheels on motor

Fixing the Ultrasonic Sensor

Screenshot_2021-07-17-15-20-21-885_com.google.android.youtube.jpg
Screenshot_2021-07-17-15-17-03-124_com.google.android.youtube.jpg

With the help of gluegun. Stick the ultrasonic sensor on the wooden block

Fix the Battery Holder

Screenshot_2021-07-17-14-55-04-696_com.google.android.youtube.jpg

In the corner of wooden block, fix the bateery holders with the help of gluegun

Making the Arm

Screenshot_2021-07-17-15-12-33-239_com.google.android.youtube.jpg

On the tip of plastic rod, fix the ultrasonic sensor and moisture sensor with the help of gluegun.

At the end of this plastic rod, fix the shaft of both the servo motor with the help of fevi quick or gluegun

Placing the Servos

Screenshot_2021-07-17-15-12-46-510_com.google.android.youtube.jpg
Screenshot_2021-07-17-15-12-55-373_com.google.android.youtube.jpg

stick the servos on the top of wooden block with the help of gluegun

DC Pump

Screenshot_2021-07-17-15-13-30-487_com.google.android.youtube.jpg

Join the pipe with the motor by heating the pipe a little bit.

Fixing the Watering Pipe on Arm

Screenshot_2021-07-17-15-14-01-950_com.google.android.youtube.jpg
Screenshot_2021-07-17-15-14-17-369_com.google.android.youtube.jpg

Fix the pipe on the arm with the help of gluegun

Wiring of Motors

Screenshot_2021-07-17-15-14-35-173_com.google.android.youtube.jpg
Screenshot_2021-07-17-15-14-50-811_com.google.android.youtube.jpg

solder the wires on moters and pass all the wirs through the hole.

Place the L293D Sheild and Arduino

Screenshot_2021-07-17-15-15-37-950_com.google.android.youtube.jpg

Place the L293D shield nearby the battery holders.

Make a Hole on the Top

Screenshot_2021-07-17-15-15-59-539_com.google.android.youtube.jpg

Make a hole on the top of wooden block to paas the wires of servo motor, moisture sensor and ultrasonic sensor. To the L293D sheild.

Placing the Charging Module

Screenshot_2021-07-17-15-17-30-842_com.google.android.youtube.jpg
Screenshot_2021-07-17-15-17-43-972_com.google.android.youtube.jpg
Screenshot_2021-07-17-15-18-15-773_com.google.android.youtube.jpg
Screenshot_2021-07-17-15-18-02-201_com.google.android.youtube.jpg

Stick the TP4056 module and a switch on the sideway of the wooden block.

After Some Paint Job

Screenshot_2021-07-17-15-18-46-929_com.google.android.youtube.jpg

You can give any colour to this robot according to your mood.

Ready to Rock

Screenshot_2021-07-17-15-19-03-810_com.google.android.youtube.jpg
Screenshot_2021-07-17-15-19-23-399_com.google.android.youtube.jpg
Screenshot_2021-07-17-15-19-42-396_com.google.android.youtube.jpg

Now, you are ready to rock with this exciting robot.

Circuit Diagram

Circuit diagram.JPG

Here Is the Whole Video of This Robot

How to make Plants Watering Robot | Irrigation System | Khurafati BABA

click here to watch the whole video

Code

// ********CODE BY KHURAFATI BABA (SARTHAK MISHRA)**********

// ********CODE BY KHURAFATI BABA (SARTHAK MISHRA)**********

#include //For adding the library of shield #include //For adding the library of servo motor Servo m1; //Variable of servo motor 1 Servo m2; //variable of servo motor 2 int pos; //Variable that will define the postion of servos const int trigPin = A0; //Defines the trig pin of ultrasonic sensor 1st const int echoPin = A1; //Defines the echo pin of ultrasonic sensor 1st const int trigPin1=A2; //Defines the trig pin of ultrasonic sensor 2nd const int echoPin1=A3; //Defines the echo pin of ultrasonic sensor 2nd int mpin = A4; //Defines the pin of moisture sensor pin int mout; //Variable to store the value given by moisture sensor long duration, duration1; //Variable that stores the duration value given by ultrasonic sensor int distance, distance1; //Variable that stores the distance value calculated by the formaula

AF_DCMotor motor1(1, MOTOR12_1KHZ); //Defines the frequency which will be given to motor 1 AF_DCMotor motor2(2, MOTOR12_1KHZ); //Defines the frequency which will be given to motor 2 AF_DCMotor motor4(4, MOTOR12_1KHZ);

void setup() { Serial.begin(9600); //starts serial communication with the arduino and PC pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); pinMode(trigPin1, OUTPUT); pinMode(echoPin1, INPUT); m1.attach(10); //Define the attached pin for servo motor 1 m2.attach(9); //Define the attached pin for servo motor 1

m1.write(0); m2.write(120); motor1.setSpeed(255); //To set the particular speed of motor 1 motor2.setSpeed(255); //To set the particular speed of motor 2 }

void loop() { digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); duration = pulseIn(echoPin, HIGH); distance= duration*0.034/2; digitalWrite(trigPin1, LOW); delayMicroseconds(2); digitalWrite(trigPin1, HIGH); delayMicroseconds(10); digitalWrite(trigPin1, LOW); duration1 = pulseIn(echoPin1, HIGH); distance1= duration1*0.034/2;

if (distance>=15) { Forward(); delay(100); }

else if(distance<15)

{ Stop(); delay(70); digitalWrite(trigPin1, LOW); delayMicroseconds(2); digitalWrite(trigPin1, HIGH); delayMicroseconds(10); digitalWrite(trigPin1, LOW); duration1 = pulseIn(echoPin1, HIGH); distance1= duration1*0.034/2;

if(distance1>=6) { servoF(); delay(100); } } mout=analogRead(mpin); if(distance1<6 && mout<=500) { servoB(); delay(100);

Forward(); delay(1000); }

if(distance1<6 && mout>500) { while(mout>500) { motor4.run(FORWARD);

mout=analogRead(mpin);

if(mout<=500) { motor4.run(RELEASE); delay(100); break; } } } } void Stop()

{

motor1.run(RELEASE); motor2.run(RELEASE); }

void Forward()

{

motor1.run(FORWARD); motor2.run(FORWARD); } void servoF() { Serial.println("servo forward is fine"); delay(100); for (pos=0;pos<=120;pos+=1)

{ digitalWrite(trigPin1, LOW); delayMicroseconds(2); digitalWrite(trigPin1, HIGH); delayMicroseconds(10); digitalWrite(trigPin1, LOW); duration1 = pulseIn(echoPin1, HIGH); distance1= duration1*0.034/2;

if(distance1>6) { m1.write(pos); m2.write(120-pos); }

}

}

void servoB() { Serial.println("Servo back is fine"); delay(100); for(pos=120;pos>=0;pos-=1) { { m1.write(pos); m2.write(120-pos); } delay(30); } }