1

, for more enquiries contacts:
Engr. Nathan David
Department of Electronic Engineering
University of Nigeria Nsukka.
E-mail: cdxix@yahoo.com, ndavid@gonline.com.

OR
CHINWEZE, CHIKA DAVE
chez_projects@yahoo.com
2
CHAPTER ONE
INTRODUCTION
1.1 PREAMBLE
In the modern world, robotics has become popular, useful, and has achieved great
successes in several fields of humanity. Robotics has become very useful in medicine,
education, military, research and mostly, in the world of manufacturing. It is a term that
has since been used to refer to a machine that performs work to assist people or work that
humans find difficult or undesirable. Robots, which could be destructive or non-
destructive, perform tasks that would have been very tedious for human beings to perform.
They are capable of performing repetitive tasks more quickly, cheaply, and accurately than
humans. Robotics involves the integration of many different disciplines, among them
kinematics, signal analysis, information theory, artificial intelligence, and probability
theory. These disciplines when applied suitably, lead to the design of a very successful
robot.
This project is a continuation of the “Design and Control of a Six Degrees of Freedom
Robotic Arm: Pioneer” project done in the Department of Electronic Engineering,
University of Nigeria, Nsukka, in the 2005/2006 academic session. We did a thorough
3
analysis of the project, which was not fully completed. Some new features were included,
in addition to improvement on existing ones and the completion of the project. Tables 1.1
and 1.2 below give the existing features and the improvements made on them, as well as
the new features that were added.
Table 1.1: Improvements on Existing Features of the Project
Features Original Improvements
Robot arm
material
Steel Aluminum was used. It is lighter and yet
possesses reasonable strength
User Interface
Software
Limited functions A richer user interface with enhanced
functionalities and user friendliness
Gears Spur gears were mostly
used to amplify the
motor torques
A combination of spur gears and spiral
gears were used. Spiral gears are used
to achieve very high torque amplification
within a relatively small space.
Circuit
Implementation
The ‘good old’ Vero
board technology was
used.
The printed circuit board (PCB)
technology was used. This has the
advantage of a neater circuit with
practically no wires, hence it is easier to
trouble shoot.
Robot Control
Circuitry
Decoders were used to
select individual motors
and discrete transistors
were used for driving the
motors
The microcontroller provides enough pins
for selecting motors, hence eliminating
the need for decoders. Also, we used
transistor driver ICs instead of discrete
transistors to simplify the circuit and
make it less error-prone.
Table 1.2: New Features
Features Description
Remote
Control
(Infrared
The robot arm was previously connected directly to the
PC via cables. A wireless communication channel
between the PC and the robot was established via
4
Communication
Module)
infrared, thereby increasing flexibility
Embedded
Control
A microcontroller was used to control the robot instead
of direct control from the PC. The user interface and
robot control were highly decoupled by placing the
robot control functions in the embedded controller, so
the PC could easily be replaced with a hand-held
remote controller, thereby further increasing the overall
flexibility of the system.
1.2 HISTORY OF ROBOTICS
The advent of robotics started in the year 350 B.C. when a Greek mathematician Archytas
of Tarentum built a mechanical bird, which was called “the pigeon”. This mechanical bird
was powered using steam. With further advancements, Leonardo Da Vinci in the year,
1495 designed a mechanical device that looked like an armored knight. The knight was
designed to move as if there was a real person inside. In 1898, Nikola Tesla designed the
first remote-controlled robot in Madison Square Garden. The robot designed was modeled
after a boat.
The first industrial robots were Unimates developed by George Devol and Joe Engelberger
in the late 50’s and early 60’s. The first patents were by Devol but Engelberger formed
Unimation which was the first market robots. Therefore, Engelberger has been called the
“father of robotics”. For a while, the economic viability of these robots proved disastrous
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.
5
• 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 MER-
B “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.
1.3 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
1.3.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
6
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.
1.3.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.
1.4 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.
1.4.1 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
7
hospital. Their main sensor for localization is a camera looking at the ceiling. The camera
detects the lamps on the ceiling as landmarks.
1.4.2 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.
1.4.3 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.
1.4.4 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.
1.4.5 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
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.
8
CHAPTER TWO
LITERATURE REVIEW
2.1 MECHANICS AND MOTION OF ROBOTS
Mechanics deals with the analysis of the forces that cause a body to be in physical motion.
The motion of the robot arm will be achieved with the use of stepper and dc motors as
actuators. Since we will require knowing the exact position of the robot arm, the motors
will be operated with feedback. The feedback sensor for the dc motor is connected to the
gear box in such a fashion that it triggers when specific positions of the output shaft of the
motor are reached, thereby allowing us to know the exact position with relatively high
accuracy.

Since mechanics involves also the parts of the robot that are acted upon directly by the
motors and the gears to achieve motion, the tensile strengths of those areas were designed
to withstand the stresses generated due to friction and force of propulsion.
2.1.1 ROBOT ARM
Manipulator is a fancy name for a robot or mechanical arm, hence it will be used
intermittently with robot arm. A manipulator is an assembly of segments and joints that
can be conveniently divided into three sections: the arm, consisting of one or more
segments and joints; the wrist, usually consisting of one to three segments and joints; and a
gripper or other means of attaching or grasping. Alternatively, the manipulator can be
divided into only two sections, arm and gripper, but for clarity the wrist is separated out as
its own section because it performs a unique function. Industrial robots are stationary
manipulators whose base is permanently attached to the floor, a table, or a stand. In most
9
cases, however, industrial manipulators are too big and use a geometry that is not effective
on a mobile robot, or lack enough sensors (indeed many have no environmental sensors at
all) to be considered for use on a mobile robot. There is a section covering them as a group
because they demonstrate a wide variety of sometimes complex manipulator geometries.
We will review the robot arm based on the three general layouts of the arm section of a
generic manipulator, and wrist and gripper designs. It should be pointed out that there are
few truly autonomous manipulators in use except in research labs. The task of positioning,
orienting, and doing something useful based solely on input from frequently inadequate
sensors is extremely difficult. In most cases, the manipulator is teleoperated (remotely
controlled using radio transmission technology).
2.1.2 POSITIONING, ORIENTING AND DEGREES OF FREEDOM
Generally, the arm and wrist of a basic manipulator perform two separate functions,
positioning and orienting. There are layouts where the wrist or arm is not distinguishable.
In the human arm, the shoulder and elbow do the gross positioning and the wrist does the
orienting. Each joint allows one degree of freedom of motion. The theoretical minimum
number of degrees of freedom to reach to any location in the work envelope and orient the
gripper in any orientation is six; three for location, and three for orientation. In other
words, there must be at least three bending or extending motions to get position, and three
twisting or rotating motions to get orientation.
Actually, the six or more joints of the manipulator can be in any order, and the arm and
wrist segments can be any length, but there are only a few combinations of joint order and
segment length that work effectively. They almost always end up being divided into arm
and wrist. The three twisting motions that give orientation are commonly labeled pitch,
roll, and yaw, for tilting up/down, twisting, and bending left/right respectively.
Unfortunately, there is no easy labeling system for the arm itself since there are many ways
to achieve gross positioning using extended segments and pivoted or twisted joints.
A good example of a manipulator is the human arm, consisting of a shoulder, upper arm,
elbow, and wrist. The shoulder allows the upper arm to move up and down which is
10
considered one degree of freedom (DOF). It allows forward and backward motion, which
is the second DOF, but it also allows rotation, which is the third DOF. The elbow joint
gives the forth DOF. The wrist pitches up and down, yaws left and right, and rolls, giving
three DOFs in one joint. The wrist joint is actually not a very well designed joint.
Theoretically the best wrist joint geometry is a ball joint, but even in the biological world,
there is only one example of a true full motion ball joint (one that allows motion in two
planes, and twists 360°) because they are so difficult to power and control. The human hip
joint is a limited motion ball joint. On a mobile robot, the chassis can often substitute for
one or two of the degrees of freedom, usually fore/aft and sometimes to yaw the arm
left/right, reducing the complexity of the manipulator significantly. Some special purpose
manipulators do not need the ability to orient the gripper in all three axes, further reducing
the DOF. At the other extreme, there are arms in the conceptual stage that have more than
fifteen DOF.
2.1.3 ARM GEOMETRIES
The three general layouts for three-DOF arms are called Cartesian, cylindrical, and polar
(or spherical). They are named for the shape of the volume that the manipulator can reach
and orient the gripper into any position within the work envelope. They all have their uses,
but as will become apparent, some are better for use on robots than others. Some use all
sliding motions, some use only pivoting joints, some use both. Pivoting joints are usually
more robust than sliding joints but, with careful design, sliding or extending can be used
effectively for some types of tasks. Pivoting joints have the drawback of preventing the
manipulator from reaching every cubic centimeter in the work envelope because the elbow
cannot fold back completely on itself. This creates dead spaces—places where the arm
cannot reach that are inside the gross work volume. On a robot, it is frequently required for
the manipulator to fold very compactly.
Cartesian or rectangular work envelope
On a mobile robot, the manipulator almost always works beyond the edge of the chassis
and must be able to reach from ground level to above the height of the robot’s body. This
means the manipulator arm works from inside or from one side of the work envelope.
11
Some industrial gantry manipulators work from outside their work envelope, and it would
be difficult indeed to use their layouts on a mobile robot.
In fact, that is how it is controlled and how the working end moves around in the work
envelope. There are two basic layouts based on how the arm segments are supported,
gantry and cantilevered. Mounted on the front of a robot, the first two DOF of a
cantilevered Cartesian manipulator can move left/right and up/down; the Y-axis is not
necessarily needed on a mobile robot because the robot can move back/forward.
Cylindrical work envelope
This is the second type of robot arm work envelope. Cylindrical types usually incorporate a
rotating base with the first segment able to telescope or slide up and down, carrying a
horizontally telescoping segment. While they are very simple to picture and the work
envelope is intuitive, they are hard to implement effectively because they require two
linear motion segments, both of which have moment loads in them caused by the load at
the end of the upper arm. In the basic layout, the control code is fairly simple, i.e., the
angle of the base, height of the first segment, and extension of the second segment.
On a robot, the angle of the base can simply be the angle of the chassis of the robot itself,
leaving the height and extension of the second segment. A second geometry that still has a
cylindrical work envelope is the SCARA design. SCARA means Selective Compliant
Assembly Robot Arm. This design has good stiffness in the vertical direction, but some
compliance in the horizontal. This makes it easier to get close to the right location and let
the small compliance take up any misalignment. A SCARA manipulator replaces the
second telescoping joint with two vertical axis-pivoting joints.
Polar or spherical work envelope
The third, and most versatile, geometry is the spherical type. It is the type used in our
project. In this layout, the work envelope can be thought of as being all around. In practice,
though, it is difficult to reach everywhere. There are several ways to layout an arm with
this work envelope. The most basic has a rotating base that carries an arm segment that can
12
pitch up and down, and extend in and out. Raising the shoulder up changes the envelope
somewhat and is worth considering in some cases.
The wrist work envelope
The arm of the manipulator only gets the end point in the right place. In order to orient the
gripper to the correct angle, in all three axes, second set of joints is usually required - the
wrist. The joints in a wrist must twist up/down, clockwise/counter-clockwise, and
left/right. They must pitch, roll, and yaw respectively. This can be done all-in-one using a
ball-in-socket joint like a human hip, but controlling and powering this type is difficult.
Most wrists consist of three separate joints. The order of the degrees of freedom in a wrist
has a large effect on the wrist’s functionality and should be chosen carefully, especially for
wrists with only one or two DOF.

Grippers work envelope
The end of the manipulator is the part the user or robot uses to affect something in the
environment. For this reason it is commonly called an end-effector, but it is also called a
gripper since that is a very common task for it to perform when mounted on a robot. It is
often used to pick up dangerous or suspicious items for the robot to carry, some can turn
doorknobs, and others are designed to carry only very specific things like beer cans.
Closing too tightly on an object and crushing it is a major problem with autonomous
grippers. There must be some way to tell how hard is enough to hold the object without
dropping it or crushing it. Even for semi-autonomous robots where a human controls the
manipulator, using the gripper effectively is often difficult. For these reasons, gripper
design requires as much knowledge as possible of the range of items the gripper will be
expected to handle. Their mass, size, shape, and strength, etc. all must be taken into
account. Some objects require grippers that have many jaws, but in most cases, grippers
have only two. There are several basic types of gripper geometries. The most basic type
has two simple jaws geared together so that turning the base of one turns the other. This
pulls the two jaws together. The jaws can be moved through a linear actuator or can be
directly mounted on a motor gearbox’s output shaft, or driven through a right angle drive
which places the drive motor further out of the way of the gripper. This and similar designs
13
have the drawback that the jaws are always at an angle to each other which tends to push
the thing being grabbed out of the jaws.
2.2 MOTORS AND MOTION CONTROL
The two types of motors that we employed in the control of the robot arm include stepper
and dc motors. The motion control was achieved using both the open loop and closed loop
method of motion control. Below is a brief look at the two types of motors.
2.2.1 STEPPER MOTOR
A stepper motor is a transducer that converts electrical pulses into mechanical shaft
rotation. The number of pulses input to the motor determines the amount of motor shaft
movement. Each pulse moves the motor a given amount (step). A stepper motor consists of
a rotor (a rotating permanent magnet) and a stator (stationary electromagnet coils). The
rotor is made of ferromagnetic material, which has been magnetized into a series of
alternating north and south poles.
In a typical stepper motor, electric power is applied to the stator in order to alternate its
magnetic polarity. Interaction between the rotor and the stator causes the rotor to move one
step per stator coil winding polarity change. The stepper motor schematic is shown in fig
2.1
Fig. 2.1: Stepper Motor Schematic
2.2.1.1 STEPPER MOTOR DRIVE METHODS
14
Stator2
Rotor
Stator1
C
Ø4

Ø3

D
Ø2
B
Ø1
A
+Vdc
+Vdc
N
S
Three common methods of driving a stepper motor are wave drive, step drive and half step
drive.
• Wave drive - Here only one power switch (or phase) is active during each step of
the motor. Since only one phase is on, the torque will be reduced. The advantage of
wave drive is increased efficiency, while the disadvantage is decreased step
accuracy.
• Step drive - Step drive occurs when two power switches are activated for each step
moved. Torque is higher with step drive than with wave drive.
• Half-step drive - Half-step drive occurs when both wave drive and step drive are
employed alternately to activate the coils. When only one coil is activated, a weak
step is produced; when two coils are activated, a strong step is produced.
2.2.2 DC MOTOR
A dc motor is a transducer that converts electrical energy (d.c.) into mechanical shaft
rotation. Its action is based on the principle that when a current-carrying conductor is
placed in a magnetic field, it experiences a mechanical force whose direction is given by
Fleming’s Left-hand rule and whose magnitude is given by
F = BIL Newton
where B = magnetic flux density
I = current
L = length of the conductor in the magnetic field
2.2.3 MOTION CONTROL
2.2.3.1 CONTROL OF STEPPER MOTORS
The circuitry is as shown below:
Controlling stepper motors using a microcontroller simply involves instructing the
microcontroller to send the appropriate bit pattern to the stepper motor in the correct order.
From the diagram, the supply voltage to the stepper motor is 12V. Therefore, in order to
magnetize any coil, 0V should be sent to the coil for current to flow through it. Since the
output of the microcontroller is digital (0V or 5V) and the supply voltage of the stepper
motor is 12V, npn transistors are used to amplify the outputs of the microcontroller. To
15
rotate the motor, the pattern sent from the microcontroller determines which coils are
energized and the direction in which the rotor rotates.
12V
12V
12V
12V
+88.8
A
B C
D
12V
D
C
B
A
uC
Fig. 2.2: Interfacing a Stepper Motor to a Microcontroller
For example, suppose the rotor is at position D and is intended to be rotated clockwise a
single step using the step mode, the microcontroller is instructed to send the bit pattern,
1001 to its outputs. This would eventually make coil D to be at 0V, coil C 12V, coil B
12V, coil A 0V. As a result, coil D and A are energized and the rotor moves to a point in
between them as shown in fig 2.2 above. Similarly, in the wave drive mode, to energize A,
the bit pattern 0001 is sent to the outputs of the microcontroller causing the rotor to move
to point A.
16
2.2.3.2 CONTROL OF DC MOTORS
Controlling the d.c. motor is done using the principle of the H-bridge. The H-bridge is
shown in the fig 2.3 below: Assuming switches A and D are closed, current flows through
the motor in one direction and the motor rotates in a clockwise direction. If switches B and
C are closed, current flows in the opposite direction and the d.c. motor rotates in a counter-
clockwise direction. If A and B OR C and D are closed, the motor’s terminals are at the
same potential and no current flows, hence the motor brakes.



Fig. 2.3: The H-Bridge
The H-bridge is represented by the transistor network shown in fig. 2.4 below: Terminals
A and B are connected to the digital outputs of the microcontroller. The LHS network is a
mirror image of the RHS network. This makes bi-directional control possible. Controlling
the motor can be analyzed considering four scenarios:

17
+88.8
A
C
B
D
12V 12V
d.c. Motor
THEH-BRIDGE
Q1
5V
Q2
Q3
Q4
12V
A
Q5
5V
Q6
Q7
Q8
12V
+88.8
B
TRANSISTOR H-BRIDGE
d.c. Motor
Fig. 2.4: H-Bridge Transistor Network
The first is when A is ‘LOW’ and B is ‘HIGH’. On the LHS, Q
1
is turned on eventually
making Q
3
to on and conduct. Q
2
is turned off, eventually turning off Q
4
. On the RHS, Q
5
is turned off, thereby turning Q
7
off also. Q
6
is turned on causing Q
8
to conduct current. As
a result, current flows through Q
8
, to the d.c. motor and finally to ground through Q
3
,
causing the motor to rotate counter-clockwise.
The second is when A is ‘HIGH’ and B is ‘LOW’. On the LHS, Q
1
and Q
3
are off while Q
2
and Q
4
are on. On the RHS, Q
5
and Q
7
are on while Q
6
and Q
8
are off. Current flows
through the d.c. motor from Q
4
to Q
7
, causing the motor to rotate clockwise.
The third is when A is ‘LOW’ and B is ‘LOW’. On the LHS, Q
1
and Q
3
are on while Q
2
and Q
4
are off. On the RHS, Q
5
and Q
7
are on while Q
6
and Q
8
are off. The motor terminals
are then at 0V and the motor brakes.
18
The fourtht is when A is ‘HIGH’ and B is ‘HIGH’. On the LHS, Q
1
and Q
3
are off while Q
2
and Q
4
are on. On the RHS, Q
5
and Q
7
are off while Q
6
and Q
8
are on. The motor terminals
are then at 12V and the motor brakes.
2.3 SENSORS
A sensor is a part of a transducer that collects an input from the environment and sends it
to the transducer for onward conversion to other forms of energy. From the definition
given above of a robot, it follows that it is impossible to design an effective and elegant
robot without the use of sensors. There are several types of sensors and these are classified
based on the kind of physical quantity being monitored. The list given below gives the
most commonly monitored physical quantities:
• Temperature
• Pressure
• Flow rate
• Composition
• Liquid level
• Light intensity
In our project work, we used infrared (IR) sensors (in form of optocouplers) and pressure
sensors (in form of switches). The pressure sensor is attached to the gripper of the robot
arm, its function is to inform the controller when the gripper has exerted the adequate
amount of pressure on the object the arm is required to pick.
The optocouplers were mounted inside the gear box of each joint to give a reference
position from which the robots position can be determined at any time.
19
CHAPTER THREE
RESEARCH METHODOLOGY
3.1 DESIGN SELECTION OF THE ROBOTIC ARM
In choosing the materials and the shape for the fabrication of the robotic arm, the following
were taken into consideration:
• The ease of manufacturing the parts
• The mode of manufacturing
• Ease of assembly
• Strength and durability of the parts
• Weight of robot
• Cost
The principal requirements for power transmission of robots are:
• Small size
• Low weight and moment of inertia
• High effective stiffness
• Accurate and constant transmission ratio
• Low energy losses and friction for better responsiveness of the control system.
• Elimination of backlash
Hence, the combination of these factors has greatly influenced all the choices made in the
design selection of the robotic arm.
20
3.1.1 MATERIAL SELECTION
In manipulator structures, stiffness-to-weight ratio of a link is very important since inertia
forces induce the largest deflections. Therefore, an increase in the Elastic modulus, E
would be very desirable if it is not accompanied by an unacceptable increase in specific
density, γ. The Elastic modulus is an indication of the material’s resistance to breakage
when subjected to force. The best properties are demonstrated by ceramics and beryllium
but ceramics have a problem of brittleness and beryllium is very expensive. Structural
materials such as magnesium (Mg), aluminum (Al), and titanium (Ti) which are light have
about the same E/γ ratios as steel and are used when high strength and low weight are more
important than E/γ ratios. Factors like ageing, creep in under constant loads, high thermal
expansion coefficient, difficulty in joining with metal parts, high cost and the fact that they
are not yet commercially available make the use of fibre-reinforced materials limited
though they have good stiffness-to-weight ratios. However, with advances in research,
some of the mentioned setbacks have been significantly reduced. Hence, the use of fibre-
reinforced materials (known as composites) is becoming more attractive. Aluminum
lithium alloy have better processing properties and is not very expensive. Alloyed
materials such as Nitinol (nickel – titanium – aluminum), aluminum incramute (copper -
manganese – aluminum) are also commercially available.
Therefore the materials recommended for use in this project are
• Al-Li alloys
• Nitinol (nickel-titanium-aluminum)
• Incramute (copper-manganese-aluminum)
• Glass-reinforced Plastic (GRP)
The links have an internal hollow area, which provides conduits for power transmitting
components i.e. gears in this case, and the stepper motors. At the same time, their external
dimensions are limited in order to reduce waste of the usable workspace. They are as light
as possible to reduce inertia forces and allow for the highest external load per given size of
motors and actuators. For a given weight, links have to possess the highest possible
21
bending (and torsional) stiffness. The parameter to be modified to comply with these
constraints is the shape of the cross-section. The choice is between hollow round and
hollow rectangular cross-section. From design standpoint of view, the links of square or
rectangular cross-section have advantage of strength and machinability ease over round
sections.
Despite the recommendations mentioned above as regards choice of materials, our options
were narrowed down to a choice between steel, GRP, and aluminium based on feasibility
studies carried out.
Current trend in robotics (especially industrial robotics) shows a quest to achieve lighter
designs with reasonable strength. This design goal has always meant a trade-off in terms of
cost. Composite materials are generally more expensive than most metals used in industrial
robots fabrication.
For the particular case of our project, we narrowed our options down to composite material
– glass reinforced plastic – otherwise known as GRP and aluminum.
The original project, upon which we are building, was fabricated with steel sheets. The
sheets cost practically nothing because metal scraps were used, but there was a setback of
the motors not being able to cope with the weight of the metal.
We figured out at least three ways of overcoming the setback mentioned above. One option
would have been to redesign the gear trains and increase torque amplification, so that the
motors can support the load. The torque amplification here would have been limited by the
real estate on the arm for the gear train and the maximum speed we would be able to give
to the motors, as output speed would reduce with increase in torque. We discarded this idea
based on long-term considerations. This would mean that much of the energy expended by
the robot would go to lifting its own weight thereby reducing the effective load it can lift.
22
Another option would have been to replace the motors with others having higher torque
ratings. This, for us, would almost be as expensive as re-fabricating the arm with a lighter
material, and the problem of effective load, as mentioned previously, would still be there.
A third option was to re-fabricate the arm, or at least part of it, with a lighter material of
reasonable strength, and that was the option we went for. It certainly involved increased
short-term costs but then we foresaw a pay off in the long term. We would no longer be
constrained to jeopardize the speed or maximum effective load of the robot while trying to
increase torque; instead, any torque amplification would directly translate to increased
effective load the robot can lift.
After more research and consultations with our supervisor and some lecturers in the
Mechanical Engineering department, who are experts in the field, we settled for aluminium
mainly on grounds of cost and workability.
3.1.2 THE GEAR SYSTEM
In this work, we have chosen the bevel, spur and spiral types of gears. These were readily
available from scrap machines (photocopiers). Spiral gears have the advantage of high
torque amplification within a relatively small space. The necessary data for the selection
and choice of the gear arrangements at each joint are:
i. Power transmitted, P = TW
ii. Transmitted speed, ω ( rad/s)
iii. Torque developed , T ( Nm)
iv. Lewis form factor, Y
v. Bending stress, σ ,( ultimate tensile strength)
vi. Ultimate tensile strength,
ut
σ
vii. Factor of safety, n
viii. Module of gear, m
ix. Number of teeth, N
23
The equations below show the relationship between these parameters. They led to the
selection of the gears.
i. Gear diameter, mN d ·
ii. Pitch line velocity,
60
ω πd
V ·
iii. Transmitted load, W
t

V
p
·
iv. Velocity , K
V

V +
·
6
6
v. Face width,
P V
t
MY K
W
F
σ
·
3.1.3 THE WIRELESS COMMUNICATION SYSTEM
Our system design is such that a microcontroller at the base of the robot directly controls
the robot movements. However, the user interacts with the robot through a graphic user
interface on a PC, hence the need for some form of communication between the PC and the
microcontroller. We chose a wireless communication mode for reasons of flexibility, and
we established communication between the PC’s parallel port and the microcontroller via
infrared.
Infrared has a long successful history in remote control applications so we were faced more
with the problem of choice of type of infrared communication system. After some
research, we decided to use a one-chip solution in the form of an infrared
transmitter/receiver IC (ST12 CODEC).
ST12 CODEC is a radio frequency and infrared encoder/decoder IC for remote control
applications having unique features and flexibility not available with other remote control
encoder decoder ICs. ST12 is truly a single-chip remote control solution. The ST12
combines the functionality of both encoder and decoder in a single package with several
unique features for enhanced operation and a reduced component count for transmitter and
receiver circuits.
24
However, we could not lay our hands on this IC because it was not readily available. We
needed to import it. This led to more research on alternatives that would approximate the
desirable qualities of the ST12. We eventually arrived at a microcontroller solution for
encoding the intelligence signal at the PC end and decoding it at the base of the robot for
appropriate arm control. A schematic diagram of how this is achieved is shown in fig. 3.1
below.
Fig. 3.1: The Wireless Communication System
When the user selects a particular action from the graphic user interface (GUI) on the PC,
the command controller generates an 8-bit command code corresponding to the desired
action and sends it to the parallel port. The microcontroller at the base of the PC reads this
command code and uses it to modulate the carrier signal coming from the carrier generator.
A 555 timer IC configured in astable mode was used to generate a carrier signal of 38kHz,
since the IR receiver is sensitive to signals at this frequency.
The IR receiver is a TSOP infrared receiver IC. It ‘sees’ a 38kHz square wave of an
infrared signal as a logic ‘1’, inverts it and places a logic ‘0’ on its output pin. When there
is no incident IR signal, it ‘sees’ it as logic ‘0’, inverts it and places logic ‘1’ on its output
pin. Hence, any binary sequence can be transmitted serially by activating or deactivating
the frequency generator appropriately in sequence. The microcontroller does this by
25
Microcontroller
(encoder)
PC parallel port
Modulated
signal
Carrier frequency
generator
IR receiver
IR transmitter
Microcontroller
at base of robot
(decoder)
pulsing the reset pin of the 555 timer IC at intervals depending on whether the bit to be
sent is a logic ‘1’ or a logic ‘0’. The serial transmitter pin of the microcontroller is most
suitable for this task.
When the TSOP IR receiver demodulates the IR signal to binary bits, the microcontroller
at the base of the robot receives these bits and decodes them as the exact 8-bit word sent
from the parallel port, which is the command code. The microcontroller interprets this
command code and sends the signals to drive the robot motors appropriately.
The baud rate of the microcontroller at the PC base (transmitter) and the microcontroller at
the robot base (receiver) are preset, by software, to a common value for correct reception
of transmitted bits.
The range of the IR transmitter can be increased by increasing the current at the
transmitter. Also, using more than one transmitter will increase the range. The transmitter
is simply an infrared light emitting diode (LED) and we were able to achieve a range of
about 6 metres line of sight.
3.2 ELECTRONIC HARDWARE SELECTION
This subsection deals with the materials that we have selected for the control system of the
robotic arm. The arm is controlled by a microcontroller driving the actuators (dc and
stepper motors) via latches and transistors. The microcontroller receives commands from
the parallel port via infrared.
Latches were used for demultiplexing, as only two 8-bit microcontroller ports were used to
drive six motors. For the transistors, we used a combination of npn/pnp power and
switching transistors. The factors considered in choosing these were current (ampere)
rating, voltage rating and switching speed. Switching speed of the transistors was a crucial
factor as it determined how fast we could drive the stepper motors, hence, the speed of the
26
robot arm movements. Suitable IC packages with multiple transistors were used to achieve
a more compact control circuit.
3.2.1 THE PARALLEL PORT
In computers, ports are used mainly for two reasons, namely, device control and
communication. Parallel ports were originally meant for connecting the printer to the PC.
However, one can program this port for many more applications beyond that, such as the
control of a robotic arm, as we have done in this project. Parallel ports are easy to program
and faster compared to the serial ports. Its disadvantage is that it needs more number of
transmission lines but this is only significant for long distance communications. Hence, it
proved advantageous for our use. In the parallel port, all the 8 bits of a byte will be sent to
the port at a time and a control indication will be sent on another line.
This port will allow the input of up to 9 bits or the output of 12 bits at any one given time,
thus requiring minimal external circuitry to implement many simpler tasks. The port is
composed of 4 control lines, 5 status lines and 8 data lines as shown in fig. 3.2 below. It is
commonly located at the back of your PC as a D-Type 25 Pin female connector.
IEEE Standard Parallel Ports
The IEEE 1284 standard however specifies three different connectors for use with the
Parallel Port.
• The IEEE 1284 Type A is the D-Type 25 connector found on the back of most
computers.
• The IEEE 1284 Type B is the 36 pin Centronics connector found on most printers.
• The IEEE 1284 Type C however, is a 36 conductor connector like the Centronics,
but smaller.
For this project, we made use of the IEEE 1284 Type A since it is adequate for the required
function. The diagram is shown in the fig 3.2 below
27
Fig. 3.2: D-Type 25 Pin Parallel Port Connector
Table 3.1: Pin Assignments of the D-Type 25 Pin Parallel Port Connector
Pin No.
(D-Type
25)
Pin No.
(Centronics)
SPP Signal Direction
(In/Out)
Register Hardware
Inverted
1 1 nStrobe In/Out Control Yes
2 2 Data 0 Out Data
3 3 Data 1 Out Data
4 4 Data 2 Out Data
5 5 Data 3 Out Data
6 6 Data 4 Out Data
7 7 Data 5 Out Data
8 8 Data 6 Out Data
9 9 Data 7 Out Data
10 10 nAck In Status
11 11 Busy In Status Yes
12 12
Paper-Out/
Paper-End
In Status
13 13 Select In Status
14 14
nAuto-
Linefeed
In/Out Control Yes
15 32 nError/Fault In Status
16 31 nInitialize In/Out Control
17 36
nSelect-
Printer/
nSelect-In
In/Out Control Yes
18 - 25 19 - 30 Ground Gnd
Table 3.1 uses "n" in front of the signal name to denote that the signal is active low. For
example, the nError signal is used to signify an error. This line is low when an error has
28
occurred. Should the printer be functioning correctly, the line is held High. The "Hardware
Inverted" means the signal is inverted by the Parallel card's hardware. Such an example is
the “Busy” line. If +5V (Logic 1) was applied to this pin and the status register read, it
would return back a 0 in Bit 7 of the Status Register.
The output of the Parallel Port is normally TTL logic levels. The voltage levels are the
easy part. The current you can sink and source varies from port to port. Most Parallel Ports
implemented in ASIC, can sink and source around 12mA. However these are just some of
the figures taken from Data sheets, Sink/Source 6mA, Source 12mA/Sink 20mA, Sink
16mA/Source 4mA, Sink/Source 12mA. As you can see they vary quite a bit. The best bet
is to use a buffer, as we are, so the least current is drawn from the Parallel Port.
The Parallel Port has three commonly used base addresses. These are listed in Table 3.2,
below. The 3BCh base address was originally introduced used for Parallel Ports on early
Video Cards. This address then disappeared for a while, when Parallel Ports were later
removed from Video Cards. They have now reappeared as an option for Parallel Ports
integrated onto motherboards, upon which their configuration can be changed using BIOS.
LPT1 is normally assigned base address 378h, while LPT2 is assigned 278h as shown in
table 3.2 below. However, this may not always be the case as explained later. 378h & 278h
have always been commonly used for Parallel Ports. The lower case h denotes that it is in
hexadecimal. These addresses may change from machine to machine.
Table 3.2: Port Addresses Usually Assigned to the Parallel Port
Address Notes
3BCh - 3BFh Used for Parallel Ports which
were incorporated on to Video
Cards - Doesn't support ECP
addresses378h - 37Fh
378h - 37Fh Usual Address For LPT 1
278h - 27Fh Usual Address For LPT 2
29
However, to find the address of LPT1 or any of the Line Printer Devices, you can use a
lookup table provided by BIOS. When BIOS assigns addresses to your printer devices, it
stores the address at specific locations in memory, so we can find them.
Table 3.3: LPT Addresses in the Bios Data Area
Start Address Function
0000:0408 LPT1's Base Address
0000:040A LPT2's Base Address
0000:040C LPT3's Base Address
0000:040E LPT4's Base Address
Table 3.3 above shows the address at which we can find the Printer Port's addresses in the
BIOS Data Area. Each address will take up 2 bytes.
The parallel port is programmed to control the required circuit or device.
3.2.2 THE MICROCONTROLLER
A microcontroller is a type of microprocessor furnished in a single integrated circuit and
needing a minimum of support chips. Its principal nature is self-sufficiency and low cost. It
is not intended to be used as a computing device in the conventional sense; that is, a
microcontroller is not designed to be a data processing machine, but rather an intelligent
core for a specialized dedicated system.
Microcontrollers are embedded in many control, monitoring, and processing systems.
Some are general-purpose devices but most microcontrollers are used in specialized
systems such as washing machines, telephones, microwave ovens, automobiles, and
weapons of many kinds. They are ideal for applications where cost and unit size are
important considerations. A microcontroller usually includes a central processor, input and
output ports, memory for program and data storage, an internal clock, and one or more
peripheral devices such as timers, counters, analog-to-digital converters, serial
communication facilities, and watchdog circuits. More than two dozen companies in the
world manufacture and market microcontrollers.
30
Certain factors are to be considered when choosing a microcontroller for an application.
They include:
• Speed, size of ROM/RAM, number of I/O ports, timers, power consumption
and cost per unit.
• Availability of software development tools like assemblers, debuggers,
compilers, simulators and technical support.
• Availability and reliable sources of microcontrollers.
Based on the above factors, we chose the AT89S52 microcontroller for our project.
The AT89S52 is a low power, high-performance CMOS 8-bit microcontroller with 8K
bytes of in-system programmable flash memory. The device is manufactured using
Atmel’s high-density nonvolatile memory technology and is compatible with the industry-
standard 80C51 instruction set and pin out. The on-chip flash allows the program memory
to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By
combining a versatile 8-bit CPU with in-system programmable flash on a monolithic chip,
the Atmel 89S52 is a powerful microcontroller, which provides a highly flexible and cost-
effective solution to many embedded control applications.
The AT89S52 also provides the following standard features: 256 bytes of RAM, 32 I/O
lines, Watchdog timer, two data pointers, three 16-bit timer/counters, a six-vector two-
level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry.
In addition, the AT89S52 is designed with static logic for operation down to zero
frequency and supports two software selectable power saving modes. The Idle Mode stops
the CPU while allowing the RAM, timer/counters, serial port, and interrupt system to
continue functioning. The Power-down mode saves the RAM contents but freezes the
oscillator, disabling all other chip functions until the next interrupt or hardware reset. The
pin configuration of the AT89S52 is found in Appendix A.
3.2.3 THE CARRIER FREQUENCY GENERATOR
31
The LM555 timer was configured in an astable mode to generate a 38 kHz square wave of
infrared signal through the IR transmitter. LM555 is a highly stable device for generating
accurate time delays or oscillation. Additional terminals are provided for triggering or
resetting if desired. In the time delay mode of operation, one external resistor and capacitor
precisely control the time. For astable operation as an oscillator, the free running frequency
and duty cycle are accurately controlled with two external resistors and one capacitor. The
circuit may be triggered and reset on falling waveforms, and the output circuit can source
or sink up to 200mA or drive TTL circuits. LM555 finds application in precision timing,
pulse generation, sequential timing, time delay generation, pulse width modulation, pulse
position modulation and linear ramp generators. The pin configuration of the 555 timer is
shown in appendix A.
3.2.4 THE INFRARED RECEIVER
The TSOP2138 series are miniaturized receivers for infrared remote control systems. PIN
diode and preamplifier are assembled on lead frame, the epoxy package is designed as IR
filter. The demodulated output signal can directly be decoded by a microprocessor.
TSOP2138 is the standard IR remote control receiver series, supporting all major
transmission codes. It includes the following features: photo detector and preamplifier in
one package, internal filter for PCM frequency, improved shielding against electrical field
disturbance, TTL and CMOS compatibility, active low output, low power consumption,
high immunity against ambient light, continuous data transmission possible
(up to 2400 bps) and suitable burst length greater than or equal to 10 cycles/burst. The IR
receiver is shown in fig. 3.3 below.
Fig. 3.3: TSOP2138 IR Receiver

3.2.5 MOTORS
32
A combination of stepper and dc motors were used in this project. Stepper motors,
generally, are easier to drive and more precise than dc motors, while dc motors can
generally achieve higher output torques.
The electrical compatibility between the motor and the driver are the most critical factors
in a stepper motor system design such as ours. Some general guidelines in the selection of
these components are:
• Inductance - Stepper motors are rated with varying degrees of inductance. A high
inductance motor will provide a greater amount of torque at low speeds and
similarly the reverse is true.
• Driver Voltage - The higher the output voltage from the driver, the higher the level
of torque vs. speed. Generally, the driver output voltage should be rated higher than
the motor voltage rating.
• Motor Stiffness - By design, stepping motors tend to run stiff. Reducing the
current flow to the motor by a small percentage will smooth the rotation. Likewise,
increasing the motor current will increase the stiffness but will also provide more
torque. Trade-offs between speed, torque and resolution are a main consideration in
designing a step motor system.
• Motor Heat - Step motors are designed to run hot (50º-90º C). However, too much
current may cause excessive heating and damage to the motor insulation and
windings. The risk of overheating can be reduced by providing a programmable
run/hold current feature.
Since, we were building from an already started project, we made use of the already
existing stepper motors, for reasons of cost, but we introduced a dc motor into the base
joint.
3.2.6 MOTOR DRIVERS
The motors operate at higher voltage and current levels than either the microcontroller or
the latches that drive them hence the need for intermediate driver circuitry. These drivers
33
are usually power transistors, which can insulate the logic circuit from the effect of the
motor current.
We selected drivers based on the ratings of the motors, and for circuit space efficiency, we
chose transistor IC packages housing several transistors instead of discrete transistors.
Separate drivers were used for the stepper and dc motors as they have different control
mechanisms and power ratings.
3.2.6.1 STEPPER MOTOR DRIVER
The stepper motor driver receives low-level signals from the microcontroller and converts
them into electrical (step) pulses to run the motor. One step pulse is required for every step
of the motor shaft. Speed and torque performance of the stepper motor is based on the flow
of current from the driver to the rotor winding. The factor that inhibits the flow, or limits
the time it takes the current to energize the winding, is known as inductance. The lower the
inductance, the faster the current gets to the winding and the better the performance of the
motor. To reduce inductance, most types of driver circuits are designed to supply a greater
amount of voltage than the motors rated voltage. The driver IC used is the ULN2803A
Darlington Array. It contains eight darlington transistors with common emitters and
integral suppression diodes for inductive loads. Each darlington features a peak load
current rating of 600mA (500mA continuous) and can withstand at least 50V in the off
state. Outputs may be paralleled for higher current capability. The ULN2803A has a
2.7kΩinput resistor for 5V TTL and CMOS and it is supplied in an 18-lead plastic DIP
with copper leads and features the convenient input opposite-output pinout to simplify
board layout. The pin configuration of ULN2803A is shown in appendix A.
3.2.6.2 DC Motor Driver
The driver IC used for the dc motor is the L298 Dual Full-Bridge Driver. The L298 is an
integrated monolithic circuit in a 15-lead multiwatt package. 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 stepper motors. Two enable inputs are
provided to enable or disable the device independently of the input signals. The emitters of
the lower transistors of each bridge are connected together and the corresponding external
terminal can be used for the connection of an external sensing resistor. An additional
34
supply input is provided so that the logic works at a lower voltage. The pin configuration
of L298 is shown in appendix A.
3.2.7 LATCHES AND BUFFERS
3.2.7.1 Latches
In our research, we found we needed to maximize the utilization of the microcontroller
input/output ports. We had only two 8-bit ports available for driving six motors so we
decided to use latches to hold the data for each of the motors and enable them when
needed. Upon further research on available latches, we found the 74LS573 latch to be
suitable for our design.
The 74LS573 consists of eight latches with 3-state outputs for bus organized system
applications. The flip-flops appear transparent to the data (data changes asynchronously)
when Latch Enable (LE) is HIGH. When LE is LOW, the data that meets the setup times is
latched. Data appears on the bus when the Output Enable (OE) is LOW. When OE is
HIGH the bus output is in the high impedance state.
3.2.7.2 Buffers
Buffers were used to isolate the PC parallel port from the transmitter circuitry to avoid
damaging the parallel port. The 74HCT541 buffer IC was used. Its pin configuration is
shown in appendix A.
3.3 SOFTWARE
A robot, by definition, must have intelligence and this actually means some software that
directs it on what to do, given zero or more input conditions.
3.3.1 CHOICE OF PROGRAMMING LANGUAGE
From analysis on our project, we arrived at the conclusion that two separate pieces of
software would be required. One would run on the PC’s processor and would take care of
35
the user interface (GUI) or what could be called the robot’s dashboard. For this, we did
some extensive research on the programming language that would be most suitable. We
chose the Java programming language based on some of its desirable characteristics,
including the following:
• Java Is simple – No language is simple, but Java is a bit easier than the popular
object-oriented programming language C++, which was the dominant software-
development language before Java. Java is practically modeled on C++, but greatly
simplified and improved.
In addition, the number of language constructs is small for such a powerful
language. The clean syntax makes Java programs easy to write and read.
• Java Is Object-Oriented – Object-oriented programming (OOP) models the real
world in terms of objects. OOP provides great flexibility, modularity and
reusability.
• Java Is Interpreted – You need an interpreter to run Java programs. The programs
are compiled into Java Virtual Machine code called bytecode. The bytecode is
machine-independent and can run on any machine that has a Java interpreter.
• Java Is Robust – Robust means reliable. No programming language can ensure
complete reliability. Java puts a lot of emphasis on early checking of possible
errors, because Java compilers can detect many problems that would first show up
at execution time in other languages. Java has eliminated certain types of error-
prone programming constructs found in other languages. It does not support
pointers, for example, thereby eliminating the possibility of overwriting memory
and corrupting data.
Java has a runtime exception-handling feature to provide programming support
for robustness. Java forces the programmer to write the code to deal with
exceptions. Java can catch and respond to an exceptional situation so that the
36
program can continue its normal execution and terminate gracefully when a
runtime error occurs.
• Java Is Architecture-Neutral – The most remarkable feature of Java is that it is
architecture-neutral, also known as platform-independent. With a Java Virtual
Machine (JVM), you can write one program that will run on any platform, such as
Windows, OS/2, Macintosh, and various UNIX, IBM AS/400, and IBM
Mainframes.
• Java Is Portable – Java programs can be run on any platform without being
recompiled, making them very portable. Moreover, there are no platform-specific
features in the Java language. The Java environment is portable to new hardware
and operating systems. In fact, the Java compiler itself is written in Java.
The second piece of software was to exist in the microcontroller code memory, and
actually form the intelligence of the robot. The ATMEL series microcontrollers (8051
family) have an instruction set that is more or less a subset of the 8086 assembly language.
However, from research, we found out that there were compilers that could permit the use
of some high-level languages such as C and BASIC for programming these
microcontrollers.
The trade-off in using a high-level language instead of the native instruction set to program
a microcontroller would be a slightly less efficient utilization of the limited code memory
and slightly slower programs. On the other hand, you would have code that is clearer and
easier to handle. This outweighed the disadvantages in the case of our project so we chose
the C language, which has an almost one-to-one correspondence with the microcontroller
assembly language.
37
CHAPTER FOUR
DESIGN AND IMPLEMENTATION OF THE ROBOTIC ARM
In the design of systems, there are generally two methods of approach namely:
• Top-down method
• Bottom-Up method
The top-down method is usually applied in designing a system from the scratch while the
down-top method is used for reverse designing of an already existing system or functional
design as in software engineering. The diagram in fig. 4.1 below is a sketch of the robot
manipulator.
Figure 4.1: Sketch of the Robot Arm
38
We employed the top-down approach in the design of the robot arm project and fig. 4.2
below shows how the various modules were integrated to arrive at the entire system.
Figure 4.2: Robot Arm System Design (Top-Down Approach)
A block diagram model of the robot arm control is shown in fig. 4.3. The feedback sensors
are optocouplers located on the robot joints which send feedback information to the
microcontroller on the robot’s position. The actuators are the stepper and dc motors at each
joint.
Figure 4.3: Block Diagram Model of the Robot Arm Control
39
MECHANICAL ARM
ELECTRONIC
HARDWARE
SOFTWARE
SYSTEM INTEGRATION
ROBOT ARM/ MANIPULATOR
Command +
Input R[n] -
Controlled
Output Y(t)
-
E[n]
Feedback
Sensor
U[n]
Actuator Controller
System to be
Controlled
4.1 MECHANICAL DESIGN AND FABRICATION
It is pertinent to note that this part of the project requires very high expertise in mechanical
design and fabrication, hence, and understandably too, it was a major source of concern for
us considering our limited exposure in the above mentioned area.
We therefore sought the assistance of experts in the mechanical engineering design field,
and, with grateful hearts, we want to mention that Engr. Chigbo Mgbemene took it upon
himself to assist us in the entire mechanical design and fabrication. Apart from the
excitement of seeing abstract drawings transform into real mechanical components, we
learnt some important things in the mechanical engineering design field while working
with him.

We employed the top-down approach (shown in fig 4.4) in the design of the robot arm but
the fabrication of the arm was done component by component and eventually, the
components were integrated to obtain the whole arm.
Fig. 4.4: Components of the (Mechanical) Robot Arm
Materials for the fabrication were selected based on some constraints that include:
• Weight
• Work envelope
• Workability
• Maintainability
40
ROBOT ARM
BASE UPPER
ARM
LOWER
ARM
WRIST GRIPPER SHOULDER
4.1.1 THE GEAR SYSTEM
Each of the joints are powered by electric motors (stepper and dc motors) whose outputs
were mechanically coupled to gear boxes for amplification of the output torque so as to
satisfy the weight requirements of the arm and the object being picked. The principal
requirements for effective power transmission in the robot arm include:
The gear boxes are composed mostly of worm gears and spur gears. Worm gears were
coupled directly to the motor’s shaft as it prevents movement in the opposite direction and
this characteristic improved the holding torque as well as protects the motor from slipping
under heavy loads.:
For a typical gear train like the figure shown below:
Figure 4.5: A typical Gear Train
T
n
= ( ) ( )
1 1 3 1 2
. . . . . . . . . . . . . T d d d d d d
m n n n m n n n

1
]
1

¸

× × × × × ×
− − − − − −
.............
( )

,
_

¸
¸

,
_

¸
¸

,
_

¸
¸
·
− − + −



1 1 1
2 1
....... ) (
m n m n
m n
n
n
n
d d
d
d
d
d d f ................ (1)
The following conditions must hold for equation (1) to be correct;
i) n must be even (because T
n
=T
n+1
)
ii) n-m = 2
iii) n>m
Recall : n = Factor of Safety,
41
… T
n
Driven
Driven
Driver
3
2
3
4
5
6 7
n 1
m= Module of gear,
T = Developed Torque (Nm)
T
1
is always given as the motor torque and T
n
is the torque required to be generated by the
gear train to carry the load. This must be greater than the torque due to the load to be lifted
and torque due to self weight of the arm (this includes all its appendages). Motor gear must
be indicated as 1 in the diagram. Therefore motor gear diameter = d
1
.
T
n
= f(d)T
1
............................................................................................(2)
For instance,
If T
1
= 0.24Nm then
T
n
= 5Nm
Then f (d) = 5/ 0.24 = 20.83
→ ( )

,
_

¸
¸

,
_

¸
¸

,
_

¸
¸
·
− − + −



1 1 1
2 1
....... ) (
m n m n
m n
n
n
n
d d
d
d
d
d d f .............................................(3)
Each bracket represents gears on the same shaft. Diameter ratios as well as the number of
shafts affect the f(d). Angular velocity is also a factor to be considered. For example, given
that n = 6, d
1
= 14mm, d
2
=38mm, d
3
= 22mm, d
4
=40mm,
d
5
= 24mm and d
6
= 37mm, the torque on the 6
th
gear can be computed using equation 1 as
shown below:
T
n
= 37 * 40 * 38 * 0.155 / 24 * 22 * 14
= 1.18Nm
The torque requirements at the various links were obtained using equations 1, 2 and 3, the
results are in given in table 4.1.
Table 4.1 Result Of Torque Calculation
Joint
Calculated torque
(Nm)
Shoulde
r
5.82
Elbow 3.61
Wrist 0.48
42
Gripper 5.82
Table 4.2 Arm Dimensions
Body Part Length(mm) Height (mm)
Width
(mm)
The Waist (base)
The Shoulder
The Upper Arm 289 113.3 82.4
The Fore Arm 271 92.9 66.3
The Wrist 222 100.5 54.2
Table 4.3 Gear Dimensions
For The Waist Diameter(D) (Mm)
Bull Spur 252
Pinion 50.4
Bevel (Spur) 225
Bevel Pinion 45
For The
Shoulder
Diameter(D) (Mm)
Bull Spur (7) 19.5, 28.5, 56.4,
27.9, 43.4, 22.5&
42.8
Worm Gear 3 6.5
For The Elbow Diameter(D) (Mm)
Bull Spur(7) 16.6, 21.8, 45.5,
26.5, 40.9, 22.9&
42.8
Worm Gear (1) 7.4
For The Wrist Diameter(D) (Mm)
Bull Spur (7) 19.4, 20.5, 56.4,
37.2, 25.3, 42.5, &
24.6
Worm Gear (1) 7.5
43
4.2 ELECTRONIC HARDWARE DESIGN AND IMPLEMENTATION
The electronic hardware design consists of the following modules:
• The Transmitter Unit
• The Motor Controller
• The Interrupt Controller
• The Power Supply Unit
4.2.1 THE TRANSMITTER UNIT
The transmitter circuit consists of a DB-25 connector, a microcontroller (AT89S52), a
voltage regulator (7805), a timer IC (555), buffers, infrared LEDs, transistors and resistors.
The DB-25 connector links the transmitter circuit to the parallel port of the PC. User
commands from the robot’s user interface are sent to the transmitter microcontroller via the
DB-25 connector. The microcontroller is programmed to read the 8-bit command code and
use it to modulate the 38 kHz infrared carrier. The modulation (or encoding) is done with
the aid of a 555 timer configured in astable mode. The microcontroller pulses the reset pin
of the 555 timer in accordance with the logic level of each bit of the command code. For
instance if a command code ‘1000 1101’ is read from the parallel port, the bits ‘1’, ‘0’, ‘1’,
‘1’, ‘0’, etc are in turn sent to the reset pin of the 555 timer via the microcontroller serial
transmitter pin. Logic ‘0’ at the reset pin will stop oscillation, and logic ‘1’ will resume
oscillation. The IR receiver at the robot base senses the presence or absence of incident
carrier signal and interprets as logic ‘1’ and logic ‘0’ respectively.
Buffers were used to interface the parallel port with the transmitter circuit and transistors
were used for switching.
The transmitter and receiver serial baud rate have to be equal and the calculation is given
below. Also, the calculation for setting the 555 timer to oscillate at 38 kHz is given.
44
4.2.1.1 BAUD RATE CALCULATION
We used a baud rate of 1500 bps. To configure the microcontroller for this baud rate, a
specific value is loaded in its timer register (timer 0 or timer1, but we used timer 1 register)
and the calculation is as shown.
val = 256 – ((System frequency / (12 * 32)) / baud)
Where:
baud = desired baud rate (1500)
System frequency = 24.00014MHz
Val = value to be loaded in to the timer register
( ) 1
]
1

¸

,
_

¸
¸
×
×
− · 1500
32 12
10 00014 . 24
256
6
val
= 214 approx.
4.2.1.2 CARRIER FREQUENCY CALCULATION
A frequency of 38 kHz implies a signal period of (1/38 kHz), that is 0.0000263s
For the 555 timer:
( ) C R R t
b a high
× + × · 693 . 0
( ) C R t
b low
× × · 693 . 0
low high
t t T + ·
Where:
R
a
= 4.7k (fixed resistor value)
R
b
= variable resistor value - to be calculated
C = 0.1uF (fixed capacitance value)
Making R
b
subject of formula and substituting fixed values gives
R
b
= 16.62kΩ
4.2.2 THE MOTOR CONTROLLER
45
The motor interface is the core control circuitry for the robot. It consists of a
microcontroller, latches, Darlington transistor IC packages, diodes, and an L298 dual full-
bridge driver.
Two out of the four ports of the microcontroller were used to drive the motors. Five
stepper motors and one dc motor were used to control each of the six degrees of motion.
Each of the stepper motors required four control pins while the dc motor required three.
That is twenty-three pins in all. The microcontroller pins therefore, had to be
demultiplexed to control the motors in turn, hence latches were used. Control lines were
used to select the appropriate latch at any instant.
The latch (74HC373) is a TTL IC, and therefore requires a source voltage of 5V. But the
motors operate with 12V dc, hence the need for some sort of buffering between the latches
and the motors. A Darlington transistor IC package (ULN2803) was used to drive the
stepper motors. The dc motor requires a transistor H-bridge in order to drive it in both
directions (clockwise and counter clockwise) without changing the source polarity. This
was achieved with an L298 dual full-bridge driver.
The circuit diagram of the motor controller is shown in Appendix E
4.2.3 THE INTERRUPT CONTROLLER
The AT89S52 microcontroller has two external interrupt pins, INT0 and INT1. We used
INT0, which was configured such that a ‘high-to-low’ transition at this pin will trigger an
interrupt and the corresponding interrupt service routine will be executed. But we have six
interrupt sources as feedback from the robot. Five optocouplers for the upper joints and
one switch for the gripper. Hence, an interrupt controller circuit was needed to connect
these six sources to one interrupt pin.
An array of AND gates is used as shown in Appendix E. The circuit is connected in such a
way that once any feedback input goes low (the motor feedbacks are active low) the output
of the AND array goes low. This is connected to the ‘trigger’ pin of a 555 timer configured
in monostable mode. The output of the 555 timer is changed from ‘high’ to ‘low’ but it
46
returns to the high state after a while (monostable). The ‘low-to-high’ transition is inverted
to a ‘high-to-low’ transition by a schmitt trigger, thereby generating an interrupt on INT0.
47
4.2.4 THE POWER SUPPLY UNIT
The power supply unit provides four voltage levels for the robot control. The dc motor
requires 15Vdc, the stepper motor requires 12Vdc, the TTL ICs require 5Vdc, and -12Vdc
was provided in anticipation of possible need of signal amplification with an operational
amplifier.
The ac voltage from the mains is stepped down by a centre tapped transformer. The low
voltage ac is converted to dc by a bridge rectifier, filtered by capacitors and passed through
appropriate voltage regulator ICs to obtain the required dc voltage levels. The 7815, 7812,
7805 and 7912 voltage regulators were used to obtain regulated outputs of 15V, 12V, 5V
and -12V dc, respectively.
It was observed, during test, that on loading, the output of the voltage regulators
(especially the 7815) dropped significantly thereby posing a problem to the correct
functioning of the motors. To overcome this problem, a TIP125 power transistor was
connected across the voltage regulator as shown in fig. 4.8. Under normal loading, the
voltage regulator is able to provide the required current. But when the required current
exceeds what can be provided by the regulator, instead of a voltage drop at the output of
the regulator, the extra current is drawn directly from the unregulated dc source through
the TIP125, thereby preventing a voltage drop.
These circuits were all implemented using the printed circuit board (PCB) technology. This
process generally involves drawing the circuit diagram with the aid of a PCB design
software. The circuit is printed on paper using a laser jet printer. The printed circuit
diagram is placed on a copper-coated board known as the printed circuit board. An exact
impression of the circuit is made on the board by pressing the printed circuit unto the board
with hot iron. The impressed board is then placed in some fluid known as etching fluid,
and all the copper, apart from the parts coated by the printed circuit ink (which was
transferred by hot iron impression), is ‘etched’ off leaving a copper trace that is an exact
reproduction of the printed circuit. Appropriate holes are then drilled and the components
soldered.
48
The PCB has the advantage of a neater circuitry (with basically no wires!) hence easier to
troubleshoot. Also, since one can have a multi-layered PCB, then larger circuits can be
compressed into a smaller space as compared to the conventional vero boards.
4.3 SOFTWARE DESIGN
Three separate pieces of software were developed for the robot system. The user interface
software, which was written in JAVA programming language and two pieces of software
for the transmitter microcontroller and the receiver/robot control microcontroller.
In all, the top-down design approach was adopted for the software design. JAVA being an
object oriented programming language, the universal modeling language specifications
were adopted as much as possible.
4.3.1 GUI SOFTWARE DESIGN AND IMPLEMENTATION
4.3.1.1 REQUIREMENTS SPECIFICATION
The GUI code is expected to capture the following functions:
• At start up the user is offered the option of controlling the robot directly or
selecting complete pick and drop actions.
• If the user chooses to use the pick and drop functionality, he is shown a display
panel with options on how fast to pick and drop and how many times. After
choosing from the available options and entering his choice using an ‘OK’ button,
the GUI code takes note of the choices and encodes it as an 8-bit command code
which is sent to the transmitter through the parallel port for onward transmission to
the robot controller at the base of the robot.
• If the user chooses the direct user control option, he is serviced with a display panel
which, when activated, responds to the appropriate key presses and generates
corresponding 8-bit command codes which are sent to the transmitter through the
parallel port.
49
4.3.1.2 USE CASE ANALYSIS
USE CASE PROPERTIES
USE CASE ID: M001
DESCRIPTION: Generates command code
that will control the robot
using predefined
behaviours already
assembled into complete
pick and drop tasks
ACTOR: User
NAME: Pick and drop
SCOPE: Subsystem
PRE-CONDITION(S): The user must select valid
options or combinations of
options
POST-CONDITION(S): The command code that
will carry out the pick and
drop task has been sent
through the parallel port
EVENT/TRIGGER: The user enters his choice
using the 'OK' button
CATEGORY: Main
AUTHOR: Robotic arm design group
MANAGEMENT: Project Supervisor
DATE: Apr-07
Table 4.4: Use Case Event Matrix (M001)
Event Action Response Remarks
The user
enters his
choice
using the
‘OK’
button
System
generates an 8-
bit command
code that
corresponds to
the user’s choice
combination
System sends the 8-bit
command code through the
parallel port and triggers
transmission to the robot
controller at the base of the
robot
50
Table 4.5: Information Needs (M001)
WHO NEEDS
INFORMATION
WHAT
INFORMATION
WHERE IS
IT
NEEDED
WHEN IS IT
NEEDED
HOW IS THE
INFORMATION
NEEDED
System User’s combination
of options for pick
and drop
Pick and
drop option
page
During pick
and drop
mode of
robot control
1) By data entry
2) By option
selection
3) By slider
positioning
USE CASE PROPERTIES
USE CASE ID: M002
DESCRIPTION: Generates command code
that will allow the user
control the robot directly
ACTOR: User
NAME: Direct user control
SCOPE: Subsystem
PRE-CONDITION(S): The user must activate this
mode of control
POST-CONDITION(S): The command code that
will carry out the direct
control task has been sent
through the parallel port
EVENT/TRIGGER: The user presses one of
the robot control buttons
on the keyboard
CATEGORY: Main
AUTHOR: Robotic arm design group
MANAGEMENT: Project Supervisor
DATE: Apr-07
51
Table 4.6: Use Case Event Matrix (M002)
Event Action Response Remarks
The user
presses one of
the robot
control buttons
on the
keyboard
System
generates an 8-
bit command
code that
corresponds to
the user’s choice
combination
System sends the 8-bit
command code through
the parallel port and
triggers transmission to
the robot controller at
the base of the robot
Table 4.7: Information Needs (M002)
WHO NEEDS
INFORMATION
WHAT
INFORMATION
WHERE IS
IT NEEDED
WHEN IS
IT
NEEDED
HOW IS THE
INFORMATION
NEEDED
Use Case Diagram of the system is shown in fig 4.6 below
Fig. 4.6: Use Case Diagram for Robot GUI
52
Direct User
Control
Pick and
Drop
System
Implementation
The code for the robot graphic user interface (GUI) is given in appendix B.
4.3.2 TRANSMITTER SOFTWARE DESIGN AND IMPLEMENTATION
4.3.2.1 Requirements Specification
The transmitter microcontroller code is expected to capture the following functions:
• It should monitor the transmit activation control line from the parallel port
• If the control line goes low, it should read the 8-bit data from the parallel port and
transmit it serially through its serial transmit pin
4.3.2.2 Program Flowchart
The flowchart showing how transmitter software is shown below in fig 4.7
START
INITIALIZE
SERIAL BAUD
RATE
READ
TRANSMIT
CONTROL
LINE
ISIT ‘LOW’ ?
READBYTE
FROM
PARALLEL
PORT
TRANSMIT
SERIALLY
NO
YES
Fig. 4.7: Program Flowchart for Transmitter Software
53
Implementation
The code for the transmitter microcontroller is given in appendix B.
4.3.3 RECEIVER/ROBOT CONTROL SOFTWARE DESIGN AND IMPLEMENTATION
4.3.3.1 Requirements Specification
The receiver/robot microcontroller code is expected to capture the following functions:
• It should monitor the command code register which is updated in the serial
interrupt service routine each time a command is sent by the user
• Each time it reads the command code, it decodes it to determine the user’s request
and also extracts some parameters that are present in the command code. A code
map which is transparent to both the user interface (GUI) code and the robot
control code is used to ensure that the two pieces of software understand each other
with respect to the meaning of each 8-bit command code
• Having determined the request, assuming the code is valid, it calls the appropriate
function(s) that will execute the user’s request by driving the motors appropriately
4.3.3.2 Program Flowchart
Fig 4.8 shows the flowchart for the receiver/robot control software design
54
START
INITIALIZESERIAL BAUD
RATEAND EXTERNAL
INTERRUPTS
READ THE
RECEIVED
COMMAND
CODE
ISCODE
VALID ?
NO
YES YES
DECODETOGET
THEREQUIRED
FUNCTION
CALL FUNCTION TO
HANDLETHEREQUEST BY
DRIVINGTHEMOTORS
APPROPRIATELY
Fig. 4.8: Program Flowchart for Transmitter Software
Implementation
The code for the receiver/robot control microcontroller is given in appendix B.
4.4 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, design
55
and implementation of wireless communication module and software development 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.
The wireless communication module was implemented and tested with a sample circuit
and we were able to achieve a range of about 6 metres line-of-sight.
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. The results were as
follows:
• The gripper motor turned satisfactorily, clockwise and counterclockwise. But the
grip force was observed to be quite low.
• The wrist roll motor worked but we discovered that it was loosely coupled to the
gear train. That was rectified.
• The wrist pitch motor was successfully controlled.
• The wrist roll motor was successfully controlled.
56
• The elbow motor was successfully controlled.
• The waist or base motor was successfully controlled.
We also tested the wireless communication module (now integrated into the entire system).
Initially it did not respond but after troubleshooting, it worked.
57
CHAPTER FIVE
CONCLUSION AND RECOMMENDATIONS
This project was basically an analysis of an already existing work with a view to
improving on it and possibly adding new features. Some limitations in the original project,
apart from the fact that it was not completed, were
• Insufficient motor torque and torque amplification with gears, to support the robot
and any added weight
• Heavy weight of robot arm due to material used (steel)
• Failure to achieve the required six degrees of freedom for the robot arm
• Lack of flexibility in the entire system since a computer (PC) was directly attached
to the robot control circuitry, and a few others.
5.1 ACHIEVEMENTS
In spite of some of the limitations and due to the recommendations by the previous group,
we were able to achieve the required six-degrees of freedom.
The following improvements were made and some new features were added
• A richer user interface with enhanced functionalities and user friendliness.
• We used bigger and stronger gears to enable the arm carry its load without slipping.
Also a type of gear called the “worm gear” was also used because it has the
advantage of being almost impossible to slip. This is due to the fact that it only
turns in one direction.
58
• The weights of all the motors were put into consideration when calculating the
torque at each joint. This is to make sure the gears are arranged in a way that will
produce enough torque to carry the succeeding load.
• The use of printed circuit boards (PCB) to do the circuits. This reduces the errors
due to faulty connections and wiring usually found on other boards.
• Perhaps one of the most important achievements is that we were able to change the
material used for arm fabrication. Due to expert advice from Engr. Mgbemena, we
settled for aluminum because of its light weight, strength and resilience.
• Use of DC motor at the base. The output torque of the DC motor is higher than that
of the stepper motors. Using DC motor at this joint brought us a step closer to
solving the problem of insufficient torque to carry the arm.
• We used a microcontroller which provides enough pins for selecting motors, hence
eliminating the need for decoders. Also, we used transistor driver ICs instead of
discrete transistors to simplify the circuit and make it less error-prone.
• The motors are operated with a feedback mechanism, using optocouplers. This
feedback is connected to the gear box in such a fashion that it triggers when
specific positions of the output shaft of the motor are reached.
• For the communication with the robot, we used an infrared circuit. This ensures
that the robot is unencumbered by wires running from the system to it. Although
the ST12 would have been the ideal choice, since it was not readily available, we
settled for a very efficiently designed microcontroller based infrared transmission
circuit.
• The gripper is fitted with pressure sensors that make sure it does not place undue
pressure on whatever material it is picking. Since industrial robots are usually made
for a particular purpose, the amount of force exerted by the gripper can be preset
based on its function.
59
5.2 LIMITATIONS
We encountered a number of problems that hampered the fast completion of the project
and placed a limitation on the amount of improvements we were able to make. They
include:
• Insufficient mechanical knowledge:
Engr. Mgbemene, who worked with the last group, was unavailable at the start of
our project. This resulted in a lot of mistakes, on our part, based on gear
arrangement and material selection. Thankfully, he came back and put us on the
right track- but by then, a lot of time and resources had been lost.
• Unavailability of some integrated circuits
One of the improvements in the robot design was in the area of communication.
We were supposed to use an integrated encoder-decoder chip called ST12 for
infrared communication. Unfortunately, this chip is not available in Nigeria so we
had to order it. The time wasted before it arrived was proving to be too much, so
we had to search for other options.
• Irregular power supply
The progress of both the mechanical and electronic parts of the project was greatly
hampered by the irregularity of the power supply.
• Inadequate Machines for Fabrication
Due to outdated and inadequate machinery in the Mechanical Engineering
Laboratory the robotic arm could not be machined using the required lathe machine
but had to be built manually. This increased the total amount of time wasted.
• Lack of well equipped electronics laboratory
60
Most of the work was done in inadequate make-shift laboratories (That is in our
room). This retarded the progress of the project because we had to source for
materials from other places.
5.3 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
61
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 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
62
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.
Despite the excitement about the development of this industry, questions about the
promises and peril concerned with our increased dependence on robots arise. Some of them
are discussed below.
Roboticists believe that humans will be more comfortable dealing with creatures physically
similar to themselves. ASIMO, the amazing Honda robot that can dance and climb stairs, is
four feet tall with arms, legs, fingers, and so forth. But ASIMO can be off-putting — all
solid wire and plastic and aluminum; no warmth, no DNA. Should robots be designed in
man’s image, or as something completely different?
If humanoid robots become integral to our daily lives, should they be expected to follow
the laws and norms of human society, or should a new set of guidelines be drawn up
especially for them? If so, what are the primary elements that need to be addressed to
protect robots from humans and humans from robots?
Robots are becoming nurse-bots and roboceptionists, jobs that have most often been
performed by women. Many Roboticists, the vast majority of whom are men, dismiss the
danger of anthropomorphism yet frequently refer to their creations as “she.” Should robots
be gender-specific? Have they already been categorized?
63
As robots become more pervasive in the workplace, what steps should be taken to
preserve the livelihood of the human beings they replace? Should a vulnerable labor force
be retrained in advance? Should protective legislation be passed?
In the near future there will be robots designed to assist surgeons replace heart valves and
knees (and possibly robots to perform surgery independently). Should a patient be able to
decline robot-assisted treatment, even if his insurance company considers it cost-effective?
What if the surgeon is a human using robotic remote-control technology from a hospital
1,000 miles away?
The Japanese believe that robots will be most useful as personal companions and
caretakers for the elderly. Already, robots can take certain vital measurements, such as
heart rates. As robots become more skilled and sophisticated, how can we ensure against a
future of old people confined to institutions serviced and supervised by machines?
Human environments are fundamentally chaotic, yet robots are sensitive precision
instruments that can become unreliable or agitated in unpredictable situations. How should
we control environments so that robots can function consistently, and who is responsible if
a destabilized robotic system damages personal property or injures a human being?
In any case, robots will certainly play a larger role in our daily lives in the future. In the
coming decades, robots will gradually move out of the industrial and scientific worlds and
into daily life, in the same way that computers spread to the home in the 1980s.
5.4 COST ANALYSIS
S/N DESCRIPTION QTY
UNIT
COST (N)
AMOUNT
(N)
1 Transformer 1 370 370
64
2 Rectifier 1 50 50
3 Regulator 5 50 250
4 Capacitor 17 20 340
5 Resistor 13 10 130
6 Transistor 6 70 420
7 SIL Connector 17 20 340
8 IR Receiver 7 30 210
9 IR LED 7 20 140
10 555 Timer 3 30 90
11 Buffer 4 80 320
12 OR Gate 1 80 80
13 IDE Cable and
Connector
2 100 200
14 Mica Capacitors 6 20 60
15 DB25-f 1 200 200
16 Microcontroller 2 300 600
17 24MHz Crystal 2 40 80
18 Switch 2 20 40
19 LED 2 10 20
20 Battery 2 50 100
21 Latch 3 100 300
22 Stepper Motor
Driver
3 280 840
23 DC Motor Driver 1 250 250
24 AND Gate 2 80 160
25 Schmitt Trigger 1 80 80
26 Diodes 7 10 70
27 Aluminium Sheet 1 2800 2800
28 Gears and Motor 8000
29 Transportation 3400
30 Research 2000
31 Printing and Binding 4000
32 Glass Reinforced Plastic
(GRP)
10000
33 Miscellaneous 2000
TOTAL 37940
5.5 CONCLUSION
The project was time-consuming, work-intensive and economically tasking. However, we
are proud as a group to have achieved for the first time, the control of a 6-degree of
freedom robotic arm, a pioneer in the department of Electronics Engineering, UNN.
65
From our experience, we recommend that for the future implementation of this project, the
following improvements can be made:
• The robot can be fitted with wheels and adequate sensors to make movement
possible.
• Control can be improved by using a remote control or joystick to manipulate the
robot instead of devoting a whole computer system to it.
• The robot can be given added intelligence so that it can sense obstacles respond
appropriately.
• Proper selection of integrated chips should be made and they should be thoroughly
tested before purchase to eliminate chances of faulty chips being purchased.
• It is also advisable to have the arm fabrication done in a workshop with up to date
machinery to avoid errors in construction.
The possibilities are endless. Robotics is a relatively untapped field in Nigeria and it has
many prospects. Starting with our community, we can, step by step, create robots that will
ultimately be used to perform some pertinent tasks that are too bothersome for human
beings. The fact that it also combines various disciplines of engineering is also notable.
REFERENCES
Andersen, P. K., Bjedov, G. & Scarbrough, M. G., “Essential C: An Introduction for
Scientists and Engineers”. Florida: Saunders College Publishing, 1995.
Cormier, J. M.“Robotics Training Systems – Concepts and Applications”. FirstEdition,.
Buck Engineering Co. Inc., 1985.
John, C. J., “Introduction to Robotics: Mechanics and Control”. Second Edition, India:
Pearson Education, Inc., 1989..
66
Kuo, B. C., Golnaraghi Farid, “Automatic Control Systems”. Eight Edition, John Wiley &
Sons, Inc., 2003..
Kafrissen, Edward, Stephans, and Mark, Industrial Robots and Robotics. (Virginia: Reston
Publishing company, Inc., 1984)
Kenjo, Takashi, “Stepping Motors and their Microprocessor Controls” Oxford University
Press, c1984. LC number: TK2785 .K4 1984
Vishay Semiconductor GmbH. TCST110. up to TCST230.
Lenarcic, j., “Kinematics” in The International Encyclopedia of Robotics. Wiley and Sons,
1988
Liang, Y. D., “Introduction to Java Programming”. 3
rd
Edition, New Jersey: Prentice-Hall
Inc., 2001.
Roth, B., Rasteger, J., and Scheinman, V., “On the Design of Computer Controlled
Manipulators”, Vol. 1, First CISM-IFToMM Symposium, Sept., 1973
Robotics Training Systems: Concepts and Applications First Edition, By the staff of Buck
Engineering. (USA: Buck Engineering Co. Inc., 1988)
5804 BiMOS II Unipolar Stepper Motor Translator/Driver datasheet. By Allegro
MicroSystems Inc. 115 Northeast Cuto_, Box 15036, Worcester, Massachussetts,
1998.
Scherz, Paul, Practical Electronics for Inventors. Second Edition, New York: Mc-Graw
Hill, Inc.,2000.
67
Theraja, B. L. & Theraja, A. K, A Text Book of Electrical Technology. New Delhi: S.
Chad & Company Ltd.,1959
Robotics Introduction. (2000). “Definitions”
http://www.ee.scu.edu/classes/2000winter/elen337/Lecture1/tsld003.htm;
Robot. (2001). “History of Robotic”
http://www.ukrobot.co.uk/html/main.htm
Robotics Introduction. (2001). “Definitions, Etymology
http://www.ee.scu.edu/classes/2000winter/elen337/Lecture1/tsld002.htm;
The Robot Factory Inc. (2000). “Education”
http://www.robotfactory.com/edu.html, THOMSON Microelectronics
The Tech. (2001). “Introduction to Robotics.”
http://www.thetech.org/exhibits_events/online/robots/intro/
68
GLOSSARY
Accuracy - The accuracy of a robot is a measure of how the robot can reach a position at
which it was instructed to reach.
Artificial Intelligence - This can be defined as the branch of computer science that deals
with writing computer programs that can solve problems creatively.
Axis - A pivot point for a type of movement.
End-effectors - End-effectors are hand-like devices or special tools placed on the robot’s
arm used to perform work. They are designed to mimic the function and structure of the
human hand.
Industrial Robots - An industrial robot is officially defined by the International Standards
Organization as an automatically controlled, reprogrammable, multipurpose manipulator
programmable in three or more axes. The field of industrial robotics may be more
practically defined as the study, design and use of robot systems for manufacturing.
Number of axes - The number of axes of robot is the number of joints required to reach
any point in space.
Robot - A robot is simply defined as a device that connects sensing with actuation using a
suitable computer logic, which processes the inputs from the sensors and sends out outputs
to actuate devices.
It can also be defined as a computer-controlled machine that is programmed to move,
manipulate objects, and accomplish work while interacting with its environment.
69
Robot Controller - This refers to the computer logic that controls the robot’s actions. The
robot controller is a device that has, programmed in it, the instructions which are to be
performed by the robot. It is also referred to as the brain of the robot.
Robotics - This is the area of artificial intelligence that is concerned with the practical use
of robots i.e. robotics is the science and technology relating to use and design of computer-
controlled mechanical devices.
Work Envelope - This is the region of space a robot can reach.
70
APPENDIX A
PIN CONFIGURATIONS

Fig. A.1: Pin Configuration of AT89S52(MICROCONTROLLER)
71
1
40
2
39
3
38
4
37
5
36
6
35
7
34
8
33
9
32
10
31
11
30
12
29
13
28
14
27
15
26
16
25
17
24
18
23
19
22
20
21
AT89S52
VCC
P0.0
P0.1
P0.2
P0.3
P0.4
P0.5
P0.6
P0.7
EA’/VPP
ALE/PROG’
PSEN’
P2.7
P2.6
P2.5
P2.4
P2.3
P2.2
P2.1
P2.0
P1.0
P1.1
P1.2
P1.3
P1.4
P1.5
P1.6
P1.7
RST
(RXD) 3.0
(TXD) 3.1
(INT0) 3.2
P3.3
P3.4
P3.5
P3.6
P3.7
XTAL2
XTAL1
GND
Fig.A.2: Pin Configuration of 555 (TIMER)


Fig. A.3: Pin Configuration of ULN2803A (DARLINGTON ARRAY)
72
1 18
2 17
3 16
4 15
5 14
6 13
7 12
8 11
9 10
ULN2803A
OUT 1
OUT 2
OUT 3
OUT 4
OUT 5
OUT 6
OUT 7
OUT 8
VSS
IN 1
IN 2
IN 3
IN 4
IN 5
IN 6
IN 7
IN 8
GND
1 8
2 7
3 6
4 5
555
+VCC
DISCHARGE
THRESHOLD
CONTROL
VOLTAGE
GND
TRIGGER
OUTPUT
RESET
Fig. A.4: Pin Configuration of the L298 Dual Full-Bridge Driver
Fig. A.5: Pin Configuration 74573 (LATCH)
73
1 20
2 19
3 18
4 17
5 16
6 15
7 14
8 13
9 12
10 11
74573
V
CC
O
0
O
1
O
2
O
3
O
4
O
5
O
6
O
7
G
OC’
D
0
D
1
D
2
D
3
D
4
D
5
D
6
D
7
GND
Fig. A.6: Pin Configuration 74541 (BUFFER)
Fig. A.7: Pin Configuration of 7414 (SCHMITT TRIGGER)
74
1 20
2 19
3 18
4 17
5 16
6 15
7 14
8 13
9 12
10 11
74541
V
CC
OE
2

Y
0
Y
1
Y
2
Y
3
Y
4
Y
5
Y
6
Y
7
OE
1

A
0
A
1
A
2
A
3
A
4
A
5
A
6
A
7
GND
1 20
2 19
3 18
4 17
5 16
6 15
7 14
7414
VCC
6A
6Y
5A
5Y
4A
4Y
1A
1Y
2A
2Y
3A
3Y
GND
APPENDIX B
PROGRAM IMPLEMENTATION (CODES)
GUI CODE
/*
* Pioneer_Ware.java
* Created on 25 April 2007, 10:45
*/
package com.robot;
import javax.swing.Timer;
import java.awt.event.*;
/**
* @author Robotic Arm Design Group
*/
public class Pioneer_Ware extends javax.swing.JFrame {
static Timer welcomeTimer;
public final static int WAIT_TIME = 5000; //Time in millisecs
static Commands cmd;
static Pioneer_Ware pWare;

/** Creates new form Pioneer_Ware */
public Pioneer_Ware(){
initComponents();
}

/**
*Create the GUI and show it. For thread safety, this method should be
*invoked from the event-dispatching thread
*/
private static void createAndShowGUI(){
pWare = new Pioneer_Ware();
cmd = new Commands();
75
cmd.setVisible(true);
pWare.setVisible(true);
//Instantiate and start the welcome timer, giving it duration 'WAIT_TIME'
welcomeTimer = new Timer(WAIT_TIME, new ActionListener() {
public void actionPerformed(ActionEvent evt) {
pWare.dispose();
//pWare = null;
}
});
welcomeTimer.setRepeats(false);
welcomeTimer.start();
}

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
}
});
}
// Variables declaration - do not modify
private javax.swing.JLabel lblRoboPix;
// End of variables declaration
}
/*
* Commands.java
* Created on 25 April 2007, 12:13
*/
package com.robot;
import javax.swing.*;
import java.awt.Color;
76
import java.awt.event.*;
import jnpout32.*;
import java.applet.*;
import java.net.URL;
/**
*
* @author Robot Arm Design Group
*/
public class Commands extends javax.swing.JFrame {

//Variable declarations
static final short DATA_PORT_ADDRESS = 0x378;
static final short CONTROL_PORT_ADDRESS = 0x37A;
static final int CONTINUOUS = 0;
static final int NON_CONTINUOUS = 1;
static final int SLOW = 0;
static final int MEDIUM = 1;
static final int FAST = 2;
static final int MAX_NUM_OF_TIMES = 10; /*Max number one can enter for the 'No of times' option
in pick-and-drop*/
int selectedRadioButton = CONTINUOUS; //default selection
boolean isExecuting = false; //A flag used to determing the execution status of the arm
AudioClip[] song = new AudioClip[3]; //some audioclips
pPort port; //handle to the parallel port data

Action upAction, downAction, leftAction, rightAction;
Action gripAction, releaseAction, cwRollAction, acwRollAction;


/** Creates new form Commands */
public Commands() {
initComponents();
bindKeys();
initAudio();
initPorts();
}
77
/**
*Method called when user clicks the 'Stop/Reset' button
*@ param evt the ActionEvent object
*/
private void reset(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Timer resetTimer;
final int RESET_DURATION = 2000; //to be modified later

port.output(DATA_PORT_ADDRESS, (short)0xFF); //send 11111111 to parallel port
port.output(CONTROL_PORT_ADDRESS, (short)0xF0); //Activate IR transmitter i.e. the
microcontroller code
//reads the LSB of this control byte to decide
//whether to move data on port 1 to transmit buffer
try{
Thread.sleep(1); //Delay 1ms
}catch(InterruptedException e){
System.err.println(e.getMessage());
}
port.output(CONTROL_PORT_ADDRESS, (short)0xFF); //Deactivate IR transmitter
btnReset.setEnabled(false);
btnExecuteCmd.setEnabled(false);

//Instantiate and start reset timer with duration 'RESET_DURATION'
resetTimer = new Timer(RESET_DURATION, new ActionListener() {
public void actionPerformed(ActionEvent evt) {
//Things that should happen at the end of the specified duration
btnReset.setEnabled(true);
btnExecuteCmd.setEnabled(true);
txtNoOfTimes.setEnabled(true);
rBtnSpecificNo.setEnabled(true);
isExecuting = false;

/*
*Change song
*Use a try-catch block for smooth program flow in case the sound file no longer exists
78
*/
try{
song[0].stop();
song[1].loop();
}catch(Exception e){
e.printStackTrace();
}
}
});
resetTimer.setRepeats(false);
resetTimer.start();
}

/**
* Method called when the 'OK' button on PickAndDrop tab window is clicked
* @ param evt the ActionEvent object
*/
private void executeCmd(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
int noOfTimes = 1; //default
int speedVal = sldSpeed.getValue(); //Here we get to know the selected speed
int execution_duration = 0; //Default - to be modified later
int unit_exec_duration = 0; /*Time it takes for one pick-and-drop action in millisecs -
to be modified*/
String requestInfo = "";
String speed = "";
String mode = ""; //Either continuously or a specific number of times

//Determine unit execution duration based on speed
switch(speedVal){
case SLOW: speed = "slow"; unit_exec_duration = 2500; break;
case MEDIUM: speed = "medium"; unit_exec_duration = 2000; break;
case FAST: speed = "fast"; unit_exec_duration = 1500; break;
default: speed = "medium"; unit_exec_duration = 2000;
//All durations to be determined experimentally
79
}

if(rBtnContinuous.isSelected()){
selectedRadioButton = CONTINUOUS; //Here we get to know the selected mode
mode = "continuously.";
}else if (rBtnSpecificNo.isSelected()){
if(!verifyTextEntry()){
txtNoOfTimes.requestFocusInWindow();
return; //exit the method
}else{
selectedRadioButton = NON_CONTINUOUS; //Here we get to know the selected mode
noOfTimes = Integer.parseInt(txtNoOfTimes.getText()); /*Here we get to know the
selected no. of times*/
mode = noOfTimes + " times.";
}
}
requestInfo = "You want the robot arm to pick and drop at a \n" + speed + " speed " + mode;
int option = JOptionPane.showConfirmDialog(this, requestInfo, "Confirm",
JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE);
if(option == JOptionPane.CANCEL_OPTION){
//terminate command
return;
}

//To generate the command code that will be sent to the microcontroller through the parallelport
int cmdCode = 0x00; //hexadecimal equivalent of 00000000. it's the default command
int tempSpeed = 0;
int tempNoOfTimes = 0;
switch(selectedRadioButton){
case CONTINUOUS:
switch(speedVal){
case SLOW:
cmdCode = 0x1B;
break;
case MEDIUM:
cmdCode = 0x0B;
break;
80
case FAST:
cmdCode = 0x2B;
break;
}
break;

case NON_CONTINUOUS:
switch(speedVal){
case SLOW:
tempSpeed = 0x10;
break;
case MEDIUM:
tempSpeed = 0x00;
break;
case FAST:
tempSpeed = 0x20;
break;
}

switch(noOfTimes){
case 1:
tempNoOfTimes = 0x01;
break;
case 2:
tempNoOfTimes = 0x02;
break;
case 3:
tempNoOfTimes = 0x03;
break;
case 4:
tempNoOfTimes = 0x04;
break;
case 5:
tempNoOfTimes = 0x05;
break;
case 6:
tempNoOfTimes = 0x06;
81
break;
case 7:
tempNoOfTimes = 0x07;
break;
case 8:
tempNoOfTimes = 0x08;
break;
case 9:
tempNoOfTimes = 0x09;
break;
case 10:
tempNoOfTimes = 0x0A;
break;
}
cmdCode = tempSpeed | tempNoOfTimes;
}

//Send the command code to the parallel port
port.output(DATA_PORT_ADDRESS, (short)cmdCode);
port.output(CONTROL_PORT_ADDRESS, (short)0xF0); //Activate IR transmitter i.e. the
microcontroller code
//reads the LSB of this control byte to decide
//whether to move data on port 1 to transmit buffer
try{
Thread.sleep(1); //Delay 1ms
}catch(InterruptedException e){
System.err.println(e.getMessage());
}
port.output(CONTROL_PORT_ADDRESS, (short)0xFF); //Deactivate IR transmitter
isExecuting = true;
/*
*Change song
*Use a try-catch block for smooth program flow in case the sound file no longer exists
*/
try{
song[1].stop();
song[0].loop();
82
}catch(Exception e){
e.printStackTrace();
}

//JOptionPane.showMessageDialog(this, "Parallel port value is " +
Integer.toHexString(port.input(DATA_PORT_ADDRESS)));
btnExecuteCmd.setEnabled(false);
if(selectedRadioButton == CONTINUOUS){
txtNoOfTimes.setEnabled(false);
rBtnSpecificNo.setEnabled(false);
}

/*
*Enable 'OK' and 'Stop/Reset' buttons after expected duration of action and set the isExecuting flag
*to false, to indicate that command has finished executing
*this should happen only for non-continuous pick-and-drop option
*/
if(selectedRadioButton == NON_CONTINUOUS){
execution_duration = unit_exec_duration * tempNoOfTimes;
Timer executeTimer;
executeTimer = new Timer(execution_duration, new ActionListener() {
public void actionPerformed(ActionEvent evt) {
btnReset.setEnabled(true);
btnExecuteCmd.setEnabled(true);
isExecuting = false;

/*
*Change song
*Use a try-catch block for smooth program flow in case the sound file no longer exists
*/
try{
song[0].stop();
song[1].loop();
}catch(Exception e){
e.printStackTrace();
}

83
}
});
executeTimer.setRepeats(false);
executeTimer.start();
}

}


/*************************************************************************************
**
* Code to handle user control of the robot arm
***************************************************************************************/

/**
* action inner class - for action object that would be bound to the 'up' cursor key
*/
public class UpAction extends AbstractAction {

/** Creates a new instance of UpAction */
public UpAction() {
super();
}
public void actionPerformed(java.awt.event.ActionEvent evt) {
port.output(DATA_PORT_ADDRESS, (short)0xF1); //send 11110001 to parallel port - command for
micro c to move robot up
port.output(CONTROL_PORT_ADDRESS, (short)0xF0); //Activate IR transmitter
try{
Thread.sleep(1); //Delay 1ms
}catch(InterruptedException e){
System.err.println(e.getMessage());
}
port.output(CONTROL_PORT_ADDRESS, (short)0xFF); //Deactivate IR transmitter
lblMotion.setText("Up");

//May include a timer delay here to give the robot time to complete its task - just in case
84
//user holds down the key continuously, as this will keep the serial_isr() at receiver ucontroller
//busy, not allowing robot to move.
}
}
/**
* action inner class - for action object that would be bound to the 'down' cursor key
*/
public class DownAction extends AbstractAction {

/** Creates a new instance of DownAction */
public DownAction() {
super();
}
public void actionPerformed(java.awt.event.ActionEvent evt) {
port.output(DATA_PORT_ADDRESS, (short)0xF2); //send 11110010 to parallel port - command for
micro c to move robot down
port.output(CONTROL_PORT_ADDRESS, (short)0xF0); //Activate IR transmitter
try{
Thread.sleep(1); //Delay 1ms
}catch(InterruptedException e){
System.err.println(e.getMessage());
}
port.output(CONTROL_PORT_ADDRESS, (short)0xFF); //Deactivate IR transmitter
lblMotion.setText("Down");
}
}

/**
* action inner class - for action object that would be bound to the 'left' cursor key
*/
public class LeftAction extends AbstractAction {

/** Creates a new instance of LeftAction */
85
public LeftAction() {
super();
}
public void actionPerformed(java.awt.event.ActionEvent evt) {
port.output(DATA_PORT_ADDRESS, (short)0xF3); //send 11110011 to parallel port
port.output(CONTROL_PORT_ADDRESS, (short)0xF0); //Activate IR transmitter
try{
Thread.sleep(1); //Delay 1ms
}catch(InterruptedException e){
System.err.println(e.getMessage());
}
port.output(CONTROL_PORT_ADDRESS, (short)0xFF); //Deactivate IR transmitter
lblMotion.setText("Left");
}
}

/**
* action inner class - for action object that would be bound to the 'right' cursor key
*/
public class RightAction extends AbstractAction {

/** Creates a new instance of RightAction */
public RightAction() {
super();
}
public void actionPerformed(java.awt.event.ActionEvent evt) {
port.output(DATA_PORT_ADDRESS, (short)0xF4); //send 11110100 to parallel port - command for
micro c to move robot right
port.output(CONTROL_PORT_ADDRESS, (short)0xF0); //Activate IR transmitter
try{
Thread.sleep(1); //Delay 1ms
86
}catch(InterruptedException e){
System.err.println(e.getMessage());
}
port.output(CONTROL_PORT_ADDRESS, (short)0xFF); //Deactivate IR transmitter
lblMotion.setText("Right");
}
}

/**
* action inner class - for action object that would be bound to the 'G' key
*/
public class GripAction extends AbstractAction {
//pPort port = new pPort();
/** Creates a new instance of GripAction */
public GripAction() {
super();
}
public void actionPerformed(java.awt.event.ActionEvent evt) {
port.output(DATA_PORT_ADDRESS, (short)0xF5); //send 11110101 to parallel port - command for
micro c to grip
port.output(CONTROL_PORT_ADDRESS, (short)0xF0); //Activate IR transmitter
try{
Thread.sleep(1); //Delay 1ms
}catch(InterruptedException e){
System.err.println(e.getMessage());
}
port.output(CONTROL_PORT_ADDRESS, (short)0xFF); //Deactivate IR transmitter
lblMotion.setText("Grip");
}
}

87
/**
* action inner class - for action object that would be bound to the 'R' key
*/
public class ReleaseAction extends AbstractAction {
//pPort port = new pPort();
/** Creates a new instance of ReleaseAction */
public ReleaseAction() {
super();
}
public void actionPerformed(java.awt.event.ActionEvent evt) {
port.output(DATA_PORT_ADDRESS, (short)0xF6); //send 11110110 to parallel port - command for
micro c to release robot gripper
port.output(CONTROL_PORT_ADDRESS, (short)0xF0); //Activate IR transmitter
try{
Thread.sleep(1); //Delay 1ms
}catch(InterruptedException e){
System.err.println(e.getMessage());
}
port.output(CONTROL_PORT_ADDRESS, (short)0xFF); //Deactivate IR transmitter
lblMotion.setText("Release");
}
}

/**
* action inner class - for action object that would be bound to the 'C'key
*/
public class CWRollAction extends AbstractAction {

/** Creates a new instance of CWRollAction */
public CWRollAction() {
super();
}
88
public void actionPerformed(java.awt.event.ActionEvent evt) {
port.output(DATA_PORT_ADDRESS, (short)0xF7); //send 11110111 to parallel port - command for
micro c to move robot wrist clockwise
port.output(CONTROL_PORT_ADDRESS, (short)0xF0); //Activate IR transmitter
try{
Thread.sleep(1); //Delay 1ms
}catch(InterruptedException e){
System.err.println(e.getMessage());
}
port.output(CONTROL_PORT_ADDRESS, (short)0xFF); //Deactivate IR transmitter
lblMotion.setText("CWRoll");
}
}

/**
* action inner class - for action object that would be bound to the 'A' key
*/
public class ACWRollAction extends AbstractAction {
//pPort port = new pPort();
/** Creates a new instance of ACWRollAction */
public ACWRollAction() {
super();
}
public void actionPerformed(java.awt.event.ActionEvent evt) {
port.output(DATA_PORT_ADDRESS, (short)0xF8); //send 11111000 to parallel port - command for
micro c to move robot wrist anticlockwise
port.output(CONTROL_PORT_ADDRESS, (short)0xF0); //Activate IR transmitter
try{
Thread.sleep(1); //Delay 1ms
}catch(InterruptedException e){
System.err.println(e.getMessage());
}
port.output(CONTROL_PORT_ADDRESS, (short)0xFF); //Deactivate IR transmitter
89
lblMotion.setText("ACWRoll");
}
}

/**
* @param args the command line arguments

public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Commands().setVisible(true);
}
});
} */

// Variables declaration - do not modify
private javax.swing.JButton btnActivate;
private javax.swing.JButton btnDeactivate;
private javax.swing.JButton btnExecuteCmd;
private javax.swing.JButton btnReset;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JPanel jPanel1;
private javax.swing.JTabbedPane jtpCommands;
private javax.swing.JLabel lblInstruction;
private javax.swing.JLabel lblMotion;
private javax.swing.JPanel panelNoOfTimes;
private javax.swing.JPanel panelPickAndDrop;
private javax.swing.JPanel panelSpeed;
private javax.swing.JPanel panelUserControl;
private javax.swing.JRadioButton rBtnContinuous;
private javax.swing.ButtonGroup rBtnGrpNoOfTimes;
private javax.swing.JRadioButton rBtnSpecificNo;
private javax.swing.JSlider sldSpeed;
90
private javax.swing.JTextField txtNoOfTimes;
// End of variables declaration
}
TRANSMITTER MICROCONTROLLER CODE
/***************************************************************************************
* Project : Design and Control of a Robot Arm
*
* Date : 2007 *
* Author : Project Group *
* Department : Electronic Engineering (UNN) *
* Programming Language: C *
* Chip type : AT89S52 *
* Program type : Application *
* Clock frequency : 24.00014MHz *
***************************************************************************************/
#include <AT89X52.H>
#define PARALLEL_PORT P1
#define NOT_SENT P3_2
#define TRUE 1
//function declarations
void init_serial();
void sendByte(unsigned char);
void delay(unsigned int);
unsigned char input;
/*
* Main function
*/
void main(void){
init_serial(); //call function to initialize serial port
//continuous loop
while(TRUE){
91
while(NOT_SENT){ //while send bit is high(deactivated)
//do nothing
}
//when send bit is low(activated)
delay(2); //wait 50ms for stabilization of activate signal
input = PARALLEL_PORT; //takes the input value from the parallel port
sendByte(input); //call function to send data
//after sending the byte, loop in order to wait for the next send command
}
}
/*
*function that transmits the byte received from the parallel port via the serial port
*/
void sendByte(unsigned char input){
SBUF = input; //send data down the serial line
}
//serial interrupt service routine using register bank 2
void serial_isr(void) interrupt 4 using 2{
ES = 0; //disable the serial interrupt to avoid data corruption
if(TI){ //if transmission caused the interrupt,
TI = 0; //clear the trnsmit interrupt flag
}else{
//*not so necessary since it is just a transmitter
if(RI){ //if reception caused the interrupt,
RI = 0; //clear the receive interrupt flag
ES = 1; //enable the serial interrupt
}
}
}
RECEIVER/ROBOT CONTROL MICROCONTROLLER CODE
92
#include <AT89X52.h>
//Define constants
#define TRUE 1
#define FALSE 0
#define FAST 8 //8ms delay
#define MEDIUM 10 //10ms delay
#define SLOW 12 //12ms delay
#define DC_FAST 15 //A t(HIGH) of 15ms in the 50Hz(20ms) pulse. The larger the t(HIGH)
wrt t(LOW), the faster the motor
#define DC_SLOW 5
#define USER_CONTROL 0 //mode - either usercontrol or pick&drop
#define PICK_AND_DROP 1
//declare and initialize global flags
volatile unsigned char command = 0x00; //default command code from user interface - "no action"
/**************************************************************************************
* Function Declarations *
***************************************************************************************/
void gripperOpen(unsigned char mode, unsigned char speed); //Done - but not tested
void gripperClose(unsigned char mode, unsigned char speed); //Done - but not tested
void wristRollCW(unsigned char mode, unsigned char speed); //Done - but not tested
void wristRollCCW(unsigned char mode, unsigned char speed); //Done - but not tested
void shoulderUp(unsigned char mode, unsigned char speed); //Done - but not tested
void shoulderDown(unsigned char mode, unsigned char speed); //Done - but not tested
void wristPitchUp(unsigned char mode, unsigned char speed);//Done - but not tested
void wristPitchDown(unsigned char mode, unsigned char speed); //Done - but not tested
void elbowUp(unsigned char mode, unsigned char speed); //Done - but not tested
void elbowDown(unsigned char mode, unsigned char speed); //Done - but not tested
void baseCW(unsigned char mode, unsigned char speed); //Done - but not tested
void baseCCW(unsigned char mode, unsigned char speed); //Done - but not tested
void pickAndDrop(unsigned char speed, unsigned char times);
void userControl(unsigned char lowNibble); //low nibble of command code which determines which motor to
move
93
void stepCW_1_3_5(unsigned char speed); //Rotate appropriate motor 1 clockwise revolution
void stepCCW_1_3_5(unsigned char speed);
void stepCW_2_4(unsigned char speed);
void stepCCW_2_4(unsigned char speed);
void delay(unsigned char speed);
void stopMotors(void);
void initialize(void); //General initialization function
void reset(void); // open gripper(can check both gripperlimit flag and gripperPos to determine if robot is
holding sth
//and to act appropriately - esp in usercontrol mode,,, raise shoulder ,,, raise elbow ,,,
//rotate base to home position,,,lower wrist ,,, make gripper horizontal,,, close gripper ,,, set
//'isReset' flag and other limit flags,,, initialize currentXXXPos.
/***************************************************************************************
* NOTES/ASSUMPTIONS *
***************************************************************************************
* The stepper motors have 7.5 degrees step angle i.e. 48 steps per rev
*/
void main(){
unsigned char currCommand;
unsigned char lowNibble;
unsigned char highNibble;
initialize();
reset();
while(TRUE){
//This is an endless loop
//Update the currCommand
currCommand = command; //command is updated by the serial interrupt
command = 0x00; //Refresh command
lowNibble = currCommand & 0x0F;
highNibble = currCommand & 0xF0;
if(currCommand == 0x00){
//no action
94
}else if(currCommand == 0xFF){
reset();
}else if(highNibble == 0xF0){
//User control command
userControl(lowNibble);
}else if(highNibble == 0x00){
//Means that the higher nibble is 0000 => pick&drop medium speed
//The lower nibble contains the no. of times and/or mode (i.e. continuous or not)
reset();
if(lowNibble == 0x0B){ //i.e xxxx1011 => continuous mode
while(command != 0x00){
//while stop/reset is not clicked on the UI
pickAndDrop(MEDIUM, 1); //pick and drop once
}
}else{
pickAndDrop(MEDIUM, lowNibble);
}
}else if(highNibble == 0x10){
//Means that the higher nibble is 0001 => pick&drop slow speed
reset();
if(lowNibble == 0x0B){ //i.e xxxx1011 => continuous mode
while(command != 0x00){
//while stop/reset is not clicked on the UI
pickAndDrop(SLOW, 1); //pick and drop once
}
}else{
pickAndDrop(SLOW, lowNibble);
}
}else if(highNibble == 0x20){
//Means that the higher nibble is 0010 => pick&drop fast speed
reset();
if(lowNibble == 0x0B){ //i.e xxxx1011 => continuous mode
while(command != 0x00){
//while 'stop/reset' is not clicked on the GUI
pickAndDrop(FAST, 1); //pick and drop once
}
}else{
95
pickAndDrop(FAST, lowNibble);
}
}else{
//do nothing
}
}
}
/*
* Function called to pick and drop an object
*/
void pickAndDrop(unsigned char speed, unsigned char times){
unsigned char i;
for(i = 0; i < times; i++){
//pick and drop sequence starting at default position
wristPitchUp(PICK_AND_DROP, speed); //raise wrist
gripperOpen(PICK_AND_DROP, speed); //open gripper
elbowDown(PICK_AND_DROP, speed); //lower elbow
gripperClose(PICK_AND_DROP, speed); //close gripper
elbowUp(PICK_AND_DROP, speed); //raise elbow
baseCCW(PICK_AND_DROP, speed); //move base to 'drop' position
elbowDown(PICK_AND_DROP, speed); //lower elbow
gripperOpen(PICK_AND_DROP, speed); //open gripper
elbowUp(PICK_AND_DROP, speed); //raise elbow
baseCW(PICK_AND_DROP, speed); //return base to default position
if(command == 0x00){
//if reset was requested by user
reset();
break;
}
}
}
void userControl(unsigned char lowNibble){
switch(lowNibble){
//Decode the 4 LSBs of command code for info on what to move and how
96
case 1:
//arm up - controls elbow and wrist only
if(currentPitchPos < MAX_WRIST_PITCH_REV){
wristPitchUp(USER_CONTROL, MEDIUM); //raise wrist
}else{
elbowUp(USER_CONTROL, MEDIUM);
}
break;
case 2:
//down - controls elbow and wrist only
if(isWristPitchLimitTripped == FALSE){
wristPitchDown(USER_CONTROL, MEDIUM);
}else{
elbowDown(USER_CONTROL, MEDIUM);
}
break;
case 3:
//left
baseCCW(USER_CONTROL, MEDIUM);
break;
case 4:
//right
baseCW(USER_CONTROL, MEDIUM);
break;
case 5:
//grip
gripperClose(USER_CONTROL, MEDIUM);
break;
case 6:
//release
gripperOpen(USER_CONTROL, MEDIUM);
break;
case 7:
//CWRoll
wristRollCW(USER_CONTROL, MEDIUM);
break;
case 8:
97
//ACWRoll
wristRollCCW(USER_CONTROL, MEDIUM);
break;
default:
//do nothing
}
}
98
APPENDIX C
STEPPER MOTOR DATASHEETS
99
100
101
APPENDIX D
THE ROBOT’S BODY DIAGRAM
THE ROBOT’S BODY DIAGRAM
SPECIFICATIONS TABLE
102
*Note: Some of the dimensions above were adjusted during fabrication.
APPENDIX E
103
J 1 WRIST JOINT MOTOR Stepper motor 87mNm
H 1 ELBOW JOINT MOTOR Stepper motor 155mNm
G 1 SHOULDER JOINT MOTOR Stepper motor 155mNm
F 1 THE GRIPPER STEEL 100×150
E 1 THE WRIST STEEL 250×440
D 1 THE FORE ARM STEEL 250×500
C 1 THE UPPER ARM STEEL 400×500
B 1 THE SHOULDER STEEL 480×550
A 1 THE WAIST STEEL 310×ø710
ITEM

NO OF DESCRIPTION SYMBOL
OF STD
MATERIAL OVERALL
DIMENSION
NOTES
NAME DATE THE DESIGN OF A ROBOT
MANIPULOR ARM
SCALES
1:5
DRAWN BY MGBEMENE C.A. 6:8:91
CHECKED BY DR O. ONUBA
APPROVED BY DR O. ONUBA
DEPARTMENT OF MECHANICAL
ENGINEERING UNN
B.ENG PROJECT REG.№
86/44740
CIRCUIT DIAGRAMS
MOTOR CONTROLLER CIRCUIT
M O T O R _ D I R
M O T O R _ P W M
M O T O R 6
M O T O R 1 _ 2
M O T O R 3 _ 4
M O T O R 5
P 1 . 0 / T 2
1
P 1 . 1 / T 2 E X
2
P 1 . 2
3
P 1 . 3
4
P 1 . 4
5
P 1 . 5 / M O S I
6
P 1 . 6 / M I S O
7
P 1 . 7 / S C K
8
R ST
9
P 3 . 0 / R X D
1 0
P 3 . 1 / T X D
1 1
P 3 . 2 / ~ I N T 0
1 2
P 3 . 3 / ~ I N T 1
1 3
P 3 . 4 / T 0
1 4
P 3 . 5 / T 1
1 5
P 3 . 6 / ~ W R
1 6
P 3 . 7 / ~ R D
1 7
X T A L2
1 8
X T A L1
1 9
G N D
2 0
V C C
4 0
P 0 . 0 / A D 0
3 9
P 0 . 1 / A D 1
3 8
P 0 . 2 / A D 2
3 7
P 0 . 3 / A D 3
3 6
P 0 . 4 / A D 4
3 5
P 0 . 5 / A D 5
3 4
P 0 . 6 / A D 6
3 3
P 0 . 7 / A D 7
3 2
~ E A / V P P
3 1
A L E / ~ P R O G
3 0
~ P S E N
2 9
P 2 . 7 / A 1 5
2 8
P 2 . 6 / A 1 4
2 7
P 2 . 5 / A 1 3
2 6
P 2 . 4 / A 1 2
2 5
P 2 . 3 / A 1 1
2 4
P 2 . 2 / A 1 0
2 3
P 2 . 1 / A 9
2 2
P 2 . 0 / A 8
2 1
U 1
A T 8 9 S 5 2
1 A
1
2 A
2
3 A
3
4 A
4
5 A
5
6 A
6
7 A
7
8 A
8
G N D
9
1 Y
1 8
2 Y
1 7
3 Y
1 6
4 Y
1 5
5 Y
1 4
6 Y
1 3
7 Y
1 2
8 Y
1 1
Vs
1 0
U 3
U L N 2 8 0 3
1 A
1
2 A
2
3 A
3
4 A
4
5 A
5
6 A
6
7 A
7
8 A
8
G N D
9
1 Y
1 8
2 Y
1 7
3 Y
1 6
4 Y
1 5
5 Y
1 4
6 Y
1 3
7 Y
1 2
8 Y
1 1
Vs
1 0
U 5
U L N 2 8 0 3
A 1
B 1
C 1
D 1
A 2
B 2
C 2
D 2
A 3
B 3
C 3
D 3
A 4
B 4
C 4
D 4
5 V
5 V
D 1
Z E N E R ( 1 2 V )
D 2
Z E N E R (1 2 V )
1 2V 5 V
I N 1
5
I N 2
7
E N A
6
O U T 1
2
O U T 2
3
E N B
1 1
O U T 3
1 3
O U T 4
1 4
I N 3
1 0
I N 4
1 2
S E N S A
1
S E N S B
1 5
G N D
8
V S
4
V C C
9
U 8
L 2 9 8
5 V 1 2 V - 2 4 V
A 5
B 5
A 6
B 6
C 1 4 7 u F
R 1
1 0 k
F D B K 1
F D B K 2
F D B K 3
F D B K 4
F D B K 5
F D B K 6
I N T E R R U PT
X 1
2 4 M H z
C 2
3 3 p F C 3
3 3 p F
~ O E
1
D 0
3
D 1
4
D 2
7
D 3
8
D 4
1 3
D 5
1 4
D 6
1 7
D 7
1 8
G N D
1 0
L E
1 1
Q 7
1 9
Q 6
1 6
Q 5
1 5
Q 4
1 2
Q 3
9
Q 2
6
Q 1
5
Q 0
2
V C C
2 0
U 2
7 4 H C 3 7 3
~ O E
1
D 0
3
D 1
4
D 2
7
D 3
8
D 4
1 3
D 5
1 4
D 6
1 7
D 7
1 8
G N D
1 0
L E
1 1
Q 7
1 9
Q 6
1 6
Q 5
1 5
Q 4
1 2
Q 3
9
Q 2
6
Q 1
5
Q 0
2
V C C
2 0
U 4
7 4 H C 3 7 3
C 4
1 0 0 n F
C 5
1 0 0 n F
D 4
1 N 4 0 0 4
D 5
1 N 4 0 0 4
D 7
1 N 4 0 0 4
D 6
1 N 4 0 0 4
B U S Y
R E AD Y
5 V
I R I N P U T
~ O E
1
D 0
3
D 1
4
D 2
7
D 3
8
D 4
1 3
D 5
1 4
D 6
1 7
D 7
1 8
G N D
1 0
L E
1 1
Q 7
1 9
Q 6
1 6
Q 5
1 5
Q 4
1 2
Q 3
9
Q 2
6
Q 1
5
Q 0
2
V C C
2 0
U 6
7 4 H C 3 7 3
1 A
1
2 A
2
3 A
3
4 A
4
5 A
5
6 A
6
7 A
7
8 A
8
G N D
9
1 Y
1 8
2 Y
1 7
3 Y
1 6
4 Y
1 5
5 Y
1 4
6 Y
1 3
7 Y
1 2
8 Y
1 1
Vs
1 0
U 7
U L N 2 8 0 3
D 3
Z E N E R (1 2 V )
C 5
D 5
F i g . 4 . 7 : T h e M o t o r C o n t r o l l e r C i r c u it
THE TRANSMITTER CIRCUIT
104
R
4
D C
7
Q
3
G
N
D
1
V
C
C
8
T R
2
T H
6
C V
5
U 1 5
5 5 5
D 1 1
I R L E D
R 5
1 0 0
Q 3
B C 5 4 7
C 1 1
0 . 1 n F
C 1 0
1 n F
R 4
5 k
R V 15 0 K
D 1 2
I R L E D
X T A L 2
1 8
X T A L 1
1 9
A L E
3 0
E A
3 1
P S E N
2 9
R S T
9
P 0 . 0 / A D 0
3 9
P 0 . 1 / A D 1
3 8
P 0 . 2 / A D 2
3 7
P 0 . 3 / A D 3
3 6
P 0 . 4 / A D 4
3 5
P 0 . 5 / A D 5
3 4
P 0 . 6 / A D 6
3 3
P 0 . 7 / A D 7
3 2
P 1 . 0 / T 2
1
P 1 . 1 / T 2 E X
2
P 1 . 2
3
P 1 . 3
4
P 1 . 4
5
P 1 . 5
6
P 1 . 6
7
P 1 . 7
8
P 3 . 0 / R X D
1 0
P 3 . 1 / T X D
1 1
P 3 . 2 / I N T 0
1 2
P 3 . 3 / I N T 1
1 3
P 3 . 4 / T 0
1 4
P 3 . 7 / R D
1 7
P 3 . 6 / W R
1 6
P 3 . 5 / T 1
1 5
P 2 . 7 / A 1 5
2 8
P 2 . 0 / A 8
2 1
P 2 . 1 / A 9
2 2
P 2 . 2 / A 1 0
2 3
P 2 . 3 / A 1 1
2 4
P 2 . 4 / A 1 2
2 5
P 2 . 5 / A 1 3
2 6
P 2 . 6 / A 1 4
2 7
U 1 3
A T 8 9 S 5 2
( 1 0 2 )
( 1 0 4 )
F i g . 4 . 6 : T h e T r a n s m i t t e r C i r c u i t
D 0
2
D 1
3
D 2
4
D 3
5
D 4
6
D 5
7
D 6
8
D 7
9
Q 0
1 8
Q 1
1 7
Q 2
1 6
Q 3
1 5
Q 4
1 4
Q 5
1 3
Q 6
1 2
Q 7
1 1
O E 1
1
O E 2
1 9
U 1 4
7 4 H C T 5 4 1
D 1 0
L E D - R E D
X 2
C R Y S T A L
C 7
3 3 p F
C 8
3 3 p F
2 4 M H z
C 9
4 7 u F
R 3
1 0 k
( 1 0 V )
V C C = P I N 4 0 , G N D = P I N 2 0
V C C = P I N 2 0
G N D = P I N 1 0
I n i t i a l i z e ( 1 6 )
1
1 4
2
1 5
3
1 6
4
1 7
5
1 8
6
1 9
7
2 0
8
2 1
9
2 2
1 0
2 3
1 1
2 4
1 2
2 5
1 3
J 3
C O N N - D 2 5 F
D 0
2
D 1
3
D 2
4
D 3
5
D 4
6
D 5
7
D 6
8
D 7
9
Q 0
1 8
Q 1
1 7
Q 2
1 6
Q 3
1 5
Q 4
1 4
Q 5
1 3
Q 6
1 2
Q 7
1 1
O E 1
1
O E 2
1 9
U 2 1
7 4 H C T 5 4 1
1
2
3
4
J 4
C O N N - S I L 4
V I
1
V O
3
G
N
D
2
U 2 2
7 8 0 5
POWER SUPPLY CIRCUIT
105
T R 1
T R A N - 2 P 3 S
V I
1
V O
3
G
N
D
2
U 1 7
7 8 1 5
V I
1
V O
3
G
N
D
2
U 1 8
7 8 1 2
V I
1
V O
3
G
N
D
2
U 1 9
7 8 0 5
Q 4
T I P 1 2 5
R 8
1 0 k
C 1 2
1 0 0 u F
B R 1
K B P 2 0 8 6
( 3 5 V )
C 1 3
1 0 0 u F
( 2 5 V )
C 1 4
1 0 0 u F
( 1 6 V )
C 1 5
1 0 0 u F
( 1 0 V )
A
B
C
O U T P U T S P E C I F I C A T I O N S
A : + 1 5 V , 3 . 7 5 A
B : + 1 2 V , 1 . 3 5 A
C : + 5 V , 1 . 3 5 A
( D . C . M o t o r L i n e )
( S t e p p e r M o t o r L i n e )
( I C L i n e )
2 2 0 V / 2 4 0 V
5 0 / 6 0 H z
M A I N S
V I
2
V O
3
G
N
D
1
U 2 0
7 9 1 2
C 1 6
1 0 0 u F
( 3 5 V )
C 1 7
1 0 0 u F
1 6 V
( - v e V o l t a g e L i n e )
D : - 1 2 V , 1 . 3 5 A
1
2
3
4
J 1
C O N N - S I L 4
1
2
3
4
J 2
C O N N - S I L 4
D
G N D
F i g . 4 . 9 : T h e P o w e r S u p p l y U n it
THE INTERRUPT CONTROLLER CIRCUIT
106
1
2
3
U 9 : A
7 4 H C 0 8
4
5
6
U 9 : B
7 4 H C 0 8
9
1 0
8
U 9 : C
7 4 H C 0 8
1 2
1 3
1 1
U 9 : D
7 4 H C 0 8
1
2
3
U 1 0 : A
7 4 H C 0 8
4
5
6
U 1 0 : B
7 4 H C 0 8
F D B K 6 ( P 1 . 6 ) F D B K 5 ( P 1 . 5 ) F D B K 4 ( P 1 . 4 ) F D B K 3 ( P 1 . 3 ) F D B K 2 ( P 1 . 1 ) F D B K 1 ( P 1 . 0 )
F R O M E N C O D E R 1 F R O M E N C O D E R 2 F R O M E N C O D E R 3 F R O M E N C O D E R 4 F R O M E N C O D E R 5 F R O M E N C O D E R 6
R
4
D C
7
Q
3
G
N
D
1
V
C
C
8
T R
2
T H
6
C V
5
U 1 1
N E 5 5 5
R 2
1 k
C 6
1 0 u F
1 2
U 1 2 : A
7 4 H C 1 4
I N T E R R U P T ( P 3 . 2 )
F i g . 4 . 8 : T h e I n t e r r u p t C o n t r o l l e r C i r c u it
107

Sign up to vote on this title
UsefulNot useful