iv DESIGN OF A PROTOTYPE ROBOTIC ARM MANIPULATOR BY USING MICRO CONTROLLER A THESIS Submitted in partial fulfillment of the requirements for the award of the degree of BACHELOR OF SCIENCE IN ELECTRICAL & ELECTRONIC ENGINEERING BY Under supervision of MD. ZAKIR HOSSAIN ASSISTANT PROFESSOR DEPARTMENT OF ELECTRICAL & ELECTRONIC ENGINEERING DHAKA UNIVERSITY OF ENGINEERING & TECHNOLOGY (DUET), GAZIPUR, BANGLADESH DECEMBER- 2010 MD. SOHEL KHANDAKER MD. MAMUNUR RAHMAN (makhon) SADAKAT HOSSAIN (sujon) INDRAJIT KUMAR NANDY (biduyat)
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
iv
DESIGN OF A PROTOTYPE ROBOTIC ARMMANIPULATOR BY USING MICRO CONTROLLER
A THESIS
Submitted in partial fulfillment of the requirements for the award of the degree
of
BACHELOR OF SCIENCE
IN
ELECTRICAL & ELECTRONIC ENGINEERING
BY
Under supervision
of
MD. ZAKIR HOSSAIN
ASSISTANT PROFESSOR
DEPARTMENT OF ELECTRICAL & ELECTRONIC ENGINEERING
DHAKA UNIVERSITY OF ENGINEERING & TECHNOLOGY (DUET), GAZIPUR,BANGLADESH
DECEMBER- 2010
MD. SOHEL KHANDAKER
MD. MAMUNUR RAHMAN (makhon)
SADAKAT HOSSAIN (sujon)
INDRAJIT KUMAR NANDY (biduyat)
Session # 2008-2009
v
ACKNOWLEDGEMENT
First of all, the author expresses his sincere thanks with regards and gratitude to
Professor Mohammad. Abdul Mannan, Head of the Department of Electrical & Electronic
Engineering, Dhaka University of Engineering & Technology Md. Zakir Hossain,
Assistant Professor of electrical and electronic engineering Department of the Dhaka
University Engineering & technology for his constant criticisms invaluable suggestion
constructive criticisms and encouragement during the preparation of this project.
Grateful thanks and appreciations are extended to other teachers of the Department of the
electrical and electronic engineering for their entire period during at DUET and on project
manuscript.
Grateful thanks are extended to the staff of the machine Lab & Electronic Lab for their co-
operation and help during the project period. Finally, we offer sincere thanks to them are
directly or indirectly helped us preparation of this project work.
vi
ABSTRACT
In this thesis we have designed a prototype Manipulator Robotic Arm. This Robotic
Arm design with the help of stepper motor and Microcontroller. Now, world is passing
heyday and being advance to the forward in all aspect. Recently, there has been wide-spread
demand of stepping motor with Robotic Arm because of the explosive growth of automation
industry. Their popularity is due to the fact that they can be controlled manually and
automatic by microcontroller, microprocessors and programmable controllers. So the entire
design is composed on software instead of hardware. Sophistic software provides the
necessary data from the Microcontroller. This program has been coded in MPLAB with CCS.
The entire design has been tested by executing the program. The performance of the software
is sufficient to satisfy the stepper motor based Robotic Arm.
vii
LIST OF FIGURE
FIGURE NO PAGE1.1 Block Diagram of this project 1
2.1 Stepper Motor Control Systems 4
2.2 Components of a PM Stepper Motor: (a) Rotor; (b) Stator 52.3 Cutaway Diagram of a Permanent Magnet Stepper Motor 72.4 Cross Section of VR Stepper Motor 82.5 Hybrid Stepper Motor 92.6 Unipolar stepper motor 92.7 Bipolar stepper motor 103.1 Ordering numbers: ULN2003A 143.2 Schematic diagram (ULN2003A): 153.3 Internal Inverter circuit of ULN-2003A 153.4 Test circuit of Driver IC (ULN2003A) 163.5 Physical structure of L298N 173.6 Internal circuit diagram of L298N 173.7 Pin connections of L298N 183.8 Physical view of PICMICRO-PIC16F877A 193.9 Pin diagram of PIC16F877A 225.1 power supply circuit diagram 305.2 Connection diagram of L298N with bipolar stepper motor 305.3 Circuit diagram of the system for one stepper motor 315.4 Block diagram of the System 315.5 Robotic arm with arm lengths (L1, L2) and Rotation angles (θ1, θ2) 335.6 Power circuit 345.7 Driver circuit 345.8 Microcontroller circuit 355.9 Base motor with mechanism 355.10 Elbow motor with mechanism 365.11 Gripper motor with mechanism 365.12 Control switch 375.13 Physical view of prototype robotic arm 37
viiivi
LIST OF TABLE
TABLE NO PAGE
2.1 Four step input sequence (Full step) 11
2.2 Eight step input sequence (Half step) 12
3.1 Absolute Maximum Ratings of ULN2003A 16
3.2 Thermal Data of ULN2003A 16
3.3 Absolute Maximum Ratings of L298N 18
3.4 Thermal Data of L298N 19
3.5 Specification of PIC microcontroller (PIC16F877A) 21
lines, serial and parallel ports, timer and other built-in peripherals, such as ADC (analog-
digital converter) and DAC (digital analog converters. The most common microcontroller use
is PIC (Microchip), (Motorola), etc.
xxxvi
CHAPTER IV
ROBOTICS
4.1 Introduction:The word robot is derived from the term robota which is generally translated as
'forced labor.' This means that the original conception of a robot, as far the etymology of the
word is concerned, was to be a capable servant. In the play, robots were portrayed as small
artificial and anthropomorphic creatures strictly. From this humble conception, many authors
began getting inspirations from the concept of a robot. It was formulated the four laws of
robots: (0) a robot may not injure humanity, or through inaction, allow humanity to come to
harm, (1) a robot may not injure or harm a human being, or through inaction, allow a human
being to come to harm, (2) a robot must obey orders given to it by human beings, except
where such orders would conflict the 0th or 1st law, and (3) a robot must protect its own
existence as long as such protection does not conflict with the previous laws. As time passed,
people began formulating an encompassing definition of a robot. As currently defined, robots
exhibit three key elements: (1) programmability, implying computational or symbolic
manipulative capabilities that a designer can combine as desired (a robot is a computer), (2)
mechanical capability, enabling it to act on its environment rather than merely function as a
data processing or a computational device (a robot is a machine), and (3) flexibility, in that it
can operate using a range of programs and manipulate and transports materials in a variety of
ways. This kind of description does not sway too far from what really most robots in the
world are doing. Most robots used now days are designed for heavy, repetitive manufacturing
work. They are specifically designed to handle certain tasks that are difficult, dangerous, or to
boring to human beings. Robots can do more work more efficiently than humans can since
robots are precise.
4.2 Classification of Robots:There are various types of robots, which are used now in the modern world each having
one or several tasks that it performs depending on the intelligence applied to it. However,
robots can be classified broadly into two types namely:
Autonomous Mobile Robots
Manipulator Robots
xxxvii
4.2.1 Autonomous Mobile Robots:
These are mobile robots provided with the mechanisms to perform certain tasks such
as locomotion, sensing, localization, and motion planning. Autonomous mobile robots are
capable of adapting to their environment. The intelligence provided to them enables them to
be able to sense conditions around their environment and respond correctly to the situations.
Examples of Autonomous mobile robots include the autonomous guided vehicle robots which
independent of external human actions deliver parts between various assembly stations by
following special electrical guide wires using a custom sensor, the HELPMATE service robot
which transports food and medication throughout hospitals by tracking the position of ceiling
lights, which are manually specified to the robot before hand. Also, in the military, some
robots are designed to detect bombs and they are capable of defusing the bombs. These robots
are all autonomous in the task they perform because they have been provided with the
intelligence to detect and adapt to the environment in which they are supposed to perform
their tasks.
4.2.2 Manipulator Robots:
These are robots that perform particular tasks. They are usually in the form of robot
arms and are normally stationary. In most cases, they are bolted at the shoulder to a specific
position in the assembly line, and the robot arm can move with great speed and accuracy to
perform repetitive tasks such as spot welding and painting. Manipulator robots are very much
unlike the autonomous mobile robots whereby the intelligence provided to them does not
make them adapt to the environment in which they are. In most cases, most manipulator
robots are capable of handling many end-effectors in order to increase the versatility of their
use. These various end-effectors can be used for several purposes such as welding, painting,
screwing and assembling. Although manipulator robots can be very versatile, they suffer
from a fundamental disadvantage, which is lack of mobility. A fixed manipulator robot has a
limited range of motion that depends on where it is bolted down, in contrast to a mobile robot
that is capable of moving about.
xxxviii
4.3 Applications of Robotics:
Robotics is becoming almost very popular in today’s world and is now applied in
several spheres of the human life. Robotics is applied in the following areas of life.
●Medicine:
In the medical field, some robots are used for performing tasks, which are dangerous and
unpleasant to humans. Some of these hazardous jobs are handling materials such as blood or
urine samples. In addition, some robots are used to transport materials around the hospital.
Their main sensor for localization is a camera looking at the ceiling. The camera detects the
lamps on the ceiling as landmarks.
●Military:
Robots in the military are used for detecting enemy equipment, detection and defusing of
bombs. In rescue operations, robots are also used for searching buildings for fugitives and
deep-water search. Also, during military attacks, guided missiles are used to blast specific
locations on the earth.
●Education and Research:
Some robots are designed for demonstration purposes, which are used for educating the
public. For example, the Howard County Sheriff's department of Kokomo Indiana, in 1999
used a motor robot with a cop in it to attract a lot of attention to promote a seat belt program
at a fair and they had the robot with the cop with his seat belt on.In space research and the
Mars research, robots are usually sent out with the space shuttle for them to obtain samples
and bring them back to earth. These robots are usually controlled from a control room in
earth.
●Entertainment:
Some robots are used for entertainment purposes. These robots are designed like puppets and
could make some funny moves which amuse people. Olden day robots were mainly like this.
They were being used to entertain royalties.
●Industry:
In the industry, robots are used to perform precise and heavy tasks which are very difficult
for humans to perform. Autonomous mobile robots could be used for carry heavy
xxxix
components from one place to another using custom sensor that help them get their precise
positions. Manipulator robots are used to perform certain tasks such as painting, welding,
screwing and other activities that would have been difficult to handle using the human hand.
Also, manipulator robots are used in assembly lines where each robot takes care of a
particular stage of the assembly process.
4.4 Robotics In The Future:Today, robots are doing human labor in all kinds of places. Best of all, they are doing
the jobs that are unhealthy or impractical for people. This frees up workers to do the more
skilled jobs, including the programming, maintenance and operation of robots.
Robots that work on cars and trucks are used for welding and assembling parts, or lifting
heavy parts - the types of jobs that involve risks like injury to your back and arm or wrist, or
they work in environments filled with hazards like excessive heat, noise or fumes dangerous
places for people. Robots that assemble and pack cookies or other foodstuff do so without the
risk of carpal tunnel injury, unlike their human counterparts. Robots that make computer
chips are working in such tiny dimensions that a person couldn't even do some of the
precision work required. In the health industry, robots are helping to research and develop
drugs, package them and even assist doctors in complicated surgery such as hip replacement
and open heart procedures. And the main reason robots are used in any application is because
they do the work so much better that there is a vast improvement in quality and/or
production, or costs are brought down so that companies can be the best at what they do
while keeping workers safe. The changes in future robots that will revolutionalize our way of
living will occur in a subtle fashion. It will happen when we wake up one morning thinking
about the past and realize that the things we take for granted are exceptionally different than
they were when we were younger. In time, just as innovations like the light bulb and
telephone elevated life, as we know it to new standards, so will robotics incorporate itself in
our everyday lives. Discussed below are the various ways the field of robotics can affect our
lives as proposed by the Robotics Industries Association.
Virtual Travel - People will be able to visit each other without traveling. They will do this
by taking control of a robot at their desired vacation destination, and use the Internet to
transmit all the sensory information back and forth. What will this mean? Doctors will make
"house calls" again. Long distance relationships will never be the same. Families spread
across the globe can play games together. And perhaps most importantly, people will think
xl
nothing of having a satisfying conversation with a mechanical contraption made of
aluminum, plastic, and silicon
Housekeeping by Choice - The physical environments we live in will take care of
themselves. Machines will do the routine chores around the house. We will choose when it is
time for the extraordinary. Our houses and apartments will keep themselves swept and
scrubbed clean. There will be no piles of laundry, and your basic dinner will be moments
away. Machines will not have replaced us. But they will give us the opportunity to build on
the routine and create the unusual, brilliant, or just different. Robots will raise the standard
upon which we will build. They will give us a chance to dream and the time to live life to the
fullest
Artificial Intelligence - Perhaps the most dramatic changes in future robots will arise from
their increasing ability to reason. The field of artificial intelligence is moving rapidly from
university laboratories to practical application in industry, and machines are being developed
that can perform cognitive tasks, such as strategic planning and learning from experience.
Increasingly, diagnosis of failures in aircraft or satellites, the management of a battlefield, or
the control of a large factory will be performed by intelligent computers. Like the term
"robot" itself, artificial intelligence is hard to define. Ultimate AI would be a recreation of the
human thought process -- a man-made machine with our intellectual abilities. This would
include the ability to learn just about anything, the ability to reason, the ability to use
language and the ability to formulate original ideas. Roboticists are nowhere near achieving
this level of artificial intelligence, but they have had made a lot of progress with more limited
AI. Today's AI machines can replicate some specific elements of intellectual ability.
Pickbot and Industrial Robot: Pickbot is one of the industrial robot that commonly use in
industries. Pickbots growing in complexity and their use in industry is becoming more
widespread. The main use of industrial robots has been in the automation of mass production
industries, where the same, definable tasks must be performs repeatedly in exactly the same
fashion. Car production is the primary example for the employment of large and complex
robots for producing goods. Industrial robots are use in that process for the painting, welding
and assembly of the cars. Industrial robots are good for such tasks because the tasks can be
accurately defined and must be performed the same every time, with little need for feedback
to control the exact process being performed. Industrial robots can be manufacture in a wide
range of sizes and so can handle more tasks requiring heavy lifting than a human could.
xli
CHAPTER V
SYSTEM DESIGN AND IMPLEMENTATION
5.1 Introduction:The important thing for circuit development is need to chose the component that will
be used to build the main circuit. The component is chosen because of specification that will
suitable for the project. This research is doing by literature review in previous chapter. Table
below show the list component that will be used to develop this project. This project has
Three main circuits that need to be developed. This three main circuit is depending on each
other. The circuits that need to build are:
5.2 Circuit of DC Power Supply:
Fig 5.1 power supply circuit diagram
5.3 Stepper driver circuit:
Fig 5.2 Connection diagram of L298N with bipolar stepper motor
xlii
5.4 Circuit of the System:
Fig 5.3 Circuit Diagram of the System for One Stepper Motor
5.5 Block Diagram of the System:
Fig 5.4 Block diagram of the System
xliii
Table 5.1 Major Circuit components
Component Explanation/specification CompanyPIC 16F877A Microcontroller: To control the input and
outputMicrochip Technology inc.
Resistor 10K ,1K,4.7K ohmVoltageregulator
Give exact value +5v tomicrocontroller(7805 ,7812)
Capacitor 100uF, 33uFswitch For rest application(push), toggle switchCrystal 4Mhz ResonatorSwitch Input switch for control this projectDriver IC ULN2003A and L298N
5.6 System Integration and Testing:The robot arm design project was split into smaller tasks to reduce complexity and
also to facilitate parallel implementation of independent tasks. The tasks include robot arm
fabrication, gear design and assembly, control circuit design and implementation for both the
GUI and microcontrollers. These tasks were allocated among the members of the group and
we constantly met to establish and update guidelines that will ensure the compatibility of the
various modules during system integration. Most of the circuits were first implemented on
bread boards before transferring to printed circuit boards apart from the very simple ones. We
tested the individual circuit boards for basic errors and also for functionality where
applicable. During testing, some components were damaged and replaced. Having tested the
various modules, the system integration was done in stages. All the individual circuits were
integrated and tested. Some power supply issues were encountered, such as supply voltage
dropping significantly when loaded and undue heating of the voltage regulators, and we tried
rectifying them but could not do so immediately. We then decided to use an already tested
power supply unit obtained from a scrap computer. The gear systems for the joints were
coupled with the motors and mounted on the fabricated robot arm. Then control and power
lines were drawn from the motors and connected to the control circuitry. A test code for
testing the movement of each joint was developed in which we tested control of each of the
joint motors, and the system test was carried out.
xliv
5.7 Prototype Robotic Arm with Mechanical Structure:
Θ2
Θ1
Fig 5.5 Robotic arm with arm lengths (L1, L2) and Rotation angles (θ1, θ2)
In this robot arm with two degrees of freedom is modeled analytically and forwardand backward direction. In actual robot control system, three 7.5° stepper motor are used andcontrolled by a PIC Microcontroller.
ARMLENGTH(L1)
300mm
FIXED BASE
STEPPERMOTOR1
LENGTH (L2) 250 mm
CONTROL SWITCH
STEPPERMOTOR 2 STEPPER
MOTOR 3
xlv
CHAPTER VI
RESULT AND DISCUSSION
6.1Introduction:This project is to design the stepper motor controller unit axis movement control.
The type of stepper motor that used in the automation system is Bipolar and Unipolar
stepper motors. Besides that, the focus of the project will be on drive the movement of
Robotic Arm 7.5 degree per step. In addition, the arm rotate is forward and reverse with
same angle which is 7.5 degree. The Robot arm is controlled by microcontroller with control
switch.
6.2 Result Analysis:The results were as follows:
The gripper motor turned satisfactorily, clockwise and counterclockwise. But the
movement force was observed to be quite low.
The elbow motor was
successfully controlled.
The base motor was successfully controlled.
6.3 Future Scope:As for the future work, first of all we can implement the sensor less technique using a
faster micro-controller. For example, we can use PIC micro-controller which is specifically
designed for motor control applications. We can also implement the fuzzy control technique,
neural network control, active disturbance rejection control, or other optimized control
techniques to control the motor speed. Another option would be to implement particle filters
or other non-linear filter techniques to estimate the winding currents. Finally, we could
implement the extended Kalman filter with online computation of the Kalman gain by
switching to hardware based filtering, or a faster micro-controller.
6.3 Conclusions:In this paper, a robot arm with four degrees of freedom is modeled analytically and
forward and inverse kinematic are analyzed simulation is generated. Movements of the actual
xlvi
robot arm are executed by 7.5° stepper motors controlled. Since the observation of robot
movements is important before the implementation of actual system in order to prevent from
possible environmental hazards, a simulation environment with control programming is
prepared by C++ programming language with its I/O assembler routines. The simulation and
control program prepared is applied to a manipulated robot arm and any kind of movements
within the limits of arm lengths are obtained. The robot arm is designed to have circles or
arcs drawn. It’s may carry small loads from one point to another point. As the actual robot
arm is aimed to be a prototype made of mostly wooden, the problems occurring from
mechanics like over-weights, sudden change of arm positions, etc. are not considered. When
the system is to be modified for another system like a large robot arm, the new parameters
must be considered in the control and simulation program and I/O board. The parameters are;
a) Degrees of freedom
b) Lengths of the arms
c) Rotation angle of the stepper motors
d) Addresses of I/O board
e) Feedback system
f) Sensing system etc.
Future experiments could include an actual robot arm mechanics rather than prototype
designed by mechanical/Electrical engineers. It could substitute a worker in industry or be