Pesticide Sprinkler Robot for Farming | Autonomous Farming Robot

Hey guy, welcome back to the Techatronic. In this article we are making a Pesticide Sprinkler robot or we can also say this robot an Autonomous robot. There is two features in this Robot it can run autonomously and it can control by a mobile phone application. So, we are going to share all the detail here, how to make this awesome Pesticide Sprinkler Robot for Farming. We have used a lot of sensor , module and motors in this robot. so, that the robot can do all the work like waling , rotating, sensing, spraying etc.

Pesticide Sprinkler Robot

Introduction

Our farmer tackle a lot of challenge in farming like raising the crop, free from pesticides , etc. but spraying pesticides may be dangerous to the Farmers so, we have invent this robot which can spray the pesticides from 100 meter distance. so they can’t be affect from the harmfull chemicals and pesticides. There is many method to spraying the pesticides like Hand sprayers or knapsack sprayers. which can be harmful for farmers. but using this robot the farmers can away from the harmful chemicals.

HTML Image as link
Qries

Pesticide Sprinkler Robot for farming is a good idea to imroove the farming. We have made a lot of robot before which are helping in daily life like fire fighting robot , Bluetooth Control robot. So, if you want to learn and make your own robot you need to read the full article. also, we have shared all the details like circuit and code below. we have upload the youtube video too from you can see how we made this robot.

Pesticides Sprinkler Robot specification:-

It have two pump in the tank which continously spryainh the pesticides from spraying nozzles

There is 6 spraying wireless direction controll nozzle which can control via mobile application

There is two IR sensors which can detect the crop nearby according to this the, farming robot can stop.

The robot have six leg strcucture which can climb on any surface rough or soft.

all six motors rotate simultanously which runs the model forward , backward, left , right and 360 rotation

It have a bluetooth module hc-05 which gives the addition to control the robot wirelessly.

the robot have two powerfull 12v lipo rechargeble batteries.

The Robot can be move autonomously by switching

Pesticide spraying robot can be used to carry the material we can remove the spraying cylinder easily

So, these are the specification of the robot now we will talk about the Working of this robot.

Pesticide Sprinkler Robot

Working of Pesticide Sprinkler Robot

when we turn on the robot the bluetooth also turn on, and can be connect to the mobile phone. mobile phone send the commands like F,B,R,F,W,V via bluetooth to the robot bluetooth. now the robot bluetooth send this information to the arduino via Rx, Tx serial communication. So, there is in the code some switch case against the data coming from bluetooth. like if Coming F then the robot will move forward, if coming B then it will move backward. L for left , R for Right. W , V adjust the Direction of the sprinkler.

To move forward we need to rotate the motor in one direction. to move backward all the motor should rotate in opposite direction. to turn the left the right motors should move forward and left motor should move backward. to move right the left side motor should move forward and right side motor turn backward.

To control the sprinkler position we need to rotate the servo motor according to the position of the sprinklers. there we can adjust the sprinkler from 0 degree to 180 degree. there is 6 sprinkler attached to 2 different water pump. so we can control the 3 sprinkler at a time. if we need only 3 sprinkler from one side we can use them only.

When the robot walk in forward and backward only then it can spray the pesticide.

Material Required

  • Arduino Uno
  • L298N Motor Driver
  • 9G Servo motor -2
  • IR sensor -2
  • Water pump 12v
  • 12V Rechargebale Lipo Battery
  • Nozzles
  • Pipe
  • ON-OFF Switch
  • Bluetooth HC-05
  • Buzzer
  • Voltage sensor
  • Hookup wire
  • Soldering Iron
  • Soldering Wire
  • Wire cutter
Components Buy Link
Arduino UnoBuy Link
L298N Motor Driver Buy Link
9G Servo motor -2 Buy Link
IR sensor -2 Buy Link
Water pump 12v Buy Link
12V Rechargebale Lipo BatteryBuy Link
NozzlesBuy Link
PipeBuy Link
ON-OFF SwitchBuy Link
Bluetooth HC-05Buy Link
Buzzer Buy Link
Voltage SensorBuy Link
Hookup wireBuy Link
Soldering IronBuy Link
Soldering wireBuy Link
Wirer CutterBuy Link

You can also buy full toolkit – which have all the required tools – Buy Now

Also You can buy all components together – Buy Now

So, there we shared all th ecomponents required.

Pesticide Sprinkler Robot Circuit Diagram

Pesticide Sprinkler Robot circuit diagram

According to the circuit diagram make your all connection.

Make sure power is off during circuiting

don’t losse open wire

Don’t give the excess voltage

Pesticide Sprinkler Robot circuit

Code for Pesticide Sprinkler Robot

#include <SoftwareSerial.h>
#include <Servo.h>

SoftwareSerial mySerial(2, 3); // RX, TX
#define SERVO1_PIN 4 // Create Servo object to control a servo
#define SERVO2_PIN 5
// Motor control pins
#define ENA 10
#define ENB 11
#define IN1 6
#define IN2 7
#define IN3 8
#define IN4 9
Servo servo1;
Servo servo2;

int angle1 = 90; // Initial angle for Servo 1
int angle2 = 90; //

void setup()
 {

    servo1.attach(SERVO1_PIN);
    servo2.attach(SERVO2_PIN);

  

    servo1.write(angle1);
    servo2.write(angle2);
    Serial.begin(9600);
    mySerial.begin(9600);
    
    pinMode(ENA, OUTPUT);
    pinMode(ENB, OUTPUT);
    pinMode(IN1, OUTPUT);
    pinMode(IN2, OUTPUT);
    pinMode(IN3, OUTPUT);
    pinMode(IN4, OUTPUT);
     pinMode(A0, OUTPUT);
    pinMode(A1, OUTPUT);
    stopMotors(); // Ensure motors are stopped initially
    digitalWrite(A0, LOW);
    digitalWrite(A1, LOW);
    delay(200);
      pinMode(A4, INPUT);
      pinMode(A5, OUTPUT);
}

void loop() {
    digitalWrite(A5, LOW);
 float m = analogRead(A4);
   float n = (m * 5) / 200;
   Serial.println(n);
   if(n<=5)

   {

digitalWrite(A5, HIGH);
delay(200);
digitalWrite(A5, LOW);
delay(200);

   }
digitalWrite(A0, LOW);
    digitalWrite(A1, LOW);
    if (mySerial.available()) {
        char command = mySerial.read();
        Serial.println(command);
        handleCommand(command);
    }
}

void handleCommand(char command) {
    switch (command) {
        case 'F': moveForward(200); break;
        case 'B': moveBackward(200); break;
        case 'R': turnRight(200); break;
        case 'L': turnLeft(200); break;
        case 'W': moveServos(); break;
        case 'V': upmoveServos(); break;
        default: stopMotors(); break;
    }
}

void moveForward(int speed) {
    analogWrite(ENA, speed);
    analogWrite(ENB, speed);
    digitalWrite(IN1, HIGH);
    digitalWrite(IN2, LOW);
    digitalWrite(IN3, HIGH);
    digitalWrite(IN4, LOW);
    digitalWrite(A0, HIGH);
    digitalWrite(A1, HIGH);
    delay(100);
}

void moveBackward(int speed) {
    analogWrite(ENA, speed);
    analogWrite(ENB, speed);
    digitalWrite(IN1, LOW);
    digitalWrite(IN2, HIGH);
    digitalWrite(IN3, LOW);
    digitalWrite(IN4, HIGH);
    digitalWrite(A0, HIGH);
    digitalWrite(A1, HIGH);
    delay(100);
}

void turnRight(int speed) {
    analogWrite(ENA, speed);
    analogWrite(ENB, speed);
    digitalWrite(IN1, HIGH);
    digitalWrite(IN2, LOW);
    digitalWrite(IN3, LOW);
    digitalWrite(IN4, HIGH);
     digitalWrite(A0, HIGH);
    digitalWrite(A1, HIGH);

}

void turnLeft(int speed) {
    analogWrite(ENA, speed);
    analogWrite(ENB, speed);
    digitalWrite(IN1, LOW);
    digitalWrite(IN2, HIGH);
    digitalWrite(IN3, HIGH);
    digitalWrite(IN4, LOW);
    digitalWrite(A0, HIGH);
    digitalWrite(A1, HIGH);
}

void stopMotors() {
    analogWrite(ENA, 0);
    analogWrite(ENB, 0);
    digitalWrite(IN1, LOW);
    digitalWrite(IN2, LOW);
    digitalWrite(IN3, LOW);
    digitalWrite(IN4, LOW);
    digitalWrite(A0, LOW);
    digitalWrite(A1, LOW);
}

void moveServos() {
    angle1 = min(angle1 + 10, 180);
    angle2 = max(angle2 - 10, 0);
        servo1.write(angle1);
        servo2.write(angle2);
        delay(200);         
                
    }


    void upmoveServos() {
     angle1 = max(angle1 - 10, 0);
                angle2 = min(angle2 + 10, 180);
                servo1.write(angle1);
        servo2.write(angle2);
        delay(200);         
    }

Upload the above given code into the ARDUINO using the Arduino Ide software. if you have any query tou can as k us in the comment section. 
After upload the code download bt controller apk in your mobile phone. 

now go to the phone bluetooth setting and pair the device hc-05

after paired , now open the application.

Now, click on the setting button and connect with the HC-05 device,

now you can control the Pesticide Sprinkler Robot via application.

Video Sample

Advantage of Pesticide Sprinkler Robot

Reduces human exposure to harmful chemicals

💸 Saves pesticide by targeted spraying

⚙️ Can be upgraded with AI, camera, GPS

☀️ Can be solar-powered for sustainability

Frequently Ask Questions

How does the robot move?

The robot uses DC motors controlled via the L298N motor driver. It can move forward, backward, turn left or right, based on commands or obstacle sensors.


5. How is the spraying controlled?

Spraying is controlled through a relay module that switches a water/pesticide pump ON or OFF, which is connected to a nozzle for spraying.


6. Can the robot avoid obstacles?

Yes, if equipped with ultrasonic sensors, the robot can detect obstacles and take alternate routes to avoid collisions.


7. Can it be controlled remotely?

Yes, with a Bluetooth module (like HC-05) and a mobile app, you can control movement and spraying remotely.


8. Is the robot autonomous or manual?

It can be:

  • Manual – controlled via Bluetooth or remote
  • Autonomous – using pre-programmed logic, obstacle sensors, or line-following

9. What is the spraying range and duration?

  • Depends on the pump capacity and nozzle type.
  • Can be programmed to spray at intervals or when motion is detected.

10. How is the robot powered?

A 12V rechargeable battery or solar panel can be used. Ensure separate power for motors and Arduino if needed.


11. Can it spray both water and pesticides?

Yes! The system can handle water-based liquids. If spraying chemicals, use a chemical-resistant pump and pipes.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top