0% found this document useful (0 votes)
13 views46 pages

Proj Doc C13

Hello everyonee eee this is a project report tof my final year engineering

Uploaded by

Apurva Pantham
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views46 pages

Proj Doc C13

Hello everyonee eee this is a project report tof my final year engineering

Uploaded by

Apurva Pantham
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

2DOF ROBOT ARM BASED ON INVERSE KINEMATICS

USING ARDUINO FOR SPRAYING PESTICIDES

A dissertation submitted in partial fulfillment of the requirements for the award of degree of
BACHELOR OF TECHNOLOGY IN
ELECTRONICS & COMMUNICATIONS ENGINEERING
Submitted by

P APURVA (20251A04G7)
P GAYATHRI (20251A04E1)
U SATHWIKA (20251A04E9)
P MANISHA (20251A04G9)

Under the esteemed guidance of


B. Sreekanth Reddy, Assistant Professor (MS), ECE, GNITS (FOR WOMEN)

DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGG.


G. NARAYANAMMA INSTITUTE OF TECHNOLOGY & SCIENCE
(For Women)
(AUTONOMOUS)
(Accredited by NBA& NAAC)
2023-2024
DEPT. OF ELECTRONICS & COMMUNICATION ENGG.
CERTIFICATE

THIS IS TO CERTIFY THAT THE MINI PROJECT ENTITLED

2DOF ROBOT ARM BASED ON INVERSE KINEMATICS USING


ARDUINO FOR SPRAYING PESTICIDES

IS THE BONAFIDE WORK OF

P APURVA (20251A04G7)
P GAYATHRI (20251A04E1)
U SATHWIKA (20251A04E9)
P MANISHA (20251A04G9)

SUBMITTED IN PARTIAL FULFILMENT OF THE REQUIREMENT FOR THE AWARD


OF DEGREE OF BACHELOR OF TECHNOLOGY IN ELECTRONICS AND
COMMUNICATION ENGINEERING DURING THE YEAR 2023-2024

Dr. K. Ragini B Sreekanth Reddy,


PROF & HOD, ECE Assistant Professor(GUIDE)
ACKNOWLEDGEMENTS
We would like to express our profound gratitude to Dr. K. Ramesh Reddy, principal
of G. Narayanamma Institute of Technology and Science, Dr. K. Ragini, HOD of Electronics
and Communication Engineering department, for their contributions to the completion of our
project.
We would like to thank Mr. B. Sreekanth Reddy, our guide, and our coordinator Mrs.
N. Krishna Jyothi, for being a constant source of inspiration. They challenged us to use our
imagination and encouraged us to do this project without delay. We were able to complete this
project because of their comprehensive knowledge, broad experience, and professional
expertise in the subject. Without their assistance and direction, this endeavor would not have
been possible. In our academic endeavors, we could not have asked for a better mentors.
Without the support of each and every person, this project would not have been a success.
Finally, we would like to thank our families, siblings, and friends for their essential
help. We also want to thank everyone who has helped with this project being completed
successfully.

P APURVA (20251A04G7)
P GAYATHRI (20251A04E1)
U SATHWIKA (20251A04E9)
P MANISHA (20251A04G9)
INDEX
S. No. Topic Page No.
Abstract i
List of Figures ii
Acronyms iv
1 Introduction 1
1.1 Problem Statement 1
1.2 Project Overview 1
1.3 Existing System 2
1.4 Objectives 3
2 Literature Review 5
3 Working of the System 6
3.1 Circuit Diagram 6
3.2 Methodology 6
3.3 Block Diagram 8
3.4 Working 8
3.5 Calculations 10
4 Hardware Components 15
4.1 Arduino UNO Board 15
4.2 L298N Motor Driver 16
4.3 Servomotors 17
4.4 Breadboard 20
4.5 Jumper Wires 21
4.6 Water Pump 22
5 Software Required 23
5.1 Arduino IDE 23
6 Results and Discussions 25
7 Advantages and Disadvantages 27
7.1 Advantages 27
7.2 Disadvantages 27
8 Applications 29
9 Conclusions 31
10 Future Scope 33
References 34
Appendix A 35
ABSTRACT
The agricultural sector plays a critical role in ensuring food security and the well-being
of society. To enhance the efficiency and sustainability of agriculture, there is a growing need
for advanced technology solutions. One such solution is the development of robotic systems
for tasks like pesticide spraying. This project presents the design and implementation of a 2-
degree-of-freedom (2-DOF) robot arm controlled by Arduino, specifically tailored for
pesticide spraying applications using inverse kinematics.
The primary objective of this project is to create a versatile and cost-effective robotic
system capable of autonomously and accurately applying pesticides to crops while minimizing
waste and environmental impact. The 2-DOF robot arm allows precise control over the
spraying nozzle's position and orientation, ensuring optimal coverage of crops and efficient
pesticide utilization.
The proposed 2-DOF robot arm for pesticide spraying offers significant advantages in
terms of precision, efficiency, and adaptability. It has the potential to revolutionize the way
pesticides are applied in agriculture, contributing to more sustainable and environmentally
friendly farming practices while improving crop yields and food security. This project
exemplifies the intersection of robotics, agriculture, and environmental stewardship,
showcasing the potential for innovative solutions in modern agriculture.
Keywords: 2DOF robot arm, Pesticide spraying

i
LIST OF FIGURES
S. No. Fig No. Name of the figure Page No.
1 3.1 Circuit Diagram 6
2 3.2 Block Diagram 8
3 3.3 Servomotor Wires 8
4 3.4 Arduino UNO Connections 9
5 3.5 L298N Motor Driver Connections 9
6 3.6 Project Setup 10
7 3.7 Kinematic Trigonometric Diagram for 2-DOF 10
Manipulator
8 3.8 Kinematic Trigonometric Diagram considering 11
a Triangle
9 3.9 Kinematic Trigonometric Diagram with Angle 11
b
10 3.10 Kinematic Trigonometric Diagram considering 12
the Triangle with Angle q2
11 3.11 Triangle Considered to find other sides of the 12
Triangle
12 3.12 Kinematic Trigonometric Diagram considering 13
the Triangle with Angle c
13 3.13 Kinematic Trigonometric Diagram considering 13
the Triangle with Angle g
14 3.14 Angles Calculated, considering different X and 14
Y coordinates
15 4.1 Arduino UNO Board 16
16 4.2 L298N Motor Driver 16

ii
17 4.3 Servomotor 18
18 4.4 Breadboard 20
19 4.5 Jumper Wires 21
20 4.6 Water Pump 22
21 5.1 Screen Capture of Arduino IDE 24

iii
ACRONYMS
S. No Abbreviations Full form
1 DOF Degrees of Freedom
2 PID Proportional Integral Derivative
3 GPS Global Positioning System
4 IDE Integrated Development
Environment
5 GND Ground
6 USB Universal Serial Bus
7 LED Light Emitting Diode
8 ICSP In-circuit Serial Programming
9 IC Integrated Circuit
10 DC Direct Current
11 PWM Pulse Width Modulation
12 CNC Computer Numerical Control

iv
1. INTRODUCTION
1.1 Problem Statement
Agriculture is a crucial sector for ensuring food security and economic stability. To
enhance agricultural practices and reduce manual labour, there is a growing demand for
automated solutions, such as robotic systems for tasks like pesticide spraying. In this
project, it is tasked with designing and implementing a 2-DOF (Degrees of Freedom) robot
arm controlled by an Arduino microcontroller. The robot arm will be used for precise
pesticide spraying in agricultural fields.
1.2 Project Overview
Robotics is defined practically as the study, design and use of robot systems for
manufacturing and generally are used to perform highly repetitive, unsafe, hazardous, and
unpleasant tasks. Robotics many different functions that used either in industry and
manufacture or in complex, clatter and changing environment such as pick and place,
assembly, drilling, welding, machine tool load and unload functions, painting, spraying,
etc. or in a delivery in a hospital and hotels, discovering the space as a results of these
different tasks there are different robot arm configuration such as rectangular, spherical,
cylindrical, revolute and prismatic jointed. A pick and place robot arm is used to ease
process of moving materials and supplying the motion required in the manufacturing
processes. The transfer process of the materials is usually being accomplished, using man
power and as the transfer process is repeated for a period of time, it can cause injuries to
the operator. The robot arm preventing injuries and increasing the efficiency of the work,
with reducing the human being errors that cost highly time and martial. The proportional-
integral-derivative (PID) control has simple structure for its three gains. The control
performances are acceptable in the most of industrial processes. Most robot manipulators
found in industrial operations are controlled by PID algorithms independently at each joint.
There are many control techniques used for controlling the robot arm. The most familiar
control techniques are the PID control, adaptive control, optimal control and robust control.
As the final goal is to design and manufacturing real robots, it's helpful doing the simulation
before the investigations with real robots, to enhance the final real robot performance and
behaviour. The field of robotics has witnessed significant advancements in recent years,
enabling the creation of various types of robotic systems. One fundamental aspect of
robotics is the ability to control the motion of robot arms accurately. Inverse kinematics
plays a vital role in achieving precise control over a robot arm's movement. Inverse

1
kinematics refers to the mathematical technique used to determine the joint angles required
to position the end-effector (or hand) of a robot arm at a specific location in its workspace.
In simpler terms, given a desired position and orientation in space, inverse kinematics helps
calculate the angles required for each joint of the robot arm to reach that target. In this
project, we will explore the implementation of inverse kinematics for a 2-DOF (two degrees
of freedom) robot arm using an Arduino microcontroller. The robot arm consists of two
joints, allowing it to move in a plane. By controlling the joint angles, we can control the
position and orientation of the end- effector.
The Arduino microcontroller serves as the brain of the robot arm, executing the
inverse kinematics calculations and transmitting the corresponding control signals to the
motor drivers. The motor drivers, in turn, control the actuators (usually servo motors)
attached to each joint of the robot arm.
To perform inverse kinematics, we need to have precise knowledge of the arm's
physical dimensions, such as the lengths of each segment and the positions of the joints.
Additionally, the desired end-effector position (x, y) needs to be specified. By utilizing
geometric and trigonometric calculations, we can determine the joint angles required to
achieve the desired position. The Arduino programming language, which is based on
C/C++, provides an ideal platform for implementing the inverse kinematics algorithm.
With its wide range of libraries and hardware compatibility, Arduino simplifies the
integration of the microcontroller with the robot arm and motor drivers. By successfully
implementing inverse kinematics for the 2-DOF robot arm, we can create a system capable
of accurately positioning the end-effector in a specified location. This opens up possibilities
for various applications, such as pick-and-place operations, drawing, writing, or even more
complex tasks that involve interacting with objects in the robot's environment. Throughout
this project, we will delve into the necessary concepts, from the fundamental principles of
inverse kinematics to the practical implementation using an Arduino microcontroller. We
will explore the code, wiring, and necessary components to bring the 2-DOF robot arm to
life, enabling it to perform precise movements based on the desired end-effector position.
1.3 Existing System
The existing system for pesticide spraying in agriculture typically relies on manual
labour or conventional tractor-mounted spraying systems. Here is an overview of the
limitations and challenges associated with the existing pesticide spraying methods:

2
1. Manual Labour: In many agricultural settings, pesticide spraying is carried out
manually by farmworkers. This approach is labour-intensive, time-consuming, and can lead
to inconsistent application rates. It also exposes workers to potentially harmful chemicals,
posing health risks.
2. Tractor-Mounted Sprayers: Tractor-mounted pesticide sprayers are commonly used
for larger-scale farming operations. While they cover more ground than manual labour,
they lack precision in targeting specific areas, resulting in overuse of pesticides and
potential environmental harm.
3. Lack of Precision: Existing systems often lack the precision required for efficient
pesticide application. This imprecision can lead to wastage, as excess pesticides are applied,
increasing costs for farmers and the risk of environmental contamination.
4. Environmental Impact: Conventional pesticide spraying methods can have adverse
effects on the environment. Over application can lead to soil and water contamination,
affecting the ecosystem and non-target species.
5. Safety Concerns: Manual pesticide spraying poses safety concerns for farmworkers who
are exposed to chemicals. It also requires specialized training and protective gear.
6. Limited Adaptability: Conventional systems are less adaptable to varying field layouts
and crop types. Different crops may require different spraying patterns and quantities of
pesticides.
7. Resource Inefficiency: The inefficient use of pesticides in existing systems can result
in unnecessary costs for farmers and contribute to pesticide resistance in pests.
In summary, the existing pesticide spraying methods suffer from inefficiency,
imprecision, environmental concerns, and safety issues. The development of a 2-DOF robot
arm based on inverse kinematics using Arduino for spraying pesticides aims to address
these limitations by providing a more precise, efficient, and environmentally friendly
solution for pesticide application in agriculture.
1.4 Objectives
The objectives of developing a 2-degree-of-freedom (2-DOF) robot arm based on
inverse kinematics using Arduino for spraying pesticides in agriculture are as follows:
1. Precision Pesticide Application: Develop a robot arm capable of precise positioning
and orientation control to accurately apply pesticides to targeted areas of crops. This
objective aims to minimize pesticide wastage and ensure efficient pesticide distribution.

3
2. Automation and Labour Reduction: Create a system that can autonomously perform
pesticide spraying tasks, reducing the reliance on manual labour. This objective seeks to
improve operational efficiency and reduce labour costs for farmers.
3. Adaptability: Design the robot arm to be adaptable to various field layouts and crop
types. This adaptability should enable the robot to adjust its spraying patterns and quantities
based on specific agricultural requirements.
4. Safety: Implement safety features to ensure the robot arm operates safely in proximity
to humans, animals, and other equipment. This includes collision avoidance mechanisms
and emergency stop functionalities.
5. Environmental Sustainability: Reduce the environmental impact of pesticide
application by controlling the amount of pesticides used and minimizing chemical runoff
into soil and water sources. This objective promotes more sustainable farming practices.
6. User-Friendly Interface: Develop a user-friendly interface for farmers or operators to
easily program the robot arm's waypoints, control its operation, and monitor its progress.
This interface should be accessible and intuitive.
7. Cost-Effectiveness: Create a cost-effective solution that is affordable for small to
medium scale farmers. Minimize the initial investment required for adopting this
technology.
8. Integration with Precision Agriculture: Ensure that the robot arm can seamlessly
integrate with other precision agriculture technologies, such as GPS systems and crop
monitoring devices, to enhance overall farming practices.
9. Testing and Validation: Conduct rigorous testing and validation of the robot arm in
real-world agricultural settings to ensure its reliability, effectiveness, and safety.
10. Documentation and Training: Develop comprehensive documentation and training
materials for farmers and operators to facilitate the adoption and proper use of the robot
arm.
11. Regulatory Compliance: Ensure that the robot arm complies with relevant agricultural
and safety regulations and standards.
By achieving these objectives, the development of a 2-DOF robot arm for pesticide
spraying using Arduino and inverse kinematics aims to provide a valuable tool for
modernizing and improving pesticide application practices in agriculture.

4
2. LITERATURE REVIEW
A literature survey on the topic of a 2-DOF robot arm based on inverse kinematics
using Arduino for spraying pesticides would involve reviewing relevant research papers,
articles, and publications to gain insights into the state of the art in this field. While I can't
provide specific citations from recent research beyond my knowledge cut-off date in
September 2021, it can be suggested as the types of sources and topics that should explored
in the literature survey:
Numerous methods exist for manipulating robotic arms - position controlled
manipulators, joystick based controllers [1], speech and gesture based controller [2], and
sensor based interfaces [3] to name a few. Position controlled manipulators controller are
too costly and its uses are mostly for remotely operated underwater vehicles. Other method
which is used for manipulating robot arm is speech based, however it cannot be used for
complex manipulation such as industry applications where noise level is high. In the
research work published in [4] an algorithm for real time gesture recognition is used to
control the robot. The robot recognizes a particular set of commands which translates into
the robot doing some specific number movements. The ability of this robot is thus limited
to directed movement. The work proposed here provides an easier interface to manipulate
a robotic arm using a Microsoft Kinect and inverse kinematics. In the research work
published in [5] the author uses triangular algorithm for inverse kinematics problem.
Jacobian iteration is faster than the triangular algorithm although the latter provides a
solution to singular matrix whereas Jacobian iteration fails to do so. In the research work
published in [6] the author uses cyclic coordinate descent (CCD) inverse kinematics
solutions in multi-joint chains. CCD takes a series of iterations before reaching to a solution
and also generate improper joint rotations. CCD has two major drawbacks, firstly the joints
close to the end effector rotate more than the joints close to the immobile joint, and the
kinematic chain will appear to roll in on itself. Secondly CCD is an iterative method which
moves joint in opposite order according to their importance. The movements seem
unnatural in case of humanoid robots because outer joints are moved first. The paper [7],
gives an idea about a gesture and position of human arm based interaction with robotic
arms using wireless accelerometer. Our work is similar in the sense that Kinect control is
also gesture based. It involves image processing, whereas the paper [7] uses acceleration
due to gravity to determine and recognize gestures. In [12] we have briefly discussed about
the Kinect based control of robotic arm.

5
3. WORKING OF THE SYSTEM
3.1 Circuit Diagram

Figure 3.1: Circuit Diagram

3.2 Methodology
To develop a 2-DOF robot arm for pesticide spraying using inverse kinematics and
Arduino, you'll need a structured methodology. Below is a step-by-step approach to guide
through the project:
1. Project Planning and Requirements Gathering:
- Define the project objectives, scope, and constraints.
- Identify the specific requirements for the robot arm, such as the spraying area, payload
capacity, and precision requirements.
- Determine the types of components needed.
2. Mechanical Design:
- Design the mechanical structure of the 2-DOF robot arm, considering factors like size,
range of motion, and stability.
- Select appropriate materials and components for the robot arm, including servos motors
for joints.
- Assemble the robot arm according to the design.
3. Inverse Kinematics Modelling:
- Develop the mathematical model for inverse kinematics. This should involve deriving
equations that relate joint angles to end effector (spraying nozzle) positions.
- Implement the inverse kinematics equations in your Arduino code to calculate joint angles
based on desired end effector positions.

6
4. Control System Development:
- Interface the Arduino microcontroller with the robot arm's motors and any sensors (e.g.,
rotary encoders) for feedback.
- Implement control algorithms to control the motors and move the robot arm to specified
positions.
- Incorporate PID control or other control strategies to ensure accurate positioning.
5. End Effector Integration:
- Design and integrate the pesticide spraying mechanism (nozzle, pump, and reservoir) onto
the robot arm's end effector.
- Implement the control logic for pesticide spraying, including on/off control and
adjustments for spray intensity.
6. Path Planning and Navigation:
- Develop algorithms for path planning within the agricultural field. Consider factors like
field shape and obstacles.
- Implement collision detection and avoidance mechanisms to ensure safe navigation.
7. User Interface:
- Create a user interface to allow users to input spraying parameters (e.g., area to be sprayed,
spray intensity) and monitor the robot's status.
8. Testing and Calibration:
- Rigorously test the robot arm's functionality in a controlled environment first.
- Fine-tune the robot's movements and spraying accuracy through calibration procedures.
- Test the robot arm in real-world agricultural settings to ensure it performs as expected.
9. Documentation:
- Prepare comprehensive documentation that includes:
- Mechanical design specifications and assembly instructions.
- Electrical schematics and wiring diagrams.
- Software documentation, including Arduino code with comments.
- User instructions for operating the robot arm safely and effectively.
10. Deployment and Maintenance:
- Deploy the robot arm in agricultural fields or controlled environments as needed.
- Establish a maintenance schedule and procedures to keep the robot arm in good working
condition.
11. Continuous Improvement:
- Collect feedback from users and operators to identify areas for improvement.

7
- Iterate on the design and software to enhance performance, usability, and safety.
Remember that this project is multidisciplinary, involving mechanical engineering,
robotics, control systems, and agriculture. Collaboration and expertise in each of these areas
will be crucial for its success. Regular testing, debugging, and calibration will also play a
significant role in achieving a functional and efficient pesticide-spraying robot arm.
3.3 Block Diagram
Initially Arduino software is installed in our computer .After the installation process, the
desired code is written in high level language set the coordinates of the desired position of
the pesticide. The laptop connected to the Arduino board via a jack wire. The code is
dumped into the Arduino .we connect the servomotors, Arduino and L298N accordingly
and input coordinates will be provides in the code.

Figure 3.2: Block Diagram of 2DOF Robot Arm


1. Give the desired X, Y positions.
2. Microcontroller (Arduino UNO): Acts as the central processing unit, acquiring data and
processing it.
3. Connected to the 2DOF robot arm.
4. End Effector to desired X, Y position.
5. Water pump connected to spray the pesticides.
3.4 Working
1. Initially install the Arduino IDE software in the laptop and write the desired code in a
high-level language. Set the coordinates to the desired position where the pesticides need
to be sprayed.
2. Then setup the hardware as follows: Connect two servo motor wires to the breadboard
and Arduino UNO. Servo motor consists of three connecting wires, they are

8
Figure 3.3: Servomotor Wires
Brown – Ground
Red – Supply
Orange – Control
3. Connect ground and supply wires of servo motor to the breadboard, and control wire to
the Arduino UNO (Pin no - ~3). Repeat the same step for the second servo motor, by
connecting the control wire to the Arduino UNO board (Pin no - ~5).
4. Connect the Vin and ground pins of the Arduino UNO board to the breadboard.
5. Power jack of the Arduino UNO is connected to the 12V adaptor and another power
supply is connected to the laptop.

Figure 3.4: Arduino UNO Connections


6. Consider L298N Motor driver, connect the Vin and ground pins to the breadboard, and
connect the input to the Arduino board (Pin No – A0). Then connect the outputs to the
water pump.

9
Figure 3.5: L298N Motor Driver Connections
7. After the hardware setup is done, now connect the laptop to the Arduino board and dump
the code. 8. Setup the coordinates in the code and run the program. 9. Now the robotic arm
moves to the given position and spray the pesticides.

Figure 3.6: Project Setup


3.5 Calculations
Kinematics is a branch of mechanics that describes the motion of objects without
reference to the forces that cause the motion. Kinematics in industrial robot concerned with
the position and orientation of the robot end effector relative to the robot joints angle.
Inverse kinematics requires complex mathematical analysis, especially in the higher degree

10
of freedom (DOF). To calculate the end effector we consider the 2DOF kinematic
trigonometric diagram as shown in Fig 3.7.

Figure 3.7: Kinematic Trigonometric Diagram for 2-DoF Manipulator


From the above figure a1 and a2 are the lengths of the two arms, and q1 and q2 are
their corresponding angles respectively. Now consider a triangle connecting the origin to
point E and from point E drop a perpendicular on to the x-axis as shown in Fig 3.8.

Figure 3.8: Kinematic Trigonometric Diagram considering a triangle


From the Fig 3.8, by using Pythagoras theorem the hypotenuse r can be written as
follows,
r 2 = x 2 + y 2 ------------------------ 1

11
Where r is the hypotenuse, x is the base of the triangle along the x-axis and y is
the height of the triangle along the y-axis.

Figure 3.9: Kinematic Trigonometric Diagram with angle b


Now, by applying cosine rule to find the angle b as shown in Fig 3.9 we get the
following equations,
r 2 = a12 +a22 – 2a1a2(cos b) ------------ 2
cos b = a12 + a22 – r 2 / (2a1a2) ------------ 3
cos b = a12 + a22 – x 2 – y 2 / (2a1a2) ------------ 4
We can write angle q2 as follows,
q2 = 𝜋 – b -------------------------------5
cos q2 = -cos b ------------------------------ 6
By substituting equation 4 in equation 6 we get,
cos q2 = x 2 + y 2 – a12 –a22 / (2a1a2)----------------7

Figure 3.10: Kinematic Trigonometric Diagram considering the Triangle with Angle q2

12
Consider the triangle with angle q2 and the arm length is a2 as shown in the Fig
3.10. Consider the triangle alone as shown in the Fig 3.11. By using simple trigonometry,
other sides of the triangle can be given as shown in the figure below,

Fig 3.11: Triangle considered to find the other sides of the Triangle
From the triangle we considered sine angle of q2 can be given as follows,
sin q2 = sqrt ( 1 – cosq2)------------------------------8

Figure 3.12: Kinematic Trigonometric Diagram considering the triangle with angle c
From Fig 3.12, r is the hypotenuse of the triangle considered, (a1 + a2 cosq2) is
the base of the triangle and a2 sinq2 is the height. From the triangle in Fig 3.12, the angle
c can be given as follows,
tan c = a2 sinq2 / (a1 + a2 cosq2)-------------------- 9
c = tan-1 (a2 sinq2) / ( a1 + a2 cosq2)----------------10

13
Figure 3.13: Kinematic Trigonometric Diagram considering the triangle with angle g
The angle g from the Fig 3.13 can be given as follows,
g = tan-1 (y / x) -------------------------------------------11
q1 = g – c-------------------------------------------------12
q1 = tan-1 (y / x) – tan-1 (a2 sinq2) / (a1 + a2 cosq2) ------------------- 13
Therefore, the equations of the angles’ q1 and q2 can be given as follows,
q2 = cos-1 (x2 + y 2 – a12 –a22 ) / (2a1a2)
q1 = tan-1 (y / x) – tan-1 (a2 sinq2) / (a1 + a2 cosq2)

Figure 3.14: Angles calculated, considering different X and Y coordinates

14
4. HARDWARE COMPONENTS
4.1 Arduino UNO Board
Arduino Uno board is a popular microcontroller board based on the ATmega328P
microcontroller. It comes with various components and features that enable you to build
and program a wide range of electronic projects. Here are the main components you'll find
on an Arduino Uno board.
1. Microcontroller: The main brain of the board is the ATmega328P microcontroller. It is
responsible for executing your code and controlling the board's functionalities.
2. Digital Input/ Output Pins: The Arduino Uno has a total of 14 digital input/output pins.
These pins can be configured as either inputs or outputs and are labelled from 0 to 13. They
can be used for tasks like reading sensors or controlling external devices.
3. Analog Input Pins: The board features 6 analog input pins labelled A0 to A5. These
pins can read analog voltages from sensors or other analog devices.
4. Power Pins: The Arduino Uno board has various power pins:
5V Pin: This pin provides a regulated 5V power output that can be used to power external
components.
3.3V Pin: It provides a regulated 3.3V power output.
Vin Pin: It is used to supply an external power source, ranging from 7V to 12V, to power
the board.
GND Pins: These pins are the ground connections for the board.
5. USB Interface: The Arduino Uno has a USB port that allows you to connect it to a
computer. This port is used for uploading your code to the board and for serial
communication with the computer.
6. Reset Button: Pressing the reset button restarts the microcontroller and re-executes your
code from the beginning.
7. Crystal Oscillator: The ATmega328P microcontroller requires an external crystal
oscillator (usually 16 MHz) for accurate timing.
8. Power LED: There is an LED that indicates when the board is powered on.
9. TX/RX LEDs: These LEDs indicate the transmitting and receiving activities between
the Arduino board and the computer.
10. ICSP Header: The In-Circuit Serial Programming (ICSP) header allows you to
program the ATmega328P microcontroller using an external programmer.

15
11. Voltage Regulator: The board includes a voltage regulator that converts the input
voltage to a regulated 5V required by the microcontroller and other components.

Figure 4.1: Arduino UNO Board


These are the main components found on an Arduino Uno board. Understanding
their functions and capabilities will help you effectively use and program the board for
your projects.
4.2 L298N Motor Driver
The L298N is a popular dual H-bridge motor driver integrated circuit (IC)
commonly used to control and drive DC motors or stepper motors. Here are the main
components of the L298N module,

Figure 4.2: L298N Motor Driver


1. H-Bridge Circuit: The L298N module contains two H-bridge circuits. An H-bridge is
a configuration of transistors that allows bidirectional control of a motor's rotation. Each

16
H-bridge consists of four power transistors (usually MOSFETs) arranged in a specific
configuration.
2. Motor Power Supply Connections: The L298N module has terminals for connecting
an external power supply to power the motors. Typically, this involves connecting a
positive voltage supply (Vcc) and ground (GND).
3. Logic Power Supply Connections: The module also has terminals for connecting a
separate logic power supply. This power supply provides the voltage required to operate
the control logic of the L298N IC. The logic power supply is usually +5V.
4. Enable Pins: The L298N IC has enable pins for each motor channel (A and B). These
pins allow you to enable or disable the corresponding motor channel. When the enable pin
is HIGH, the motor is active, and when it's LOW, the motor is disabled.
5. Control Inputs: The L298N module has control inputs for each motor channel. Each
motor channel typically has two control inputs, labelled IN1 and IN2 for channel A and
IN3 and IN4 for channel B. These inputs determine the direction of motor rotation and the
braking mode.
6. Motor Outputs: The module has motor output terminals to connect the motors. The
output terminals are typically labelled OUT1 and OUT2 for channel A and OUT3 and
OUT4 for channel B. These terminals are connected to the motor's positive and negative
terminals. Current Sensing: The L298N IC includes pins for current sensing. These pins
allow you to monitor the current flowing through each motor channel. By measuring the
current, you can implement current limiting and protect the motors from excessive current.
7. Heat Sink: The L298N module may have a heat sink attached to it or a provision to
attach one. The heat sink helps dissipate heat generated by the power transistors during
operation, ensuring proper functioning and preventing overheating.
8. Screw Terminal Blocks: The module often features screw terminal blocks to facilitate
easy connections to the power supply, motors, and control signals. These terminal blocks
allow for secure and reliable connections without the need for soldering.
4.3 Servomotor
A servo motor is a type of motor commonly used in robotics and other applications
that require precise control of angular position. Here are the main components of a typical
servo motor,
1. DC Motor: The servo motor contains a DC (Direct Current) motor as its main driving
component. The motor generates rotational motion in response to electrical signals.

17
2. Gear Train: A servo motor usually incorporates a gear train to increase torque and
reduce the motor's speed. The gear train allows the motor to generate high torque while
maintaining precise control.
3. Position Sensor: Servo motors have a built-in position sensor, typically a potentiometer
or an optical encoder. The position sensor provides feedback on the motor's current angular
position. Control Circuitry: Servo motors include control circuitry that interprets incoming
electrical signals and adjusts the motor's position accordingly. The control circuitry
compares the desired position (input signal) with the current position (feedback signal)
from the position sensor and adjusts the motor's rotation to minimize the error.
4. Drive Electronics: The drive electronics in a servo motor receive signals from the
control circuitry and convert them into the appropriate voltage and current levels to drive
the motor. The drive electronics amplify and regulate the power supply to the motor.
5. Output Shaft: The output shaft is the part of the servo motor that rotates. It is connected
to the gear train and transfers the rotational motion to the external mechanism or load.
6. Servo Horn: The servo horn is a plastic or metal component attached to the output shaft.
It provides a means to connect the servo motor to external components or linkages, allowing
the motor's motion to be translated into useful mechanical work.
7. Connector: Servo motors typically have a three-wire connector for power (usually +5V
and ground) and control signal. The control signal is a pulse-width modulation (PWM)
signal that determines the desired position of the motor.

Figure 4.3: Servomotor

18
Specifications of Servomotors are given as below:
1. Type: Servo motors come in various types, including DC servo motors, AC servo
motors, and brushless DC servo motors. The type you choose will depend on your
application's requirements.
2. Size: Servo motors come in different physical sizes, often referred to by their frame size.
The frame size is a standardized measurement that helps you determine the motor's physical
dimensions and mounting compatibility.
3. Voltage: The operating voltage of the servo motor is crucial to ensure it works with your
power supply. Common voltage ratings include 12V, 24V, 48V, and higher, depending on
the motors design and application.
4. Power Rating: This specifies the motor's output power, usually measured in watts (W)
or kilowatts (kW). It indicates the motor's capability to perform work.
5. Torque: Torque is a critical specification and is often provided in units like ounce-inches
(oz-in), pound-inches (lb-in), or Newton-meters (Nm). It represents the rotational force the
motor can generate.
6. Speed: The speed rating indicates how fast the motor can rotate its shaft. It's typically
given in revolutions per minute (RPM) or radians per second (rad/s).
7. Feedback System: Many servo motors include a feedback system, such as an encoder
or resolver, to provide precise position and speed information. This feedback is essential
for closed-loop control systems.
8. Control Interface: Servo motors can have different control interfaces, such as analog
(voltage or current control), pulse-width modulation (PWM), or digital communication
protocols like CAN (Controller Area Network) or EtherCAT.
9. Operating Temperature Range: The temperature range in which the servo motor can
safely operate without performance degradation or damage.
10. Mounting Style: Servo motors can have various mounting options, including flange
mounting, face mounting, or through-shaft mounting.
11. Protection Rating: This rating specifies the motor's resistance to environmental factors
like dust and water, often denoted by an IP (Ingress Protection) rating.
12. Mechanical Efficiency: This represents how efficiently the motor converts electrical
power into mechanical work. It's usually expressed as a percentage.
13. Inertia: The motor's rotor inertia is essential for determining its responsiveness and
ability to accelerate or decelerate rapidly.

19
14. Weight: The weight of the servo motor can be a factor in certain applications, especially
in mobile robotics or systems with weight constraints.
15. Price: The cost of the servo motor is a practical consideration when choosing one for
your application. Prices can vary significantly based on specifications and manufacturer.
When selecting a servo motor for your specific application, it's crucial to consider
how these specifications align with your project's requirements and performance goals.
Additionally, consulting the manufacturer's datasheet and technical documentation is
essential to ensure you have all the necessary information for your decision.
4.4 Breadboard
A breadboard is a simple device designed to let you create circuits without the need
for soldering. They come in various sizes, and the design can vary, but as a general rule
they look something like this:

Figure 4.4: Breadboard


The breadboard is a white rectangular board with small embedded holes to insert
electronic components. It is commonly used in electronics projects. We can also say that
breadboard is a prototype that acts as a construction base of electronics. A breadboard is
also categorized as a Solderless board. It means that the component does not require any
soldering to fit into the board. Thus, we can say that breadboard can be reused. We can
easily fit the components by plugging their end terminal into the board. Hence, a
breadboard is often called a plug board. White plastic is the material that is used to create
breadboards. Today, most of the breadboards are Solderless breadboards. We can directly
plug in the electronic components and connect it with the external power supply. The top
and bottom holes of a row in a breadboard are connected horizontally, and the centre part
is connected vertically. It means a single horizontal line of a breadboard has the same
connection. It is because the metal strip underneath the breadboard at the top and bottom

20
are connected horizontally. Hence, it provides the same connection in a row. The two top
and bottom parts of a breadboard are generally used for power connections. The vertical
connection of the centre part means a single vertical line in a breadboard provides the same
connection. It is useful when we need to connect the different components in series.
4.5 Jumper Wires
Jumper wires are simply wires that have connector pins at each end, allowing them
to be used to connect two points to each other without soldering. Jumper wires are typically
used with breadboards and other prototyping tools in order to make it easy to change a
circuit as needed.

Figure 4.5: Jumper Wires


Though jumper wires come in a variety of colours, the colours don’t actually mean
anything. This means that a red jumper wire is technically the same as a black one. But the
colours can be used to your advantage in order to differentiate between types of
connections, such as ground or power. The wire colour is just an aid to help you keep track
of what is connected to which.
Types of Jumper Wires:
Male-to-male jumper
Male-to-female jumper
Female-to-female jumper
The difference between each is in the endpoint of the wire. Male ends have a pin
protruding and can plug into things, while female ends do not but are also used for plugging.
Moreover, a male connector is referred to as a plug and has a solid pin for centre
conduction. Meanwhile, a female connector is referred to as a jack and has a centre
conductor with a hole in it to accept the male pin. Male-to-male jumper wires are the most
common and what you will likely use most often. For instance, when connecting two ports
on a breadboard, a male-to-male wire is what you will need.

21
4.6 Water Pump
Micro DC 3-6V Micro Submersible Pump Mini water pump For Fountain Garden
Mini water circulation System DIY project. This is a low cost, small size Submersible
Pump Motor which can be operated from a 3 ~ 6V power supply. It can take up to 120 litres
per hour with very low current consumption of 220mA. Just connect tube pipe to the motor
outlet, submerge it in water and power it. Make sure that the water level is always higher
than the motor. Dry run may damage the motor due to heating and it will also produce
noise.

Figure 4.6: Water Pump


Specifications:-
Flow Rate: 80 ~ 120 L/H
Maximum Lift: 40 ~ 110 mm
Continuous Working Life: 500 hours
Driving Mode: DC, Magnetic Driving
Material: Engineering Plastic
Outlet outside Diameter: 7.5 mm
Outlet inside Diameter: 5 mm
A water pump is a mechanical device used to move water from one place to another.
They are commonly used for various purposes, such as supplying water to homes, irrigation
in agriculture, and industrial processes. Water pumps come in different types, including
centrifugal pumps and positive displacement pumps, each suited for specific applications.

22
5. SOFTWARE REQUIRED
5.1 Arduino IDE (Integrated Development Environment)
The Arduino IDE (Integrated Development Environment) is a software platform
used for writing, compiling, and uploading code to Arduino microcontroller boards. It
provides an easy-to-use interface for programming Arduino-based projects. Here are some
key features and aspects of the Arduino IDE:
1. Cross-Platform Compatibility: Arduino IDE is available for multiple operating
systems, including Windows, macOS, and Linux, making it accessible to a wide range of
users.
2. Code Editor: It includes a text editor where you can write and edit your Arduino code.
The editor provides syntax highlighting and auto-indentation to make coding easier.
3. Built-In Library Manager: Arduino IDE comes with a library manager that allows you
to easily add and manage libraries for various sensors, modules, and functions. This
simplifies the process of integrating additional functionality into your projects.
4. Serial Monitor: The IDE features a built-in serial monitor that allows you to interact
with your Arduino board through the serial communication port. It's a valuable tool for
debugging and monitoring data exchange between your computer and the microcontroller.
5. Upload and Compile: Arduino IDE can compile your code and upload it to the Arduino
board with a single click. It automatically handles the compilation and flashing process,
making it user friendly, especially for beginners.
6. Board Manager: The IDE supports a wide range of Arduino-compatible boards. You
can select the specific board you are using through the Board Manager, which also provides
options for installing additional board profiles.
7. Code Examples: Arduino IDE includes a collection of code examples to help you get
started with common tasks and components. These examples cover a wide range of topics
and are excellent resources for learning and reference.
8. Community and Support: Arduino has a large and active community of users and
developers. You can find a wealth of tutorials, forums, and documentation to help you with
your projects and troubleshoot any issues you encounter.
9. Extensions and Plugins: The Arduino IDE can be extended with various plugins and
tools to enhance its functionality. For example, you can add version control integration or
use third-party tools for advanced code analysis.

23
10. Open Source: Arduino IDE is open-source software, which means that it's free to use,
and you can also contribute to its development if you have the skills and desire to do so.
11. Integration with Other IDEs: While the Arduino IDE is the standard environment for
Arduino development, more experienced users may prefer to use alternative IDEs like
Visual Studio Code with appropriate extensions for Arduino development.
The steps followed for writing the code from Arduino IDE to the Arduino UNO
board goes as mentioned bellow:
1. Code Development: Code is written for Arduino UNO in the Arduino IDE. This code
includes the setup of components, Wi-Fi connectivity, and data formatting.
2. Compilation: After writing the code, compile it in the Arduino IDE. The IDE converts
the human-readable code into machine-readable instructions that the Arduino UNO can
understand.
3. Uploading: Once compiled, upload the compiled code to the Arduino UNO
microcontroller. This is done through a USB connection between the computer and the
Arduino UNO.
4. Serial Monitor: Arduino IDE has a built-in serial monitor that allows you to
communicate with the Arduino UNO, view debug messages, and monitor sensor data
during development.

Figure 5.1: Screen Capture of Arduino IDE


Overall, the Arduino IDE is a beginner-friendly and versatile tool for programming
and developing projects with Arduino microcontrollers. It has played a significant role in
making embedded systems and microcontroller programming accessible to a wide range of
enthusiasts and professionals.

24
6. RESULTS AND DISCUSSIONS
In the recent years with advancement of technology everyone are leading a hustle
life. In this process the importance to health is given less importance and priority. The
amount of chemicals and pesticides level consumed by us is least bothered. Human
poisoning by pesticides has long been seen as a severe public health problem. As early as
1990, a task force of the World Health Organization (WHO) estimated that about one
million unintentional pesticide poisonings occur annually, leading to approximately 20,000
deaths. Thirty years on there is no up-to-date picture of global pesticide poisoning despite
an increase in global pesticide use.
Scientists has proposed different strategies to overcome the over usage of
pesticides, many different hybrid models has been discovered, various standards and rules
are implemented on the level of usage of pesticides. One of the solution is to spray
pesticides only at effected areas rather than spraying on the whole plant.
In this project, Robotics and Embedded Systems plays an important role. Two
robotic arms, two servomotors, Arduino UNO board and L298N Motor Driver are the
components used to make the connections of the required circuit. In order to spray
pesticides at a particular place, we are supposed to give the X and Y coordinates to the
system, the embedded system process the input and calculate the angles according to the
input coordinates then the processed output is given to the servomotors which has a robotic
arm attached to it. Now, the pesticides is sprayed at the target.
The mathematical formula used for calculating the angles are:
q2 = cos-1 (x2 + y 2 – a12 –a22) / (2a1a2)
q1 = tan-1 (y / x) – tan-1 (a2 sinq2) / (a1 + a2 cosq2)
(Note: The length of the robotic arm considered is a1 = a2 = 20cm)
Now, let us analyse the different cases:
1. Case 1: Let X=20, Y=25
The calculated shoulder angle is 40.5(degree), the elbow angle is 60.5(degree) and
the end effector angle from the reference is 110(degree). It means the Coordinates
are in the free space of the robotic arm. Initially the shoulder angle is calculated and
then the elbow angle. The pesticides will only be sprayed at the target i.e., at end
effector angle.

25
2. Case 2: Let X=25, Y= 30
The calculated shoulder angle is 55(degree), the elbow angle is 75(degree) and the
end effector angle from the reference is 130(degree). Since, the coordinates given
are not in the blind spot. The robotic arm moves to the target position and spray the
pesticides.

3. Case 3: Let X=35,Y=45


No angle is calculated because the input coordinates are given in the blind spot. The
robotic arm cannot be positioned in the target coordinates.
In this way, the robotic arm calculates the angles and move it's end effector to the
target position and spray the pesticides at the target. This reduces the effect of health
Hazards.

26
7. ADVANTAGES AND DISADVANTAGES
7.1 Advantages
1. Precision and Accuracy: Inverse kinematics allows for precise control of the robot
arm's end effector, ensuring accurate placement of pesticides. This is crucial for effective
pest control and minimizing pesticide waste.
2. Customizable Reach: You can design the arm to have a specific reach and range of
motion tailored to your field's requirements. This flexibility allows you to adapt the robot
for various crop layouts.
3. Reduced Pesticide Exposure: By using a robot, you reduce the need for human
operators to be in direct contact with pesticides, minimizing health risks.
4. Consistent Coverage: The robot can follow a predefined path with consistent speed and
accuracy, ensuring uniform pesticide coverage across the field. This leads to more effective
pest management.
5. Efficiency: Automation can work continuously without fatigue, leading to improved
efficiency and faster pesticide application compared to manual spraying.
6. Data Collection: You can integrate sensors and data collection tools into the robot for
real time monitoring of crop conditions, enabling data-driven decision-making for pesticide
application.
7. Safety: Reduced human involvement means fewer chances of accidents or pesticide
exposure, enhancing overall safety in agricultural operations.
8. Adaptability: Arduino-based systems are highly customizable and can be easily adapted
to different pesticide types and application methods.
9. Cost-Effective: Building a 2-DOF robot arm with Arduino can be cost-effective
compared to more complex robotic systems, making it accessible to a wider range of
farmers.
10. Scalability: If needed, you can scale up the system by adding more robots to cover
larger agricultural areas.
7.2 Disadvantages
1. Limited Range of Motion: A 2-DOF robot arm has only two degrees of freedom, which
can limit its ability to reach certain areas of a field, especially in complex terrain or
irregularly shaped fields.

27
2. Lack of Full Flexibility: Compared to more complex multi-DOF robotic arms, a 2-DOF
arm may struggle with tasks that require intricate movements, such as reaching under leaves
or getting close to the ground.
3. Speed: 2-DOF arms may not be as fast as needed for large-scale farming operations,
potentially leading to longer spraying times.
4. Payload Capacity: These arms typically have limited payload capacity, which may
restrict the amount of pesticide that can be carried and sprayed at one time.
5. Complex Programming: Implementing inverse kinematics and programming the arm
to follow precise paths can be complex, requiring a good understanding of robotics and
mathematics.
6. Maintenance: Mechanical parts may require frequent maintenance due to wear and tear,
which can be time-consuming and costly.
7. Weather Dependency: Adverse weather conditions, such as strong winds, heavy rain,
or extreme temperatures, can affect the performance and reliability of the robot.
8. Initial Cost: While it can be cost-effective compared to more advanced robotic systems,
there is still an initial cost involved in designing, building, and programming the robot.
9. Sensor Integration: Integrating sensors for obstacle detection and environmental
monitoring can add complexity to the system and may require additional development
efforts.
10. Regulatory Compliance: Adherence to local regulations and safety standards for
pesticide application with robotic systems is essential and may involve bureaucratic
hurdles.
11. Limited Autonomy: Some 2-DOF robots may lack advanced autonomous navigation
capabilities, requiring human intervention for tasks like path planning and obstacle
avoidance.
12. Skill Requirement: Operating and maintaining the robot may require specialized
skills, potentially leading to a need for training or hiring skilled personnel.

28
8. APPLICATIONS
1. Pick and Place Operations: One of the most common applications of robotic arms is in
pick and place operations, where the robotic arm is used to pick objects from one location
and place them in another. Inverse kinematics helps in calculating the joint angles required
to move the end-effector to the desired pick and place positions.
2. Assembly Line Tasks: Robotic arms with 2 degrees of freedom can be used in assembly
line tasks where parts need to be assembled in a specific sequence. The robotic arm can be
programmed using inverse kinematics to accurately position components for assembly.
3. Painting and Coating: In industries like automotive manufacturing, robotic arms are
used for painting and coating tasks. Inverse kinematics ensures that the robotic arm can
precisely move the paint nozzle or coating tool to apply a uniform layer of paint or coating
on the surface.
4. CNC Machining: Computer Numerical Control (CNC) machines often use robotic arms
to control the movement of cutting tools. Inverse kinematics helps in calculating the joint
angles required to guide the tool along a specific cutting path.
5. Medical Procedures: In the field of medicine, robotic arms can be used for minimally
invasive surgeries or other medical procedures. Inverse kinematics ensures that the surgical
tool can be accurately positioned inside the body based on the surgeon's input.
6. Educational Purposes: 2D0F robotic arms are often used in educational settings to teach
students about robotics, kinematics, and programming. Students can learn how to calculate
joint angles and control the arm's movement using inverse kinematics algorithms.
7. Prototyping and Research: Roboticists and researchers might use 2D0F robotic arms
for prototyping new algorithms and control strategies. Inverse kinematics plays a crucial
role in enabling these arms to perform specific tasks accurately.
8. Entertainment and Animation: In the entertainment industry, robotic arms are used to
create special effects, animations, and simulations. Inverse kinematics allows for precise
control over the arm's movement, making it useful for creating dynamic and realistic
animations.
9. Lab Automation: Robotic arms can be used in laboratories for tasks such as handling
samples, moving equipment, and conducting experiments. Inverse kinematics ensures that
the robotic arm can interact precisely with the laboratory environment.

29
10. Food Industry: In the food industry, robotic arms can be employed for tasks like
sorting, packaging, and even cooking. Inverse kinematics ensures that the arm can
manipulate food items accurately and safely.
11. Agriculture and Pesticide Spraying: As previously mentioned, this robot arm can be
used for precise and automated pesticide spraying in agricultural fields. It can improve the
efficiency of pesticide application, reduce chemical waste, and minimize human exposure
to pesticides.
12. Environmental Monitoring: Robot arms can be used to deploy sensors and
instruments in challenging environments for environmental monitoring, such as underwater
or in remote locations.

30
9. CONCLUSIONS
Designing a 2 Degree of Freedom (2DOF) robot arm for spraying pesticides using
Arduino and implementing inverse kinematics is a valuable project that can have several
meaningful conclusions and takeaways:
1. Precision and Accuracy: The implementation of inverse kinematics in your 2DOF robot
arm allows for precise control of the end-effector's position and orientation. This is crucial
when spraying pesticides as it ensures accurate coverage and minimizes wastage.
2. Reduced Human Exposure: Automating pesticide spraying through robotics reduces
the need for human operators to be in direct contact with potentially harmful chemicals.
This can improve safety and reduce health risks.
3. Customization and Flexibility: By using Arduino and inverse kinematics, you can
easily customize the robot arm's movement for different spraying patterns and target areas.
This flexibility is valuable in agriculture where crop layouts may vary.
4. Resource Efficiency: Automated pesticide spraying can lead to more efficient use of
pesticides and resources. The robot arm can be programmed to apply just the right amount
of pesticide where it's needed, reducing overuse and environmental impact.
5. Data Collection: Implementing sensors and data collection capabilities on the robot arm
can provide valuable information about the state of the crops, which can be used for further
optimization and decision-making in agriculture.
6. Scalability: The 2DOF robot arm project can serve as a foundation for more complex
robotic systems. For instance, you can expand the robot's capabilities by adding more
degrees of freedom or integrating it with other agricultural technologies.
7. Challenges and Learning: Building such a project is not without its challenges, such as
calibration, power management, and environmental conditions. Concluding the project can
provide insights into addressing these challenges and a deeper understanding of robotics
and automation.
8. Environmental Impact: An automated pesticide spraying system can be more
environmentally friendly than traditional methods, as it reduces chemical runoff and air
pollution.
9. Cost-Benefit Analysis: Conducting a cost-benefit analysis of your project can help
determine its economic viability. Consider factors like the initial investment, maintenance
costs, and potential savings in labour and pesticide usage.

31
10. In this project, the mathematical modelling, control and simulation of a 2-DOF robot
arm were presented.
11. The distinct feature of this approach was the 2-DOF mathematical model that served as
the core element.
In summary, a 2DOF robot arm for pesticide spraying with inverse kinematics using
Arduino offers numerous benefits, including precision, safety, resource efficiency, and
flexibility. The project's conclusions can shed light on the potential for automation in
agriculture and provide a foundation for further advancements in robotic technology for
farming applications.

32
10. FUTURE SCOPE
1. Robotics and Automation: As robotics and automation continue to advance, there will
be an increasing demand for efficient and accurate solutions to inverse kinematics
problems. 2DOF robots are often used in simple pick-and-place tasks, and further
advancements in their applications will require improved and optimized inverse kinematics
algorithms.
2. Human-Robot Interaction: In fields like medical robotics and rehabilitation, 2DOF
robots may play a role in assisting or augmenting human capabilities. The ability to solve
inverse kinematics problems for such robots will be crucial in ensuring smooth and natural
interactions between robots and humans.
3. Virtual Reality and Gaming: In the realm of computer graphics and animation, 2DOF
inverse kinematics can be utilized to create realistic and interactive character movements,
particularly in 2D games or simulations.
4. Education and Research: Inverse kinematics problems, including 2DOF systems,
remain an essential topic in robotics and engineering education. Future developments may
involve the creation of user-friendly software or tools to help students and researchers
understand and experiment with inverse kinematics concepts.
5. Multi-Robot Systems: As the deployment of multi-robot systems becomes more
common, the coordination and control of robots become increasingly complex. 2DOF
inverse kinematics could be applied to specific tasks within these systems, contributing to
overall efficiency and coordination.
6. Motion Planning: Inverse kinematics is a fundamental aspect of motion planning for
robots. As robots become more ubiquitous and diverse in their applications, the need for
advanced motion planning techniques involving 2DOF systems will rise.
7. Miniature and Micro-Robots: With the growing interest in miniature and micro robots
for various applications, including medical procedures, exploration, and environmental
monitoring, solving inverse kinematics problems for these small-scale systems will present
unique challenges and opportunities.
8. Optimization and Machine Learning: There is potential to combine inverse kinematics
with optimization methods or machine learning techniques to enhance performance and
handle more complex scenarios efficiently.

33
REFERENCES
[1] Hirose, S., Chu, R. “Development of a Lightweight Torque Limiting M-Drive Actuator
for HyperRedundant Manipulator Float Arm”, ICRA 1999, pp.2831-2836
[2] Neo Ee Sian; Yokoi, K.; Kajita, S.; Kanehiro, F.; Tanie, K., "Whole body teleoperation
of a humanoid robot – development of a simple master device using joysticks," Intelligent
Robots and Systems, 2002. IEEE/RSJ International Conference on , vol.3, no.,
pp.2569,2574 vol.3, 2002 doi: 10.1109/IRDS.2002.1041657
[3] Lim, S., Lee, K., & Kwon, D. (2003). Human friendly interfaces of robotic manipulator
control system for handicapped persons. Proceedings of the 2003 IEEE/ASME …, (Aim),
435–440. Retrieved from http://robot.kaist.ac.kr/paper/article.php?n=53
[4] Assad, C., Wolf, M., Stoica, A., Theodoridis, T., & Glette, K. (2013). BioSleeve: A
natural EMG-based interface for HRI. 2013 8th ACM/IEEE International Conference on
Human-Robot Interaction (HRI), 69– 70. doi:10.1109/HRI.2013.6483505
[5] R. M¨uller-Cajar, R. Mukundan, ‘Triangulation: A New Algorithm for Inverse
Kinematics’, Proceedings of Image and Vision Computing New Zealand 2007, pp. 181–
186, Hamilton, New Zealand, December 2007
[6] K. C. Gupta and K. Kazerounian, “Improved numerical solutions of inverse kinematics
of robots,” in Proceedings of the 1985 IEEE International Conference on Robotics and
Automation, vol. 2, March 1985, pp. 743–748
[7] Pedro Neto, J. Norberto Pires & A. Paulo Moreira, Accelerometer-based control of an
industrial robotic arm. Robot and Human Interactive Communication.2009, ROMAN 2009
[8] Amin, A. T. M., Rahim, A. H. A. & Low, C. Y. (2014). Adaptive controller algorithm
for 2- DOF humanoid robot arm. Procedia Technology, 15, 765–774.
https://doi.org/10.1016/j.protcy.2014.09.049
[9] Bonkovic, M., Stipanicev, D. & Stula, M. (1999). Control of robot arm approach by
Fuzzy Pattern comparison technique. Springer, Berlin, Heidelberg, 246 - 252
https://doi.org/10.1007/3-540-48774-3_29
[10] Branch, I. (2012). A new method for position control of a 2-DOF robot arm using
neuro – fuzzy controller. Indian Journal of Science and Technology, 5(3), 2253– 2257.
[11] Craig, J. J. (2005). Introduction to Robotics. IEEE Expert, (3rd ed., Vol. 1). Pearson
Education International. https://doi.org/10.1109/MEX.1986.4306961
[12] David, I & Robles, G. (2012). PID control dynamics of a robotic arm manipulator with
two degrees of freedom. Control de Processos Y Robotica

34
APPENDIX A
CODE
#include <Servo.h>
Servo S_servo; // create servo object to control a servo
Servo E_servo; // create servo object to control a servo
// twelve servo objects can be created on most boards
float pos_X = 0.0; // variable to store the servo position
float pos_Y = 0.0; // variable to store the servo position
float Shoulder_Angle = 0.0;
float Elbow_Angle = 0.0;
float len1=7.5;
//float len2=6.0;
float len2=21.0;
float len3=5.5;
//float len4=5.5;
float len4=22.0;
float a1;
float a2;
float a3;
float a4;
float r1 = 0.0;
float phi1 = 0.0;
float phi2 = 0.0;
float phi3 = 0.0;
float T1 = 0.0; // T1 is theta 1 in radians
float T2 = 0.0; // T2 is theta 2 in radians
float angle_1 = 0;
float angle_2 = 0;
float Hardware_min_ang1=0;
float Hardware_max_ang1=0;
float Software_min_ang1=0;
float Software_max_ang1=0;
float ang1= 0.0;

35
float Hardware_min_ang2=0;
float Hardware_max_ang2=0;
float Software_min_ang2=0;
float Software_max_ang2=0;
float ang2= 0.0;
void setup() {
Serial.begin(9600);
S_servo.attach(9); // attaches the servo on pin 9 to the servo object
E_servo.attach(10); // attaches the servo on pin 10 to the servo object
}
void loop() {
pos_X = 40.0;
pos_Y = 20.0;
a1=len1; // lenght of link a1 in cm
a2=len2;
a3=len3;
a4=len4;
r1 = sqrt(pos_X * pos_X + pos_Y * pos_Y); // Eq 1
phi1 = acos(((a4*a4) - (a2*a2) - (r1 * r1)) / (-2.0 * a2 * r1)); // Eq 2
phi2 = atan(pos_Y/pos_X); // Eq 3
T1 = phi2 - phi1;
phi3 = acos(((r1*r1) - (a2*a2) - (a4 * a4)) / (-2.0 * a2 * a4)); // Eq 5
T2 = 3.14159 - phi3; // Eq 6
angle_1 = ((T1/3.14159)*180.0); // T1 is theta 1 in Degrees
angle_2 = ((T2/3.14159)*180.0); // T2 is theta 1 in Degrees
Hardware_min_ang1=0;
Hardware_max_ang1=160;
Software_min_ang1=0;
Software_max_ang1=180;
ang1=((((Software_max_ang1-Software_min_ang1)/(Hardware_max_ang1 -
Hardware_min_ang1))*(angle_1-Hardware_min_ang1))+Software_min_ang1);
Hardware_min_ang2=-0;
Hardware_max_ang2=160;
Software_min_ang2=0;

36
Software_max_ang2=180;
ang2=((((Software_max_ang2-Software_min_ang2)/(Hardware_max_ang2 -
Hardware_min_ang2))*(angle_2-Hardware_min_ang2))+Software_min_ang2);
Shoulder_Angle = ang1;
Elbow_Angle = ang2;
Serial.println("============================");
Serial.println(Shoulder_Angle);
Serial.println(Elbow_Angle);
Serial.println("============================");
S_servo.write(Shoulder_Angle);
delay(60);
E_servo.write(Elbow_Angle);
delay(60);
}

37

You might also like