DIY AgriBot- the Agriculture Bot

by roboticswitharjun in Circuits > Arduino

1507 Views, 5 Favorites, 0 Comments

DIY AgriBot- the Agriculture Bot

AgriBot Project 2021 Arjun Agarwal (only visible with link- unlisted)
AGRIBOTER | Arjun Agarwal | Class 8 | 13 year old
app made by arjun agarwal.png
agribot logo.jpg

I am Arjun Agarwal, I'm in class 8, a 13 year old made a Robot which could help in agriculture. I coded it myself and made the app also myself. It can plough, dig, plant, water and fertilize the land. I could also be controlled by a phone using Bluetooth. I made the application myself and to prove my point, I even inserted my own watermark- "App made by Arjun Agarwal". To download the app- Click here.

Supplies

component price in dollars.jpeg
component price in indian rupeesjpeg.jpeg

Making the Frame

Make the Chassis using MDF wood and make holes for motor clamps and the spray tube of the pump outlet. Now attach the 2 pumps and then attach their outlets to the hole in the mdf. Attach the driving high torque motors.

Wiring

agribot1_bb.png

So wire the components according to this schematic. The motors with the L298 motor drivers are the High torque 12v motors and the motors with the relays are plougher and seed scattering system. The two pumps connected to the relay are for spraying fertilizer, water, pesticides, etc.

Wiring Simplified

Pump 1 relay → D11

Pump 2 relay → D12

Plougher motor → D8

Seed sowing motor → D9


L298 IN1_A → D2

L298 IN2_A → D3

L298 EN_A → D10


L298 IN1_B → D4

L298 IN2_B → D5

L298 EN_B → D6


HC-05 tx → D0

HC-05 rx → D1


L298 12V → 18650 Battery pack's +ve

L298 0V→ 18650 Battery pack's -ve


All Vcc/5v to 5v of Arduino

All gnd/0v to gnd of Arduino

Flow Chart

flow chart.jpg

Here is a flowchart to help understand better.

Coding!

//Code by Arjun Agarwal for instrustable stem model 2021


#include <L298NX2.h> //Including library to control motors
char val=0; //making a character val to given by store values 


const unsigned int EN_A = 10; // Enable pin to controll speed
const unsigned int IN1_A = 2; //Input pins to control direction
const unsigned int IN2_A = 3; 


const unsigned int IN1_B = 4;
const unsigned int IN2_B = 5;//Input pins to control direction
const unsigned int EN_B = 6;// Enable pin to controll speed


L298NX2 motors(EN_A, IN1_A, IN2_A, EN_B, IN1_B, IN2_B);//telling the library where the motor drver pins are conntected




void setup() {
motors.setSpeed(80); //setting the speed 
Serial.begin(9600); //Starting Serial communication 
pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
pinMode(11,OUTPUT);
pinMode(12,OUTPUT);// setting the pins as out
digitalWrite(11,1);
digitalWrite(12,1);//turing the relay's off at first
digitalWrite(8,1);
digitalWrite(9,1);
}


void loop() 
{
 if(Serial.available() > 0)  
  {val=Serial.read();      
    Serial.print(val); 
        
if(val == 'f')
{
motors.forward();// when f received go forward
}




if(val == 'b')
{
motors.backward();// when b received go backward
}




if(val == 'r')
{
 motors.backwardA();// when r received go right by one wheel forward and one backward
 motors.forwardB();
}




if(val == 'l')
{
 motors.backwardB();// when l received go left by one wheel backward and one forward
 motors.forwardA();
}




if(val == 'a')
{
motors.stop();// when a received stop motors
}




if(val == '2')
{
motors.setSpeed(50); // when 2 received set 50% speed
}




if(val == '5')
{
motors.setSpeed(65); // when 5 received set 65% speed
}




if(val == '7')
{
motors.setSpeed(75); // when 7 received set 75% speed
}




if(val == '1')
{
motors.setSpeed(100);// when 1 received set 100% speed
}






if(val == 'p')
{
digitalWrite(9,0); //plough on when reveived p
}


if(val == 'q')
{
digitalWrite(9,1); //plough off when reveived q
}




if(val == 's')
{
digitalWrite(8,0); //seed scatter on when reveived s
}


if(val == 't')
{
digitalWrite(8,1); //seed scatter off when reveived q
}




if(val == 'm')
{
digitalWrite(11,0); //pump1 on when reveived m
}


if(val == 'n')
{
digitalWrite(11,1); //pump1 off when reveived n
}




if(val == 'w')
{
digitalWrite(12,0); //pump2 on when reveived w
}


if(val == 'x')
{
digitalWrite(12,1); //pump2 off when reveived x
}


}
} 

DOWNLOAD L298NX2.h library - click here

Then import this library

DOWNLOAD CODE HERE

Upload this code to the arduino UNO and your robot is ready

Download the AgriBot App

agribot app.png
agribottttttttttttttt.png

Now you can download the agribot app made by me-

Just click here to download the apk. This is not there in the play store due to the fees we need to pay to get it in playstore.