You are on page 1of 42

Agriculture Pesticide Spraying Robot

Submitted By
Md Shakil Hossain
ID: 2022403016
Hasan Ali
ID: 2022403030
Md Hasibul Hasan Shanto
ID: 2022403040
And
Md Sohel Rana
ID: 1932203111

A report submitted to the City University, Bangladesh in partial fulfillment of the


requirements of the degree of B.Sc. in Electrical and Electronic Engineering.

DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING,


CITY UNIVERSITY, DHAKA, BANGLADESH

OCTOBER 2023

1
Agriculture Pesticide Spraying Robot

Submitted By
Md Shakil Hossain
ID: 2022403016
Hasan Ali
ID: 2022403030
Md Hasibul Hasan Shanto
ID: 2022403040
And
Md Sohel Rana
ID: 1932203111

A report submitted to the City University, Bangladesh in partial fulfillment of the


requirements of the degree of B.Sc. in Electrical and Electronic Engineering.

DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING,


CITY UNIVERSITY, DHAKA, BANGLADESH

OCTOBER 2023

ii
DECLARATION

This is to certify that the project titled “Agriculture Pesticide Spraying Robot” is
the result of our study in partial fulfillment of the B.Sc. Engineering degree under the
supervision of Md Shayan Rana, Lecturer, Department of Electrical and Electronic
Engineering (EEE), City University, Bangladesh. It is also hereby declared that this
project or any part of it has not been submitted elsewhere for the award of any degree.

Signature of Authors Signature of Supervisor

_______________________ __________________
Md Shakil Hossain Md Shayan Rana
ID: 2022403016 Lecturer
Department of Electrical and Electronic Engineering Department of Electrical and
City University, Dhaka, Bangladesh Electronic Engineering, City
University, Bangladesh

_______________________
Hasan Ali
ID: 2022403030
Department of Electrical and Electronic Engineering
City University, Dhaka, Bangladesh

_______________________
Md Hasibul Hasan Shanto
ID: 2022403040
Department of Electrical and Electronic Engineering
City University, Dhaka, Bangladesh

_______________________
Md Sohel Rana
ID: 1932203111
Department of Electrical and Electronic Engineering
City University, Dhaka, Bangladesh

ii
ACKNOWLEDGMENT

First, we would like to say heartiest thanks to almighty “ALLAH” for giving us the
strength to finish the project as a part of our partial fulfillment for the requirements
for the Degree of B. Sc. in Electrical and Electronic Engineering. We would like to
express our gratitude and appreciation to our supervisor, Md Shayan Rana, Lecturer,
Department of Electrical and Electronic Engineering of City University for the
guidance and enthusiasm extended throughout the progress of this work. We would
like to say special thanks to our Head of the department Dr. Engr. Fouzia Ferdous,
Associate Professor, Department of Electrical and Electronic Engineering of City
University for his precious advises, fruitful suggestions and coordination. We would
like to express our heartiest gratitude to Prof. Dr. Engr. Md. Huamaun Kabir, Dean,
Faculty of Science & Engineering, City University for allowing us to do the projects.
We are also grateful to all the faculties of the Department of Electrical and
Electronic Engineering of City University, Bangladesh for giving us the opportunity
to complete the work and necessary support during the period. This thesis work
would not have been possible without the encouragement, logical help and advice
from our friends. We are grateful to them. Finally, we must acknowledge with due
respect the constant support and patience of our parents.

ABSTRACT

The management of pest insects is the critical component of agricultural production


especially in the fertigation based farm. Although the fertigation farm in Malaysia has
advantages in the fertilization and irrigation management system, it still lacking with
the pest management system. Since almost the insect and pests are living under the
crop’s leaves, it is difficult and hard labor work to spray under the leaves of the crop.
Almost agricultural plants are damaged, weakened, or killed by insect pests
iii
especially. These results in reduced yields, lowered quality, and damaged plants or
plant products that cannot be sold. Even after harvest, insects continue their damage
in stored or processed products. Therefore, the aim of this study is to design and
develop an autonomous pesticide sprayer for the chili fertigation system. Then, this
study intends to implement a flexible sprayer arm to spray the pesticide under the
crop’s leaves, respectively. This study involves the development of unmanned
pesticide sprayer that can be mobilized autonomously. It is because the pesticide is a
hazardous component that can be affected human health in the future if it exposed
during manual spraying method especially in a closed area such as in the greenhouse.
The flexible sprayer boom also can be flexibly controlled in the greenhouse and
outdoor environment such as open space farms. It is expected to have a successful
pesticide management system in the fertigation based farm by using the autonomous
pesticide sprayer robot. Besides, the proposed autonomous pesticide sprayer also can
be used for various types of crops such as rock melon, tomato, papaya, pineapples,
vegetables and etc.A pesticide spraying ramble is the device for exact pesticide
spraying equipped for managing nebulous shapes and variable article targets. The
gadget incorporates a solitary splash siphon engine with a consequently separate
flexible spraying utilizing ultrasonic sensors, all mounted on a pan tilt unit. The site-
explicit spraying gadget plans to splash explicit targets while diminishing the
utilization of pesticides. The proposed framework includes the advancement of an
article explicit sprayer arrangement. The created gadget intends to diminish pesticide
application by spraying singular targets explicitly by setting the item separation of the
spraying as per the objective. The spraying device is equipped for decreasing the
measure of pesticides connected. Real reserve funds rely upon the spraying lengths,
target size, and appropriation. We trust that such a device can be utilized in present
day farming and can be joined with an automated sprayer exploring independently
along yield fields. Such a gadget will add to decreased pesticide application.

TABLE OF CONTENTS

Name of The Contents Page No


Declaration ii
Acknowledgement iii
Abstract iv
Table of Contents v

iv
List of Figure vii
List of Table viii
Abbreviations ix

Chapter 1: Introduction
1.1 Introduction 1
1.2 Objective of the Project 2
1.3 Motivation 2
1.4 Proposed System 3
1.5 Organization of the Project Book 4

Chapter 2: Literature Review


2.1 Literature Review 5
2.2 History 7

Chapter 3: Experimental Design


3.1 Introduction 8
3.1.1 Required Components 8
3.2 L293D Motor Driver 8
3.2.1 Pins of L293D Motor Driver 9
3.3 Water Pump 9
3.4 DC Gear Motor 10
3.5 Jumper Wire 10
3.6 DC Power Supply 11
3.7 Servo Motor 11
3.8 NodeMCU 12
3.8.1 Pins of NodeMCU 13
3.9 IP Camera 14
3.10 Arduino IDE Software 15
3.11 Spraying Nozzle 16
3.12 Circuit Diagram 16
3.12.1 Block Diagram 17
3.12.2 Flow Chart 17
3.13 Required software and their set up process 18

v
3.14 Software 18
3.14.1 Arduino IDE Installation 18
3.14.2 Installation and setup of the Arduino software 18
3.15 Programming 19
3.15.1 Arduino program development 19
3.16 Blynk IOT App 20

Chapter 4: Result and Discussion


4.1 Introduction 21
4.2 Results 22
4.3 Advantages 23
4.4 Limitations 23
4.5 Cost Analysis 23
4.6 Project Outlook 24
4.4 Discussion 24

Chapter 5: Conclusion and Recommendation


5.1 Conclusion 26
5.2 Future Recommendation 26

References 27
Appendix 29

LIST OF FIGURE

Fig. No. Figure Contain Page No


Fig. 3.1 Motor Driver 8
Fig.3.2 Water Pump 10
Fig.3.3 DC Gear Motor 10
Fig.3.4 Jumper Wire 11
Fig.3.5 Battery 11
Fig.3.6 Servo Motor 12

vi
Fig.3.7 NodeMCU 13
Fig.3.8 IP Camera 14
Fig.3.9 Arduino IDE 15
Fig.3.10 Spraying Nozzle 16
Fig.3.11 Circuit Diagram 16
Fig.3.12 Block Diagram 17
Fig.3.13 Flow Chart 17
Fig.3.14 Program installation Process-1 18
Fig.3.15 Program installation Process-2 19
Fig.3.16 Flowchart of the compiling process 19
Fig.3.17 Blynk IOT App 20
Fig.4.1 Controlling View of Robot, Camera 22
Fig.4.2 Project Outlook 24

LIST OF TABLE

Table No. Table of Contain Page No


Table 3.1 Pins of L298N Motor Driver 9
Table 3.2 Pins of NodeMCU 13
Table 4.1 Cost Analysis of this project 23

vii
ABBREVIATIONS

SL No Short Name Abbreviation


1 IoT Internet of Thing
2 MCU Microcontroller Unit
3 I2C Inter Integrated Circuit
4 UART Universal Asynchronies Receiver Transmitter

viii
CHAPTER 1
INTRODUCTION

1.1 Introduction
Farming is Bangladesh’s cornerstone. In our nation, approximately forty three million
hector of soil is irrigated crop region. The Economic Survey says that there is a need
to improve farm mechanization in the nation. Increasing Pest infestation productivity
control plays a significant role. The farmers are facing significant issues in managing
pest infestation. Pests are undesirable insects or germs that interfere with human
activity and can bite, ruin food plants or make life harder for farmers. A key point in
crop management is early detection and avoidance of pests. Effective control of pests
needs some understanding of pests and their habitats. Farmers are currently spraying
pesticides around their fields. Farming is Bangladesh's cornerstone. In our nation,
approximately 14.3 million hector of soil is irrigated crop region. The Economic
Survey says that there is a need to improve farm mechanization in the nation.
Increasing Pest infestation productivity control plays a significant role. The farmers
are facing significant issues in managing pest infestation. Pests are undesirable insects
or germs that interfere with human activity and can bite, ruin food plants or make life
harder for farmers. A key point in crop management is early detection and avoidance
of pests. Effective control of pests needs some understanding of pests and their
habitats. Farmers are currently spraying pesticides around their fields. The main
disadvantages with regard to this method are: the pesticide may come into contact
with the farmer during spraying, which may trigger skin cancer and asthma illnesses.
Increased pesticide spraying can impact consumer health as it enters the food chain.
Pesticides are also sometimes sprayed on non-affected crops resulting in the same
waste. We have therefore created an automated robotic system that can spray
pesticides in restricted quantities only if pests are discovered to solve the above-
mentioned problems. Not only does this save the farmer from life-threatening
illnesses and physical issues, but it also saves his cash because of restricted pesticide
use. That is why it helps farmers, in turn the nation, to develop economically. Using
this form of robots Time consumption is decreased in spraying the pesticide liquid
and it will also assist farmers to decrease the workload and in any season and

1
conditions to do job. In Bangladesh, farming is performed using worldly methods.
The absence of adequate understanding for most of our farmers makes it even more
erratic. The projections are based on a big part of farming and agricultural Operations,
which sometimes fail. Farmers must bear enormous losses and sometimes the source
of suicide. Since we know the advantages of proper soil moisture and its consistency,
air quality and irrigation, these criteria cannot be ignored in crop growth. Therefore,
we produced a fresh concept of using IoT to monitor crops and to use intelligent
farming. Because of its reliability and remote monitoring, we think our idea will be a
benchmark in the agribusiness. Our concept is digitalization of agriculture and
farming operations so farmers can track crop requirements and predict their
development correctly. Surely this idea will speed up their company to achieve new
heights and be more lucrative as well. Implementing our project relies mainly on
farmer’s consciousness, which we think will be readily generated owing to its
countless benefits.

1.2 Objective of this Project


 To spray pesticide by own
 To control the robot using mobile from long distance
 To watch the view in real life using camera and mobile.
 To control spray nozzle and movement

1.3 Motivation
With flourishing technology that is introduced in this twenty first century, there is
numerous types of robots been used in agricultural activity starting from the
cultivation process to the production process. The autonomous robot had been
introduced in various application such is in underwater, rescue, line following robot
based on metal detection. In agriculture field, the usage of robotics in agriculture
operation able to help to increase the production process and improve efficiency. One
of the types of the robot used in agriculture is for the purpose of pesticide spraying
with the ability to navigate in the farm, recognize the target and regulate the spraying
mechanism. The use of autonomous robot pesticide sprayer as the substitution of the
worker who used conventional pesticide sprayer can be applicable. Besides, the
demand for the agriculture robot also stimulates the consciousness of how important

2
its role in the current and future generations. The survey conducted shows that the
demand for robots and drones in agriculture will be expected to be rose from 2018 to
2038. Hence, the usage of the autonomous robot is assumed to rise thus replacing the
current labor worker. This granular 20 years market forecast covers all the aspect of
the agricultural robots and drones for 16 market categories with the expectation by the
end of 2038, the market of the robots and drones in these categories is predicted will
close to 35 billion with the viable technology and ongoing market demand by
considering its technology and application . Nevertheless, the common problem with
an autonomous robot use in agricultural activity is the navigation method used to able
the robot fully-operated with decision making capability. In order to navigate through
all the field, there are some research has been done. It can be done through
infrastructure ready or to be without infrastructure. Some research on RFID based
navigation are conducted to be implemented as navigation tools. As artificial
intelligence (AI) starts to emerge, the current robot should be able to navigate the next
movement by the adaptation of the surrounding environment and decide which path it
will take. The typical method used in the detection is based on the targeted object
orientation or repelled signal emits from the sensor itself then calculates the distance
in between it. Other than that, there is also the robot that uses the vision observation
then accumulates all the acquired data to generate the data fusion that enables the
robot to navigate itself through the farm.

1.4 Proposed System


It has induced plant diseases a huge post-effect scenario as it is possible. The quality
and quantity of agricultural products decreases significantly. Early detection of pests
is a major problem for planting. First phase includes the crop being carefully and
periodically monitored. The affected plants are then identified and photographs are
obtained for the affected crop component using scanners or cameras. Then these
objects are pre-processed, transformed and grouped. Then these images are sent to the
processor as input and images are compared by the processor. If the picture is
contaminated, an automatic sprayer of pesticides is used to spray.

3
1.5 Organization of the Project Book
This book consists of five chapters.

Chapter 1: Gives a brief discussion of the project introduction, project objectives,


project motivation and history.
Chapter 2: Focuses on system design and theoretical background how the project is
designed. How the system works. All the system is legit or not.

Chapter 3: Focuses on hardware we used, their theoretical background and


applications. Each hardware’s detail. How the hardware works. How the hardware can
be implementation.

Chapter 4: Focuses on experimental result. How we gave our best result from our
project that described in this chapter. Also we showed all the results visual here.

Chapter 5: Concludes overall the project. And advantages of this project. How this
project will give its best in our daily work.

4
CHAPTER 2
LITERATURE REVIEW

2.1 Literature Review


Agriculture is a profession of farmers, which consists of many tedious processes and
practices, one of which is the sprinkling of insecticides in the farm fields. A different
farms field requires extensive spraying every 3-4 days in the summer and every 5-6
days in the rainy season. Already methods in use, we know are like: a person carrying
a sprayer and manually actuating a to generate pressure and pump the pesticide
through a tube or a mobile vehicle carrying an inbuilt compressor and sprayer unit
which has to be including manually driven by a human operator. These methods are
working under fuel consuming. Another major disadvantage in human operated
systems is that the operator is exposed to the harmful chemicals while spraying. Long
term exposure, can be extremely detrimental to the operator’s health. In this paper is
presented, available alternate to these methods. The Automatic sprayer is a four
wheeled vehicle which spray pesticide in any given fields with almost zero human
assistance. The vehicle is powered using an onboard solar powered battery which
brings down the running cost. The control of the vehicle is achieved using an inbuilt
micro controller unit which is programmed to respond to the Bluetooth device [3].

This paper describes the concept of an autonomous robot for harvesting cucumbers in
green houses. A description is given of the working environment of the robot and the
logistics of harvesting. It is stated that for a 2 ha Dutch nursery, 4 harvesting robots
and one docking station are needed during the peak season. Based on these
preliminaries, the design specifications of the harvest robot are defined. The main
requirement is that a single harvest operation may take at most10s. Then, the paper
focuses on the individual hardware and software components of the robot. These
include, the autonomous vehicle, the manipulator, the end-effector, the two computer
vision systems for detection and 3D imaging of the fruit and the environment and,
finally, a control scheme that generates collision-free motions for the manipulator
during harvesting [5]. The manipulator has seven degrees-of-freedom (DOF). This is
sufficient for the harvesting task. The end-effector is designed such that it handles the

5
soft fruit without loss of quality. The thermal cutting device included in the end-
effector prevents the spreading of viruses through the greenhouse. The computer
vision system is able to detect more than 95% of the cucumbers in a greenhouse.
Using geometric models the ripeness of the cucumbers is determined. A motion
planner based on the A search algorithm assures collision-free eye-hand co-
ordination. In autumn 2001 system integration took place and the harvesting robot
was tested in a greenhouse. With a success rate of 80%, field tests confirmed the
ability of the robot to pick cucumbers without human interference [9].

Oilseed rape OSR, Brassica napus L. is one of the most important oleaginous crops in
the world [1]. In the last 20 years, the increasing demand for biofuels has made this
crop profitable for farmers [2]. At the same time, the cultivation of OSR can be a
solution for areas with pollution of heavy metals [8]. Romania is in fourth place on
the OSR cultivated area list from the EU27 [9]. In this country, the area cultivated
with OSR increased after 2010, arriving at peaks of 455.95 thousand ha in 2016 and
632.68 in 2017, while in the last few years, it ranged from 342.60 to 445.90 thousand
ha [2]. From this total area with OSR, only a small size is cultivated in an ecological
system, but the areas increased from 498 ha in 2017 to 5798 ha in 2019 [3].

The average OSR production in Romania ranged from 2124 to 2835 kg/ha, with a
3084 kg/ha peak in 2021 [10]. Many hazards often limit the yield potential of the OSR
crop across the world [4]. In Romania, especially in the southern regions, drought
from the autumn can have negative consequences for OSR plants’ emergence and
development in the early vegetation stages [6]. Frost during the winter is another
important hazard for OSR production in temperate climate regions, including
Romania [9]. However, in the last ten years, because of climate changes, frost
frequency during the cold season has decreased [3]. In recent years, invasive weed
species have threatened OSR crops in Southeast Romania [4]. Plant diseases such as
phoma stem canker or Sclerotinia are another European OSR production risk. Pests
are a main limiting factor for OSR production worldwide. The diamondback moth
Plutellaxylostella (Lepidoptera: Plutellidae) is the major pest of this crop, with a
global distribution on all continents. The moths have an excellent capacity for
migration; they can fly 400–500 km in one night and up to 1500 km in a few night. A
recent study from China shows that moths can migrate more than 2000 km. DBM has
6
a limited capacity for overwintering, preferring tropical and temperate Mediterranean
climates. The DBM high migration capacity is because of moths’ ability to use warm
air currents and low jet streams. During the summer, moths can migrate to areas with
a temperate climate, such as Canada or the UK, or even cooler climates, such as the
Svalbard Archipelago. This is why DBM is considered the most widely distributed
species of the Lepidoptera order. At the same time, it is regarded as one of the most
distributed pests of cruciferous plants across the globe [5].

2.2 History
The field of robotics has its origins in science fiction. The term robot was derived
from the English translation of a fantasy play written in Czechoslovakia around1920.
It took another 40 years before the modern technology of industrial robotics began.
Early robots were confined to industrial applications, doing repetitive tasks like
loading-unloading machines, welding, spray painting, etc. In the last two decades,
robots have stepped out of industrial applications and ventured right in to our homes
as pets, service robots, helpers, rehabilitation devises, etc. Today, we have both hard
(physical) robots like manipulator arms, mobile robots, etc., and also soft (simulated)
robots like virtual characters, virtual reality, etc. sometimes simply called bots In this
chapter, we will survey some of the science fiction stories about robots and trace the
historical development of robotics technology. Let us begin our chapter by defining
the term robotics and establishing its place in relation to other types of industrial
automation. Automation and robotics are two closely related technologies. In an
industrial context, we can define automation as a technology that is concerned with
the use of mechanical, electronic and computer-based systems in the operation and
control of production. Examples of this technology include transfer lines, mechanized
assembly machines, feedback control systems (applied to industrial processes),
numerically controlled machine tools and robots. Accordingly, robotics is a form of
industrial automation.

7
CHAPTER 3

EXPERIMENTAL DESIGN

3.1 Introduction
In this chapter we are going to describe all the hardware that we used for our project
also describing all the circuit diagram block diagram software etc.

3.1.1 Required Components


1. Battery
2. DC Motor
3. Motor Driver
4. Servo Motor
5. Water Pump
6. Spraying Nozzle
7. NodeMCU
8. IP Camera

3.2 L298 Motor Driver


L298N Motor Driver Module is a high power motor driver module for driving DC and
Stepper Motors. This module consists of an L298 motor driver IC and a 78M05 5V
regulator. L298N Module can control up to 4 DC motors, or 2 DC motors with
directional and speed control.

Fig.3.1: Motor Driver

8
3.2.1 Pinsof L298 Motor Driver IC

Table 3.1: Pins of L298N Motor Driver

SL NO PIN NAME DESCRIPTION

1 IN1 & IN2 Motor A input pins. Used to control the


spinning direction of Motor A

2 IN3 & IN4 Motor B input pins. Used to control the


spinning direction of Motor B

3 ENA Enables PWM signal for Motor A

4 ENB Enables PWM signal for Motor B

5 OUT1 & OUT2 Output pins of Motor A

6 OUT3 & OUT4 Output pins of Motor B

7 12V 12V input from DC power Source

8 5V Supplies power for the switching logic


circuitry inside L298N IC

9 GND Ground pin

3.3 Water Pump


This is a low cost mini submersible type water pump that works on 12V DC. It is
extremely simple and easy to use. Just immerse the pump in water, connect a suitable
pipe to the outlet and power the motor with 12V to start pumping water. Great for

9
building science projects, fire-extinguishers, firefighting robots, fountains, waterfalls,
plant watering systems etc .

Fig.3.2: Water Pump

3.4 DC Gear Motor


A Direct Current (DC) motor is a rotating electrical device that converts direct
current, of electrical energy, into Electrical and Electronic energy. An Inductor (coil)
inside the DC motor produces a magnetic field that creates rotary motion as DC
voltage is applied to its terminal.

Fig.3.3: DC Gear Motor

3.5 Jumper Wire


A jump wire (also known as jumper wire, or jumper) is an electrical wire, or group of
them in a cable, with a connector or pin at each end (or sometimes without them
simply "tinned"), which is normally used to interconnect the Components of a
breadboard or other prototype or test circuit, internally or with other.

10
Fig.3.4: Jumper wires

3.6 12V DC Power Supply


We need two power supply for our system. One for full device and one 12 volts DC
for our pump. As 12 volts power supply we use three4V 5A battery which is
connected in series.

Fig.3.5: Battery

3.7 Servo Motor


A servo motor is a self-contained electrical device that rotate parts of a machine with
high efficiency and with great precision. The output shaft of this motor can be moved
to a particular angle, position and velocity that a regular motor does not have. The
Servo Motor utilizes a regular motor and couples it with a sensor for positional
feedback. The controller is the most important part of the Servo Motor designed and
used specifically for this purpose. The servo motor is a closed-loop mechanism that
incorporates positional feedback in order to control the rotational or linear speed and

11
position. The motor is controlled with an electric signal, either analog or digital,
which determines the amount of movement which represents the final command
position for the shaft. A type of encoder serves as a sensor providing speed and
position feedback. This circuitry is built right inside the motor housing which usually
is fitted with gear system.

Fig.3.6: Servo Motor

3.8 NodeMCU
NodeMCU is an open source firmware for which open source prototyping board
designs are available. The name "NodeMCU" combines "node" and "MCU" (micro-
controller unit). Strictly speaking, the term "NodeMCU" refers to the firmware rather
than the associated development kits. Both the firmware and prototyping board
designs are open source. The firmware uses the Lua scripting language. The firmware
is based on the eLua project, and built on the Espressif Non-OS SDK for ESP8266. It
uses many open source projects, such as lua-cjson and SPIFFS. Due to resource
constraints, users need to select the modules relevant for their project and build a
firmware tailored to their needs. Support for the 32-bit ESP32 has also been
implemented. The prototyping hardware typically used is a circuit board functioning
as a dual in-line package (DIP) which integrates a USB controller with a smaller
surface-mounted board containing the MCU and antenna. The choice of the DIP
format allows for easy prototyping on breadboards. The design was initially based on
the ESP-12 module of the ESP8266, which is a Wi-Fi SoC integrated with a
TensilicaXtensa LX106 core, widely used in IoT applications

12
Fig.3.7: NodeMCU

3.8.1 Pins of NodeMCU

Table 3.2: Pins of NodeMCU

PIN CATEGORY NAME DESCRIPTION

Power USB, Micro-USB: NodeMCU can be powered


through the USB port
3.3V, 3.3V: Regulated 3.3V can be supplied to
GND, this pin to power the board
GND: Ground pins
Vin Vin: External Power Supply

Control Pins EN, RST The pin and the button resets the
microcontroller

Analog Pin A0 Used to measure analog voltage in the


range of 0-3.3V

GPIO Pins GPIO1 to NodeMCU has 16 general purpose input-


GPIO16 output pins on its board

SPI Pins SD1, NodeMCU has four pins available for


CMD, SPI communication.
D0, CLK

13
UART Pins TXD0, NodeMCU has two UART interfaces,
RXD0, UART0 (RXD0 & TXD0) and UART1
TXD2, (RXD1 & TXD1). UART1 is used to
RXD2 upload the firmware/program.

I2C Pins NodeMCU has I2C functionality support


but due to the internal functionality of
these pins, you have to find which pin is
I2C.

3.9 IP Camera
An Internet Protocol camera, or IP camera, is a type of digital video camera that
receives control data and sends image data via an IP network. They are commonly
used for surveillance, but, unlike analog closed-circuit television (CCTV) cameras,
they require no local recording device, only a local area network. Most IP cameras are
webcams, but the term IP camera or netcam usually applies only to those that can be
directly accessed over a network connection. Others are able to operate in a
decentralized manner with no NVR needed, as the camera is able to record directly to
any local or remote storage media. The first IP Camera was invented by Axis
Communications [1] in 1996.

Fig.3.8: IP Camera

14
3.10 Arduino IDE Software
To make this project we used 2 software. One is programming code editor software
which name is Arduino Ide. The one is an Android app which is for controlling our
appliances For coding for Node MCU we need an IDE which is compatible to our
NodeMCU. The Arduino IDE is one of the most easiest and compatible IDE for Node
MCU. So we choice Arduino IDE for our coding. The Arduino Integrated
Development Environment (IDE) is a cross-platform application (for Windows,
macOS, Linux) that is written in functions from C and C++.It is used to write and
upload programs to Arduino compatible boards, but also, with the help of third-party
cores, other vendor development boards. The Arduino IDE supports the languages C
and C++ using special rules of code structuring. The Arduino IDE supplies a software
library from the Wiring project, which provides many common input and output
procedures. User-written code only requires two basic functions, for starting the
sketch and the main program loop, that are compiled and linked with a program stub
main() into an executable cyclic executive program with the GNU toolchain, also
included with the IDE distribution. The Arduino IDE employs the program avrdude to
convert the executable code into a text file in hexadecimal encoding that is loaded into
the Arduino board by a loader program in the board's firmware. Written in C, C++
Operating system Windows, macOS, Linux Platform IA-32, x86-64, ARM
TypeIntegrated development environment License. Other vendors started to
implement custom open source compilers and tools (cores) that can build and upload
sketches to other microcontrollers that are not supported by Arduino's official line of
microcontrollers.

Fig.3.9: Arduino IDE

15
3.11 Spraying Nozzle
A spray nozzle is a precision device that facilitates dispersion of liquid into a spray.
Nozzles are used for three purposes: to distribute a liquid over an area, to increase
liquid surface area, and create impact force on a solid surface. A wide variety of spray
nozzle applications use a number of spray characteristics to describe the spray. Spray
nozzles can be categorized based on the energy input used to cause atomization, the
breakup of the fluid into drops. Spray nozzles can have one or more outlets; a multiple
outlet nozzle is known as a compound nozzle. Multiple outlets on nozzles are present
on spray balls, which have been used in the brewing industry for many years for
cleaning casks and kegs. Spray nozzles range from heavy duty industrial uses to light
duty spray cans or spray bottles.

Fig.3.10: Spraying Nozzle

3.12 Circuit Diagram


Hardware connection is same as like as the circuit diagram.1 st we program the
Nodemcu then we connect all the equipment as per our circuit diagram.

Fig. 3.11: Circuit Diagram


16
Here we program our nodemcu then we connect a motor driver to our nodemcu’s D0-
D5 pin. Then we connect two servo motor to nodemcu’s D6 and D7 pin and we
connect a relay to D8 pin. Also we added an IP camera to our system. At last we
connect four dc gear motor to our motor driver’s output pin.

3.12.1 Block Diagram

Fig. 3.12: Block Diagram

Our mobile app is connected to the microcontroller using internet and server as like
our IP camera. A motor driver is connected to nodemcu and four dc gear motor is
connected to motor driver. A relay is for water pump control. And two servo motors
are for control the spraying nozzle. One for up and down and another one is for left
and right.

3.12.2 Flow Chart

Fig. 3.13: Flow Chart

17
3.13 Required Software and Their Setup Process
To complete our project, we need many types of software, most important of them are
following

1. Arduino IDE-1.8.9
2. Blynk

3.14 Software
The software that is used to program the microcontroller is open-source-software and
can be downloaded for free on www.arduino.cc. With this “Arduino software” we can
write little programs with the microcontroller. These programs are called “Sketch”.In
the end the sketches are transferred to the microcontroller by USB cable. More on that
later on the subject “programming”.

3.14.1Arduino IDE Installation


Now one after another the Arduino software and the USB driver for the board have to
be installed.

3.14.2 Installation and setup of the Arduino software


1. We have downloaded the Arduino software from www.arduino.cc and installed it
on the computer (This was NOT connected to the PC). After that we opened the
software file and installed the program named arduino.exe.
Two set ups on the program are important and should be considered.
The board that we want to connect has to be selected on the arduino software. The
“Arduino Uno” is here known as “Arduino / GenuinoUno ,Nano, Lilipo or any name
can be”.

Fig. 3.14: Program installation process -1

18
b) We have to choose the right “Serial-Port”, to let the Computer know to which port
the board has been connected. That is only possible if the USB driver has been
installed correctly. It can be checked this way:
At the moment the Arduino wasn’t connected to the PC. If we now choose “Port”,
under the field “Tool”, we will already see one or more ports here (COM1/ COM2/
COM3…).

Fig. 3.15: Program installation process -2

3.15 Programming
The development cycle is divided into 4 phases:

Edit Compile Upload Run

Fig. 3.16: Flowchart of the compiling process

Compile: Compile means to translate the sketch into machine language, also known
as object.
Code Run: Arduino sketch is executed as soon as terminates the step of uploading on
the board.

3.15.1 Arduino Program Development

• Based on C++ without 80% of the instructions.

19
• A handful of new commands.
• Programs are called 'sketches'.
• Sketches need two functions:
• void setup ( )
• Voidloop ( )
• Setup ( ) runs first and once.

3.16 Blynk IOT App


Blynk is an IoT platform for iOS or Android smartphones that is used to control
Arduino, Raspberry Pi and NodeMCU via the Internet. This application is used to
create a graphical interface or human machine interface (HMI) by compiling and
providing the appropriate address on the available widgets.Blynk is a comprehensive
software suite that enables the prototyping, deployment, and remote management of
connected electronic devices at any scale.

Fig. 3.17: Blynk IOT App

20
CHAPTER 4
RESULTS AND DISCUSSION

4.1 Introduction
The function of a greenhouse is to create the optimal growing conditions for the full
life of the plants [1]. Achievement of the desired conditions often requires the use of
pesticides, fungicides, high temperatures and increased carbon dioxide and humidity
levels [2]. Prolonged exposure of greenhouse workers to these conditions leads to an
uncomfortable and hazardous work environment [3, 4], contravening modern
Australian occupational, health and safety principles. Often, there are substantial risks
involved in greenhouse work due to the hazardous environment or dangerous
operations. Speciflc examples of these include: repetitive strain injury, toxic chemical
exposure, extreme heat exposure, extreme humidity (heatstroke) [3], and working at
heights. Automating tasks within the greenhouse will enable the avoidance of
unwanted or hazardous human exposure whilst potentially leading to an increase in
overall e–ciency and productivity. The main application of robots in the commercial
sector has been concerned with the substitution of manual human labour by robots or
mechanised systems to make the work more time e–cient, accurate, uniform and less
costly [5]-[10]. One may argue the social implications of such developments, for
example, the efiects on employment through loss of blue collar jobs to the more e–
cient robotic counterpart; there are also ethical considerations that may be argued.
Whilst there may well be some validity to the argument in some cases, this current
project is unique in the number of stakeholders that are affected in a positive sense.
The farmers beneflts are found in more e–cient maintenance of the crops and either
less work for themselves or a decreased need for the employment of others (arguably,
an expensive process). Increased demand on growers has begun to be met with
increased speciflc automation in many flelds, as producers believe that automation is
a viable and sometimes necessary [7] method to ensure maximum proflts with
minimum costs [6]. Indeed Hopkins [6] argues that automation enables the expansion
of a greenhouse without having to invest more flnancial resources on labour.
Merchants may beneflt from increased sales due to a lower cost prod- 1uct; the
consumers will beneflt, likewise, from a lower cost product of comparable quality.

21
The stakeholders that beneflt most, at least from an ethical or social perspective,
however, are the greenhouse workers. This paper presents the design and construction
of an autonomous robot that seeks to address some of the human health concerns
associated with greenhouses. This robot is designed as a base for developing systems
to enable the automation of greenhouse processes such as the spraying of pesticides,
picking of fruit and the caring for diseased plants.

4.2 Results
The final result of our project is it able to spray the pesticide. It can runnable using
mobile app. It has built in camera for observing.
Our first result shows the live streaming from our system. And it is able to rotate the
camera. Another result shows us the dialog box of our robot’s controlling system
where we are able to control the robot’s movement using joystick button also able to
control speed of robot and nozzle up and down and left / right through slider button.
And a push button for pump operate.

Fig. 4.1: Controlling view of robot camera and pump.

22
4.3 Advantages
 Workload on farmers minimized by using these type of agrobots, and also
reduce the chance of danger of breathing problems.
 Farmers don’t have to go in the field because robots do their work properly
and effectively.
 Time consumed by robots for spraying liquids is less than mankind, and they
can improve the working efficiency.
 Live video streaming.

4.4 Limitations
 Internet speed is a problem for our project.
 As we used a free server so sometimes it won’t be able to send the data
properly.
 Should be concern always in battery.
 For this robot some people will lose their job.

4.5 Cost Analysis


Table 4.1: Cost Analysis

SL No EQUIPMENT PRICE

1 L298 Motor Driver 300

2 Gear Motor *4 with wheel 1000

3 NodeMCU 600

4 Power Supply 1500

5 Water Pump 750

6 Spraying Nozzle 800

7 PVC Board 400

8 Servo Motor 1000

9 Others 1000

Total 7350 Taka

23
4.6 Project Outlook
Here is our projects outlook. This is how look like our project. The hardware project
has performed the basic operations of robotic arm as expected. The main problem to
overcome in this project was to interface the Nodemcu board with the android device
via Wifi and internet.

Fig. 4.2: Project Outlook

4.7 Discussion
The proposed system is a bit of an advancing exploration expected to override the
standard spraying procedures with a cultivating Electrical and Electronic sprayer. The

24
robot investigates self-ruling along the vineyard pushes, and performs express
spraying toward distinguished targets. For site-unequivocal spraying the goal ought to
at first be perceived and after that showered. This examination revolves around the
spraying technique so as to thoroughly cover the goal while restricting the proportion
of material sprinkled. Ceaseless research focused on the target area and on the
progression of a totally operational cultivating spraying robot. The width of the
sprayer is set by the shape and size of the target like the starting late proposed patent
that prescribes a variable gush hole. In any case, in existing technique was organized,
produced, and executed in evident conditions and included exploratory frameworks
and investigations for evaluation and endorsement of the spraying contraption for
agrarian amorphous shapes. The assessed spraying strategies were as per the
following, 1. Fixed Nozzle Spacing: In this methodology, a great deal of spouts are
created vertically on a showering area with destined isolating. The gush position and
the sprinkle estimation are set going before the showering methodology paying little
regard to the target's shape and size. While the sprayer vehicle comes the collect push,
the spouts sprinkle synchronously (using an electric valve) in order to cover the goal.
2. Optimal Spray Coverage: In this procedure, the splashing is performed using a lone
showering gush associated with the dish tilt unit (PTU) and is prepared for organizing
the gush. The shower width of the gush is set before the splashing system. Since the
sprinkle separate crosswise over is fixed, every target will require a couple of showers
for full incorporation.

25
CHAPTER 5
CONCLUSION AND RECOMMENDATIONS

5.1 Conclusion
The robot for agricultural purpose a pesticide spray robot is a concept for the near the
performance and cost of the product once optimized, will prove to be work through in
the agricultural spraying operations. Workload on the farmers is decreased and health
problems also. Successful in constructing robot which can be travelled on rough
surfaces also and weighing enough load of compressor and other equipment.
Successful in developing a robot whose construction is enough to withstand the
challenges of the field. Sure about that once this concept will be presented in a
manner suitable to Bangladesh market, it will definitely help in bringing down the
15% molality rate found in the Bangladeshi farmers associated with the agricultural
spraying operation.

5.2 Future Recommendations


It can be improved by voice controlled so anyone can use. Also enhance the robot to
do authentication process. Using GPS for tracking the location. Adding AI to the
system so the system work autonomously.

26
REFERENCES

[1] S. I. Cho and N. H. Ki, “Autonomous speed sprayer guidance using machine vision
and fuzzy logic,” Trans. Amer. Soc. Agricult. Eng., vol. 42, no. 4, pp. 1137–1144,
1999.
[2] S. Dasgupta, C. Meisner, D. Wheeler, K. Xuyen, and N. T. Lam, “Pesticide poisoning
of farm workers— Implications of blood test results from Vietnam,” Int. J. Hygiene
Environ. Health, vol. 210, no. 2, pp. 121–132, 2007.
[3] W. J. Rogan and A. Chen, “Health risks and benefits of bis(4-chlorophenyl)-1,1,1-
trichloroethane (DDT),” Lancet, vol. 366, no. 9787, pp. 763–773, 2005.
[4] D. Pimentel and H. Lehman, The Pesticide Question: Environment, Economics, and
Ethics. London,International Journal of Future Generation Communication and
Networking Vol. 13, No. 1, (2020), pp. 150-160 159 ISSN: 2233-7857 IJFGCN
Copyright ⓒ 2020 SERSC U.K.: Chapman & Hall, 1993.
[5] J. Reus et al., “Comparison and evaluation of eight pesticide environmental risk
indicators developed in Europe and recommendations for future use,” Agricult.
Ecosyst. Environ., vol. 90, no. 2, pp. 177–187, 2002.
[6] S. H. Swan et al., “Semen quality in relation to biomarkers of pesticide exposure,”
Environ. Health Perspect., vol. 111, no. 12, pp. 1478–1484, 2003.
[7] J. Canny, “A computational approach to edge detection,” IEEE Trans. Pattern Anal.
Mach. Intell., vol. PAMI-8, no. 6, pp. 679–698, Nov. 1986.
[8] M. Sharifi, M. Fathy, and M. T. Mahmoudi, “A classified and comparative study of
edge detection algorithms,” in Proc. Int. Conf. Inf. Technol. Coding Comput., Apr.
2002, pp. 117–120.
[9] M. C. Shin, D. Goldgof, and K. W. Bowyer, “An objective comparison methodology
of edge detection algorithms using a structure from motion task,” in Proc. Conf. IEEE
Comput. Vis. Pattern Recognit., Jun. 1998, pp. 190–195.
[10] L. Breiman, J. Friedman, C. J. Stone, and R. A. Olshen, Classification and Regression
Trees. Boca Raton, FL, USA: CRC Press, 1984.
[11] K. Kapach, E. Barnea, R. Mairon, Y. Edan, and O. Ben-Shahar, “Computer vision for
fruit harvesting robots—State of the art and challenges ahead,” Int. J. Comput. Vis.
Robot., vol. 3, nos. 1–2, pp. 4–34, 2012. 29
[12] R. Berenstein, “A human-robot cooperative vineyard selective sprayer,” Ph.D.
dissertation, Dept. Ind. Eng. Manage., Ben-Gurion Univ. Negev, Beersheba, Israel,
2016.

27
[13] R. Berenstein and Y. Edan, “Robotic precision spraying methods,” presented at the
ASABE Annu. Int. Meeting, Dallas, TX, USA, 2012, paper no: 121341054.
[14] R. Berenstein and Y. Edan, “Evaluation of marking techniques for a human-robot
selective vineyard sprayer,”in Proc. Int. Conf. Agricult. Eng. (CIGR-AgEng),
Valencia, Spain, 2012, p. C-1090.
[15] R. Berenstein and Y. Edan, “Human-robot cooperative precision spraying:
Collaboration levels and optimization function,” in Proc. Symp. Robot Control
(SYROCO), Dubrovnik, Croatia, 2012, pp. 799– 804.
[16] R. Berenstein, Y. Edan, and I. Ben Halevi, “A remote interface for a human-robot
cooperative vineyard sprayer,” in Proc. Int. Soc. Precision Agricult. (ICPA),
Indianapolis, IN, USA, 2012, pp. 15–18.
[17] R. Berenstein, O. B. Shahar, A. Shapiro, and Y. Edan, “Grape clusters and foliage
detection algorithms International Journal of Future Generation Communication and
Networking Vol. 13, No. 1, (2020), pp. 150-160 160 ISSN: 2233-7857 IJFGCN
Copyright ⓒ 2020 SERSC for autonomous selective vineyard sprayer,” Intell.
Service Robot., vol. 3, no. 4, pp. 233–243, 2010.
[18] R. Berenstein, “A robot cooperative selective sprayer,” Ph.D. dissertation, Dept. Ind.
Eng. Manage., Ben-Gurion Univ. Negev, Beersheba, Israel, 2016.
[19] S.Thilagamani , N. Shanthi,” Object Recognition Based on Image Segmentation and
Clustering”, Journal of Computer Science,Vol. 7,No.11,pp. 1741-1748, 2011.

28
APPENDIX

A. Programming Code for the Project

#define BLYNK_PRINT Serial


#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include<Servo.h>
Servo servo1, servo2;
// Define the motor pins
#define ENA D0
#define IN1 D1
#define IN2 D2
#define IN3 D3
#define IN4 D4
#define ENB D5

#define bz D6
// Variables for the Blynk widget values
int x = 50;
int y = 50;
int Speed;
BlynkTimer timer;
charauth[] = "lOHfChqgJUSxU-1j-kAsEnIMtrkAVYQR"; //Enter your Blynkauth
token
charssid[] = "iot"; //Enter your WIFI name
char pass[] = "iot12345"; //Enter your WIFI passowrd

void setup() {
Serial.begin(9600);
//Set the motor pins as output pins
pinMode(ENA, OUTPUT);
pinMode(IN1, OUTPUT);

29
pinMode(IN2, OUTPUT);
pinMode(IN3, OUTPUT);
pinMode(IN4, OUTPUT);
pinMode(ENB, OUTPUT);
pinMode(bz, OUTPUT);
servo1.attach(D7);
servo2.attach(D8);
// Initialize the Blynk library
Blynk.begin(auth, ssid, pass, "blynk.cloud", 80);
}

// Get the joystick values


BLYNK_WRITE(V0) {
x = param[0].asInt();
}
// Get the joystick values
BLYNK_WRITE(V1) {
y = param[0].asInt();
}
//Get the slider values
BLYNK_WRITE(V4) {
Speed = param.asInt();
}

BLYNK_WRITE(V2)
{
int s1 = param.asInt();
servo1.write(s1);
Blynk.virtualWrite(V5, s1);
}

BLYNK_WRITE(V3)
{
int s2 = param.asInt();
30
servo2.write(s2);
Blynk.virtualWrite(V6, s2);
}

BLYNK_WRITE(V7)
{
int s = param.asInt();
if (s==0){digitalWrite (bz,HIGH);}
else {digitalWrite (bz,LOW);}
}

// Check these values using the IF condition


voidsmartcar() {
if (y > 70) {
carForward();
Serial.println("carForward");
} else if (y < 30) {
carBackward();
Serial.println("carBackward");
} else if (x < 30) {
carLeft();
Serial.println("carLeft");
} else if (x > 70) {
carRight();
Serial.println("carRight");
} else if (x < 70 && x > 30 && y < 70 && y > 30) {
carStop();
Serial.println("carstop");
}
}

31
void loop() {
Blynk.run();// Run the blynk function
smartcar();// Call the main function
timer.run();
}

/**************Motor movement functions*****************/


voidcarForward() {
analogWrite(ENA, Speed);
analogWrite(ENB, Speed);
digitalWrite(IN1, LOW);
digitalWrite(IN2, HIGH);
digitalWrite(IN3, HIGH);
digitalWrite(IN4, LOW);
}
voidcarBackward() {
analogWrite(ENA, Speed);
analogWrite(ENB, Speed);
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
digitalWrite(IN3, LOW);
digitalWrite(IN4, HIGH);
}
voidcarLeft() {
analogWrite(ENA, Speed);
analogWrite(ENB, Speed);
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
digitalWrite(IN3, HIGH);
digitalWrite(IN4, LOW);
}
voidcarRight() {
analogWrite(ENA, Speed);
analogWrite(ENB, Speed);
32
digitalWrite(IN1, LOW);
digitalWrite(IN2, HIGH);
digitalWrite(IN3, LOW);
digitalWrite(IN4, HIGH);
}
voidcarStop() {
digitalWrite(IN1, LOW);
digitalWrite(IN2, LOW);
digitalWrite(IN3, LOW);
digitalWrite(IN4, LOW);
}

33

You might also like