Professional Documents
Culture Documents
A THESIS
Submitted in partial fulfillment of the requirements for the award of the degree
of
BACHELOR OF SCIENCE
IN
ELECTRICAL & ELECTRONIC ENGINEERING
BY
Session # 2008-2009
Under supervision
of
ASSISTANT PROFESSOR
DECEMBER- 2010
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 PAGE
1.1 Block Diagram of this project 1
2.1 Stepper Motor Control Systems 4
LIST OF TABLE
TABLE NO PAGE
CONTENTS
ACKNOWLEDGMENT iv
ABSTRACT v
LIST OF TABLE vi
CHAPTER-I: INTRODUCTION 1
1.1 Introduction 1
1.2 Present Status 2
1.3 Objective 3
REFERENCES
xii
CHAPTER I
INTRODUCTION
1.1 Introduction:
This chapter will discuss on axis movement controller in Automation system and
its implementation to industry. The problem statement which contributes to the
creation and development of this project, overview, objective and scope of this project
is also presented in this chapter. This project is focusing on development of axis movement
controller for 2- axis configuration machine control or 4 degrees freedom. The movement of
the A u t o m a t i o n system design is driven by a (unipolar/Bipolar) stepper motor. The
project has prepared a driver for stepper motor to control automation system. The stepper
motor is control using PIC16F877A. The stepper motor used in this project has 48 pulses
and each pulse movement has 7.5 degree. The driver of a stepper motor that use in this
system is ULN2003 and L298N. This driver consists of 16 pinned with high input voltage
and current and H-Bridge consists of 15 pinned. The advantage of using this driver is
because the driver consist seven open collector Darlington pairs with common emitter and
L298N consists of high current with Analog properties.
CONTROL INPUT
Power Supply: 12V, 3A DC power supply is used from the step-down transformer which
is describing the chapter v.
Driver IC: The ULN2003 andULN2004A are high voltage, high current darling ton arrays
each containing seven open collector darling ton pairs with common emitters. Each channel
rated at 500mA and can withstand peak currents of 600mA. The L298 is an integrated
monolithic circuit in a 15- lead Multi watt and Power SO20 packages. It is a high voltage,
high current dual full-bridge driver designed to accept standard TTL logic levels and drive
inductive loads such as relays, solenoids, DC and stepping motors. Briefly describe in chapter
iii
Control Input: The prototype Robotic Arm control by four toggles switch. Switch 1, 2
and 3 control the three stepper motor start/stop (bipolar and Unipolar) and switch 4 used for
change of direction (clockwise and anti-clockwise).
Stepper Motor: A Stepper Motor is widely used devices that translate electrical pulses
into mechanical movement. The motor is called stepper motor because this motor rotates
through a fixed angular step in response to each input current pulse received by its controller.
These motors are also called stepping motors or step motors. Briefly describe in chapter ii.
Robotic Arm: 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. .
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. Briefly describe in chapter iv
and thing slowed down for robotics. However, by mid-80’s, the industry recovered and
robotics was back on track. George Devol Jr, in 1954 developed the multi-jointed artificial
arm, which lead to the modern robots. However, mechanical engineer Victor Scheinman,
developed the truly flexible arm know as the Programmable Universal Manipulation Arm
(PUMA).
In 1950, Isaac Asimov came up with laws for robots and these were:
A robot may not injure a human being, or through inaction allow a human being to
come to harm.
A robot must obey the orders given it by human beings, except where such orders
would conflict with the first law.
A robot must protect its own existence as long as such protection does not conflict
with the first or second law (Robotics Introduction. 2001).
Mobile Robotics moved into its own in 1983 when Odetics introduced a six-legged vehicle
that was capable of climbing over objects. This robot could lift over 5.6 times its own weight
parked and 2.3 times it weight moving. There were very significant changes in robotics until
the year 2003 when NASA launched two robots MER-A “Spirit” and MERB “Opportunity”
rovers which were destined for Mars. Up till date, Roboticists have kept researching on how
to make robots very interactive with man in order to be able to communicate efficiently in the
social community.
CHAPTER II
STEPPER MOTOR
2.1 Introduction:
A Stepper Motor is widely used devices that translate electrical pulses into
mechanical movement. The motor is called stepper motor because this motor rotates through
a fixed angular step in response to each input current pulse received by its controller. These
motors are also called stepping motors or step motors. This section of the stepper tutorial
deals with the basic final stage drive circuitry for stepping motors. This circuitry is centered
on a single issue, switching the current in each motor winding on and off, and controlling its
direction. The circuitry discussed in this section is connected directly to the motor windings
and the motor power supply, and this circuitry is controlled by a digital system that
determines when the switches are turned on or off. This section covers all types of motors,
from the elementary circuitry needed to control a variable reluctance motor, to the H-bridge
circuitry needed to control a bipolar permanent magnet motor. Each class of drive circuit is
illustrated with practical examples, but these examples are not intended as an exhaustive
catalog of the commercially available control circuits, nor is the information given here
intended to substitute for the information found on the manufacturer's component data sheets
for the parts mentioned. This section only covers the most elementary control circuitry for
each class of motor. All of these circuits assume that the motor power supply provides a drive
voltage no greater than the motor's rated voltage, and this significantly limits motor
performance. The next section, on current limited drive circuitry, covers practical high-
performance drive circuits.
The first element, the indexer, is a microprocessor capable of generating pulses and direction
signals to the driver. The second element is the driver and converts the indexer command
signal into the power necessary to energize the motor winding. The last element is the step
motor which is an electromagnetic device that converts the digital pulses into mechanical
shaft rotation. Advantages of step motors (compared to other types of motors) are low cost,
high reliability, high torque at low speeds and a simple rugged construction that operates in
almost any environment. The disadvantages of step motors are resonance effects at low
speeds and decreasing torque with increasing speed .
electricity is provided. Like poles of a magnet repel and unlike poles attract. Figure 2.2 shows
a typical cross-sectional view of the rotor and stator of a stepper motor. From this diagram we
can see that stator has four poles, and the rotor has six poles. So the rotor will require 48
pulses of electricity to move the 48 steps to make one complete revolution. Another way to
say this is that the rotor will move precisely 7.5 degrees for each pulse of electricity the motor
receives. When no power is applied to the motor, the residual magnetism in the rotor magnets
will cause the rotor to detent or align one set of its magnetic pole with the magnetic poles of
one of the stator magnets. This means that the rotor will have 48 possible detent positions.
When the rotor is in a detent position, it will have enough magnetic force to keep the shaft
from moving to the next position. This is what makes the rotor feel like it is clicking from
one position to the next as you rotate the rotor by hand with no power applied . When power is
applied, it is directed to only one of the stator pairs of windings, which will cause that
winding pair to become a magnet. One of the coils for the pair will become the north pole,
and the other will become the south pole. When this occurs, the stator coil that is the north
pole will attract the closest rotor tooth that has the opposite polarity, and the stator coil that is
the south pole will attract the closest rotor tooth that has the opposite polarity. When current
is flowing through these poles, the rotor will now have a much stronger attraction to the stator
winding, and the increased torque is called the holding torque. The magnetic field in the
stator is continually changed as the rotor moves through the 48 steps to move a total of 360°.
very easy to control; the position of the shaft is guaranteed as long as the torque of the
motor is sufficient for the load, under all its operating conditions.
• Load Independent - The rotation speed of a stepper is independent of load,
provided it has sufficient torque to overcome slipping. The higher rpm a stepper motor is
driven, the more torque it needs, so all steppers eventually poop out at some rpm and start
slipping. Slipping is usually a disaster for steppers, because the position of the shaft
becomes unknown. For this reason, software usually keeps the stepping rate within a
maximum top rate. In applications where a known RPM is needed under a varying load,
steppers can be very handy.
Three basic types of stepper motors include the permanent magnet motor, the variable
reluctance motor, and the hybrid motor, which is combination of previous two.
The VR stepper motor at its core basically differs from the PM stepper in that it has
no permanent-magnet rotor and thus no residual torque to hold the rotor at one position when
turned off. This means the field strength can be varied. The stator of a variable-reluctance
stepper motor has a magnetic core constructed with a stack of steel laminations. The rotor is
made of demagnetized soft steel with teeth and slots, or any other such magnetically
permeable substance, unlike PM stepper motors. When the stator coils are energized, the
rotor teeth will align with the energized stator poles. In the non-energized condition there is
no magnetic flux in the air gap so there is no detent torque. This type of motor operates on the
principle of minimizing the reluctance along the path of the applied magnetic field. By
alternating the windings that are energized in the stator, the stator field changes, and the rotor
moves to a new position.
A typical hybrid motor is shown in Fig. 2.5. The stator construction is similar to the
permanent magnet motor, and the rotor is cylindrical and magnetized like the PM motor with
multiple teeth like a VR motor. The teeth on the rotor provide a better path for the flux to
flow through the preferred locations in the air gap. This increases the detent, holding, and
dynamic torque characteristics of the motor compared to the other two types of motors.
Hybrid motors have a smaller step angle compared to the permanent magnet motor, but they
are very expensive. In low cost applications, the step angle of a permanent magnet motor is
divided into smaller angles using better control techniques. Permanent magnet motors and
hybrid motors are more popular than the variable reluctance motor, and since the stator
construction of these motors is very similar, a common control circuit can easily drive both
types of motors.
Unipolar stepping motors, both permanent magnet and hybrid stepping motors with 5
or 6 wires are usually wired as shown in the schematic in Figure 2.6 with a center tap on
each of two windings. In use, the center taps of the windings are typically wired to the
positive supply, and the two ends of each winding are alternately grounded to reverse
the direction of the field provided by that winding.
The motor cross section shown in Figure 2.6 is of a 7.5 degree per step permanent
magnet or hybrid motor. The difference between these two motor types is not relevant at
this level of abstraction. Motor winding number 1 is distributed between the top and
bottom stator pole, while motor winding number 2 is distributed between the left and right
motor poles. The rotor is a permanent magnet with 6 poles,
3 souths and 3 norths, arranged around its circumference.
Bipolar permanent magnet and hybrid motors are constructed with exactly the same
mechanism as is used on unipolar motors, but the two windings are wired more simply, with
no center taps. Thus, the motor itself is simpler but the drive circuit needed to reverse the
polarity of each pair of motor poles is more complex. The schematic in Figure 2.7 shows
how such a motor is wired. The motor cross section shown here is exactly the same as the
cross section shown in Figure 2.6.
To distinguish a bipolar permanent magnet motor from other 4 wire motors, measure the
resistances between the different terminals. It is worth noting that some permanent magnet
stepping motors have 4 independent windings, organized as two sets of two. Within each
set, if the two windings are wired in series, the result can be used as a high voltage bipolar
motor. If they are wired in parallel, the result can be used as a low voltage bipolar motor.
If they are wired in series with a center tap, the result can be used as a low voltage unipolar
motor.
xxii
Full-step: The stepper motor uses a four-step switching sequence, which is called a
full-step switching sequence. Each of the windings is tapped at one end and they are
connected through a resistor to the negative terminal of the power supply.
The table 2.1 shows the sequence for energizing the coils. During the first step of the
sequence, switches SW1 and SW3 are on and the other two are off. During the second step of
the sequence, switches SW1 and SW4 are on and the other two are off. During the third step
of the sequence, SW2 and SW4 are on and the other two are off. During the fourth step of the
sequence, SW2 and SW3 are on and the other two are off. This sequence continues through
four steps, and then the same four steps are repeated again. These steps cause the motor to
rotate one step or tooth on the rotor when a pulse is applied by closing two of the switches.
This “Two Phase On” method gives 41.4 % more torque compared to “One Phase On”
method.
Half-step: Another switching sequence for the stepper motor is called an eight-step
or half-step sequence. The switching diagram for the half-step sequence is shown in Table
2.2. The main feature of this switching sequence is that you can double the resolution of the
stepper motor by causing the rotor to move half the distance it does when the full-step
switching sequence is used. This means that a 48step motor, which has a resolution of 7.5°,
xxiii
will have a resolution of 96 steps and 3.75°. The way the controller gets the motor to reach
the half-step is to energize both phases at the same time with equal current.
In this sequence the first step has SW1 and SW3 on, and SW2 and SW4 are off. The
sequence for the first step is the same as the full-step sequence. The second step has SW1 on
and all of the remaining switches are off. This configuration of switches causes the rotor to
move an additional half-step. The third step has SW1 and SW4 on, and SW2 and SW3 are
off, which is the same as step 2 of the full-step sequence. The sequence continues for eight
steps and then repeats. The main difference between this sequence and the full-step sequence
is that steps 2, 4, 6, and 8 are added to the full-step sequence to create the half-step moves.
Torque (oz-in)
T=Fr………………………………………….(1)
Where F= force in oz
r = radius in inch
CHAPTER III
DRIVER IC AND MICROCONTROLLER
3.1 Introduction:
A microcontroller is an inexpensive single-chip computer. Single-chip means that the
entire computer system lies within the confines of the integrated circuit. The microcontrollers
existing on the encapsulated silver of silicon have features and similarities to our standard
personal computers. Primarily, the microcontroller is capable of storing and running a
program. Microcontrollers are frequently used in automatically controlled products and
devices, such as automobile engine control systems, office machines, appliances, power tools,
and toys. By reducing the size, cost, and power consumption compared to a design using a
separate microprocessor, memory, and input/output devices, microcontrollers make it
economical to electronically control many more processes. The ULN2003 andULN2004A are
high voltage, high current darling ton arrays each containing seven open collector darling ton
pairs with common emitters. Each channel rated at 500mA and can withstand peak currents
of 600mA. The L298 is an integrated monolithic circuit in a 15- lead Multi watt and Power
SO20 packages. It is a high voltage, high current dual full-bridge driver designed to accept
standard TTL logic levels and drive inductive loads such as relays, solenoids, DC and
stepping motors.
PORTD is a
bidirectional I/O port
RD0/PSP0 19 21 38 38 ST/TTL(3)
RD0 I/O
PSP0 I/O
20 22 39 39
RD1/PSP1
I/O ST/TTL(3) Digital I/O.
RD1
I/O Digital I/O.
PSP1 21 23 40 40
RD2/PSP2 I/O ST/TTL(3)
RD2 22 24 41 41 I/O Digital I/O.
PSP2
RD3/PSP3 I/O ST/TTL(3)
RD3 27 30 2 2 I/O Digital I/O.
PSP3
I/O
RD4/PSP4 28 31 3 3 ST/TTL(3)
RD4 I/O Digital I/O.
PSP4
29 32 4 4 I/O
RD5/PSP5 ST/TTL(3)
I/O Digital I/O.
RD5
PSP5 30 33 5 5 I/O
RD6/PSP6 I/O ST/TTL(3) Digital I/O.
RD6
PSP6 I/O
RD7/PSP7 I/O ST/TTL(3)
RD7
PSP7
xxxv
PORTE bidirectional
RE0/RD/AN 8 9 25 25 ST/TTL (3) I/O port.
5 I/O
RE0 I Digital I/O.
RD I Read
9 10 26 26
AN5 ST/TTL(3) control
I/O for
RE1/WR/AN
I Parallel
6 10 11 27 27 I Slave
RE1
WR ST/TTL(3) Port.
I/O
AN6 Analog
I
RE2/CS/AN7 I input 5.
RE2
Digital I/O.
CS
Write
AN7
control
VSS 12, 31 13, 6, 29 6, P — for
Ground
34 30, Parallel
31 Slave
Port.
VDD 11, 32 12, 7, 287, 8, P — Positive
Analog supply
35 28, input 6.
29
NC — 1, 17, 12,13, 13 — —
not internally
Digital I/O.
28, 33, 34 connected.
Chip select
40 left unconnected.
control for
Parallel
Slave Port.
Analog input
3.10 Advantages Using Microcontroller over Microprocessor:
7.
A microcontroller (MCU) is a computer-on-a-chip. It is a type of microprocessor
emphasizing self-sufficiency and cost-effectiveness, in contrast to a general-purpose
microprocessor. The only difference between a microcontroller and a microprocessor is that a
microprocessor has three parts - ALU, Control Unit and registers (like memory), while the
microcontroller has additional elements like ROM, RAM etc. The advantage of using MCU
is a microcontroller is an inexpensive single-chip computer. Single-chip means that the entire
computer system lies within the confines of the integrated circuit. The microcontroller
contains a central processing unit (CPU), random-access memory (RAM), read-only memory
(ROM), electrical erasable Programmable read-only memory (EEPROM), input/output (I/O)
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.
●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.
●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.
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
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:
Fig 5.3 Circuit Diagram of the System for One Stepper Motor
STEPPER
STEPPER
MOTOR 2
MOTOR 3
Θ2
ARM
LEN
GTH
(L1)
300
mm
Θ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 forward
and backward direction. In actual robot control system, three 7.5° stepper motor are used and
controlled by a PIC Microcontroller.
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.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
used in education as a demonstration tool.
REFERENCES: