SlideShare ist ein Scribd-Unternehmen logo
1 von 147
Downloaden Sie, um offline zu lesen
Final Project Report of BE (IE) 2007
PR IIEE 15b 433 2007
Automatic Spray Painter Using Articulated
2-DOF Robotic Arm
Shahzad Ali 1533
M. Ayaz Butt 1520
M. Zeeshan Taj 1528
S.M. Umer 1537
Submitted to In-charge
Final Project
Ashab Mirza
Associate Professor IIEE
SUPERVISORS OF THE PROJECT
EExxtteerrnnaall PPrroojjeecctt SSuuppeerrvviissoorr
MMrr.. KKaasshhiiff IIsshhaaqq
LLeeccttuurreerr aatt PPAAFFKKIIEETT KKaarraacchhii
BBEE ((IInndduussttrriiaall EEllccttrroonniiccss)) IIIIEEEE NNEEDDUUEETT,,
KKaarraacchhii
EEmmaaiill:: kkaasshhiiff99774444@@ggmmaaiill..ccoomm
IInntteerrnnaall PPrroojjeecctt SSuuppeerrvviissoorr
MMrr.. AAssiiff MMeemmoonn
LLeeccttuurreerr aatt IIIIEEEE KKaarraacchhii
BBEE ((EElleeccttrriiccaall)) KKUUEETT
PPrroojjeecctt WWoorrkk IInncchhaarrggee
MMrr.. AAsshhaabb MMiirrzzaa
AAssssoocciiaattee PPrrooffeessssoorr aatt IIIIEEEE
MMSS ((AAeerroossppaaccee EEnngggg..)) EENNSSAAEE,, TToouulloouussee,, FFrraannccee
BBEE ((EElleeccttrroonniiccss)) NNEEDDUUEETT,, KKaarraacchhii
EEmmaaiill:: aasshhaabbmmiirrzzaa@@yyaahhoooo..ccoomm
TEAM MEMBERS Enrollment No.
Shahzad Ali IIEE-610
(Group Leader)
Cell: +92-333-2881912
Email: shahzad_iiee@yahoo.com
M. Ayaz Butt IIEE-597
Cell: +92-321-2325699
Email: buttie85@yahoo.com
M. Zeeshan Taj IIEE-605
Cell: +92-334-6046054
Email: zeeshantaj@yahoo.com
S.M. Umer IIEE-614
Cell: +92-0321-2507838
Email: iiee_1537@yahoo.com
.
ACKNOWLEDGMENT
We would like to express our sincere thanks to SIR H.K Raza (NEDUET), who
contributed in our project selection by giving basic information about primary design
criterion and initial steps for the task; Sir Farhan Khan (NUST Karachi), who helps us in
the selection of dc servo motor of specific parameter suitable for this task; Sir Shafiq
(UIT Karachi), his valuable comments and suggestions have greatly inspired us to
proceed with this project especially for hardware design; Sir Ashab Mirza (IIEE
Karachi), whose valuable comments greatly helped us in completion of this project and
especially in documenting this report; and many more whose suggestions and valuable
comments paid the role in completing this project. It was their affection for us that they
guided us time to time for the successful completion of our project. They transferred their
practical experience to us very devotedly. Their great affection on this occasion enabled
us to have a practical view of the concepts we gained in the theory subjects.
CONTENTS
PREFACE 1
1. PROCESS AUTOMATION
1.1. Introduction 4
1.2. Automation and Robotics 4
1.3. Project Description 8
1.4. Block Diagram 15
1.5. Overall System 17
1.6. Possible Solutions 21
1.7. ON-OFF Controller 22
1.8. Summary 24
2. ANALYSIS AND SIMULATION
2.1. Introduction 25
2.2. Mathematical model 25
2.3. Stability of Open Loop System 33
2.4. Kinematics of Robotic Arm 37
2.5. Robotic Arm Trajectory Planning 44
2.6. Summary 49
3. IMPLEMENTATION PROPOSAL
3.1. Introduction 50
3.2. Sensory System of Robotic Arm 50
3.3. Controller and Electronics 53
3.4. Actuation System for the Task 56
3.5. Arm Manipulator 65
3.6. Designing of Digital Controller 67
3.7. Transient Analysis 68
3.8. Software Section 72
3.9. Summary 81
4. MECHANICAL STRUCTURE
4.1. Introduction 82
4.2. Material Selection 82
4.3. Physical Parameters 82
4.4. Problems and Solutions 83
4.5. Parts of Robot 83
4.6. End-Effector 88
5. CONCLUSION
5.1. Achievements 91
5.2. Recommendations 92
BIBLOGRAPHY & REFERENCES 93
APPENDEX
A-1 PIC16F877A Coding
A-2 Visual Basic Coding
A-3 Data Sheets
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
1
PREFACE
The Project named “Automatic Spray Painter by Articulated 2-DOF
Robotic Arm” is selected on mutual understanding due to keen interest in
Automation and Robotics field and found only way to learn about Automation and
Robotic technology by this Project. Automation and Robotics technology is future
of our industries and leading technology of western industries. This project is
concerned with our Engineering field Industrial Electronics so this gave great
opportunity to perform the task. This Project covers almost all subjects that are
studied during our studies from simple Electronics to Digital Control Engineering.
Purpose of this project is to learn problem solving techniques and design
techniques on this level. This project would give much knowledge about linear
control system practically. The reason to choose spray painting operation for
automation was due to the fact that Spray Painting is the most common example of
the general class of the robotic arm application. The later termed suggests the
broader range of the possible application which includes painting. The spray
coating process makes use spray gun directed at the object to be coated fluid (e.g.
paint) flows through the nozzle of the spray gun to be dispersed applied over the
surface of the object. The work environment of the human being who performs this
process is filled with health hazards. These hazards include noxious fumes in the
air, risk of the flash fires & noise from nozzle. The environment is also believed to
poise a carcinogenic risk for workers. Largely because of these hazards, robotic
arms are being used with increase frequency for spray coating task.
The initial problem faced in the selection of this task is the feasibility of
this project and physical realization on this level. For this initial decision was to
design two DOF Robotic Arm rather than three as it was suppose to be suitable for
design on this level. The next problem was its dynamics and Kinematics. Most of
dynamics and Kinematics of Arm Manipulator is based on non-linear theory. For
this our group consulted with teachers associated with this field and concluded that
the first step of designing is to assume the area of workspace and modeled the
system to estimate the span, displacement, velocity and acceleration of each joint.
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
2
For the modeling of system it was necessary to develop linear model which was
most difficult due to the fact that most of Robotic Arm modeling is based on non-
linear theory. The solution of this problem took some time and after long internet
search it was found that Arm manipulator is the application of Inverted Pendulum,
so this solved our Dynamics problem and thus, system was modeled easily.
Another problem faced was the Mechanical design. For this many rough sketches
were drawn and many of models were downloaded from various websites. The
difficult thing was the selection of mechanical design with respect to our design
requirement. Our design requirement was yaw movement of shoulder and pitch
movement of elbow with simplicity because of level of designing. Mechanical
designs downloaded were not at our level as they were on professional level. The
solution of the problem was the visit of different universities and institutions to
view existing mechanical designs of many Robotic Arms projects. Different
concepts were taken from mechanical designs, from those concepts rough sketches
were drawn and after modifications mechanical designs was finalized. Another
problem was the selection of motor for actuation purpose. The choice of Servo
motor over stepper motor was due to the fact that it made design of control system
easy and simple. Selection of motor was not so problem as our project in charge
suggested us for servo motor in the beginning of task. Type of servo motor selected
was RC-coupled servo motor because it provides six slider potentiometer as
feedback position sensor, comparator, PID-controller and H-bridge of MOSFETs
for motor driving stage which made system designing very easy. The real problem
was the selection of motor of particular torque. This all is done through
mathematical model. The last problem was the selection of type of digital
controller to be design for the system. There were several options for controllers
but choice was to be made from digital PID-controller or simple ON-OFF
controller. For our level ON-OFF controller was the best option. These were
several problems faced by us during performance but by the grace of Allah
almighty and with the help of teachers these problems were solved easily.
We would like to express our sincere thanks to SIR H.K Raza (NEDUET),
who contributed in our project selection by giving basic information about primary
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
3
design criterion and initial steps for the task; Sir Farhan Khan (NUST Karachi),
who helps us in the selection of dc servo motor of specific parameter suitable for
this task; Sir Shafiq (UIT Karachi), his valuable comments and suggestions have
greatly inspired us to proceed with this project especially for hardware design; Sir
Ashab Mirza (IIEE Karachi), whose valuable comments great helped us in
completion of this project and especially in documenting this report; and many
more whose suggestions and valuable comments paid the role in completing this
project. It was their affection for us that they guided us time to time for the
successful completion of our project. They transferred their practical experience to
us very devotedly. Their great affection on this occasion enabled us to have a
practical view of the concepts we gained in the theory subjects
CHAPTER 1
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
4
1.1 INTRODUCTION
This chapter deals with detail concept about industrial automation and
robotics. This chapter concern with basic concepts about our task and type of robot
selected for our project and type of joint used in it. Detail Block diagram and
general schematics are also discussed with type of digital controller used. After
going through this chapter readers find them selves well aware about automation
and robotics and about our project.
1.2 Automation and Robotics
Automation is the use of electrical, hydraulic or pneumatic power to move stage
machinery, staging, performers or scenery. The effectiveness of any automation
system depends entirely on the quality of its underlying electrical, mechanical and
control engineering. As computers have changed all aspects of the entertainment
industry so the advances have revolutionized automation making sophisticated
effects ever more widely available. Both in a performance environment and as part
of the supporting infrastructure, the uses and advantages of automation are
manifold. [25]
1.2.1 Advantages of Automation
Absolute control of speed and position Repeatability of moves
1. Coordinating multiple piece moves
2. Offline editing and simulation
3. Moving pieces in complicated paths
4. Reduced manual handling
5. Repeating moves indefinitely
6. Automatic safety checking
7. Improved efficiency
8. Safe movement of a single piece controlled by
9. several motors
10. Movement in confined spaces
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
5
1.2.2 Robotics: Flexible Automation
Most manufacturing automation is called fixed automation. A stamping
machine can stamp only one kind of sheet metal part without being retooled, for
example, or a boring machine bores only one kind of hole in one kind of part.
When robots are part of an automatic process, the process can be changed by
changing the programming of the robots. Robotic automation is called flexible
automation [28].
1.2.2.1 Definition of Robot
Robots are more and more used in industrial and commercial applications.
Now, the number of robots in use is increasing at the rate of about 35% per year.
Sales volume is also increasing at the same rate.
Some of the reasons for the increased use of robots are as follows:
 Reduced Production Cost.
 Increased Productivity.
 Improved Product Quality.
 Operation in Hazardous and Hostile Environment.
 Improved Management.
 Decreased Reaction and Debugging Time
A robot is an autonomous artifact that obtains information by sensing the world
around it and uses the information to manipulate its environment to achieve goals.
Robot sensing includes vision, sound, touch, and others. Manipulation includes the
use of specialized tools and dexterous manipulation. Robots often have the ability
to change their locations in the world (locomotion).
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
6
1.2.2.2 Sensing
If robots didn‟t have autonomy, they wouldn‟t need sensing. They could
have all their actions pre-programmed into them, but their capabilities would be
considerably limited. With sensing, the robot must use the information acquired
from the sensors in deciding what to do next.
The information from the sensors will only make sense if the robot has
some way of using the information to create or modify a model of the world. The
process of using sensor data is called representation. Representation and decision
making require intelligence
Figure1.1 SCARA Arm Manipulator
.
1.2.2.3 Intelligence
One common approach to robotics is to use a sensing-action cycle. The
robot takes sensor data to build or modify a model of the world around it. Then it
uses its objectives (goals) to decide how to operate on the world model to achieve a
particular goal or sub-goal. Then it performs the action and repeats the cycle.
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
7
Different robot applications require different intelligence strategies. Some
applications require complex planning algorithms. Others where speed is important
have simple and fast programs
1.2.2.4 Manipulation
Manipulation is the area of robotics concerned with finding a good grip
(grasping) and then handling objects so that objectives are met.
In handling an object, there are a large number of “configurations” of the
gripper on the object. The robot has to know how to compute an acceptable grip. If
there is an error, the robot could drop the object it picks up, or won‟t be able to
properly hand it off or put it where it belongs.
For example, suppose a robot needs to hand a pan of water to a person or
another robot. If the first robot‟s hand completely covers the handle, the person or
second robot won‟t be able to take the pan.
1.2.2.5 Computer Vision
Another very rich and interesting research area is computer vision. This
usually requires constructing a 3D model of the world based on the images from
one or more cameras.
Many vision systems use “binocular vision” similar to humans. Others use
laser range finders, sonar, or radar. Stereoscopic vision can be constructed using
one camera and moving it from place to place in the scene to be modeled.
1.2.2.6 Artificial Intelligence
Navigation, manipulation, and computer vision all require artificial
intelligence. However, artificial intelligence goes beyond those three strictly
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
8
robotic disciplines. Realizing the fullest capabilities of robots will require speech
understanding and common sense reasoning. For a robot to communicate with
people, it will require to have understanding of the world, or at least understanding
of its domain environment. Research projects to achieve this goal have been
underway at universities for many years [28].
1.3 PROJECT DESCRIPTION
Our Project named “Automatic Spray Painter By Articulated 2DOF-
Robotic Arm” is the implementation of theoretical concepts of Modern Control
System. This Project is related with Automation and Robotics (as a Linear System)
theory in Laboratory conditions.
The theme of this Project is to Design 2 Degree of Freedom Robotic Arm
Control in which 2DOF Control will be:
1) Yaw Control of Shoulder.
2) Pitch Control of Elbow.
All of these Controls will be Servo Mechanism based. The Controls of this
system is based on Linear Control system (as some of Robotic Arm Control
System considered as Non-Linear) and is an application of Inverted pendulum. The
End Effecter of this System is Nozzle connected with small compressor (filled with
color) through thin rubber pipe. Flow control of color from Nozzle is through
Servo control Valve. The Work space is Thin Metal Plate of specific Dimensions.
Our goal is to Design Economical, Light Weight, Reliable System which
could be useful for future students to work with this system to achieve more
achievements in Automation & Robotics field.
.
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
9
1.3.1 Types of Arm Manipulators
Manipulators are grouped into classes according to the combination of
joints used in their construction. A Cartesian geometry arm (sometimes called a
gantry crane) uses only prismatic joints, and can reach any position in its
rectangular workspace by Cartesian motions of the links. By replacing the waist
joint of a Cartesian arm with a revolute joint, a cylindrical geometry arm is formed.
This arm can reach any point in its cylindrical workspace (a thick-shelled cylinder)
by a combination of rotation and translation. If the shoulder joint is also replaced
by a revolute joint, an arm with a polar geometry is formed. The workspace of this
arm is half thick spherical shell, and end effectors positions are best described with
polar coordinates. Finally, replacing the elbow joint with a revolute joint results in
a revolute geometry, or articulated arm. The workspace of an articulated arm is a
rather complex thick walled spherical shell. The outside of the shell is a single
sphere, but the inside is a set of intersecting spheres.
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
10
Figure 1.2 Manipulators of various joint types
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
11
1.3.2 Cartesian Arm Manipulator
Looking at figure 2.1(a), type of each joint of manipulator is:
 Prismatic waist
 Prismatic shoulder
 Prismatic elbow
Advantages of above mentioned Cartesian arm manipulator are:
 Linear motion in three dimensions
 Simple kinematics model
 Rigid structure
 Easy to visualize
 Can use inexpensive pneumatic drives for pick and place operation.
Besides above mentioned advantages, it has a few drawbacks also. Which are:
 Requires a large volume to operate in
 Work space is smaller than robot volume
 Unable to reach areas under objects
 Guiding surfaces of prismatic joints
 Must be covered to prevent ingress of dust
1.3.3 Cylindrical Arm Manipulator
Looking at figure 2.1(b), type of each joint of manipulator is:
 Revolute waist
 Prismatic shoulder.
 Prismatic elbow
Advantages of above mentioned cylindrical arm manipulator are:
 Simple kinematics model
 Easy to visualize
 Good access into cavities and machine openings
 Very powerful when hydraulic drives used
Besides above mentioned advantages, it has a few drawbacks also. Which are:
 Restricted work space
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
12
 Prismatic guides difficult to seal from dust and liquids
 Back of robot can overlap work volume
1.3.4 Spherical Arm Manipulator
Looking at figure 2.1(c), type of each joint of manipulator is:
 Revolute waist.
 Revolute shoulder
 Prismatic elbow
Advantages of above mentioned spherical arm manipulator are:
 Covers a large volume from a central support
 Can bend down to pick objects up off the floor
Besides above mentioned advantages, it has a few drawbacks also. Which are:
 Complex kinematics model
 Difficult to visualize
1.3.5 Articulated Arm Manipulator
 Revolute waist.
 Revolute shoulder.
 Revolute elbow
Advantages of above mentioned spherical arm manipulator are:
 Maximum flexibility
 Covers a large work space relative to volume of robots
 Revolute joints are easy to seal
 Suits electric motors
 Can reach over and under objects
Besides above mentioned advantages, it has a few drawbacks also. Which are:
 Complex kinematics
 Difficult to visualize
 Control of linear motion is difficult
 Structure not very rigid at full reach
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
13
1.3.6 Joint selected for the task
1.3.6.1 Articulated Arm Manipulator
The common industrial manipulator is often referred to as a robot arm, with
links and joints described in similar terms. Manipulators which emulate the
characteristics of a human arm recalled articulated arms. All their joints are rotary
(or revolute). Representative articulated manipulators are the ASEA robot
1.3.6.2 Degree of freedoms
The motion of articulated robot arms differs from the motion of the human
arm. While robot joints have fewer degrees of freedom, they can move through
greater angles. For example, the elbow of an articulated robot can bend up or down
whereas a person can only bend their elbow in one direction with respect to the
straight arm position. Many applications do not require arms with articulated (or
revolute) geometries. Simpler geometries involving prismatic or sliding joints are
often adequate. Prismatic and revolute joints represent the opposite extremes of a
universal screw. In a revolute joint, the screw pitch is zero, constraining the joint to
pure rotation. In a prismatic joint, the pitch is infinite, constraining the joint to pure
sliding motion. Revolute joints are often preferred because of the strength, low
friction and reliability of ball bearings. Joints that allow a combination of
translation and rotation (such as lead screws) are not normally used to join the
links of robot arms [29].
1.3.6.3 Work space consideration
Workspace considerations, particularly reach and collision avoidance, play an
important part in the selection of a robot for an application. All manufacturers give
detailed specifications of the work space of their robots and associated equipment.
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
14
1.3.7 SCARA Robot
Consideration of the motions involved in assembly has led to the
development of simpler arm geometry for use in assembly applications, known as
the SCARA (Selective Compliance Automatic Robot Arm) geometry. While all
SCARA robots have the same geometry the name SCARA does not have a
geometric basis. Most assembly operations involve building up the assembly by
placing parts on top of a partially complete assembly. A SCARA arm has two
revolute joints in the horizontal plane, allowing it to reach any point within a
horizontal planar workspace defined by two concentric circles. At the end of the
arm is a vertical link which can translate in the vertical direction, allowing parts to
be raised from a tray and placed on to the assembly. A gripper placed at the end of
this link may be able to rotate about the vertical axis of this link, facilitating
control of part orientation in a horizontal plane. One problem in achieving
spherical wrist design is the physical difficulty of fitting all the components into
the available space. The size of the human wrist is small because the muscles
which power it are located in the forearm, not in the wrist. Wrist design is a
complex task, involving conflicting goals. Desirable features of a wrist include
[29]
 Small size
 Axes close together to increase mechanical efficiency
 Tool plate close to the axes to increase strength and precision
 Soluble mathematical model
 No singularities in the work volume
 Back-driving to allow programming by teach and playback
 Decoupling between motions around the three axes
 Actuators mounted away from the wrist to allow size reduction
 Paths for end effectors control and power through the wrist
 Power proportionate to the proposed task
 Rugged housing.
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
15
1.4 BLOCK DIAGRAM
Block diagram is the way for initial system representation. It provides the
specified way for system designing. By follow the blocks in block diagram with
calculated parameters system can be designed easily as shown in figure 1.3.
Figure 1.3 Block Diagram of Robotic Arm
1.4.1 Sensor
The sensor is an electronic device that transforms physical (environmental)
data into electrical signals. Sensors can provide some limited feedback to the robot.
Robots can be designed and programmed to get specific information that is beyond
what our senses can tell us. For instance, a robotic sensor might "see" in the dark,
detect tiny amounts of invisible radiation or measure movement that are too small
or fast for the human eye to see All the above mentioned parts are used together in
order to accomplish the robot its mission.
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
16
1.4.2 Controller
Every robot is connected to a controller (usually a microcontroller), also it
can be connected to a simple home PC, which keeps the pieces of the arm working
together. The controller functions as the "brain" of the robot. Robots today have
controllers that run programs. Usually, entirely pre-programmed by people, robots
have very specific jobs to accomplish.
In the block diagram representation of Robotic Arm system there are three
separate servo- Control systems(feedback control loops) due to the fact that
physics involve in system dynamics(motor as an actuator) in Robotic Arm is on the
concept of “Absolute Frame of Reference “. So, three separate Feedback control
loops are drawn having digital input through digital computer with designed
sampled time “T” having switching sequence between loops as desired.
Digital controllers are of “ON-OFF type” for shoulder, elbow and valve
dynamics which are Plants of the system. Feedback sensor is position sensor and is
part of Servo motor by combining called Servomechanism. TL is the Load Torque
on joints due to Actuation Mechanism involving gear & belt system. D/A converter
is to convert discrete signal in to Continuous time signal and A/D converter is to
convert Continuous time signal in to Discrete signal [12].
1.4.3 Robotic Arm
Robotic arms come in all shapes and sizes. The arm is the part of the robot
that sets the end- effectors and sensors to do their preprogrammed job. Many (but
not all) resemble human arms and have shoulders, elbows, and wrists, even fingers.
Each joint gives to the robot one degree of freedom. So, a simple robotic arm with
three degrees of freedom could move in three ways: up and down, left and right,
forward and backward.
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
17
1.4.4 Actuation System and Drive
The drive is the engine that drives the links (the sections between the joints)
into their desired position. Very common devices that robots use as drives are
Servomotors and Step-Motors. These two categories are usually connected directly
to a microcontroller. The microcontroller triggers them by generating specific
pulses. They are very useful because they have flexible moving and opposed to the
simple motors they can be set at very specific positions each time. Also, a
characteristic that makes them useful for robots is that they can handle with heavy
items. In other words these kinds of motors can carry heavy parts [15].
1.4.5 End-Effectors
The end-effectors is the "hand" connected to the robots‟ arm. It could be a
tool such as a gripper, tweezers or a scalpel. So, the end-effectors are the part of
the robotic system that characterizes its implementation.
1.5 OVER ALL SYSTEM
Over all system is represented by General Schematics. The General
Schematics of the system have four parts. First part is Comparator and Controller
part which is digital controller (ON-OFF type). Comparison and Controller is done
by using PIC microcontroller. Second part of the system is motor driving stage
consist of H-bridge for bidirectional switching of system. Third stage is servo
mechanism consist of Servo motor with gear system. The last stage is the Plant
which of course Arm Manipulator. General Schematic of system is shown in
figure 1.4.
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
18
Figure 1.4 General Schematic of Robotic Arm
1.5.1 System Description
All the work controlling the servos is done in the preprogrammed PIC
micro-controller (  C). As such the kit provides a text-book example of how a  C
can replace a handful of IC‟s & other glue chips. Everything is done in software.
Connect a 5V power supply capable of delivering an amp. The input signals are
between 0 - 5V delivered by connecting up the potentiometers as voltage dividers.
Inside the PIC an AD converter (multiplexed when there is more than one input
signal) changes the voltage signal into the Pulse Code Modulation system used by
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
19
servo motors. This signal is a 5V pulse between 1 and 2 mSec long repeated 50
times per second. That is, a 20msec frame rate.
The width of the pulse determines the position of the server. Most servos
will move to the center of their travel when they receive a 1.5msec pulse. One
extreme of motion generally equates to a pulse width of 1.0msec; the other extreme
to 2.0msec with a smooth variation throughout the range, and neutral at 1.5msec.
The period between the pulses is used to synchronize the receiver. Servos are
closed loop devices. They are constantly comparing their position (proportional to
the pulse width) to their actual position (proportional to the signal voltage input.) If
there is a difference between the two the servo electronics will turn the motor to
adjust the difference error. This also means that servos will resist forces which try
to change their position. When a servo is not receiving positioning pulses (i-e not
being provided with power) the output shaft can be easily turned by hand. [18]
1.5.2 Electronics
To guide the servomotors on when and how to move, an electronic board is
needed. On the board (Figure 1), there are some electronic circuits that give to the
preprogrammed microcontroller the ability to communicate with the peripheral
devices (servomotors, sensors, PCs). The board has inputs and outputs that are
connected to the microcontroller. Four outputs are used for the servomotors and
one input for the sensor. One I/O interface based on a DB-9 RS-232 is used for
transferring data from and to a PC when connected. The microcontroller is a PIC
model 16F877A (Microchip). PIC has 13 I/O pins, an 8-bit microprocessor and 1K
of RAM. Its circuit is a usual TTL/CMOS based and so its V is +5V. Using the
PWM (Pulse Width Modulation) technique, PIC controls the servomotors. Also
PIC inputs receive signals that come from sensors and may be useable at any case.
In our work we use a supersonic sensor, which transmits high frequencies and then
receives the reflections. In this way PIC can understand where and in which height
a CD is, related to the ground. The board may also communicate with other
external sensors via the PC interface (for sensors connected on the PC) or get
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
20
connected with more sensors attached to the board directly via its integrated
sockets (PIC16F877 Tutorial and basic explanations; Microchip PIC16F877A
Technical Specifications 2002; PIC16F877 Fundamentals and Programming
Examples; Programming the PIC16F877 Micro Controller and Data Sheets
Resource Centers Internet Sites).
1.5.3 Assembly
Check the components in the kit against the Components List. Some of the
resistors stand up on the board. Make sure to get the electrolytic capacitor and the
IC1 around the correct way. To complete the kit between 5K - 10K potentiometers
are required to produce the input signal. Connect each pot as a voltage divider with
the center pin going to the signal input. Servo motors are required. They have not
been included in this kit because users will usually have their own particular servos
they wish to control.
1.5.4 Servo Motor
Servo is a small device that has an output shaft. This shaft can be
positioned to specific angular positions by sending the servo a coded signal. As
long as the coded signal exists on the input line, the servo will maintain the angular
position of the shaft. As the coded signal changes, the angular position of the shaft
changes. In practice, servos are used in radio controlled airplanes to position
control surfaces like the elevators and rudders. They are also used in radio
controlled cars, puppets, and of course, robots [20].
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
21
Figure 1.5 Timing Diagram of Servo Motor
Servo motors are used in radio-controlled models (cars, planes), robotics,
theme park special effects, test equipment, industrial automation. At the hobbyist
end of the market they are small, compact and relatively inexpensive. The motors
themselves are black boxes which contain a motor, gearbox and decoder
electronics. Three wires go into the box; 5V, ground and signal. A short shaft
comes out of the motor which usually has a circular interface plate attached to it
Most servos will rotate through about 100 degrees in less than a second according
to the signal input. This Kit will control up to 4 servo motors simultaneously.
1.6 Possible Solutions
There are many possible solutions to design this system but two of them is
of our level which are:
1. To design digital PID controller for this system.
2. To design ON-OFF type controller for this system.
Both of these two controllers are applicable for digital controller design but due to
some reasons given in article 1.6 we select option two for controller design for this
system.
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
22
1.7 ON-OFF Controller
The controller is responsible to establish the link between computer and the
robot. The reason for that is that the computer outputs only a few mA, not enough
to start most motors. Therefore, a supply of power is usually appended to the
controller (a 9volts, 1A in the case of Lego motors which are simple DC motors).
Figure 1.6 Robot-Computer Interface
1.7.1 Choice of Motor
Before making a controller, you must choose what type of motors you want
to use; your design will greatly depend on it. Stepper motors are motors whose
rotation can be controlled with a high precision. However, they require a pretty
complex controller. Servos are pretty weird motors, since they can rotate no more
than 360 degrees. They are useful for short motion, but are clearly counter-
indicated for propelling a car! I did not found circuit information for controlling
servos. DC motors are the most simple to control. Presence of voltage on one
input makes them turn. They are however very imprecise.
The simplest way to control a dc motor is thru the use of a transistor.
Transistors act like switches. In the first figure, R1 is a 1 kilo-ohms resistance, and
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
23
R2 is any small resistance (10-300 ohms). Q1 is a very common type of transistor:
a 2N2222. See part list for a drawing of these, and this for a picture. A transistor
costs no more than 50 cents.
In order to control bi-directional a motor (ON/OFF, and clockwise or
counterclockwise), a H-type circuit is needed. In the second picture, if both upper
left and lower right transistors are ON, the current will flow through the motor
from left to right, yielding a CW rotation.
Trouble is that there is a lost of power. I have not been able to sink more than 500
mA through the motor in the H circuit. It is enough for small motors, but not for
the Lego-type motors who need a full 1 ampere of current.
One alternative is to replace transistors with power-MOSFET. I haven't try,
but you might look at MOSFET H-Bridge Schematic & Theory of Operation for
more. Another alternative that I explored in tutorial 2 is to use a mechanical switch
to control the direction of motion. Relays are electro-magnetic switch that can be
controlled easily with a transistor. Since the current is independent of the
transistor-magnet circuit, there is no lost of power [25].
1.7.2 Communication port
Personal computer needs to communicate to the controller. The two likely
methods are to use the ports available. There is two kind of port. The parallel port
(or printer port) is easy to program, but has a limited capacity at any given time. In
the best case, it can only output 8 bits of information, and can input from sensor 8
bits.
There is a large variety in sensors, ranging from electronic thermometer to
pressure sensors. The simplest kind is the on/off sensors. When pressure is applied,
the switch turns on. One bit of information is enough per sensor.
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
24
1.7.3 Sending Command/Receive Data
The first layer is only a list of what can possibly be done with your robot.
Now we need to send specific commands to your robot. Commands can be very
simple, such as "Start motor 3 now", or more complex, such as "Start motor 3, wait
5 seconds, start motor 2, and when sensor 2 gets on, stop all moves." The VBASIC
interface that I proposed in another page is an example which can send only simple
commands. A better interface would accept commands such as "Turn motor 3 for x
seconds" or "Turn motor 3 until sensor 2 gets on".
1.7.4 Constrain Control
Not all moves are safe for the health of your robots. For example, turning
the arm to the left for an indefinite time is risky if your arm cannot do more than
360 degree turns (and most arms can not do that much).
In order to avoid wreckage, your robot should know things about its
limitations. These are called constraints. Example of constraints are:
If the base is turning for more than 5 seconds, then you ought to stop turning the
base.[25].
1.8 Summary
A basic of Robotic Arm is so important for every engineer to step in
Automation and robotics technology. Basic information provided in this chapter is
so helpful for the student of this level to design such type of manipulator on this
level that we proposed in this chapter. Type of block diagram, schematic, type of
controller etc is much helpful to collect idea for their designs.
CHAPTER 2
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
25
2.1 INTRODUCTION
This chapter contains mathematical work on robot manipulator dynamics
and kinematics. Concept of linear system is discussed in this chapter while
kinematics of manipulator is discussed by simple Trigonometrical relations.
Trajectory planning is discussed in this chapter on the behalf of kinematics. Open
loop stability of each joint is being issue in this chapter by using mathematical
tools and also by MATLAB.
2.2 MATHEMATICALMODELLING
Figure 2.1 Robotic Arm in Cartesian coordinate system
For the mathematical model of Robotic Arm dynamics as a linear system, we
analyze the dynamics of its two parts.
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
26
1. Shoulder dynamics
2. Elbow dynamics
Let us represent our system graphically in Cartesian coordinate system and analyze
its dynamics by considering some of important parameters involved in its
dynamics.
Some of the important parameters of Shoulder & Elbow kinematics are given as:
Table 2.1 General Parameters of Joints
General Parameters of Robotic
Arm
For Shoulder For Elbow
Horizontal component of force on pivot H1 H2
Vertical component of force on pivot V1 V2
The force due to torque per unit length Ft1
Ft2
Angular Displacement
1
 2

The angular acceleration ..
 1
..
 2
Acceleration of Joint moment ..
d 1
..
d 2
Weight Mg1 m2g2
Inertia J1 J2
Moment of Inertia
J1
..
 1 J2
..
 2
Displacement of Joints from its initial
position
d1 d2
Centripetal force Fc1 Fc2
Mass of Shoulder M m2
Length L l2
Torque
1 2
The linear displacement w.r.t. change in its angular displacement is our
output of joints (plant) movements. The order of equation of each joint depends on
the no. of DOF of that joint .The order of this system should be second order due to
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
27
one DOF of each joint. As this system is one of many applications of Inverted
Pendulum so linear model of this system is established by study the dynamics of
Inverted Pendulum. Many of models of Robotic Arm system is based on nonlinear
system on undergraduate level which is due to lack of awareness of designing on
this level. Following mathematical modeling lead the undergraduate engineers to
aware the proper analyses of dynamics of robotic arm system by consider it as
linear system [27].
To analyze dynamics of arm manipulator, first analyze their Direct
Kinematics & inverse kinematics of joints moment, then analyze the Transfer
Function of whole system.
To analyze the kinematics of arm joints, it is important to analyze kinematics of
shoulder & elbow separately. For this first of all sum the forces perpendicular to
the shoulder & elbow.
Applying condition of equilibrium
For Shoulder joint
1 1 1
J  
For Elbow joint
2 2 2
J  
Solving the systems along these axis ends up saving lot of algebra.
You should get the following equations [27].
For Shoulder
.. ..
1 1 1 1 1 1 1 1 1sin cos sin cosV H Mg ML M d        (2.1)
For Elbow
.. ..
2 2 2 2 2 2 2 2 2 2 2 2 2sin cos sin cosV H m g m l m d        (2.2)
Torque () on Shoulder joint
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
28
1 1 1
J  
Torque on Elbow joint
2 2 2
J   (2.3)
The force on shoulder due to turning effect of force per unit of its length is given
as,
..
2
1
2
tF ML
l

 
Where,
M = m1 + m2
L=l1+l2
Similarly, for Elbow,
..
2
22 2
2
tF m l
l

  (2.4)
The Centripetal Force act on the Shoulder,
2.
1cF ML (2.5)
Similarly for Elbow,
2.
22 2cF m l  (2.6)
To get rid of H1, H2, V1, V2 terms in the equations above, sum the moments
around the Centroids of the Shoulder & Elbow to get the following equations,
For Shoulder
..
1 1 1 1 1 1sin cosV L H L J     (2.7)
For Elbow
..
2 2 2 2 2 2 2 2sin cosV l H l J     (2.8)
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
29
Equations (2.7) & (2.8) are based on the law of equilibrium i.e. sum of clockwise
torque is equal to sum of anti clockwise torque.
For Shoulder, multiply eq. (2.5) by l1 and add in eq. (2.7), by this dynamic eq. of
Shoulder is evaluated as:
.. .. ..
2
1 1 1 1 1 1 1sin cosMg L ML M d L J      
.. ..
2
1 1 1 1 1 1( ) sin cosJ ML Mg L MLd      (2.9)
Similarly, for Elbow:
.. ..
2
2 2 2 2 2 2 2 2 2 2 2 2( ) sin cosJ m l m g l m l d      (2.10)
Taking, g1 = g2 = g
Since MATLAB can only work with linear functions, which is strongest
tool to analyze this system. So, these sets of equations should be linearized about,
1 2   
Assume that,
   
Where,
Φ is representing a small angle from the vertical upward direction.
Therefore,
cos cos( ) 1     
While,
( )Sin Sin      
Also,
2.
0 
After linearization the two equations of motions becomes:
For shoulder
.. ..
2
1 1 1 1( )J ML MgL MLd    (2.11)
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
30
For Elbow
.. ..
2
2 2 2 2 2 2 2 2 2 2( )J m l m gl m l d    (2.12)
The direct kinematics of the system is given as:
For shoulder
2 2 2
1 1 1 1( )J ML D MgL ML D d   
Therefore time domain analysis of shoulder:
2 2
1 1
2
1
( ) ( )
( )
d t J ML D MgL
t MLD

 (2.13)
For Elbow
2 2
2 2 2 2 2 2
2
2 2 2
( ) ( )
( )
d t J m l D m gl
t m l D

 (2.14)
The above sets of equations for Elbow and shoulder represent the direct kinematics
of plant.
For inverse kinematics i.e. analyzing angular displacements of plants for given
space coordinate [27].
2.2.1 Actuation Mechanism
The actuation mechanism consists of belt & gear, driven by the DC motor
by which plant works (i.e. shoulder & elbow move).
So overall transfer function depends upon actuation mechanism will depend on
transfer function of DC motor, belt & external gear.
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
31
2.2.1.1 Belt & Gear
Load inertial to the motor consists of gear (of radius „r‟) & masses of
shoulder (i.e. m1) & elbow (i.e. m2).
Therefore, Load Torque is given as;
For elbow joint system
1
2
1 1.LT Mr D
Or,
1
2 2
1 1. ( )LT Mr D t
For elbow joint system
2
2 2
2 2 2. ( )LT m r D t
2.2.1.2 Motor
Dynamics of motor will also affect the transfer function of the actuation
mechanism.
Experimentally, the transfer function of armature control servo dc motor is given
as, [27]
.
( )
( ) 1
m
m
Kt
E t D




(2.15)
Or,
( )
( ) ( 1)
m
m
Kt
E t D D




(2.16)
Where,
Km = Steady state gain in rad/s/v
τm = Time constant for motor in sec
Therefore, overall actuation mechanism is given as for shoulder & elbow,
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
32
For elbow joint system
2 2
1 1
1
( )
( ) ( 1)
m
m
K Mr Dt
E t D D




2
11
1
( )
( ) ( 1)
m
m
K Mr Dt
E t D




(2.17)
For elbow joint system
Similarly,
2
2 2 2
2
( )
( ) ( 1)
m
m
K m r Dt
E t D




(2.18)
Differential equation of overall system
For shoulder joint system
 
 
2 2 2
1 1 1 1
1
2
1 1
( )
( ) 1
m
m
J Ml D Mgl K Mr Dd t
E t Ml D D
   

 
 
2 2 2
1 1 1 1
1
1 1
( )
( ) 1
m
m
K Mr J Ml D Mgld t
E t Ml D D
    
 
 
 
2 22
1 1 111
2
1 1
( )
( ) 1
m
m
J Ml D MglK rt
E t l D D


  
 
  
(2.19)
For elbow joint system
 
 
2 22
2 2 2 2 222
2
2 2
( )
( ) 1
m
m
J m l D m glK rt
E t l D D


  
 
  
(2.20)
By inserting transfer function values from specification table; differential equations
are given as, [27]
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
33
For shoulder joint system
 
2
1
1
( ) 21.4
0.2
( ) 5.52
t D
E t D D
  
  
 
(2.21)
For elbow joint system
 
2
2
2
( ) 20.7
0.076
( ) 5.52
t D
E t D D
  
  
 
(2.22)
Transfer function for Shoulder joint system,
2
1
2
1
( ) 0.2 4.28
( ) 5.52
s s
E s s s
 


(2.23)
Transfer function of Elbow joint system,
2
2
2
2
( ) 0.076 1.55
( ) 5.52
s s
E s s s
 


(2.24)
2.3 Stability of Open Loop System
In the light of mathematical model and transfer function in s-domain in
section 2.2. The next step towards designing of system is the analysis of its
stability. There are two ways of analysis. First by mathematical way and second
one is by computer simulation which is actually confirmation of mathematical way
of analysis.[2]
It is clear from the above roots of the system that system is marginary
stable in open loop that one of its pole lie at origin while others are at the left side.
Let the stability of system be analyzed by evaluating d(t) by applying
impulse at input i.e.
e(t) = σ(t)
Where, σ (t) = impulse input
From equation (2.23),
c(t) = 0 .775 – 0.575e-5.52t
(2.25)
Fort , c(∞) = 0.775
Above result clearly shows that system is not unstable in open loop and is
marginary stable for the roots mention above.
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
34
It is clear from the above roots of the system that system is marginary
stable in open loop that one of its pole lie at origin while others are at the left
side.[2]
Let the stability of system be analyzed by evaluating d(t) by applying impulse at
input i.e.
e(t) = σ(t)
Where, σ (t) = impulse input
From equation (2.24),
c(t) = 0 .280 – 0.21e-5.52t
(2.26)
Fort , c(∞) = 0.280
Above result clearly shows that system is not unstable in open loop and is
marginary stable for the roots mention above.
Results from computer simulation clearly confirm the mathematics for
stability analysis for open loop system. Pole-Zero maps in figure 2.2 of the
Shoulder joint system clearly proves that system is marginary stable.
From equation (2.23) in section 2.2 roots for Shoulder joint system is given as,
z1= j4.63, z2= -j4.63, p1= 0, p2= 5.52
Pole-Zero Map
Real Axis
ImaginaryAxis
-6 -5 -4 -3 -2 -1 0 1
-6
-4
-2
0
2
4
6
p=5.52
p=0
z=j4.63
z=-j4.63
Figure 2.2 Pole-Zero Map of Shoulder Joint
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
35
In open loop due to the fact in pole-zero maps one of the pole lie at origin
and other at left side confirms the marginal stability of shoulder joint system.
Figure 2.3 Impulse Response for Shoulder Joint
Impulse response of the shoulder joint system is shown in figure 2.3 clearly
shows that response of the shoulder joint system is settled down proves the
analysis in section 2.3.2
Results from computer simulation clearly confirm the mathematics for
stability analysis for open loop system. Pole-Zero maps in figure 2.4 of the
Shoulder joint system clearly proves that system is marginary stable.
From equation (2.24) in section 2.2 roots for Elbow joint system is given
as,
z1= j4.53, z2= -j4.53, p1= 0, p2= 5.52
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
36
Figure 2.4 Pole-Zero Map of Elbow Joint
In open loop due to the fact in pole-zero maps one of the pole lie at origin
and other at left side confirms the marginal stability of shoulder joint system.
Figure 2.5 Impulse Response of Elbow Joint
Pole-Zero Map
Real Axis
Imaginary Axis
-6 -5 -4 -3 -2 -1 0 1 2
-5
-4
-3
-2
-1
0
1
2
3
4
5
z=-j4.53
z=j4.53
p=5.52
p=0
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
37
Impulse response of the shoulder joint system is shown in figure clearly
shows that response of the shoulder joint system is settled down proves the
analysis in section 2.3.2
2.4 Kinematics of Robotic Arm
Robotic arms are common place in today's world. They are used to weld
automobile bodies, employed to locate merchandise in computerized warehouses,
and used by the Space Shuttle to retrieve satellites from orbit. They are reliable and
accurate. This reliability and accuracy is due to the computer a robot arm uses in
determining where and how it should move. This control computer is programmed
with some basic mathematics. In this paper, we will look at the mathematics
behind robot arms [21].
We will study the two-link robot arm shown in Figure 2.6
Figure 2.6 Two-Link Robotic Arm
Let, θ1 =A and θ2 =B
Most robot arms are more complicated than this, using three links and a
moveable "hand," but with these complications come much more difficult
mathematics. Operation of the two-link arm is simple. The first link (length L1)
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
38
pivots around the origin of an XY Cartesian coordinate system while the second
link (length L2) pivots about the connection between the two links. The two pivot
points are drawn as circles. The angle the first link makes with the horizontal (X)
axis is designated A, while the angle the second link makes with the first link is
designated B. The end of the second link is the position of the robot arm, (X, Y).
Arm position (X, Y)? This is simple trigonometry. The second problem is
"inverse kinematics." Here, we want to ask: given the position (X, Y), what angles,
A and B, yield this position? This is a more difficult problem. Lastly, we need to
look at the problem of "trajectory planning." In trajectory planning, we ask: given
our current position (X, Y) and some desired new position, how do we change the
angles A and B to arrive at this new position? We examine each of these problems
separately, using the two-link robot arm [21].
2.4.1 Forward Kinematics
The kinematics problem requires computation of the robot arm Cartesian
position (X, Y), knowing the two link angles, A and B. Referring to Figure 2.6
We can see the position of the end of the first link (X1, Y1) is given by
X1 = L1 cos (A)
Y1 = L1 sin (A)
Then, the end of the second link (X, Y) is simply
X = X1 + L2 cos (A + B)
Y = Y1 + L2 sin (A + B)
Combining these two sets of equations provides the solution to the
kinematics problem:
X = L1 cos (A) + L2 cos (A + B) (2.27)
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
39
Y = L1 sin (A) + L2 sin (A + B) (2.28)
An interesting question at this point is: if we cycle A and B through all possible
combinations (-180 degrees < A < 180 degrees, -180 degrees < B < 180 degrees),
what would the region of coverage look like? If L1 and L2 are equal, the region
would be a circle (radius L1 + L2). If L1 and L2 are not equal, the region would be
armular (like a donut). This coverage region becomes important in the inverse
kinematics problem, where we need to know if it's possible to reach a given point
by adjusting the link angles.
2.4.2 Inverse Kinematics
The kinematics problem is seen to be fairly easy to solve. The inverse
problem, that of finding A and B, knowing (X, Y) is not nearly as simple. Let's see
why. [21]
Figure 2.7 Inverse Kinematics
Using the kinematics equations, if we know X and Y, we need to solve the
following for A and B:
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
40
L1 cos A) + L2 cos (A + B) = X (2.29)
L1 sin (A) + L2 sin (A + B) = Y (2.30)
This is a nonlinear problem. There are two possible solution approaches:
algebraic and geometric. The algebraic approach (solving the equations directly) is
tedious and involved. For the two-link robot arm, the geometric approach is more
straightforward. We will outline the steps of the algebraic approach to illustrate
some salient points of the inverse kinematics problem. Also, by outlining these
steps, we allow the more industrious reader to see if he/she can solve the problem
algebraically. After this outline, we will develop the solution to the problem with a
geometric approach.
2.4.3 Algebraic Solution
In the algebraic solution, we first square both of the above equations and
add them together. Then, we apply these trigonometric identities: [21]
Cos (A + B) = cos (A) cos (B) – sin (A) sin (B)
Sin (A + B) = cos (A) sin (B) + sin (A) cos (B)
sin2
(C) + cos2
(C) = 1
Where C is any angle
Following these steps, we are able to obtain a relation for cos (B) simply in
terms of X, Y, L1, and L2. That relation is (see if you can find it)
Cos (B) = (X2
+ Y2
– L1
2
- L2
2
)/2L1L2 (2.31)
With this, we can find B by applying the inverse cosine, or can we? What if
cos (B) is greater than one or less than minus one? In these cases, there is no
solution! When this happens, the desired point (X, Y) is not within the coverage
region of the robot arm (as discussed in the previous section). If (X, Y) is in the
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
41
coverage region, can we find a unique B? No, just knowing the cosine is not
sufficient. If B is a solution to the above equation, so is -B since
Cos (B) = cos (-B)
Hence, the inverse kinematics problem always has two solutions. This is
shown in Figure 2.7. In "robotics talk," one solution is referred to as "elbow-out"
and one is "elbow-in." To specify which solution we want, we must also find the
sine of B.
Knowing the cosine of B, the sine is given by
Sin (B) = + [1 - cos2
(B)] ½
(2.32)
The angle B is then completely specified by selecting either a plus or minus
sign in this expression. The robot designer must decide which sign to choose based
on problem geometry and current arm configuration. This choice is discussed in
detail in the "Trajectory Planning" section. Figure 2.8 shows the Cartesian
quadrant in which an angle belongs, based on the sign of the two trigonometric
functions.
Figure 2.8 Quadrant System
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
42
At this point in the algebraic solution process, we have the angle B. How
do we find A? Knowing B, and hence sin (B) and cos (B), we substitute this (along
with X and Y) back into the kinematics equations. Using the relations for the sine
and cosine of the sum of two angles, the resulting equations will be (again, see if
you can get these)
[L1 + L2 cos (B)] cos (A) – L2 sin (B) sin (A) = X (2.33)
L2 sin (B) cos (A) + [L1 + L2 cos (B)] sin (A) = Y (2.34)
Here, we have two linear equations with two unknowns: sin (A) and cos (A).
Solving these equations (use Cramer's rule) and applying the angle
convention in Figure 2.8 will yield a unique value for A. At this point, we have
solved the inverse kinematics problem with an algebraic approach.
2.4.4 Geometric Solution
The geometric solution is more direct. We can develop expressions for the
angles A and B by simply looking at the geometry of the problem. First, we'll find
B. Figure 4 sketches the configuration necessary for this evaluation. If we look at
the triangle formed by the two links and the line [of length (X2
+ Y2
)1/2
] connecting
the origin to the point (X, Y), we can use the law of cosines to write [21]
X2
+ Y2
= L1
2
+ L2
2
- 2L1 L2 cos (180º - B) (2.35)
But, cos (180º - B) = -cos (B). Substituting this into the equation and
solving for cos (B) yields
Cos (B) = (X2
+ Y2
- L1
2
- L2
2
)/2L1L2 (2.36)
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
43
This is exactly the result obtained using the algebraic approach. The
geometric approach is seen to be much simpler. Recall, though, that this does
define a unique angle B. This definition is made by establishing a value for sin (B),
as outlined in the algebraic approach.
The other angle, A, is found with a two step procedure. If we define the
angle between link 1 and the line [length (X2
+ Y2
)1/2
] from (0, 0) to (X, Y) as C
(see Figure 2.9).
Figure 2.9 Geometric solutions for angle A
We can write
Sin (C) = L2 sin (B)/(X2
+ Y2
)1/2
(2.37)
Cos (C) = [L1 + L2 cos (B)]/(X2
+ Y2
)1/2
(2.38)
These expressions define a unique C. Now, using the right triangle (Figure
2.9) defined by the three coordinates (0, 0), (X, 0), and (X, Y), we have
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
44
Sin (A + C) = Y/(X2
+ Y2
)1/2
(2.39)
Cos (A + C) = X/(X2
+ Y2
)1/2
(2.40)
Which uniquely define A + C. Subtracting C from this sum will yield the
angle A. This completes the geometric approach.
Figure 2.10 Geometric solution for angle B
2.5 ROBOT ARM TRAJECTORY PLANNING
The last robotics problem we need to solve is referred to as trajectory
planning. Our two-link robot arm is at one position (Xold, Yold), with corresponding
link angles Aold and Bold. We want to move the arm to another point (Xnew, Ynew).
Assume we have solved the inverse kinematics problem and we know the angles,
Anew and Bnew, which correspond to (Xnew, Ynew). We must decide how to change
the old angles, Aold and Bold, so that they take on the new angle values. Do we
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
45
change A first, B first, or both simultaneously? In which direction do we change
them? Clockwise? Counterclockwise? This is not a difficult problem if there are no
obstacles in the path of the robot arm, i.e. we have complete freedom of
movement. In that case, we usually move A and B in the direction of smaller
change. That way, we minimize the energy required to move the arm and the time
required to change configuration. [21]
As an example, look at Figure 2.11(a).
Figure 2.11(a): Graph-I
Here, L1 = L2 = 3, Aold = -45 degrees, and Bold = 90 degrees, which
corresponds to a Cartesian location of (Xold, Yold) = (4.24, 0). Check the math using
the kinematics equations. Say we want to move to (Xnew, Ynew) = (-4, 4). To reach
this point, the inverse kinematics equations yield Anew = 115 degrees, Bnew = 39
degrees (see if you can get the same values - I have rounded to the nearest degree).
We'll assume we can only change the angles one at a time. So, to go from (4.24, 0)
to (-4, 4) with minimum angle change, we swing A from -45 to 115 degrees
(counterclockwise) and then B from 90 degrees to 39 degrees (clockwise), as
shown in Figure 2 11(a). What if there was a solid wall in the quadrant where X >
0 and Y > O? In that case, the trajectory in Figure 2.6(a) would not be possible?
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
46
We need to change our plan. Figure 2.11(b) shows a trajectory that avoids the
blocked quadrant. In this trajectory, A is changed in a clockwise direction.
Figure 2.11(b): Graph-II
The two trajectories here achieve the desired condition, but not in the most
direct fashion. We all know the shortest distance between two points is a straight
line -let's see how to plan this trajectory.
To follow a straight line, we solve the inverse kinematics problem several
times. We first draw a line from the current (Xold, Yold) point to the new point. We
divide that line into some number of segments and compute the corresponding (X,
Y) coordinates at the end of each segment using the equation of a straight line. For
each (X, Y) pair, we compute the required angles, A and B, to achieve this point.
As each new A and B is computed, we change the arm configuration. With this
procedure, we move along the line until the desired endpoint is reached. The
trajectory in Figure 2.12(a) shows the path followed by the example two-link robot
arm using 20 intermediate points along the straight line (we have eliminated the
blockage for).
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
47
Figure 2.12(a): Path Followed By Two-Link Robot
The path is not a straight line due to the nonlinearities of the robot arm and
the motions as the angles are changed sequentially. If we changed the angles
simultaneously, the path followed would be much smoother. We can extend this
procedure to follow any desired trajectory. This allows us to get around any
obstacles that might be in the way of the arm. Simply draw the desired path and
compute Cartesian points along the path, along with the corresponding joint angles.
Then, cycle through each pair of A and B values until the endpoint is reached.
Figure 2.12(b) shows the arm following a three-segment straight line path from
(4.24, 0) to (-4, 4). Again, this path would be smoother if the angles changed
simultaneously. [21]
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
48
Figure 2.12(b): Three Segment Straight Line Path
Obviously, there are many considerations in the trajectory planning
problem. There is one last thing to discuss before moving on. Recall in solving the
inverse kinematics problem, we need to choose B - whether we want an "elbow-in"
or "elbow-out" configuration at each new point. The primary consideration in
making this choice is a potential obstacle that is we must insure the robot arm links
do not collide with surrounding structures. If there are no potential collisions, we
usually choose the B value that is closest to the current B.
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
49
2.6 Summary
The robot arm problem is a very interesting mathematical exercise. It
represents nonlinear equations which may or may not have a solution. And, if a
solution exists, there are multiple (two, in this case) solutions. And then, once the
problem has been solved, many decisions must be made about how to implement
the solution.
An obvious use for the equations as presented is to program them on a
computer using a language such as Visual Basic or Java. Use graphics and allow
the user to manipulate the angles A and B to watch the robot arm move. Allow for
variable length links to investigate the potential coverage regions. Implement the
inverse kinematics solution to allow for trajectory planning. Make sure you can
detect solution existence. Determine methods of trajectory planning. Allow the
angles to change one at a time or simultaneously. Can your robotic arm follow a
straight line? Can you program it to follow any prescribed path? With such an
implementation comes a question of resolution. In the discrete world of a
computer, there are no two angles that will exactly correspond to some point (X,
Y). However, there are angles that correspond "closely" to (X, Y). The robot
designer has to decide what is close. If we can establish angles to within only 5
degrees, we have to allow for that sloppiness in our design. If we need more
precision, we need to make it possible to have finer angle adjustments.
CHAPTER 3
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
50
3.1 INTRODUCTION
This chapter contain practical design implementation of digital controller
for each joint and concept of difference equation. Transient response is also
discussed in detail by using MATLAB. Hardware design is also presented in this
chapter contain specification table and three dimensional views of different part of
designed manipulator. Software section is also discussed contain algorithms and
Flowcharts for each joint controller and also for master controller.
Robotic Arm System is represented by blocks in figure 3.1 consists of four
parts named Sensory System, controller and Electronics, Actuation System and
Manipulator Joints as plant.
Figure 1.1 Manipulation Systems
3.2 Sensory System of Robotic Arm
Sensors are the sensory system of a robot much like the five senses that
humans have: touch, sight, sound, smell and taste and measure environmental data
like touch, distance, light, sound, strain, rotation, magnetism, smell, temperature,
inclination, pressure, or altitude. Sensors provide the raw data that must be
processed to provide information to allow the robot to appropriately respond to its
environment. Robots are equipped with sensors so they can have an understanding
of their surrounding environment and make changes in their behavior based on the
information they have gathered. [24]
Sensors allow robots to detect objects and variations in the environment. A
robot will invariably be equipped with a number of sensors which may include: an
acoustic sensor to detect sound, motion or location, infrared sensors to detect heat
Sensory
System
Controller
&
Electronics
Electro-
Mechanical
Actuator
Plant
Manipulator
Joints
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
51
sources, contact sensors, tactile sensors to give a sense of touch, or optical/vision
sensors. A robot can also monitor itself with sensors.
3.2.1 Common Sensors for Manipulators
3.2.1.1 Touch Sensors
Touch sensors are basically variable switching devices that work through
pressure.
3.2.1.2 Global Positioning Systems
Global Positioning Systems (GPS) receive signals from orbiting satellites
that pinpoint the location of an outdoor robot on the Earth. [24]
3.2.1.3 Light Sensor
It measures the level of light as a number between 0% (total darkness) and
100% (very bright). Can differentiate light levels reflected from bright and dark
surfaces. Inside the light sensor is a photo-transistor. The photo-transistor acts like
a valve for electricity. The more light energy it senses, the more electricity
flows.[24]
3.2.1.4 Rotation Sensor
It measures the rotation of an axle or shaft. The rotation sensor sends out a
series of voltage pulses. There will be a number of pulses per rotation. In the lego
robotics kits there are 16 of these pulses per one revolution. These pulses are also
referred to as “ticks”, “clicks”, or “counts”.
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
52
3.2.2 Sensor Selected for the Task
Rotation sensors (also called encoders) measure the rotation of a shaft or
axle. They are used to measure the angle of a robotic arm, or how far a mobile
robot‟s wheel has turned. [24]
3.2.1.1 Rotation Sensor
It measures the rotation of an axle or shaft. The rotation sensor sends out a
series of voltage pulses. There will be a number of pulses per rotation. In the lego
robotics kits there are 16 of these pulses per one revolution. These pulses are also
referred to as “ticks”, “clicks”, or “counts”.
Figure 2.2 Series of Voltage pulses
3.2.1.2 Pull to Position
In the case of autonomous mobile robots operating in unstructured
environments the position, geometry and orientation of objects of interest are not
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
53
known. We aim to use sensor inputs from targets directly to control the motion of
the robot and thereby use the world and its objects as its own best model. The robot
arm structure, dimensions and joint angles, however, are well known and so can be
used for control.
The approach used here is to develop a simple structured linked model of
the articulated limb. The model records link lengths, joint angles and joint
stiffness. The model is manipulated to 'pull' the end of the limb towards the desired
destination position and orientation. The direction of this pulls being derived from
robot sensors. Then the actual motion is realized by driving the joints and linkages
through the trajectories followed by the model. By incorporating continuous
sensory feed-back of joint angles and deriving updated target vectors from target
sensors very simple limb models are sufficient for the control task. Simply 'pulling'
the limb end point [24] towards the destination entails a simple vector mapping
(figure 3.1). Employing servo control of motion direction rather than position
means that the limb will achieve the target point even with simplified modeling.
There is no med to accurately model linkage weights and friction. This control
approach could be considered to be a primitive version of the perception driven
control which living creatures can employ.
3.3 CONTROLLER AND ELECTRONICS
3.3.1 ON-OFF Controller
The controller is responsible to establish the link between computer
and the robot. The reason for that is that the computer outputs only a few mA, not
enough to start most motors. Therefore, a supply of power is usually appended to
the controller (a 9volts, 1A in the case of Lego motors which are simple DC
motors).
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
54
Digital controllers are of “ON-OFF type” for shoulder, elbow and valve dynamics
which are Plants of the system. Feedback sensor is position sensor and is part of
Servo motor by combining called Servomechanism. TL is the Load Torque on
joints due to Actuation Mechanism involving gear & belt system. D/A converter is
to convert discrete signal in to Continuous time signal and A/D converter is to
convert Continuous time signal in to discrete signal.
The switching sequence in ON-OFF controller is programmed by computer
and interfaces it with plant through microcontroller. When ever interrupt or
switching occur for any joint moment module for that joint moment recalls in
microcontroller according to sequence discussed in algorithm for master controller
in section 3.9.2.
3.3.2 PIC Microcontroller
Microcontroller used in for controlling purpose is PIC microcontroller due many
advantages over 8051 microcontroller. It is forty pins microcontroller having 8bits
port B (RB.0 to RB.7) and 8bits port C (RC.0 to RC.7) and 6bits port A. Output
from the sensor for each joint directly interfaced with port A.0 as no ADC is
needed for this purpose. This is one of the great feature of PIC microcontroller to
accept analog input if its level in the range of 0V to 5V. Reference input from
computer is connected with microcontroller through DB-9 at port RA.1. 8bits
output is connected with DAC to convert 8bits digital output signal into analog
signal of specific level.
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
55
Figure 3.3 PIC19F877
The width of the pulse determines the position of the server. Most servos
will move to the center of their travel when they receive a 1.5msec pulse. One
extreme of motion generally equates to a pulse width of 1.0msec; the other extreme
to 2.0msec with a smooth variation throughout the range, and neutral at 1.5msec.
The period between the pulses is used to synchronize the receiver. Servos are
closed loop devices. They are constantly comparing their position (proportional to
the pulse width) to their actual position (proportional to the signal voltage input.) If
there is a difference between the two the servo electronics will turn the motor to
adjust the difference error. This also means that servos will resist forces which try
to change their position. When a servo is not receiving positioning pulses (i-e not
being provided with power) the output shaft can be easily turned by hand.
3.3.2 DAC0808 8-Bit D/A Converter
The DAC0808 is an 8-bit monolithic digital-to-analog converter (DAC)
featuring a full scale output current settling time of 150 ns while dissipating only
33 mW with ±5V supplies. No reference current (IREF) trimming is required for
most applications since the full scale output current is typically ±1 LSB of 255
IREF/256. Relative accuracies of better than ±0.19% assure 8-bit monotonic and
linearity while zero level output current of less than 4 µA provides 8-bit zero
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
56
accuracy for IREF³2 mA. The power supply currents of the DAC0808 are
independent of bit codes, and exhibits essentially constant device characteristics
over the entire supply voltage range. The DAC0808 will interface directly with
popular TTL, DTL or CMOS logic levels, and is a direct replacement for the
MC1508/MC1408. For higher speed applications, see figure 3.3.
Figure 3.4 Circuit of DAC
3.4 Actuation System for the Task
3.4.1 Servo motors
Servos are DC motors with built in gearing and feedback control loop
circuitry. And no motor drivers required
Servo motors depend upon "closed-loop" circuitry to supply information
back to the computer so that positioning errors can be continuously corrected. This
feedback is provided by encoders, which in some respects, are like the bicycle
wheels that some road builders and others use to measure distances.
A new type of servo motor called an "intelligent servo motor" has recently
appeared on the scene. It is useful for some applications, and we use it in our
automatic torch height controls. In fact, we probably purchase more of them than
any of our competitors. The motor has some programmable computer circuitry
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
57
incorporated into it, which lets it independently follow simple instructions. It
works well with our torch height controls, due to their low torque demand. We
believe intelligent motors are impractical for driving a cnc machine, for reasons
given below.
The following paragraphs explain each of these types of motors in more
detail.
Figure 3.5 Torque-Speed Curves of Servo Motor
Servo motors are somewhat more expensive than steppers -- perhaps
double the price, or more. They are generally just as accurate, if maintained in a
proper state of tune, however they rely on encoders to provide positioning
information back to the computer. Thus the complexity of the system is at least
doubled, with no accuracy advantage, greater initial cost, and more maintenance
issues. The "closed loop" rhetoric that some manufacturers play up sounds
convincing to the uninitiated, but provides no benefit over a simpler and more
reliable stepper system. [25]
Servo motors are available in larger sizes than stepper motors, and
powerful servos are generally used on heavy machines with gantry carriages in the
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
58
500 to 1,000 lb range. They offer no advantage whatsoever on lighter machines,
such as Torch mate and its competitors.
Small intelligent motors with 50 oz. in. peak torque and 28 oz. in.
continuous torque are used on one new competitor's cnc machine, although this is
disguised by the citing of output torque at the gearbox. Although these small
motors are expensive, larger intelligent motors would be far more costly. The only
way these relatively low power motors can drive a gantry on a cnc machine is to
run them at a very high rpm with a large gear reduction. This is kind of like
driving your stick shift car around in low gear. This high rpm greatly increases
motor wear, and introduces planetary gearbox backlash into the equation. When a
gearbox first turns in one direction, and then the other, as in cutting a circle, the
backlash in the gear train must be taken up before the direction changes. Unless
super-expensive low-backlash planetary gear boxes are used, as on the large
$100,000 plus machines, circles don't end up in the same place they started, etc.
[25]
Servos are extremely popular with robot, RC plane, and RC boat builders.
Most servo motors can rotate about 90 to 180 degrees. Some rotate through a full
360 degrees or more. However, servos are unable to continually rotate, meaning
they can't be used for driving wheels (unless modified), but their precision
positioning makes them ideal for robot arms and legs, rack and pinion steering, and
sensor scanners to name a few. Since servos are fully self contained, the velocity
and angle control loops are very easy to implement, while prices remain very
affordable. To use a servo, simply connect the black wire to ground, the red to a
4.8-6V source, and the yellow/white wire to a signal generator (such as from your
microcontroller). Vary the square wave pulse width from 1-2ms and your servo is
now position/velocity controlled
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
59
3.4.2 Servo Voltage (Red and Black/Brown wires)
Servos can operate under a range of voltages. Typical operation is from 4.8V to
6V. There are a few micro sized servos that can operate at less, and now a few
Hitec servos that operate at much more. The reason for this standard range is
because most microcontrollers and RC receivers operate near this voltage. So what
voltage should you operate at? Well, unless you have a battery
voltage/current/power limitation, you should operate at 6V. This is simply because
DC motors have higher torque at higher voltages
3.4.3 Signal Wire (Yellow/Orange/White wire)
While the black and red wires provide power to the motor, the signal wire
is what you use to command the servo. The general concept is to simply send an
ordinary logic square wave to your servo at a specific wave length, and your servo
goes to a particular angle (or velocity if your servo is modified). The wavelength
directly maps to servo angle so how do you apply this square wave to your servo?
If your robot is remote controlled, your RC receiver will apply the proper square
wave for you. If however your robot is running from a microcontroller, you must:
bring high a digital port wait between 1-2ms bring low the same digital port
cycle a few dozen times per second
Note, if you are running multiple servos simultaneously, you can just put a
few of these program blocks in sequential order. You can run as many servos as
you have of digital ports. [25]
So how many milliseconds do you keep the port high? It all depends on the
servo. You may have to tweak for each individual servo some several
microseconds‟ difference.
The standard time vs. angle is represented in this chart:
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
60
Figure 3.6 Timing diagram of servo motor
3.4.4 Servo Current
Servo current operates the same as in a DC motor, except that you now also
have a hard to predict feedback control system to contend with. If your DC motor
is not at the specified angle, it will suddenly draw huge amounts of current to reach
that angle. But there are other peculiarities as well. If you run an experiment with a
servo at a fixed angle and hang precision weights from the servo horn, the
measured current will not be what you expect. One would think that the current
would increase at some fixed rate as the weights increased linearly. Instead you
will get unpredictable curves and multiple rates. In conclusion, servo current draw
is very unpredictable. [25]
3.4.4.1 Stall Torque, Stall Current, Current Drain
Since servos contain DC motors, please read my DC motor tutorial to learn about
servo stall characteristics.
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
61
Figure 3.7 Hitch RC-servo motor
3.4.5 Gear Types
More expensive servos come with metal gears for higher torque and longer
life, followed by carbonite and then nylon gears for the cheapest.
3.4.5.1 Nylon Gears
Nylon gears are most common in servos. They are extremely smooth with
little or no wear factors. They are also very lightweight, but lack in durability and
strength.
3.4.5.2 Karbonite Gears
Karbonite gears are relatively new to the market. They offer almost 5 times
the strength of nylon gears and also better wear resistance. Cycle times of well
over 300,000 have been observed with these gears with virtually no wear. Servos
with these gears are more expensive but what you get in durability is more than
equaled.
3.4.5.3 Metal Gears
Metal gears have been around for sometime now. Although the heaviest
and having the highest wear rate of all gear types, they offer unparalleled strength.
With a metal output shaft, side-loads can be much greater. Ever had a nylon output
shaft crack? I have. In applications that are jarred around, metal gears are best.
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
62
Unfortunately, due to wear, metal gears will eventually develop slight play in the
gear-train. Accuracy will slowly be lost. [25]
3.4.6 Velocity
The servo turn rate, or transit time, is used for determining servo rotational
velocity. This is the amount of time it takes for the servo to move a set amount,
usually 60 degrees. For example, suppose you have a servo with a transit time of
0.17sec/60 degrees at no load. This means it would take nearly half a second to
rotate an entire 180 degrees. More if the servo were under a load. This information
is very important if high servo response speed is a requirement of your robot
application. It is also useful for determining the maximum forward velocity of your
robot if your servo is modified for full rotation. Remember, the worst case turning
time is when the servo is at the minimum rotation angle and is then commanded to
go to maximum rotation angle, all while under load. This can take several seconds
on a very high torque servo.
3.4.7 Efficiency and Noise
Due to noise and control circuitry requirements, servos are less efficient
than DC motors uncontrolled. To begin with, the control circuitry typically drains
5-8mA just on idle. Secondly, noise can more than triple current draw during a
holding position (not moving), and almost double current during rotation. Noise is
often a major source of servo inefficiency and therefore should be avoided. Ever
notice your servo jitter or vibrate? This is because your servo is rapidly jumping
between two different angles due to interference. What causes this interference?
Well the signal wire is no different than long antennae, capable of accepting
unwanted foreign signals and sending them straight to your servo as a command. A
common interference source is usually from other nearby servos and/or servo
wiring. How to prevent this problem? Keep your signal wire short, meaning do not
add say 3+ feet of extension cables to your servo. If you have many servo wires
going through one area, and it isn‟t feasible to keep them apart, then twist them
together. Supposedly this reduces cross interference and I've heard it works,
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
63
although I cannot really tell for sure myself. You can also buy something called a
servo booster extension which buffers and amplifies the signal Digital Servos vs
Analog Servos Digital servos, at the user end, are controlled no differently than
analog servos. The difference is in how the servo motor is controlled via the circuit
board (amplifier). The motor of an analog servo receives a signal from the
amplifier 30 times a second or at 30Hz. This signal allows the amplifier to update
the motor position. Digital servos use a high frequency amplifier that updates the
servo motor position 300 times a second or at 300Hz. By updating the motor
position more often, the digital servo can deliver full torque from the beginning of
movement and increases the holding power of the servo. The quick refresh also
allows the digital servo to have a tighter dead band.
3.4.8 Digital Servos VS Analog Servos
With the exception of a higher cost, there are only advantages for digital
servos over analog servos.
The digital micro processor is 10 times faster than an analog servo. This
results in a much quicker response from the beginning with the servo developing
all the rated torque 1 degree off of the center point. Be aware that this faster
response also results in higher starting currents, so make sure your batteries can
handle it.
Digital servos can be programmed for direction of rotation, center and end
points, failsafe option, speed, and dead bandwidth adjustment. This is great for
matching sets of servos for dead band width, center and end points in giant scale
aircraft applications, and for reversing a digital servo when two are used on a "Y"
harness. If you do not want to deal with the added complication of programming,
no worries! Hitec digital servos will perform like standard servos out of the box. It
is not required to program them before use.
The standing torque of a digital servo is 3 times that of its analog
counterpart. This means digital servos are typically smaller and have more torque.
Automatic Spray Painting By Articulated 2DOF Robotic Arm
__________________________________________________________________
PCSIR - Institute of Industrial Electronics Engineering,
IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300
64
3.4.9 Hitec vs Futaba
There are actually four major servo manufacturers - Hitec, Futaba,
Airtronics, and JR Radios. The last two are uncommon today, so I wont talk about
them. Hitec and Futaba servos work the same, but there are several interfacing
differences which you should be aware of.
Figure 3.8 (a) Wire Configuration (b) Wire Configuration
The first is wire color, as Hitec uses a yellow signal wire while Futaba uses
a white one. The wiring order is the same, just different colors.
The second is connector compatibility. Futaba (J type) has a special flange thingy
while Hitec (S type, for universal) does not. Futaba has the extra flange to help the
user plug in the servo correctly, although there are only two ways to do it and
connecting a servo in the wrong way will not actually damage anything. If you
want to connect a Futaba servo to a Hitec device, just clip the flange off and use
sandpaper to file it down until it fits. If you ever need to connect a Hitec connector
to something Futaba, just use sandpaper to decrease the connector width until it
fits. [25]
The third is price. All things kept the same; Hitec servos are cheaper than
Futaba servos. But don't let this be your only determining factor in your decision,
as Futaba has some servo sizes that Hitec does not.
The last major difference is in the spline. The spline is the output shaft of
the servo. This is where you would attach your servo horn or servo arm. Standard
Hitec splines have 24 teeth while standard Futaba splines have 25 teeth. What
makes this important is that servo horns built for one will not work with the other.
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm
Automatic Spray Painter Using 2-DOF Robotic Arm

Weitere ähnliche Inhalte

Was ist angesagt?

Ch1 introduction Erdi Karaçal Mechanical Engineer University of Gaziantep
Ch1 introduction Erdi Karaçal Mechanical Engineer University of GaziantepCh1 introduction Erdi Karaçal Mechanical Engineer University of Gaziantep
Ch1 introduction Erdi Karaçal Mechanical Engineer University of GaziantepErdi Karaçal
 
Investigation of Process Parameters for Optimization of Surface Roughness in ...
Investigation of Process Parameters for Optimization of Surface Roughness in ...Investigation of Process Parameters for Optimization of Surface Roughness in ...
Investigation of Process Parameters for Optimization of Surface Roughness in ...IJERA Editor
 
IRJET - Mathematical Modelling to Predict Bead Geometry and Shape Relationshi...
IRJET - Mathematical Modelling to Predict Bead Geometry and Shape Relationshi...IRJET - Mathematical Modelling to Predict Bead Geometry and Shape Relationshi...
IRJET - Mathematical Modelling to Predict Bead Geometry and Shape Relationshi...IRJET Journal
 
International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)ijceronline
 
IRJET- Improving the Performance of M42 Twist Drill Tool
IRJET- Improving the Performance of M42 Twist Drill ToolIRJET- Improving the Performance of M42 Twist Drill Tool
IRJET- Improving the Performance of M42 Twist Drill ToolIRJET Journal
 
Unit 6 additive mnufacturing
Unit 6   additive mnufacturingUnit 6   additive mnufacturing
Unit 6 additive mnufacturingGujrathi Sonam
 
DESIGN AND FABRICATION OF WELDING FIXTURES AND POSITIONERS
DESIGN AND FABRICATION OF WELDING FIXTURES  AND POSITIONERSDESIGN AND FABRICATION OF WELDING FIXTURES  AND POSITIONERS
DESIGN AND FABRICATION OF WELDING FIXTURES AND POSITIONERSvivatechijri
 
IRJET- Modeling & Analysis of a 100CC I.C. Engine Connecting ROD
IRJET-  	  Modeling & Analysis of a 100CC I.C. Engine Connecting RODIRJET-  	  Modeling & Analysis of a 100CC I.C. Engine Connecting ROD
IRJET- Modeling & Analysis of a 100CC I.C. Engine Connecting RODIRJET Journal
 
Crash Analysis of Torque Box Beam Column of an Automobile Vehicle
Crash Analysis of Torque Box Beam Column of an Automobile VehicleCrash Analysis of Torque Box Beam Column of an Automobile Vehicle
Crash Analysis of Torque Box Beam Column of an Automobile VehicleIRJET Journal
 
Flank Wear Measurement of INCONEL 825
Flank Wear Measurement of INCONEL 825Flank Wear Measurement of INCONEL 825
Flank Wear Measurement of INCONEL 825IRJET Journal
 
Heat flow prediction in friction stir welded aluminium alloy 1100
Heat flow prediction in friction stir welded aluminium alloy 1100Heat flow prediction in friction stir welded aluminium alloy 1100
Heat flow prediction in friction stir welded aluminium alloy 1100IAEME Publication
 
An Experimental Investigation on Mechanical Properties of Friction Stir Weldi...
An Experimental Investigation on Mechanical Properties of Friction Stir Weldi...An Experimental Investigation on Mechanical Properties of Friction Stir Weldi...
An Experimental Investigation on Mechanical Properties of Friction Stir Weldi...IRJET Journal
 
IRJET- Experimental Analysis and Geometrical Effect on Mild Steel with Un...
IRJET-  	  Experimental Analysis and Geometrical Effect on Mild Steel with Un...IRJET-  	  Experimental Analysis and Geometrical Effect on Mild Steel with Un...
IRJET- Experimental Analysis and Geometrical Effect on Mild Steel with Un...IRJET Journal
 
Design Optimization of Display Unit Supporting Structure Under Static and Spe...
Design Optimization of Display Unit Supporting Structure Under Static and Spe...Design Optimization of Display Unit Supporting Structure Under Static and Spe...
Design Optimization of Display Unit Supporting Structure Under Static and Spe...IRJET Journal
 
IRJET- Analysis and Optimization of Ti (Grade 5) on µ- EDM by Taguchi Method
IRJET- Analysis and Optimization of Ti (Grade 5) on µ- EDM by Taguchi MethodIRJET- Analysis and Optimization of Ti (Grade 5) on µ- EDM by Taguchi Method
IRJET- Analysis and Optimization of Ti (Grade 5) on µ- EDM by Taguchi MethodIRJET Journal
 
IRJET-Metal Forming by Cold Extrusion Process
IRJET-Metal Forming by Cold Extrusion ProcessIRJET-Metal Forming by Cold Extrusion Process
IRJET-Metal Forming by Cold Extrusion ProcessIRJET Journal
 
Feasibility study on stereolithography apparatus sla and selective laser si...
Feasibility study on stereolithography apparatus  sla  and selective laser si...Feasibility study on stereolithography apparatus  sla  and selective laser si...
Feasibility study on stereolithography apparatus sla and selective laser si...IAEME Publication
 
Optimization of machining parameters in edm of cfrp composite using taguchi t...
Optimization of machining parameters in edm of cfrp composite using taguchi t...Optimization of machining parameters in edm of cfrp composite using taguchi t...
Optimization of machining parameters in edm of cfrp composite using taguchi t...IAEME Publication
 
IRJET-Numerical Analysis of Extruder Screw & Controlling the Diameter of Plas...
IRJET-Numerical Analysis of Extruder Screw & Controlling the Diameter of Plas...IRJET-Numerical Analysis of Extruder Screw & Controlling the Diameter of Plas...
IRJET-Numerical Analysis of Extruder Screw & Controlling the Diameter of Plas...IRJET Journal
 

Was ist angesagt? (20)

Ch1 introduction Erdi Karaçal Mechanical Engineer University of Gaziantep
Ch1 introduction Erdi Karaçal Mechanical Engineer University of GaziantepCh1 introduction Erdi Karaçal Mechanical Engineer University of Gaziantep
Ch1 introduction Erdi Karaçal Mechanical Engineer University of Gaziantep
 
Investigation of Process Parameters for Optimization of Surface Roughness in ...
Investigation of Process Parameters for Optimization of Surface Roughness in ...Investigation of Process Parameters for Optimization of Surface Roughness in ...
Investigation of Process Parameters for Optimization of Surface Roughness in ...
 
IRJET - Mathematical Modelling to Predict Bead Geometry and Shape Relationshi...
IRJET - Mathematical Modelling to Predict Bead Geometry and Shape Relationshi...IRJET - Mathematical Modelling to Predict Bead Geometry and Shape Relationshi...
IRJET - Mathematical Modelling to Predict Bead Geometry and Shape Relationshi...
 
International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)
 
IRJET- Improving the Performance of M42 Twist Drill Tool
IRJET- Improving the Performance of M42 Twist Drill ToolIRJET- Improving the Performance of M42 Twist Drill Tool
IRJET- Improving the Performance of M42 Twist Drill Tool
 
Unit 6 additive mnufacturing
Unit 6   additive mnufacturingUnit 6   additive mnufacturing
Unit 6 additive mnufacturing
 
DESIGN AND FABRICATION OF WELDING FIXTURES AND POSITIONERS
DESIGN AND FABRICATION OF WELDING FIXTURES  AND POSITIONERSDESIGN AND FABRICATION OF WELDING FIXTURES  AND POSITIONERS
DESIGN AND FABRICATION OF WELDING FIXTURES AND POSITIONERS
 
IRJET- Modeling & Analysis of a 100CC I.C. Engine Connecting ROD
IRJET-  	  Modeling & Analysis of a 100CC I.C. Engine Connecting RODIRJET-  	  Modeling & Analysis of a 100CC I.C. Engine Connecting ROD
IRJET- Modeling & Analysis of a 100CC I.C. Engine Connecting ROD
 
Crash Analysis of Torque Box Beam Column of an Automobile Vehicle
Crash Analysis of Torque Box Beam Column of an Automobile VehicleCrash Analysis of Torque Box Beam Column of an Automobile Vehicle
Crash Analysis of Torque Box Beam Column of an Automobile Vehicle
 
Flank Wear Measurement of INCONEL 825
Flank Wear Measurement of INCONEL 825Flank Wear Measurement of INCONEL 825
Flank Wear Measurement of INCONEL 825
 
Heat flow prediction in friction stir welded aluminium alloy 1100
Heat flow prediction in friction stir welded aluminium alloy 1100Heat flow prediction in friction stir welded aluminium alloy 1100
Heat flow prediction in friction stir welded aluminium alloy 1100
 
An Experimental Investigation on Mechanical Properties of Friction Stir Weldi...
An Experimental Investigation on Mechanical Properties of Friction Stir Weldi...An Experimental Investigation on Mechanical Properties of Friction Stir Weldi...
An Experimental Investigation on Mechanical Properties of Friction Stir Weldi...
 
IRJET- Experimental Analysis and Geometrical Effect on Mild Steel with Un...
IRJET-  	  Experimental Analysis and Geometrical Effect on Mild Steel with Un...IRJET-  	  Experimental Analysis and Geometrical Effect on Mild Steel with Un...
IRJET- Experimental Analysis and Geometrical Effect on Mild Steel with Un...
 
Design Optimization of Display Unit Supporting Structure Under Static and Spe...
Design Optimization of Display Unit Supporting Structure Under Static and Spe...Design Optimization of Display Unit Supporting Structure Under Static and Spe...
Design Optimization of Display Unit Supporting Structure Under Static and Spe...
 
IRJET- Analysis and Optimization of Ti (Grade 5) on µ- EDM by Taguchi Method
IRJET- Analysis and Optimization of Ti (Grade 5) on µ- EDM by Taguchi MethodIRJET- Analysis and Optimization of Ti (Grade 5) on µ- EDM by Taguchi Method
IRJET- Analysis and Optimization of Ti (Grade 5) on µ- EDM by Taguchi Method
 
IRJET-Metal Forming by Cold Extrusion Process
IRJET-Metal Forming by Cold Extrusion ProcessIRJET-Metal Forming by Cold Extrusion Process
IRJET-Metal Forming by Cold Extrusion Process
 
JRK Write-up
JRK Write-upJRK Write-up
JRK Write-up
 
Feasibility study on stereolithography apparatus sla and selective laser si...
Feasibility study on stereolithography apparatus  sla  and selective laser si...Feasibility study on stereolithography apparatus  sla  and selective laser si...
Feasibility study on stereolithography apparatus sla and selective laser si...
 
Optimization of machining parameters in edm of cfrp composite using taguchi t...
Optimization of machining parameters in edm of cfrp composite using taguchi t...Optimization of machining parameters in edm of cfrp composite using taguchi t...
Optimization of machining parameters in edm of cfrp composite using taguchi t...
 
IRJET-Numerical Analysis of Extruder Screw & Controlling the Diameter of Plas...
IRJET-Numerical Analysis of Extruder Screw & Controlling the Diameter of Plas...IRJET-Numerical Analysis of Extruder Screw & Controlling the Diameter of Plas...
IRJET-Numerical Analysis of Extruder Screw & Controlling the Diameter of Plas...
 

Ähnlich wie Automatic Spray Painter Using 2-DOF Robotic Arm

Final_Semester_Project _Report
Final_Semester_Project _ReportFinal_Semester_Project _Report
Final_Semester_Project _ReportSriram Raghavan
 
EE323 Mini-Project - Line tracing robot
EE323 Mini-Project - Line tracing robotEE323 Mini-Project - Line tracing robot
EE323 Mini-Project - Line tracing robotPraneel Chand
 
Design and implementation of Arduino based robotic arm
Design and implementation of Arduino based robotic armDesign and implementation of Arduino based robotic arm
Design and implementation of Arduino based robotic armIJECEIAES
 
INTERNSHIP REPORT AT DRONA AUTOMATIONS
INTERNSHIP REPORT AT DRONA AUTOMATIONSINTERNSHIP REPORT AT DRONA AUTOMATIONS
INTERNSHIP REPORT AT DRONA AUTOMATIONStulasiva
 
Final report minor_project
Final report minor_projectFinal report minor_project
Final report minor_projectOmkar Rane
 
TFG_Oriol_Torta.pdf
TFG_Oriol_Torta.pdfTFG_Oriol_Torta.pdf
TFG_Oriol_Torta.pdfhoussemouni2
 
IRJET- Design and Fabrication of Prismatic Painting Robot
IRJET-  	  Design and Fabrication of Prismatic Painting RobotIRJET-  	  Design and Fabrication of Prismatic Painting Robot
IRJET- Design and Fabrication of Prismatic Painting RobotIRJET Journal
 
Design and development of industrial End effector (gripper)
Design and development of industrial End effector (gripper)Design and development of industrial End effector (gripper)
Design and development of industrial End effector (gripper)Hrishikesh Mahajan
 
VISION ALGORITHM FOR SEAM TRACKING IN AUTOMATIC WELDING SYSTEM
VISION ALGORITHM FOR SEAM TRACKING IN AUTOMATIC WELDING SYSTEMVISION ALGORITHM FOR SEAM TRACKING IN AUTOMATIC WELDING SYSTEM
VISION ALGORITHM FOR SEAM TRACKING IN AUTOMATIC WELDING SYSTEMijmech
 
Design of Mechatronics System
Design of Mechatronics SystemDesign of Mechatronics System
Design of Mechatronics SystemVeerakumar S
 
Automatic braking system whole project documentation.docx pdf
Automatic braking system whole project documentation.docx pdfAutomatic braking system whole project documentation.docx pdf
Automatic braking system whole project documentation.docx pdfSyedmuhammed Hussainabbas
 
phase 1 presentation-1.pdf
phase 1 presentation-1.pdfphase 1 presentation-1.pdf
phase 1 presentation-1.pdfHemanthaRaju2
 
Minor_Project_Report
Minor_Project_ReportMinor_Project_Report
Minor_Project_ReportVansh Kumar
 
FLSmidth Report final
FLSmidth Report finalFLSmidth Report final
FLSmidth Report finalShahid Faizee
 
IRJET- A Research Paper on Spray-Painting Robot for Painting Irregular Workpi...
IRJET- A Research Paper on Spray-Painting Robot for Painting Irregular Workpi...IRJET- A Research Paper on Spray-Painting Robot for Painting Irregular Workpi...
IRJET- A Research Paper on Spray-Painting Robot for Painting Irregular Workpi...IRJET Journal
 

Ähnlich wie Automatic Spray Painter Using 2-DOF Robotic Arm (20)

Final_Semester_Project _Report
Final_Semester_Project _ReportFinal_Semester_Project _Report
Final_Semester_Project _Report
 
miniproject
miniprojectminiproject
miniproject
 
EE323 Mini-Project - Line tracing robot
EE323 Mini-Project - Line tracing robotEE323 Mini-Project - Line tracing robot
EE323 Mini-Project - Line tracing robot
 
Design and implementation of Arduino based robotic arm
Design and implementation of Arduino based robotic armDesign and implementation of Arduino based robotic arm
Design and implementation of Arduino based robotic arm
 
Machine vision amk mtmr final
Machine vision amk  mtmr final Machine vision amk  mtmr final
Machine vision amk mtmr final
 
INTERNSHIP REPORT AT DRONA AUTOMATIONS
INTERNSHIP REPORT AT DRONA AUTOMATIONSINTERNSHIP REPORT AT DRONA AUTOMATIONS
INTERNSHIP REPORT AT DRONA AUTOMATIONS
 
Final report minor_project
Final report minor_projectFinal report minor_project
Final report minor_project
 
TFG_Oriol_Torta.pdf
TFG_Oriol_Torta.pdfTFG_Oriol_Torta.pdf
TFG_Oriol_Torta.pdf
 
THESIS
THESISTHESIS
THESIS
 
IRJET- Design and Fabrication of Prismatic Painting Robot
IRJET-  	  Design and Fabrication of Prismatic Painting RobotIRJET-  	  Design and Fabrication of Prismatic Painting Robot
IRJET- Design and Fabrication of Prismatic Painting Robot
 
Riv2
Riv2Riv2
Riv2
 
afc-1
afc-1afc-1
afc-1
 
Design and development of industrial End effector (gripper)
Design and development of industrial End effector (gripper)Design and development of industrial End effector (gripper)
Design and development of industrial End effector (gripper)
 
VISION ALGORITHM FOR SEAM TRACKING IN AUTOMATIC WELDING SYSTEM
VISION ALGORITHM FOR SEAM TRACKING IN AUTOMATIC WELDING SYSTEMVISION ALGORITHM FOR SEAM TRACKING IN AUTOMATIC WELDING SYSTEM
VISION ALGORITHM FOR SEAM TRACKING IN AUTOMATIC WELDING SYSTEM
 
Design of Mechatronics System
Design of Mechatronics SystemDesign of Mechatronics System
Design of Mechatronics System
 
Automatic braking system whole project documentation.docx pdf
Automatic braking system whole project documentation.docx pdfAutomatic braking system whole project documentation.docx pdf
Automatic braking system whole project documentation.docx pdf
 
phase 1 presentation-1.pdf
phase 1 presentation-1.pdfphase 1 presentation-1.pdf
phase 1 presentation-1.pdf
 
Minor_Project_Report
Minor_Project_ReportMinor_Project_Report
Minor_Project_Report
 
FLSmidth Report final
FLSmidth Report finalFLSmidth Report final
FLSmidth Report final
 
IRJET- A Research Paper on Spray-Painting Robot for Painting Irregular Workpi...
IRJET- A Research Paper on Spray-Painting Robot for Painting Irregular Workpi...IRJET- A Research Paper on Spray-Painting Robot for Painting Irregular Workpi...
IRJET- A Research Paper on Spray-Painting Robot for Painting Irregular Workpi...
 

Automatic Spray Painter Using 2-DOF Robotic Arm

  • 1.
  • 2. Final Project Report of BE (IE) 2007 PR IIEE 15b 433 2007 Automatic Spray Painter Using Articulated 2-DOF Robotic Arm Shahzad Ali 1533 M. Ayaz Butt 1520 M. Zeeshan Taj 1528 S.M. Umer 1537 Submitted to In-charge Final Project Ashab Mirza Associate Professor IIEE
  • 3. SUPERVISORS OF THE PROJECT EExxtteerrnnaall PPrroojjeecctt SSuuppeerrvviissoorr MMrr.. KKaasshhiiff IIsshhaaqq LLeeccttuurreerr aatt PPAAFFKKIIEETT KKaarraacchhii BBEE ((IInndduussttrriiaall EEllccttrroonniiccss)) IIIIEEEE NNEEDDUUEETT,, KKaarraacchhii EEmmaaiill:: kkaasshhiiff99774444@@ggmmaaiill..ccoomm IInntteerrnnaall PPrroojjeecctt SSuuppeerrvviissoorr MMrr.. AAssiiff MMeemmoonn LLeeccttuurreerr aatt IIIIEEEE KKaarraacchhii BBEE ((EElleeccttrriiccaall)) KKUUEETT PPrroojjeecctt WWoorrkk IInncchhaarrggee MMrr.. AAsshhaabb MMiirrzzaa AAssssoocciiaattee PPrrooffeessssoorr aatt IIIIEEEE MMSS ((AAeerroossppaaccee EEnngggg..)) EENNSSAAEE,, TToouulloouussee,, FFrraannccee BBEE ((EElleeccttrroonniiccss)) NNEEDDUUEETT,, KKaarraacchhii EEmmaaiill:: aasshhaabbmmiirrzzaa@@yyaahhoooo..ccoomm
  • 4. TEAM MEMBERS Enrollment No. Shahzad Ali IIEE-610 (Group Leader) Cell: +92-333-2881912 Email: shahzad_iiee@yahoo.com M. Ayaz Butt IIEE-597 Cell: +92-321-2325699 Email: buttie85@yahoo.com M. Zeeshan Taj IIEE-605 Cell: +92-334-6046054 Email: zeeshantaj@yahoo.com S.M. Umer IIEE-614 Cell: +92-0321-2507838 Email: iiee_1537@yahoo.com .
  • 5. ACKNOWLEDGMENT We would like to express our sincere thanks to SIR H.K Raza (NEDUET), who contributed in our project selection by giving basic information about primary design criterion and initial steps for the task; Sir Farhan Khan (NUST Karachi), who helps us in the selection of dc servo motor of specific parameter suitable for this task; Sir Shafiq (UIT Karachi), his valuable comments and suggestions have greatly inspired us to proceed with this project especially for hardware design; Sir Ashab Mirza (IIEE Karachi), whose valuable comments greatly helped us in completion of this project and especially in documenting this report; and many more whose suggestions and valuable comments paid the role in completing this project. It was their affection for us that they guided us time to time for the successful completion of our project. They transferred their practical experience to us very devotedly. Their great affection on this occasion enabled us to have a practical view of the concepts we gained in the theory subjects.
  • 6. CONTENTS PREFACE 1 1. PROCESS AUTOMATION 1.1. Introduction 4 1.2. Automation and Robotics 4 1.3. Project Description 8 1.4. Block Diagram 15 1.5. Overall System 17 1.6. Possible Solutions 21 1.7. ON-OFF Controller 22 1.8. Summary 24 2. ANALYSIS AND SIMULATION 2.1. Introduction 25 2.2. Mathematical model 25 2.3. Stability of Open Loop System 33 2.4. Kinematics of Robotic Arm 37 2.5. Robotic Arm Trajectory Planning 44 2.6. Summary 49 3. IMPLEMENTATION PROPOSAL 3.1. Introduction 50 3.2. Sensory System of Robotic Arm 50 3.3. Controller and Electronics 53 3.4. Actuation System for the Task 56 3.5. Arm Manipulator 65 3.6. Designing of Digital Controller 67 3.7. Transient Analysis 68 3.8. Software Section 72 3.9. Summary 81
  • 7. 4. MECHANICAL STRUCTURE 4.1. Introduction 82 4.2. Material Selection 82 4.3. Physical Parameters 82 4.4. Problems and Solutions 83 4.5. Parts of Robot 83 4.6. End-Effector 88 5. CONCLUSION 5.1. Achievements 91 5.2. Recommendations 92 BIBLOGRAPHY & REFERENCES 93 APPENDEX A-1 PIC16F877A Coding A-2 Visual Basic Coding A-3 Data Sheets
  • 8. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 1 PREFACE The Project named “Automatic Spray Painter by Articulated 2-DOF Robotic Arm” is selected on mutual understanding due to keen interest in Automation and Robotics field and found only way to learn about Automation and Robotic technology by this Project. Automation and Robotics technology is future of our industries and leading technology of western industries. This project is concerned with our Engineering field Industrial Electronics so this gave great opportunity to perform the task. This Project covers almost all subjects that are studied during our studies from simple Electronics to Digital Control Engineering. Purpose of this project is to learn problem solving techniques and design techniques on this level. This project would give much knowledge about linear control system practically. The reason to choose spray painting operation for automation was due to the fact that Spray Painting is the most common example of the general class of the robotic arm application. The later termed suggests the broader range of the possible application which includes painting. The spray coating process makes use spray gun directed at the object to be coated fluid (e.g. paint) flows through the nozzle of the spray gun to be dispersed applied over the surface of the object. The work environment of the human being who performs this process is filled with health hazards. These hazards include noxious fumes in the air, risk of the flash fires & noise from nozzle. The environment is also believed to poise a carcinogenic risk for workers. Largely because of these hazards, robotic arms are being used with increase frequency for spray coating task. The initial problem faced in the selection of this task is the feasibility of this project and physical realization on this level. For this initial decision was to design two DOF Robotic Arm rather than three as it was suppose to be suitable for design on this level. The next problem was its dynamics and Kinematics. Most of dynamics and Kinematics of Arm Manipulator is based on non-linear theory. For this our group consulted with teachers associated with this field and concluded that the first step of designing is to assume the area of workspace and modeled the system to estimate the span, displacement, velocity and acceleration of each joint.
  • 9. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 2 For the modeling of system it was necessary to develop linear model which was most difficult due to the fact that most of Robotic Arm modeling is based on non- linear theory. The solution of this problem took some time and after long internet search it was found that Arm manipulator is the application of Inverted Pendulum, so this solved our Dynamics problem and thus, system was modeled easily. Another problem faced was the Mechanical design. For this many rough sketches were drawn and many of models were downloaded from various websites. The difficult thing was the selection of mechanical design with respect to our design requirement. Our design requirement was yaw movement of shoulder and pitch movement of elbow with simplicity because of level of designing. Mechanical designs downloaded were not at our level as they were on professional level. The solution of the problem was the visit of different universities and institutions to view existing mechanical designs of many Robotic Arms projects. Different concepts were taken from mechanical designs, from those concepts rough sketches were drawn and after modifications mechanical designs was finalized. Another problem was the selection of motor for actuation purpose. The choice of Servo motor over stepper motor was due to the fact that it made design of control system easy and simple. Selection of motor was not so problem as our project in charge suggested us for servo motor in the beginning of task. Type of servo motor selected was RC-coupled servo motor because it provides six slider potentiometer as feedback position sensor, comparator, PID-controller and H-bridge of MOSFETs for motor driving stage which made system designing very easy. The real problem was the selection of motor of particular torque. This all is done through mathematical model. The last problem was the selection of type of digital controller to be design for the system. There were several options for controllers but choice was to be made from digital PID-controller or simple ON-OFF controller. For our level ON-OFF controller was the best option. These were several problems faced by us during performance but by the grace of Allah almighty and with the help of teachers these problems were solved easily. We would like to express our sincere thanks to SIR H.K Raza (NEDUET), who contributed in our project selection by giving basic information about primary
  • 10. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 3 design criterion and initial steps for the task; Sir Farhan Khan (NUST Karachi), who helps us in the selection of dc servo motor of specific parameter suitable for this task; Sir Shafiq (UIT Karachi), his valuable comments and suggestions have greatly inspired us to proceed with this project especially for hardware design; Sir Ashab Mirza (IIEE Karachi), whose valuable comments great helped us in completion of this project and especially in documenting this report; and many more whose suggestions and valuable comments paid the role in completing this project. It was their affection for us that they guided us time to time for the successful completion of our project. They transferred their practical experience to us very devotedly. Their great affection on this occasion enabled us to have a practical view of the concepts we gained in the theory subjects
  • 12. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 4 1.1 INTRODUCTION This chapter deals with detail concept about industrial automation and robotics. This chapter concern with basic concepts about our task and type of robot selected for our project and type of joint used in it. Detail Block diagram and general schematics are also discussed with type of digital controller used. After going through this chapter readers find them selves well aware about automation and robotics and about our project. 1.2 Automation and Robotics Automation is the use of electrical, hydraulic or pneumatic power to move stage machinery, staging, performers or scenery. The effectiveness of any automation system depends entirely on the quality of its underlying electrical, mechanical and control engineering. As computers have changed all aspects of the entertainment industry so the advances have revolutionized automation making sophisticated effects ever more widely available. Both in a performance environment and as part of the supporting infrastructure, the uses and advantages of automation are manifold. [25] 1.2.1 Advantages of Automation Absolute control of speed and position Repeatability of moves 1. Coordinating multiple piece moves 2. Offline editing and simulation 3. Moving pieces in complicated paths 4. Reduced manual handling 5. Repeating moves indefinitely 6. Automatic safety checking 7. Improved efficiency 8. Safe movement of a single piece controlled by 9. several motors 10. Movement in confined spaces
  • 13. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 5 1.2.2 Robotics: Flexible Automation Most manufacturing automation is called fixed automation. A stamping machine can stamp only one kind of sheet metal part without being retooled, for example, or a boring machine bores only one kind of hole in one kind of part. When robots are part of an automatic process, the process can be changed by changing the programming of the robots. Robotic automation is called flexible automation [28]. 1.2.2.1 Definition of Robot Robots are more and more used in industrial and commercial applications. Now, the number of robots in use is increasing at the rate of about 35% per year. Sales volume is also increasing at the same rate. Some of the reasons for the increased use of robots are as follows:  Reduced Production Cost.  Increased Productivity.  Improved Product Quality.  Operation in Hazardous and Hostile Environment.  Improved Management.  Decreased Reaction and Debugging Time A robot is an autonomous artifact that obtains information by sensing the world around it and uses the information to manipulate its environment to achieve goals. Robot sensing includes vision, sound, touch, and others. Manipulation includes the use of specialized tools and dexterous manipulation. Robots often have the ability to change their locations in the world (locomotion).
  • 14. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 6 1.2.2.2 Sensing If robots didn‟t have autonomy, they wouldn‟t need sensing. They could have all their actions pre-programmed into them, but their capabilities would be considerably limited. With sensing, the robot must use the information acquired from the sensors in deciding what to do next. The information from the sensors will only make sense if the robot has some way of using the information to create or modify a model of the world. The process of using sensor data is called representation. Representation and decision making require intelligence Figure1.1 SCARA Arm Manipulator . 1.2.2.3 Intelligence One common approach to robotics is to use a sensing-action cycle. The robot takes sensor data to build or modify a model of the world around it. Then it uses its objectives (goals) to decide how to operate on the world model to achieve a particular goal or sub-goal. Then it performs the action and repeats the cycle.
  • 15. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 7 Different robot applications require different intelligence strategies. Some applications require complex planning algorithms. Others where speed is important have simple and fast programs 1.2.2.4 Manipulation Manipulation is the area of robotics concerned with finding a good grip (grasping) and then handling objects so that objectives are met. In handling an object, there are a large number of “configurations” of the gripper on the object. The robot has to know how to compute an acceptable grip. If there is an error, the robot could drop the object it picks up, or won‟t be able to properly hand it off or put it where it belongs. For example, suppose a robot needs to hand a pan of water to a person or another robot. If the first robot‟s hand completely covers the handle, the person or second robot won‟t be able to take the pan. 1.2.2.5 Computer Vision Another very rich and interesting research area is computer vision. This usually requires constructing a 3D model of the world based on the images from one or more cameras. Many vision systems use “binocular vision” similar to humans. Others use laser range finders, sonar, or radar. Stereoscopic vision can be constructed using one camera and moving it from place to place in the scene to be modeled. 1.2.2.6 Artificial Intelligence Navigation, manipulation, and computer vision all require artificial intelligence. However, artificial intelligence goes beyond those three strictly
  • 16. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 8 robotic disciplines. Realizing the fullest capabilities of robots will require speech understanding and common sense reasoning. For a robot to communicate with people, it will require to have understanding of the world, or at least understanding of its domain environment. Research projects to achieve this goal have been underway at universities for many years [28]. 1.3 PROJECT DESCRIPTION Our Project named “Automatic Spray Painter By Articulated 2DOF- Robotic Arm” is the implementation of theoretical concepts of Modern Control System. This Project is related with Automation and Robotics (as a Linear System) theory in Laboratory conditions. The theme of this Project is to Design 2 Degree of Freedom Robotic Arm Control in which 2DOF Control will be: 1) Yaw Control of Shoulder. 2) Pitch Control of Elbow. All of these Controls will be Servo Mechanism based. The Controls of this system is based on Linear Control system (as some of Robotic Arm Control System considered as Non-Linear) and is an application of Inverted pendulum. The End Effecter of this System is Nozzle connected with small compressor (filled with color) through thin rubber pipe. Flow control of color from Nozzle is through Servo control Valve. The Work space is Thin Metal Plate of specific Dimensions. Our goal is to Design Economical, Light Weight, Reliable System which could be useful for future students to work with this system to achieve more achievements in Automation & Robotics field. .
  • 17. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 9 1.3.1 Types of Arm Manipulators Manipulators are grouped into classes according to the combination of joints used in their construction. A Cartesian geometry arm (sometimes called a gantry crane) uses only prismatic joints, and can reach any position in its rectangular workspace by Cartesian motions of the links. By replacing the waist joint of a Cartesian arm with a revolute joint, a cylindrical geometry arm is formed. This arm can reach any point in its cylindrical workspace (a thick-shelled cylinder) by a combination of rotation and translation. If the shoulder joint is also replaced by a revolute joint, an arm with a polar geometry is formed. The workspace of this arm is half thick spherical shell, and end effectors positions are best described with polar coordinates. Finally, replacing the elbow joint with a revolute joint results in a revolute geometry, or articulated arm. The workspace of an articulated arm is a rather complex thick walled spherical shell. The outside of the shell is a single sphere, but the inside is a set of intersecting spheres.
  • 18. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 10 Figure 1.2 Manipulators of various joint types
  • 19. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 11 1.3.2 Cartesian Arm Manipulator Looking at figure 2.1(a), type of each joint of manipulator is:  Prismatic waist  Prismatic shoulder  Prismatic elbow Advantages of above mentioned Cartesian arm manipulator are:  Linear motion in three dimensions  Simple kinematics model  Rigid structure  Easy to visualize  Can use inexpensive pneumatic drives for pick and place operation. Besides above mentioned advantages, it has a few drawbacks also. Which are:  Requires a large volume to operate in  Work space is smaller than robot volume  Unable to reach areas under objects  Guiding surfaces of prismatic joints  Must be covered to prevent ingress of dust 1.3.3 Cylindrical Arm Manipulator Looking at figure 2.1(b), type of each joint of manipulator is:  Revolute waist  Prismatic shoulder.  Prismatic elbow Advantages of above mentioned cylindrical arm manipulator are:  Simple kinematics model  Easy to visualize  Good access into cavities and machine openings  Very powerful when hydraulic drives used Besides above mentioned advantages, it has a few drawbacks also. Which are:  Restricted work space
  • 20. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 12  Prismatic guides difficult to seal from dust and liquids  Back of robot can overlap work volume 1.3.4 Spherical Arm Manipulator Looking at figure 2.1(c), type of each joint of manipulator is:  Revolute waist.  Revolute shoulder  Prismatic elbow Advantages of above mentioned spherical arm manipulator are:  Covers a large volume from a central support  Can bend down to pick objects up off the floor Besides above mentioned advantages, it has a few drawbacks also. Which are:  Complex kinematics model  Difficult to visualize 1.3.5 Articulated Arm Manipulator  Revolute waist.  Revolute shoulder.  Revolute elbow Advantages of above mentioned spherical arm manipulator are:  Maximum flexibility  Covers a large work space relative to volume of robots  Revolute joints are easy to seal  Suits electric motors  Can reach over and under objects Besides above mentioned advantages, it has a few drawbacks also. Which are:  Complex kinematics  Difficult to visualize  Control of linear motion is difficult  Structure not very rigid at full reach
  • 21. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 13 1.3.6 Joint selected for the task 1.3.6.1 Articulated Arm Manipulator The common industrial manipulator is often referred to as a robot arm, with links and joints described in similar terms. Manipulators which emulate the characteristics of a human arm recalled articulated arms. All their joints are rotary (or revolute). Representative articulated manipulators are the ASEA robot 1.3.6.2 Degree of freedoms The motion of articulated robot arms differs from the motion of the human arm. While robot joints have fewer degrees of freedom, they can move through greater angles. For example, the elbow of an articulated robot can bend up or down whereas a person can only bend their elbow in one direction with respect to the straight arm position. Many applications do not require arms with articulated (or revolute) geometries. Simpler geometries involving prismatic or sliding joints are often adequate. Prismatic and revolute joints represent the opposite extremes of a universal screw. In a revolute joint, the screw pitch is zero, constraining the joint to pure rotation. In a prismatic joint, the pitch is infinite, constraining the joint to pure sliding motion. Revolute joints are often preferred because of the strength, low friction and reliability of ball bearings. Joints that allow a combination of translation and rotation (such as lead screws) are not normally used to join the links of robot arms [29]. 1.3.6.3 Work space consideration Workspace considerations, particularly reach and collision avoidance, play an important part in the selection of a robot for an application. All manufacturers give detailed specifications of the work space of their robots and associated equipment.
  • 22. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 14 1.3.7 SCARA Robot Consideration of the motions involved in assembly has led to the development of simpler arm geometry for use in assembly applications, known as the SCARA (Selective Compliance Automatic Robot Arm) geometry. While all SCARA robots have the same geometry the name SCARA does not have a geometric basis. Most assembly operations involve building up the assembly by placing parts on top of a partially complete assembly. A SCARA arm has two revolute joints in the horizontal plane, allowing it to reach any point within a horizontal planar workspace defined by two concentric circles. At the end of the arm is a vertical link which can translate in the vertical direction, allowing parts to be raised from a tray and placed on to the assembly. A gripper placed at the end of this link may be able to rotate about the vertical axis of this link, facilitating control of part orientation in a horizontal plane. One problem in achieving spherical wrist design is the physical difficulty of fitting all the components into the available space. The size of the human wrist is small because the muscles which power it are located in the forearm, not in the wrist. Wrist design is a complex task, involving conflicting goals. Desirable features of a wrist include [29]  Small size  Axes close together to increase mechanical efficiency  Tool plate close to the axes to increase strength and precision  Soluble mathematical model  No singularities in the work volume  Back-driving to allow programming by teach and playback  Decoupling between motions around the three axes  Actuators mounted away from the wrist to allow size reduction  Paths for end effectors control and power through the wrist  Power proportionate to the proposed task  Rugged housing.
  • 23. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 15 1.4 BLOCK DIAGRAM Block diagram is the way for initial system representation. It provides the specified way for system designing. By follow the blocks in block diagram with calculated parameters system can be designed easily as shown in figure 1.3. Figure 1.3 Block Diagram of Robotic Arm 1.4.1 Sensor The sensor is an electronic device that transforms physical (environmental) data into electrical signals. Sensors can provide some limited feedback to the robot. Robots can be designed and programmed to get specific information that is beyond what our senses can tell us. For instance, a robotic sensor might "see" in the dark, detect tiny amounts of invisible radiation or measure movement that are too small or fast for the human eye to see All the above mentioned parts are used together in order to accomplish the robot its mission.
  • 24. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 16 1.4.2 Controller Every robot is connected to a controller (usually a microcontroller), also it can be connected to a simple home PC, which keeps the pieces of the arm working together. The controller functions as the "brain" of the robot. Robots today have controllers that run programs. Usually, entirely pre-programmed by people, robots have very specific jobs to accomplish. In the block diagram representation of Robotic Arm system there are three separate servo- Control systems(feedback control loops) due to the fact that physics involve in system dynamics(motor as an actuator) in Robotic Arm is on the concept of “Absolute Frame of Reference “. So, three separate Feedback control loops are drawn having digital input through digital computer with designed sampled time “T” having switching sequence between loops as desired. Digital controllers are of “ON-OFF type” for shoulder, elbow and valve dynamics which are Plants of the system. Feedback sensor is position sensor and is part of Servo motor by combining called Servomechanism. TL is the Load Torque on joints due to Actuation Mechanism involving gear & belt system. D/A converter is to convert discrete signal in to Continuous time signal and A/D converter is to convert Continuous time signal in to Discrete signal [12]. 1.4.3 Robotic Arm Robotic arms come in all shapes and sizes. The arm is the part of the robot that sets the end- effectors and sensors to do their preprogrammed job. Many (but not all) resemble human arms and have shoulders, elbows, and wrists, even fingers. Each joint gives to the robot one degree of freedom. So, a simple robotic arm with three degrees of freedom could move in three ways: up and down, left and right, forward and backward.
  • 25. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 17 1.4.4 Actuation System and Drive The drive is the engine that drives the links (the sections between the joints) into their desired position. Very common devices that robots use as drives are Servomotors and Step-Motors. These two categories are usually connected directly to a microcontroller. The microcontroller triggers them by generating specific pulses. They are very useful because they have flexible moving and opposed to the simple motors they can be set at very specific positions each time. Also, a characteristic that makes them useful for robots is that they can handle with heavy items. In other words these kinds of motors can carry heavy parts [15]. 1.4.5 End-Effectors The end-effectors is the "hand" connected to the robots‟ arm. It could be a tool such as a gripper, tweezers or a scalpel. So, the end-effectors are the part of the robotic system that characterizes its implementation. 1.5 OVER ALL SYSTEM Over all system is represented by General Schematics. The General Schematics of the system have four parts. First part is Comparator and Controller part which is digital controller (ON-OFF type). Comparison and Controller is done by using PIC microcontroller. Second part of the system is motor driving stage consist of H-bridge for bidirectional switching of system. Third stage is servo mechanism consist of Servo motor with gear system. The last stage is the Plant which of course Arm Manipulator. General Schematic of system is shown in figure 1.4.
  • 26. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 18 Figure 1.4 General Schematic of Robotic Arm 1.5.1 System Description All the work controlling the servos is done in the preprogrammed PIC micro-controller (  C). As such the kit provides a text-book example of how a  C can replace a handful of IC‟s & other glue chips. Everything is done in software. Connect a 5V power supply capable of delivering an amp. The input signals are between 0 - 5V delivered by connecting up the potentiometers as voltage dividers. Inside the PIC an AD converter (multiplexed when there is more than one input signal) changes the voltage signal into the Pulse Code Modulation system used by
  • 27. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 19 servo motors. This signal is a 5V pulse between 1 and 2 mSec long repeated 50 times per second. That is, a 20msec frame rate. The width of the pulse determines the position of the server. Most servos will move to the center of their travel when they receive a 1.5msec pulse. One extreme of motion generally equates to a pulse width of 1.0msec; the other extreme to 2.0msec with a smooth variation throughout the range, and neutral at 1.5msec. The period between the pulses is used to synchronize the receiver. Servos are closed loop devices. They are constantly comparing their position (proportional to the pulse width) to their actual position (proportional to the signal voltage input.) If there is a difference between the two the servo electronics will turn the motor to adjust the difference error. This also means that servos will resist forces which try to change their position. When a servo is not receiving positioning pulses (i-e not being provided with power) the output shaft can be easily turned by hand. [18] 1.5.2 Electronics To guide the servomotors on when and how to move, an electronic board is needed. On the board (Figure 1), there are some electronic circuits that give to the preprogrammed microcontroller the ability to communicate with the peripheral devices (servomotors, sensors, PCs). The board has inputs and outputs that are connected to the microcontroller. Four outputs are used for the servomotors and one input for the sensor. One I/O interface based on a DB-9 RS-232 is used for transferring data from and to a PC when connected. The microcontroller is a PIC model 16F877A (Microchip). PIC has 13 I/O pins, an 8-bit microprocessor and 1K of RAM. Its circuit is a usual TTL/CMOS based and so its V is +5V. Using the PWM (Pulse Width Modulation) technique, PIC controls the servomotors. Also PIC inputs receive signals that come from sensors and may be useable at any case. In our work we use a supersonic sensor, which transmits high frequencies and then receives the reflections. In this way PIC can understand where and in which height a CD is, related to the ground. The board may also communicate with other external sensors via the PC interface (for sensors connected on the PC) or get
  • 28. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 20 connected with more sensors attached to the board directly via its integrated sockets (PIC16F877 Tutorial and basic explanations; Microchip PIC16F877A Technical Specifications 2002; PIC16F877 Fundamentals and Programming Examples; Programming the PIC16F877 Micro Controller and Data Sheets Resource Centers Internet Sites). 1.5.3 Assembly Check the components in the kit against the Components List. Some of the resistors stand up on the board. Make sure to get the electrolytic capacitor and the IC1 around the correct way. To complete the kit between 5K - 10K potentiometers are required to produce the input signal. Connect each pot as a voltage divider with the center pin going to the signal input. Servo motors are required. They have not been included in this kit because users will usually have their own particular servos they wish to control. 1.5.4 Servo Motor Servo is a small device that has an output shaft. This shaft can be positioned to specific angular positions by sending the servo a coded signal. As long as the coded signal exists on the input line, the servo will maintain the angular position of the shaft. As the coded signal changes, the angular position of the shaft changes. In practice, servos are used in radio controlled airplanes to position control surfaces like the elevators and rudders. They are also used in radio controlled cars, puppets, and of course, robots [20].
  • 29. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 21 Figure 1.5 Timing Diagram of Servo Motor Servo motors are used in radio-controlled models (cars, planes), robotics, theme park special effects, test equipment, industrial automation. At the hobbyist end of the market they are small, compact and relatively inexpensive. The motors themselves are black boxes which contain a motor, gearbox and decoder electronics. Three wires go into the box; 5V, ground and signal. A short shaft comes out of the motor which usually has a circular interface plate attached to it Most servos will rotate through about 100 degrees in less than a second according to the signal input. This Kit will control up to 4 servo motors simultaneously. 1.6 Possible Solutions There are many possible solutions to design this system but two of them is of our level which are: 1. To design digital PID controller for this system. 2. To design ON-OFF type controller for this system. Both of these two controllers are applicable for digital controller design but due to some reasons given in article 1.6 we select option two for controller design for this system.
  • 30. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 22 1.7 ON-OFF Controller The controller is responsible to establish the link between computer and the robot. The reason for that is that the computer outputs only a few mA, not enough to start most motors. Therefore, a supply of power is usually appended to the controller (a 9volts, 1A in the case of Lego motors which are simple DC motors). Figure 1.6 Robot-Computer Interface 1.7.1 Choice of Motor Before making a controller, you must choose what type of motors you want to use; your design will greatly depend on it. Stepper motors are motors whose rotation can be controlled with a high precision. However, they require a pretty complex controller. Servos are pretty weird motors, since they can rotate no more than 360 degrees. They are useful for short motion, but are clearly counter- indicated for propelling a car! I did not found circuit information for controlling servos. DC motors are the most simple to control. Presence of voltage on one input makes them turn. They are however very imprecise. The simplest way to control a dc motor is thru the use of a transistor. Transistors act like switches. In the first figure, R1 is a 1 kilo-ohms resistance, and
  • 31. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 23 R2 is any small resistance (10-300 ohms). Q1 is a very common type of transistor: a 2N2222. See part list for a drawing of these, and this for a picture. A transistor costs no more than 50 cents. In order to control bi-directional a motor (ON/OFF, and clockwise or counterclockwise), a H-type circuit is needed. In the second picture, if both upper left and lower right transistors are ON, the current will flow through the motor from left to right, yielding a CW rotation. Trouble is that there is a lost of power. I have not been able to sink more than 500 mA through the motor in the H circuit. It is enough for small motors, but not for the Lego-type motors who need a full 1 ampere of current. One alternative is to replace transistors with power-MOSFET. I haven't try, but you might look at MOSFET H-Bridge Schematic & Theory of Operation for more. Another alternative that I explored in tutorial 2 is to use a mechanical switch to control the direction of motion. Relays are electro-magnetic switch that can be controlled easily with a transistor. Since the current is independent of the transistor-magnet circuit, there is no lost of power [25]. 1.7.2 Communication port Personal computer needs to communicate to the controller. The two likely methods are to use the ports available. There is two kind of port. The parallel port (or printer port) is easy to program, but has a limited capacity at any given time. In the best case, it can only output 8 bits of information, and can input from sensor 8 bits. There is a large variety in sensors, ranging from electronic thermometer to pressure sensors. The simplest kind is the on/off sensors. When pressure is applied, the switch turns on. One bit of information is enough per sensor.
  • 32. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 24 1.7.3 Sending Command/Receive Data The first layer is only a list of what can possibly be done with your robot. Now we need to send specific commands to your robot. Commands can be very simple, such as "Start motor 3 now", or more complex, such as "Start motor 3, wait 5 seconds, start motor 2, and when sensor 2 gets on, stop all moves." The VBASIC interface that I proposed in another page is an example which can send only simple commands. A better interface would accept commands such as "Turn motor 3 for x seconds" or "Turn motor 3 until sensor 2 gets on". 1.7.4 Constrain Control Not all moves are safe for the health of your robots. For example, turning the arm to the left for an indefinite time is risky if your arm cannot do more than 360 degree turns (and most arms can not do that much). In order to avoid wreckage, your robot should know things about its limitations. These are called constraints. Example of constraints are: If the base is turning for more than 5 seconds, then you ought to stop turning the base.[25]. 1.8 Summary A basic of Robotic Arm is so important for every engineer to step in Automation and robotics technology. Basic information provided in this chapter is so helpful for the student of this level to design such type of manipulator on this level that we proposed in this chapter. Type of block diagram, schematic, type of controller etc is much helpful to collect idea for their designs.
  • 34. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 25 2.1 INTRODUCTION This chapter contains mathematical work on robot manipulator dynamics and kinematics. Concept of linear system is discussed in this chapter while kinematics of manipulator is discussed by simple Trigonometrical relations. Trajectory planning is discussed in this chapter on the behalf of kinematics. Open loop stability of each joint is being issue in this chapter by using mathematical tools and also by MATLAB. 2.2 MATHEMATICALMODELLING Figure 2.1 Robotic Arm in Cartesian coordinate system For the mathematical model of Robotic Arm dynamics as a linear system, we analyze the dynamics of its two parts.
  • 35. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 26 1. Shoulder dynamics 2. Elbow dynamics Let us represent our system graphically in Cartesian coordinate system and analyze its dynamics by considering some of important parameters involved in its dynamics. Some of the important parameters of Shoulder & Elbow kinematics are given as: Table 2.1 General Parameters of Joints General Parameters of Robotic Arm For Shoulder For Elbow Horizontal component of force on pivot H1 H2 Vertical component of force on pivot V1 V2 The force due to torque per unit length Ft1 Ft2 Angular Displacement 1  2  The angular acceleration ..  1 ..  2 Acceleration of Joint moment .. d 1 .. d 2 Weight Mg1 m2g2 Inertia J1 J2 Moment of Inertia J1 ..  1 J2 ..  2 Displacement of Joints from its initial position d1 d2 Centripetal force Fc1 Fc2 Mass of Shoulder M m2 Length L l2 Torque 1 2 The linear displacement w.r.t. change in its angular displacement is our output of joints (plant) movements. The order of equation of each joint depends on the no. of DOF of that joint .The order of this system should be second order due to
  • 36. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 27 one DOF of each joint. As this system is one of many applications of Inverted Pendulum so linear model of this system is established by study the dynamics of Inverted Pendulum. Many of models of Robotic Arm system is based on nonlinear system on undergraduate level which is due to lack of awareness of designing on this level. Following mathematical modeling lead the undergraduate engineers to aware the proper analyses of dynamics of robotic arm system by consider it as linear system [27]. To analyze dynamics of arm manipulator, first analyze their Direct Kinematics & inverse kinematics of joints moment, then analyze the Transfer Function of whole system. To analyze the kinematics of arm joints, it is important to analyze kinematics of shoulder & elbow separately. For this first of all sum the forces perpendicular to the shoulder & elbow. Applying condition of equilibrium For Shoulder joint 1 1 1 J   For Elbow joint 2 2 2 J   Solving the systems along these axis ends up saving lot of algebra. You should get the following equations [27]. For Shoulder .. .. 1 1 1 1 1 1 1 1 1sin cos sin cosV H Mg ML M d        (2.1) For Elbow .. .. 2 2 2 2 2 2 2 2 2 2 2 2 2sin cos sin cosV H m g m l m d        (2.2) Torque () on Shoulder joint
  • 37. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 28 1 1 1 J   Torque on Elbow joint 2 2 2 J   (2.3) The force on shoulder due to turning effect of force per unit of its length is given as, .. 2 1 2 tF ML l    Where, M = m1 + m2 L=l1+l2 Similarly, for Elbow, .. 2 22 2 2 tF m l l    (2.4) The Centripetal Force act on the Shoulder, 2. 1cF ML (2.5) Similarly for Elbow, 2. 22 2cF m l  (2.6) To get rid of H1, H2, V1, V2 terms in the equations above, sum the moments around the Centroids of the Shoulder & Elbow to get the following equations, For Shoulder .. 1 1 1 1 1 1sin cosV L H L J     (2.7) For Elbow .. 2 2 2 2 2 2 2 2sin cosV l H l J     (2.8)
  • 38. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 29 Equations (2.7) & (2.8) are based on the law of equilibrium i.e. sum of clockwise torque is equal to sum of anti clockwise torque. For Shoulder, multiply eq. (2.5) by l1 and add in eq. (2.7), by this dynamic eq. of Shoulder is evaluated as: .. .. .. 2 1 1 1 1 1 1 1sin cosMg L ML M d L J       .. .. 2 1 1 1 1 1 1( ) sin cosJ ML Mg L MLd      (2.9) Similarly, for Elbow: .. .. 2 2 2 2 2 2 2 2 2 2 2 2 2( ) sin cosJ m l m g l m l d      (2.10) Taking, g1 = g2 = g Since MATLAB can only work with linear functions, which is strongest tool to analyze this system. So, these sets of equations should be linearized about, 1 2    Assume that,     Where, Φ is representing a small angle from the vertical upward direction. Therefore, cos cos( ) 1      While, ( )Sin Sin       Also, 2. 0  After linearization the two equations of motions becomes: For shoulder .. .. 2 1 1 1 1( )J ML MgL MLd    (2.11)
  • 39. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 30 For Elbow .. .. 2 2 2 2 2 2 2 2 2 2 2( )J m l m gl m l d    (2.12) The direct kinematics of the system is given as: For shoulder 2 2 2 1 1 1 1( )J ML D MgL ML D d    Therefore time domain analysis of shoulder: 2 2 1 1 2 1 ( ) ( ) ( ) d t J ML D MgL t MLD   (2.13) For Elbow 2 2 2 2 2 2 2 2 2 2 2 2 ( ) ( ) ( ) d t J m l D m gl t m l D   (2.14) The above sets of equations for Elbow and shoulder represent the direct kinematics of plant. For inverse kinematics i.e. analyzing angular displacements of plants for given space coordinate [27]. 2.2.1 Actuation Mechanism The actuation mechanism consists of belt & gear, driven by the DC motor by which plant works (i.e. shoulder & elbow move). So overall transfer function depends upon actuation mechanism will depend on transfer function of DC motor, belt & external gear.
  • 40. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 31 2.2.1.1 Belt & Gear Load inertial to the motor consists of gear (of radius „r‟) & masses of shoulder (i.e. m1) & elbow (i.e. m2). Therefore, Load Torque is given as; For elbow joint system 1 2 1 1.LT Mr D Or, 1 2 2 1 1. ( )LT Mr D t For elbow joint system 2 2 2 2 2 2. ( )LT m r D t 2.2.1.2 Motor Dynamics of motor will also affect the transfer function of the actuation mechanism. Experimentally, the transfer function of armature control servo dc motor is given as, [27] . ( ) ( ) 1 m m Kt E t D     (2.15) Or, ( ) ( ) ( 1) m m Kt E t D D     (2.16) Where, Km = Steady state gain in rad/s/v τm = Time constant for motor in sec Therefore, overall actuation mechanism is given as for shoulder & elbow,
  • 41. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 32 For elbow joint system 2 2 1 1 1 ( ) ( ) ( 1) m m K Mr Dt E t D D     2 11 1 ( ) ( ) ( 1) m m K Mr Dt E t D     (2.17) For elbow joint system Similarly, 2 2 2 2 2 ( ) ( ) ( 1) m m K m r Dt E t D     (2.18) Differential equation of overall system For shoulder joint system     2 2 2 1 1 1 1 1 2 1 1 ( ) ( ) 1 m m J Ml D Mgl K Mr Dd t E t Ml D D          2 2 2 1 1 1 1 1 1 1 ( ) ( ) 1 m m K Mr J Ml D Mgld t E t Ml D D            2 22 1 1 111 2 1 1 ( ) ( ) 1 m m J Ml D MglK rt E t l D D           (2.19) For elbow joint system     2 22 2 2 2 2 222 2 2 2 ( ) ( ) 1 m m J m l D m glK rt E t l D D           (2.20) By inserting transfer function values from specification table; differential equations are given as, [27]
  • 42. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 33 For shoulder joint system   2 1 1 ( ) 21.4 0.2 ( ) 5.52 t D E t D D         (2.21) For elbow joint system   2 2 2 ( ) 20.7 0.076 ( ) 5.52 t D E t D D         (2.22) Transfer function for Shoulder joint system, 2 1 2 1 ( ) 0.2 4.28 ( ) 5.52 s s E s s s     (2.23) Transfer function of Elbow joint system, 2 2 2 2 ( ) 0.076 1.55 ( ) 5.52 s s E s s s     (2.24) 2.3 Stability of Open Loop System In the light of mathematical model and transfer function in s-domain in section 2.2. The next step towards designing of system is the analysis of its stability. There are two ways of analysis. First by mathematical way and second one is by computer simulation which is actually confirmation of mathematical way of analysis.[2] It is clear from the above roots of the system that system is marginary stable in open loop that one of its pole lie at origin while others are at the left side. Let the stability of system be analyzed by evaluating d(t) by applying impulse at input i.e. e(t) = σ(t) Where, σ (t) = impulse input From equation (2.23), c(t) = 0 .775 – 0.575e-5.52t (2.25) Fort , c(∞) = 0.775 Above result clearly shows that system is not unstable in open loop and is marginary stable for the roots mention above.
  • 43. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 34 It is clear from the above roots of the system that system is marginary stable in open loop that one of its pole lie at origin while others are at the left side.[2] Let the stability of system be analyzed by evaluating d(t) by applying impulse at input i.e. e(t) = σ(t) Where, σ (t) = impulse input From equation (2.24), c(t) = 0 .280 – 0.21e-5.52t (2.26) Fort , c(∞) = 0.280 Above result clearly shows that system is not unstable in open loop and is marginary stable for the roots mention above. Results from computer simulation clearly confirm the mathematics for stability analysis for open loop system. Pole-Zero maps in figure 2.2 of the Shoulder joint system clearly proves that system is marginary stable. From equation (2.23) in section 2.2 roots for Shoulder joint system is given as, z1= j4.63, z2= -j4.63, p1= 0, p2= 5.52 Pole-Zero Map Real Axis ImaginaryAxis -6 -5 -4 -3 -2 -1 0 1 -6 -4 -2 0 2 4 6 p=5.52 p=0 z=j4.63 z=-j4.63 Figure 2.2 Pole-Zero Map of Shoulder Joint
  • 44. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 35 In open loop due to the fact in pole-zero maps one of the pole lie at origin and other at left side confirms the marginal stability of shoulder joint system. Figure 2.3 Impulse Response for Shoulder Joint Impulse response of the shoulder joint system is shown in figure 2.3 clearly shows that response of the shoulder joint system is settled down proves the analysis in section 2.3.2 Results from computer simulation clearly confirm the mathematics for stability analysis for open loop system. Pole-Zero maps in figure 2.4 of the Shoulder joint system clearly proves that system is marginary stable. From equation (2.24) in section 2.2 roots for Elbow joint system is given as, z1= j4.53, z2= -j4.53, p1= 0, p2= 5.52
  • 45. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 36 Figure 2.4 Pole-Zero Map of Elbow Joint In open loop due to the fact in pole-zero maps one of the pole lie at origin and other at left side confirms the marginal stability of shoulder joint system. Figure 2.5 Impulse Response of Elbow Joint Pole-Zero Map Real Axis Imaginary Axis -6 -5 -4 -3 -2 -1 0 1 2 -5 -4 -3 -2 -1 0 1 2 3 4 5 z=-j4.53 z=j4.53 p=5.52 p=0
  • 46. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 37 Impulse response of the shoulder joint system is shown in figure clearly shows that response of the shoulder joint system is settled down proves the analysis in section 2.3.2 2.4 Kinematics of Robotic Arm Robotic arms are common place in today's world. They are used to weld automobile bodies, employed to locate merchandise in computerized warehouses, and used by the Space Shuttle to retrieve satellites from orbit. They are reliable and accurate. This reliability and accuracy is due to the computer a robot arm uses in determining where and how it should move. This control computer is programmed with some basic mathematics. In this paper, we will look at the mathematics behind robot arms [21]. We will study the two-link robot arm shown in Figure 2.6 Figure 2.6 Two-Link Robotic Arm Let, θ1 =A and θ2 =B Most robot arms are more complicated than this, using three links and a moveable "hand," but with these complications come much more difficult mathematics. Operation of the two-link arm is simple. The first link (length L1)
  • 47. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 38 pivots around the origin of an XY Cartesian coordinate system while the second link (length L2) pivots about the connection between the two links. The two pivot points are drawn as circles. The angle the first link makes with the horizontal (X) axis is designated A, while the angle the second link makes with the first link is designated B. The end of the second link is the position of the robot arm, (X, Y). Arm position (X, Y)? This is simple trigonometry. The second problem is "inverse kinematics." Here, we want to ask: given the position (X, Y), what angles, A and B, yield this position? This is a more difficult problem. Lastly, we need to look at the problem of "trajectory planning." In trajectory planning, we ask: given our current position (X, Y) and some desired new position, how do we change the angles A and B to arrive at this new position? We examine each of these problems separately, using the two-link robot arm [21]. 2.4.1 Forward Kinematics The kinematics problem requires computation of the robot arm Cartesian position (X, Y), knowing the two link angles, A and B. Referring to Figure 2.6 We can see the position of the end of the first link (X1, Y1) is given by X1 = L1 cos (A) Y1 = L1 sin (A) Then, the end of the second link (X, Y) is simply X = X1 + L2 cos (A + B) Y = Y1 + L2 sin (A + B) Combining these two sets of equations provides the solution to the kinematics problem: X = L1 cos (A) + L2 cos (A + B) (2.27)
  • 48. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 39 Y = L1 sin (A) + L2 sin (A + B) (2.28) An interesting question at this point is: if we cycle A and B through all possible combinations (-180 degrees < A < 180 degrees, -180 degrees < B < 180 degrees), what would the region of coverage look like? If L1 and L2 are equal, the region would be a circle (radius L1 + L2). If L1 and L2 are not equal, the region would be armular (like a donut). This coverage region becomes important in the inverse kinematics problem, where we need to know if it's possible to reach a given point by adjusting the link angles. 2.4.2 Inverse Kinematics The kinematics problem is seen to be fairly easy to solve. The inverse problem, that of finding A and B, knowing (X, Y) is not nearly as simple. Let's see why. [21] Figure 2.7 Inverse Kinematics Using the kinematics equations, if we know X and Y, we need to solve the following for A and B:
  • 49. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 40 L1 cos A) + L2 cos (A + B) = X (2.29) L1 sin (A) + L2 sin (A + B) = Y (2.30) This is a nonlinear problem. There are two possible solution approaches: algebraic and geometric. The algebraic approach (solving the equations directly) is tedious and involved. For the two-link robot arm, the geometric approach is more straightforward. We will outline the steps of the algebraic approach to illustrate some salient points of the inverse kinematics problem. Also, by outlining these steps, we allow the more industrious reader to see if he/she can solve the problem algebraically. After this outline, we will develop the solution to the problem with a geometric approach. 2.4.3 Algebraic Solution In the algebraic solution, we first square both of the above equations and add them together. Then, we apply these trigonometric identities: [21] Cos (A + B) = cos (A) cos (B) – sin (A) sin (B) Sin (A + B) = cos (A) sin (B) + sin (A) cos (B) sin2 (C) + cos2 (C) = 1 Where C is any angle Following these steps, we are able to obtain a relation for cos (B) simply in terms of X, Y, L1, and L2. That relation is (see if you can find it) Cos (B) = (X2 + Y2 – L1 2 - L2 2 )/2L1L2 (2.31) With this, we can find B by applying the inverse cosine, or can we? What if cos (B) is greater than one or less than minus one? In these cases, there is no solution! When this happens, the desired point (X, Y) is not within the coverage region of the robot arm (as discussed in the previous section). If (X, Y) is in the
  • 50. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 41 coverage region, can we find a unique B? No, just knowing the cosine is not sufficient. If B is a solution to the above equation, so is -B since Cos (B) = cos (-B) Hence, the inverse kinematics problem always has two solutions. This is shown in Figure 2.7. In "robotics talk," one solution is referred to as "elbow-out" and one is "elbow-in." To specify which solution we want, we must also find the sine of B. Knowing the cosine of B, the sine is given by Sin (B) = + [1 - cos2 (B)] ½ (2.32) The angle B is then completely specified by selecting either a plus or minus sign in this expression. The robot designer must decide which sign to choose based on problem geometry and current arm configuration. This choice is discussed in detail in the "Trajectory Planning" section. Figure 2.8 shows the Cartesian quadrant in which an angle belongs, based on the sign of the two trigonometric functions. Figure 2.8 Quadrant System
  • 51. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 42 At this point in the algebraic solution process, we have the angle B. How do we find A? Knowing B, and hence sin (B) and cos (B), we substitute this (along with X and Y) back into the kinematics equations. Using the relations for the sine and cosine of the sum of two angles, the resulting equations will be (again, see if you can get these) [L1 + L2 cos (B)] cos (A) – L2 sin (B) sin (A) = X (2.33) L2 sin (B) cos (A) + [L1 + L2 cos (B)] sin (A) = Y (2.34) Here, we have two linear equations with two unknowns: sin (A) and cos (A). Solving these equations (use Cramer's rule) and applying the angle convention in Figure 2.8 will yield a unique value for A. At this point, we have solved the inverse kinematics problem with an algebraic approach. 2.4.4 Geometric Solution The geometric solution is more direct. We can develop expressions for the angles A and B by simply looking at the geometry of the problem. First, we'll find B. Figure 4 sketches the configuration necessary for this evaluation. If we look at the triangle formed by the two links and the line [of length (X2 + Y2 )1/2 ] connecting the origin to the point (X, Y), we can use the law of cosines to write [21] X2 + Y2 = L1 2 + L2 2 - 2L1 L2 cos (180º - B) (2.35) But, cos (180º - B) = -cos (B). Substituting this into the equation and solving for cos (B) yields Cos (B) = (X2 + Y2 - L1 2 - L2 2 )/2L1L2 (2.36)
  • 52. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 43 This is exactly the result obtained using the algebraic approach. The geometric approach is seen to be much simpler. Recall, though, that this does define a unique angle B. This definition is made by establishing a value for sin (B), as outlined in the algebraic approach. The other angle, A, is found with a two step procedure. If we define the angle between link 1 and the line [length (X2 + Y2 )1/2 ] from (0, 0) to (X, Y) as C (see Figure 2.9). Figure 2.9 Geometric solutions for angle A We can write Sin (C) = L2 sin (B)/(X2 + Y2 )1/2 (2.37) Cos (C) = [L1 + L2 cos (B)]/(X2 + Y2 )1/2 (2.38) These expressions define a unique C. Now, using the right triangle (Figure 2.9) defined by the three coordinates (0, 0), (X, 0), and (X, Y), we have
  • 53. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 44 Sin (A + C) = Y/(X2 + Y2 )1/2 (2.39) Cos (A + C) = X/(X2 + Y2 )1/2 (2.40) Which uniquely define A + C. Subtracting C from this sum will yield the angle A. This completes the geometric approach. Figure 2.10 Geometric solution for angle B 2.5 ROBOT ARM TRAJECTORY PLANNING The last robotics problem we need to solve is referred to as trajectory planning. Our two-link robot arm is at one position (Xold, Yold), with corresponding link angles Aold and Bold. We want to move the arm to another point (Xnew, Ynew). Assume we have solved the inverse kinematics problem and we know the angles, Anew and Bnew, which correspond to (Xnew, Ynew). We must decide how to change the old angles, Aold and Bold, so that they take on the new angle values. Do we
  • 54. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 45 change A first, B first, or both simultaneously? In which direction do we change them? Clockwise? Counterclockwise? This is not a difficult problem if there are no obstacles in the path of the robot arm, i.e. we have complete freedom of movement. In that case, we usually move A and B in the direction of smaller change. That way, we minimize the energy required to move the arm and the time required to change configuration. [21] As an example, look at Figure 2.11(a). Figure 2.11(a): Graph-I Here, L1 = L2 = 3, Aold = -45 degrees, and Bold = 90 degrees, which corresponds to a Cartesian location of (Xold, Yold) = (4.24, 0). Check the math using the kinematics equations. Say we want to move to (Xnew, Ynew) = (-4, 4). To reach this point, the inverse kinematics equations yield Anew = 115 degrees, Bnew = 39 degrees (see if you can get the same values - I have rounded to the nearest degree). We'll assume we can only change the angles one at a time. So, to go from (4.24, 0) to (-4, 4) with minimum angle change, we swing A from -45 to 115 degrees (counterclockwise) and then B from 90 degrees to 39 degrees (clockwise), as shown in Figure 2 11(a). What if there was a solid wall in the quadrant where X > 0 and Y > O? In that case, the trajectory in Figure 2.6(a) would not be possible?
  • 55. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 46 We need to change our plan. Figure 2.11(b) shows a trajectory that avoids the blocked quadrant. In this trajectory, A is changed in a clockwise direction. Figure 2.11(b): Graph-II The two trajectories here achieve the desired condition, but not in the most direct fashion. We all know the shortest distance between two points is a straight line -let's see how to plan this trajectory. To follow a straight line, we solve the inverse kinematics problem several times. We first draw a line from the current (Xold, Yold) point to the new point. We divide that line into some number of segments and compute the corresponding (X, Y) coordinates at the end of each segment using the equation of a straight line. For each (X, Y) pair, we compute the required angles, A and B, to achieve this point. As each new A and B is computed, we change the arm configuration. With this procedure, we move along the line until the desired endpoint is reached. The trajectory in Figure 2.12(a) shows the path followed by the example two-link robot arm using 20 intermediate points along the straight line (we have eliminated the blockage for).
  • 56. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 47 Figure 2.12(a): Path Followed By Two-Link Robot The path is not a straight line due to the nonlinearities of the robot arm and the motions as the angles are changed sequentially. If we changed the angles simultaneously, the path followed would be much smoother. We can extend this procedure to follow any desired trajectory. This allows us to get around any obstacles that might be in the way of the arm. Simply draw the desired path and compute Cartesian points along the path, along with the corresponding joint angles. Then, cycle through each pair of A and B values until the endpoint is reached. Figure 2.12(b) shows the arm following a three-segment straight line path from (4.24, 0) to (-4, 4). Again, this path would be smoother if the angles changed simultaneously. [21]
  • 57. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 48 Figure 2.12(b): Three Segment Straight Line Path Obviously, there are many considerations in the trajectory planning problem. There is one last thing to discuss before moving on. Recall in solving the inverse kinematics problem, we need to choose B - whether we want an "elbow-in" or "elbow-out" configuration at each new point. The primary consideration in making this choice is a potential obstacle that is we must insure the robot arm links do not collide with surrounding structures. If there are no potential collisions, we usually choose the B value that is closest to the current B.
  • 58. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 49 2.6 Summary The robot arm problem is a very interesting mathematical exercise. It represents nonlinear equations which may or may not have a solution. And, if a solution exists, there are multiple (two, in this case) solutions. And then, once the problem has been solved, many decisions must be made about how to implement the solution. An obvious use for the equations as presented is to program them on a computer using a language such as Visual Basic or Java. Use graphics and allow the user to manipulate the angles A and B to watch the robot arm move. Allow for variable length links to investigate the potential coverage regions. Implement the inverse kinematics solution to allow for trajectory planning. Make sure you can detect solution existence. Determine methods of trajectory planning. Allow the angles to change one at a time or simultaneously. Can your robotic arm follow a straight line? Can you program it to follow any prescribed path? With such an implementation comes a question of resolution. In the discrete world of a computer, there are no two angles that will exactly correspond to some point (X, Y). However, there are angles that correspond "closely" to (X, Y). The robot designer has to decide what is close. If we can establish angles to within only 5 degrees, we have to allow for that sloppiness in our design. If we need more precision, we need to make it possible to have finer angle adjustments.
  • 60. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 50 3.1 INTRODUCTION This chapter contain practical design implementation of digital controller for each joint and concept of difference equation. Transient response is also discussed in detail by using MATLAB. Hardware design is also presented in this chapter contain specification table and three dimensional views of different part of designed manipulator. Software section is also discussed contain algorithms and Flowcharts for each joint controller and also for master controller. Robotic Arm System is represented by blocks in figure 3.1 consists of four parts named Sensory System, controller and Electronics, Actuation System and Manipulator Joints as plant. Figure 1.1 Manipulation Systems 3.2 Sensory System of Robotic Arm Sensors are the sensory system of a robot much like the five senses that humans have: touch, sight, sound, smell and taste and measure environmental data like touch, distance, light, sound, strain, rotation, magnetism, smell, temperature, inclination, pressure, or altitude. Sensors provide the raw data that must be processed to provide information to allow the robot to appropriately respond to its environment. Robots are equipped with sensors so they can have an understanding of their surrounding environment and make changes in their behavior based on the information they have gathered. [24] Sensors allow robots to detect objects and variations in the environment. A robot will invariably be equipped with a number of sensors which may include: an acoustic sensor to detect sound, motion or location, infrared sensors to detect heat Sensory System Controller & Electronics Electro- Mechanical Actuator Plant Manipulator Joints
  • 61. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 51 sources, contact sensors, tactile sensors to give a sense of touch, or optical/vision sensors. A robot can also monitor itself with sensors. 3.2.1 Common Sensors for Manipulators 3.2.1.1 Touch Sensors Touch sensors are basically variable switching devices that work through pressure. 3.2.1.2 Global Positioning Systems Global Positioning Systems (GPS) receive signals from orbiting satellites that pinpoint the location of an outdoor robot on the Earth. [24] 3.2.1.3 Light Sensor It measures the level of light as a number between 0% (total darkness) and 100% (very bright). Can differentiate light levels reflected from bright and dark surfaces. Inside the light sensor is a photo-transistor. The photo-transistor acts like a valve for electricity. The more light energy it senses, the more electricity flows.[24] 3.2.1.4 Rotation Sensor It measures the rotation of an axle or shaft. The rotation sensor sends out a series of voltage pulses. There will be a number of pulses per rotation. In the lego robotics kits there are 16 of these pulses per one revolution. These pulses are also referred to as “ticks”, “clicks”, or “counts”.
  • 62. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 52 3.2.2 Sensor Selected for the Task Rotation sensors (also called encoders) measure the rotation of a shaft or axle. They are used to measure the angle of a robotic arm, or how far a mobile robot‟s wheel has turned. [24] 3.2.1.1 Rotation Sensor It measures the rotation of an axle or shaft. The rotation sensor sends out a series of voltage pulses. There will be a number of pulses per rotation. In the lego robotics kits there are 16 of these pulses per one revolution. These pulses are also referred to as “ticks”, “clicks”, or “counts”. Figure 2.2 Series of Voltage pulses 3.2.1.2 Pull to Position In the case of autonomous mobile robots operating in unstructured environments the position, geometry and orientation of objects of interest are not
  • 63. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 53 known. We aim to use sensor inputs from targets directly to control the motion of the robot and thereby use the world and its objects as its own best model. The robot arm structure, dimensions and joint angles, however, are well known and so can be used for control. The approach used here is to develop a simple structured linked model of the articulated limb. The model records link lengths, joint angles and joint stiffness. The model is manipulated to 'pull' the end of the limb towards the desired destination position and orientation. The direction of this pulls being derived from robot sensors. Then the actual motion is realized by driving the joints and linkages through the trajectories followed by the model. By incorporating continuous sensory feed-back of joint angles and deriving updated target vectors from target sensors very simple limb models are sufficient for the control task. Simply 'pulling' the limb end point [24] towards the destination entails a simple vector mapping (figure 3.1). Employing servo control of motion direction rather than position means that the limb will achieve the target point even with simplified modeling. There is no med to accurately model linkage weights and friction. This control approach could be considered to be a primitive version of the perception driven control which living creatures can employ. 3.3 CONTROLLER AND ELECTRONICS 3.3.1 ON-OFF Controller The controller is responsible to establish the link between computer and the robot. The reason for that is that the computer outputs only a few mA, not enough to start most motors. Therefore, a supply of power is usually appended to the controller (a 9volts, 1A in the case of Lego motors which are simple DC motors).
  • 64. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 54 Digital controllers are of “ON-OFF type” for shoulder, elbow and valve dynamics which are Plants of the system. Feedback sensor is position sensor and is part of Servo motor by combining called Servomechanism. TL is the Load Torque on joints due to Actuation Mechanism involving gear & belt system. D/A converter is to convert discrete signal in to Continuous time signal and A/D converter is to convert Continuous time signal in to discrete signal. The switching sequence in ON-OFF controller is programmed by computer and interfaces it with plant through microcontroller. When ever interrupt or switching occur for any joint moment module for that joint moment recalls in microcontroller according to sequence discussed in algorithm for master controller in section 3.9.2. 3.3.2 PIC Microcontroller Microcontroller used in for controlling purpose is PIC microcontroller due many advantages over 8051 microcontroller. It is forty pins microcontroller having 8bits port B (RB.0 to RB.7) and 8bits port C (RC.0 to RC.7) and 6bits port A. Output from the sensor for each joint directly interfaced with port A.0 as no ADC is needed for this purpose. This is one of the great feature of PIC microcontroller to accept analog input if its level in the range of 0V to 5V. Reference input from computer is connected with microcontroller through DB-9 at port RA.1. 8bits output is connected with DAC to convert 8bits digital output signal into analog signal of specific level.
  • 65. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 55 Figure 3.3 PIC19F877 The width of the pulse determines the position of the server. Most servos will move to the center of their travel when they receive a 1.5msec pulse. One extreme of motion generally equates to a pulse width of 1.0msec; the other extreme to 2.0msec with a smooth variation throughout the range, and neutral at 1.5msec. The period between the pulses is used to synchronize the receiver. Servos are closed loop devices. They are constantly comparing their position (proportional to the pulse width) to their actual position (proportional to the signal voltage input.) If there is a difference between the two the servo electronics will turn the motor to adjust the difference error. This also means that servos will resist forces which try to change their position. When a servo is not receiving positioning pulses (i-e not being provided with power) the output shaft can be easily turned by hand. 3.3.2 DAC0808 8-Bit D/A Converter The DAC0808 is an 8-bit monolithic digital-to-analog converter (DAC) featuring a full scale output current settling time of 150 ns while dissipating only 33 mW with ±5V supplies. No reference current (IREF) trimming is required for most applications since the full scale output current is typically ±1 LSB of 255 IREF/256. Relative accuracies of better than ±0.19% assure 8-bit monotonic and linearity while zero level output current of less than 4 µA provides 8-bit zero
  • 66. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 56 accuracy for IREF³2 mA. The power supply currents of the DAC0808 are independent of bit codes, and exhibits essentially constant device characteristics over the entire supply voltage range. The DAC0808 will interface directly with popular TTL, DTL or CMOS logic levels, and is a direct replacement for the MC1508/MC1408. For higher speed applications, see figure 3.3. Figure 3.4 Circuit of DAC 3.4 Actuation System for the Task 3.4.1 Servo motors Servos are DC motors with built in gearing and feedback control loop circuitry. And no motor drivers required Servo motors depend upon "closed-loop" circuitry to supply information back to the computer so that positioning errors can be continuously corrected. This feedback is provided by encoders, which in some respects, are like the bicycle wheels that some road builders and others use to measure distances. A new type of servo motor called an "intelligent servo motor" has recently appeared on the scene. It is useful for some applications, and we use it in our automatic torch height controls. In fact, we probably purchase more of them than any of our competitors. The motor has some programmable computer circuitry
  • 67. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 57 incorporated into it, which lets it independently follow simple instructions. It works well with our torch height controls, due to their low torque demand. We believe intelligent motors are impractical for driving a cnc machine, for reasons given below. The following paragraphs explain each of these types of motors in more detail. Figure 3.5 Torque-Speed Curves of Servo Motor Servo motors are somewhat more expensive than steppers -- perhaps double the price, or more. They are generally just as accurate, if maintained in a proper state of tune, however they rely on encoders to provide positioning information back to the computer. Thus the complexity of the system is at least doubled, with no accuracy advantage, greater initial cost, and more maintenance issues. The "closed loop" rhetoric that some manufacturers play up sounds convincing to the uninitiated, but provides no benefit over a simpler and more reliable stepper system. [25] Servo motors are available in larger sizes than stepper motors, and powerful servos are generally used on heavy machines with gantry carriages in the
  • 68. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 58 500 to 1,000 lb range. They offer no advantage whatsoever on lighter machines, such as Torch mate and its competitors. Small intelligent motors with 50 oz. in. peak torque and 28 oz. in. continuous torque are used on one new competitor's cnc machine, although this is disguised by the citing of output torque at the gearbox. Although these small motors are expensive, larger intelligent motors would be far more costly. The only way these relatively low power motors can drive a gantry on a cnc machine is to run them at a very high rpm with a large gear reduction. This is kind of like driving your stick shift car around in low gear. This high rpm greatly increases motor wear, and introduces planetary gearbox backlash into the equation. When a gearbox first turns in one direction, and then the other, as in cutting a circle, the backlash in the gear train must be taken up before the direction changes. Unless super-expensive low-backlash planetary gear boxes are used, as on the large $100,000 plus machines, circles don't end up in the same place they started, etc. [25] Servos are extremely popular with robot, RC plane, and RC boat builders. Most servo motors can rotate about 90 to 180 degrees. Some rotate through a full 360 degrees or more. However, servos are unable to continually rotate, meaning they can't be used for driving wheels (unless modified), but their precision positioning makes them ideal for robot arms and legs, rack and pinion steering, and sensor scanners to name a few. Since servos are fully self contained, the velocity and angle control loops are very easy to implement, while prices remain very affordable. To use a servo, simply connect the black wire to ground, the red to a 4.8-6V source, and the yellow/white wire to a signal generator (such as from your microcontroller). Vary the square wave pulse width from 1-2ms and your servo is now position/velocity controlled
  • 69. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 59 3.4.2 Servo Voltage (Red and Black/Brown wires) Servos can operate under a range of voltages. Typical operation is from 4.8V to 6V. There are a few micro sized servos that can operate at less, and now a few Hitec servos that operate at much more. The reason for this standard range is because most microcontrollers and RC receivers operate near this voltage. So what voltage should you operate at? Well, unless you have a battery voltage/current/power limitation, you should operate at 6V. This is simply because DC motors have higher torque at higher voltages 3.4.3 Signal Wire (Yellow/Orange/White wire) While the black and red wires provide power to the motor, the signal wire is what you use to command the servo. The general concept is to simply send an ordinary logic square wave to your servo at a specific wave length, and your servo goes to a particular angle (or velocity if your servo is modified). The wavelength directly maps to servo angle so how do you apply this square wave to your servo? If your robot is remote controlled, your RC receiver will apply the proper square wave for you. If however your robot is running from a microcontroller, you must: bring high a digital port wait between 1-2ms bring low the same digital port cycle a few dozen times per second Note, if you are running multiple servos simultaneously, you can just put a few of these program blocks in sequential order. You can run as many servos as you have of digital ports. [25] So how many milliseconds do you keep the port high? It all depends on the servo. You may have to tweak for each individual servo some several microseconds‟ difference. The standard time vs. angle is represented in this chart:
  • 70. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 60 Figure 3.6 Timing diagram of servo motor 3.4.4 Servo Current Servo current operates the same as in a DC motor, except that you now also have a hard to predict feedback control system to contend with. If your DC motor is not at the specified angle, it will suddenly draw huge amounts of current to reach that angle. But there are other peculiarities as well. If you run an experiment with a servo at a fixed angle and hang precision weights from the servo horn, the measured current will not be what you expect. One would think that the current would increase at some fixed rate as the weights increased linearly. Instead you will get unpredictable curves and multiple rates. In conclusion, servo current draw is very unpredictable. [25] 3.4.4.1 Stall Torque, Stall Current, Current Drain Since servos contain DC motors, please read my DC motor tutorial to learn about servo stall characteristics.
  • 71. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 61 Figure 3.7 Hitch RC-servo motor 3.4.5 Gear Types More expensive servos come with metal gears for higher torque and longer life, followed by carbonite and then nylon gears for the cheapest. 3.4.5.1 Nylon Gears Nylon gears are most common in servos. They are extremely smooth with little or no wear factors. They are also very lightweight, but lack in durability and strength. 3.4.5.2 Karbonite Gears Karbonite gears are relatively new to the market. They offer almost 5 times the strength of nylon gears and also better wear resistance. Cycle times of well over 300,000 have been observed with these gears with virtually no wear. Servos with these gears are more expensive but what you get in durability is more than equaled. 3.4.5.3 Metal Gears Metal gears have been around for sometime now. Although the heaviest and having the highest wear rate of all gear types, they offer unparalleled strength. With a metal output shaft, side-loads can be much greater. Ever had a nylon output shaft crack? I have. In applications that are jarred around, metal gears are best.
  • 72. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 62 Unfortunately, due to wear, metal gears will eventually develop slight play in the gear-train. Accuracy will slowly be lost. [25] 3.4.6 Velocity The servo turn rate, or transit time, is used for determining servo rotational velocity. This is the amount of time it takes for the servo to move a set amount, usually 60 degrees. For example, suppose you have a servo with a transit time of 0.17sec/60 degrees at no load. This means it would take nearly half a second to rotate an entire 180 degrees. More if the servo were under a load. This information is very important if high servo response speed is a requirement of your robot application. It is also useful for determining the maximum forward velocity of your robot if your servo is modified for full rotation. Remember, the worst case turning time is when the servo is at the minimum rotation angle and is then commanded to go to maximum rotation angle, all while under load. This can take several seconds on a very high torque servo. 3.4.7 Efficiency and Noise Due to noise and control circuitry requirements, servos are less efficient than DC motors uncontrolled. To begin with, the control circuitry typically drains 5-8mA just on idle. Secondly, noise can more than triple current draw during a holding position (not moving), and almost double current during rotation. Noise is often a major source of servo inefficiency and therefore should be avoided. Ever notice your servo jitter or vibrate? This is because your servo is rapidly jumping between two different angles due to interference. What causes this interference? Well the signal wire is no different than long antennae, capable of accepting unwanted foreign signals and sending them straight to your servo as a command. A common interference source is usually from other nearby servos and/or servo wiring. How to prevent this problem? Keep your signal wire short, meaning do not add say 3+ feet of extension cables to your servo. If you have many servo wires going through one area, and it isn‟t feasible to keep them apart, then twist them together. Supposedly this reduces cross interference and I've heard it works,
  • 73. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 63 although I cannot really tell for sure myself. You can also buy something called a servo booster extension which buffers and amplifies the signal Digital Servos vs Analog Servos Digital servos, at the user end, are controlled no differently than analog servos. The difference is in how the servo motor is controlled via the circuit board (amplifier). The motor of an analog servo receives a signal from the amplifier 30 times a second or at 30Hz. This signal allows the amplifier to update the motor position. Digital servos use a high frequency amplifier that updates the servo motor position 300 times a second or at 300Hz. By updating the motor position more often, the digital servo can deliver full torque from the beginning of movement and increases the holding power of the servo. The quick refresh also allows the digital servo to have a tighter dead band. 3.4.8 Digital Servos VS Analog Servos With the exception of a higher cost, there are only advantages for digital servos over analog servos. The digital micro processor is 10 times faster than an analog servo. This results in a much quicker response from the beginning with the servo developing all the rated torque 1 degree off of the center point. Be aware that this faster response also results in higher starting currents, so make sure your batteries can handle it. Digital servos can be programmed for direction of rotation, center and end points, failsafe option, speed, and dead bandwidth adjustment. This is great for matching sets of servos for dead band width, center and end points in giant scale aircraft applications, and for reversing a digital servo when two are used on a "Y" harness. If you do not want to deal with the added complication of programming, no worries! Hitec digital servos will perform like standard servos out of the box. It is not required to program them before use. The standing torque of a digital servo is 3 times that of its analog counterpart. This means digital servos are typically smaller and have more torque.
  • 74. Automatic Spray Painting By Articulated 2DOF Robotic Arm __________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300 64 3.4.9 Hitec vs Futaba There are actually four major servo manufacturers - Hitec, Futaba, Airtronics, and JR Radios. The last two are uncommon today, so I wont talk about them. Hitec and Futaba servos work the same, but there are several interfacing differences which you should be aware of. Figure 3.8 (a) Wire Configuration (b) Wire Configuration The first is wire color, as Hitec uses a yellow signal wire while Futaba uses a white one. The wiring order is the same, just different colors. The second is connector compatibility. Futaba (J type) has a special flange thingy while Hitec (S type, for universal) does not. Futaba has the extra flange to help the user plug in the servo correctly, although there are only two ways to do it and connecting a servo in the wrong way will not actually damage anything. If you want to connect a Futaba servo to a Hitec device, just clip the flange off and use sandpaper to file it down until it fits. If you ever need to connect a Hitec connector to something Futaba, just use sandpaper to decrease the connector width until it fits. [25] The third is price. All things kept the same; Hitec servos are cheaper than Futaba servos. But don't let this be your only determining factor in your decision, as Futaba has some servo sizes that Hitec does not. The last major difference is in the spline. The spline is the output shaft of the servo. This is where you would attach your servo horn or servo arm. Standard Hitec splines have 24 teeth while standard Futaba splines have 25 teeth. What makes this important is that servo horns built for one will not work with the other.