Design and Remote Control of A Gantry Mechanism For The Scara Robot
Design and Remote Control of A Gantry Mechanism For The Scara Robot
Design and Remote Control of A Gantry Mechanism For The Scara Robot
A Thesis
by
SURINDER PAL
MASTER OF SCIENCE
August 2007
A Thesis
by
SURINDER PAL
MASTER OF SCIENCE
Approved by:
August 2007
ABSTRACT
Remote experimentation and control have led researchers to develop new technologies
as well as implement existing techniques. The multidisciplinary nature of research in
electromechanical systems has led to the synergy of mechanical engineering, electrical
engineering and computer science. This work describes the design of a model of a
Gantry Mechanism, which maneuvers a web-cam. The user controls virtually the
position of end-effecter of the Gantry Mechanism using a Graphical User Interface. The
GUI is accessed over the Internet. In order to reduce the unbalanced vibrations of the
Gantry Mechanism, we investigate the development of an algorithm of input shaping. A
model of the Gantry Mechanism is built, and it is controlled over the Internet to view
experimentation of the SCARA Robot. The system performance is studied by comparing
the inputs such as distances and angles with outputs, and methods to improve the
performance are suggested.
iv
DEDICATION
To my parents
v
ACKNOWLEDGMENTS
I would like to thank my committee chair, Dr. Hsieh, and my committee members, Dr.
Suh and Dr. Chan, for their guidance and support throughout the course of this research.
Thanks also to my friends and colleagues and the department faculty and staff for
making my time at Texas A&M University a great experience. I also want to extend my
gratitude to Mr. Frank and Mr. Butch for providing help in the workshop.
Finally, thanks to my mother and brother for their encouragement.
vi
NOMENCLATURE
TABLE OF CONTENTS
Page
ABSTRACT …………………………………………………..……………………. iii
DEDICATION ……………………………………………………………………... iv
ACKNOWLEDGMENTS.………………………………………………………….. v
NOMENCLATURE…….………………………………………………………….. vi
TABLE OF CONTENTS ………………………………………………………….. vii
LIST OF FIGURES ……….……………………………………………………….. ix
LIST OF TABLES ….…….……………………………………………………….. x
CHAPTER
I INTRODUCTION ………………………………………………… 1
Objective ………...………………………………………………… 1
Research tasks……...………………………………………………… 2
Organization of the thesis………………………………………… 3
II LITERATURE REVIEW………………………………………….. 4
Web-based control survey…………………………………………. 4
Summary of literature review. ……………………………………. 12
Selection of software and hardware for control over Internet……… 12
Selection of mechanism…………………………………………… 14
III DESIGN OF GANTRY MECHANISM…………………………... 18
Introduction…………………..……………………………………. 18
Design and selection of mechanical parts………………………… 18
Design and selection of electrical parts…………………………... 26
IV CONTROL OF GANTRY MECHANISM AND SCARA ROBOT.. 32
Introduction…………………………………………………………. 32
Interfaces of the PIC microcontroller...……..………………………. 32
Feedback control of Gantry Mechanism……………………………. 34
Over-distance and over-angle avoidance………...…………………. 34
Control of the Gantry Mechanism over the Internet…………………… 37
Formulation of position, rotation and direction of Gantry Mechanism.. 38
Vibration control of the Gantry Mechanism…………………………. 40
viii
CHAPTER Page
V EVALUATION OF RESULTS……………………………………... 45
Sample calculation of position, direction and rotation of
Gantry Mechanism…………………………………………………. 45
Error between input parameters and measured parameters…………. 45
Calculation for vibration control …………………………………….. 50
VI SUMMARY AND CONCLUSIONS……………………………….. 52
Summary……………………………………………………………. 52
Future work………………………………………………………… 52
Conclusion………………………………………………………… 53
REFERENCES……………………………………………………………………… 54
APPENDIX…………………………………………………………………………. 56
VITA…………………………………………………………………………. 61
ix
LIST OF FIGURES
FIGURE Page
1.1 Gantry Mechanism...……………………………………………… 2
2.1 Block diagram of embedded control system [16]..……………… 5
2.2 Block diagram of proposed architecture of control Gantry
Mechanism using the Internet…………………………………….. 13
2.3 Cylindrical Mechanism…………………………………………… 15
3.1 Top view of Gantry Mechanism showing X and Y degrees
of freedom………………………………………………………… 19
3.2 Side view of Gantry Mechanism showing Z and θ degrees
of freedom………………………………………………………… 20
3.3 Belt and pulley arrangement……………………………………… 21
3.4 Shaft loading for Y-motion……………………………………… 24
3.5 Loading due to webcam……...…………………………………… 25
3.6 Torque vs speed of motor…...………………………….………… 27
3.7 Pin-outs of SN75441ONE…...………………………….………… 30
4.1 Interfaces of control of Gantry Mechanism…………….………… 32
4.2 Interfaces of PIC microcontroller……………………….………… 33
4.3 Feedback loop of Gantry Mechanism……………………...……… 35
4.4 Over-distance and over-angle avoidance circuit diagram ....……… 36
4.5 Programming software of client, server and PIC-microcontroller… 37
4.6 Graphic User Interface of Gantry Mechanism……………...……… 38
4.7 Superposition of two impulse responses………………...…………. 41
4.8 Spring-dashpot modal of Gantry Mechanism (Y-direction) ………. 43
5.1 Input distance vs error (X-direction) ……………………………. 48
5.2 Input distance vs error (Y-direction) ……………………………. 49
5.3 Input distance vs error (Z-direction) ……………………………. 49
5.4 Input angle vs error (θ-direction) ………………………………… 50
5.5 Impulse responses of sample calculation
(Gantry Mechanism: Y-motion) ………………...…………………. 51
x
LIST OF TABLES
TABLE Page
CHAPTER I
INTRODUCTION
Objective
The objective of this research is to survey the field of web-based control, and to design a
Gantry mechanism and development of its control over the Internet for remote
experimentation of SCARA robot. The Gantry Mechanism is used to observe the
working space of the SCARA robot through the Internet. A web CAM mounted on the
Gantry mechanism provides a three-dimensional view of Adept manipulator and its work
space. A web-based application with Graphic User Interface (GUI) is developed for user
to remotely control the mechanism that drives the web CAM. In addition, Algorithms
are explored to reduce the vibration effect on the web CAM so that a steady image of
working space is presented on the client side. The 3D view provided by the web CAM
driven by the Gantry Mechanism enhances the user’s visualization of working area,
object, and robot working in the real time environment.
Research tasks
The research task of designing the Gantry-Mechanism and implementation of its web-
based control has been divided in three tasks.
The first task is to design and build a Gantry Mechanism. A model of the actual
mechanism is built (Fig. 1.1). The mechanism has four degrees of freedom: three along
the coordinate axis X, Y and Z direction, and one rotation in the X-Y plane. The
mechanism carries a camera and maneuvers it in the working space. The mechanical
parts comprise of timing belt-pulley drives, screw-nut arrangements and the transmission
shafts. The electrical parts are motors, sensors, motor drivers, logic gates and PIC
microcontroller.
The position and angle of view of the camera is controlled over the Internet to view the
workspace and manipulator. The user virtually controls the movement of the mechanism
using a Graphical User Interface on the client side. The user selects coordinates of the
Gantry Mechanism by computer mouse and keyboard. After receiving the coordinates
from the client, the server generates the commands for the PIC microcontroller, and
sends them through serial cable.
3
The motive of studying vibration control is to reduce the unbalanced vibrations of the
Gantry Mechanism. The working space of actual mechanism is about 2.5 m x 1.9 m x
1.5 m. The accelerated mass produces vibrations of hanging web-cam. The vibrations
can damage the surrounding and hit the Adept manipulator. In this research, a scaled
modal of actual web-cam mechanism is built. However, a study of vibration control is
made and methods of vibration control are explored for actual implementation.
CHAPTER II
LITERATURE REVIEW
This chapter performs the literature survey of web-based control and seeks the solutions
for the tasks proposed. Based on the survey of web-based control systems, a suitable
control system comprising of interfaces of various software and hardware has been
selected. A suitable mechanism is also selected after comparison of two proposed
mechanisms. A survey of vibration control to improve the mechanism stability is
performed, and algorithm has been developed to control the vibration.
Web-browser
Embedded
Internet Programmable System
Controller
The issue of time delay is not only encountered in process control but many
other network controlled devices experience the same. In order to minimize the time
delay so that the events happen at precise times, in [2] a need of a real time operating
environment is suggested. The authors have proposed a real-time operating environment
based on RTAI (Real Time Application Interface) 24.1.2 with Redhat Linux 7.3. It is
also suggested that use of UDP instead of TCP/IP gives better performance.
Another approach to deal with the problems of internet transmission delays,
delay jitter and not-guaranteed bandwidth availability has been presented in [3]. It
involves the implementation of a new trinomial protocol for data transmission instead of
TCP and UDP. The comparison of TCP, UDP and proposed protocol with respect to
delay jitter and packet losses provides good results. Mobile Agent technology [4] is an
approach to cope up with the limitations of restricted bandwidth. A Mobile Agent, a
software program, is best suited to applications characterized by asynchronous
transactions, low-bandwidth, high latency, remote information retrieval, multi-
processing, or distributed task processing features.
In [5], a virtual engineering lab is established using LAN, dialup modem and ISP
for data transmission over internet. A video camera is used for remote viewing. The time
delay in the performance is caused by slow dialup networking. The experiment also
sends large sized graphical bitmap images, which adds to the slow process. However,
with the development in technology high-speed and reliable Internet connection
6
technologies such as ISDN, cable, and DSL alleviate this problem. In graphical
interfaces, instead of sending a large bitmap of the entire screen a local copy of the
graphical screen can be updated by sending only the required data. This can be
implemented by embedding the code for the remote graphical user interface panels in the
local Web server using Java language applets. The Java applets are automatically sent to
the remote site and are launched by the Web browser. Further, real-time communication
requires only data and status information transfers, substantially improving system
response time.
Researchers have always been in search of better solutions with the development
of technology. In order to, further, solve the problem of transmission of large sized
image file, another concept of Wise-Shop Floor (A Web-based integrated Sensor-driven
e-shop Floor) is presented in [6, 7]. In this approach Java 3D graphics and sensors on the
device are used to view the device virtually. The device can be represented by a scene
graph-based Java-3D model as an applet. The applet remains alive with passing of low
volume sensor data and control commands. It also has the flexibility of visualization by
walk through and fly-around. This concept is implemented to control CNC machine in
[8]. Implementation of Java 3D as compared to other 3D visualizations in [8] is more
appropriate as it does not require any other software to be installed on the client browser.
Internet Telerobotics is emerging field in the decade of web-based control. There
are two generations of internet robotics. Mercury Project (1994) was one of the earliest
outcomes of telerobotics over internet. The first generation was mainly based on direct
control of robotic manipulators and simple mobile robots. These robots have no local
intelligence and they operate in well-structured environment with little uncertainty [9].
In direct control mode the robot behaves as a puppet, and is operated only by the user
who understands the robot’s characteristics. Direct control via the Intemet with inherent
high latency, low bandwidth, uncertain time delay and packet losses, is not suitable for
robotic systems. However, when the robot fails to function and requires remote teaching,
direct control is important [10].
7
In [11], the authors presented the control of robotic manipulator using a web
server and CGI technology. But to provide robust control they suggested the use of
client-server application in Java in their open-ended project.
In contrast to the first generation, the second generation of robotics has recently
begun. This focuses the supervisory control of autonomous robots. These robots cope
with uncertainty and work in dynamic world [9]. Robots work as a service man to do
some specific works. The client sends only high-level command to the server. The robot
performs the task with built in mechanisms and local intelligence. For example, in
mobile robots, robot behavior such as collision avoidance, path planning, self-
referencing, object recognition etc. is implemented. With local intelligence the control
system can avoid too many communication details through internet [10].
Unfortunately, most of supervisory controls involve lack of adequate human-
robot interaction. The control interface involves limited control methods such as a mouse
to click a map. The operator (client) can issue a very high-level instructions and it is
difficult to obtain robot’s running status or information about the events it has
encountered. The robot often needs to know some environmental knowledge in advance
for path planning or self-localization. Therefore, it is difficult to be applied in the
unknown dynamic environment. The typical examples include Xavior (an office-
exploring robot at CMU), RHINO and MINERVA (museum tour-guide robots) and
Mars lander [9].
Researchers attempt to make the human-robot interaction more active. In [9], the
authors have explored two methods of active supervisory control by tele-commanding
using joystick commands (navigation keyboard keys) and advanced linguistic
commands, such as MOVE, TURN, WANDER, GOTOEND and COORDINATE. A
similar approach in [10] has been implemented using supervisory behavior control
mode. The experimental results conducted on a mobile robot strengthens the use of
supervisory control over direct control mode in terms of efficiency, operating
environment, complex task handling, and control capability.
8
Further development in the field led the researchers in [12] to give another web-
based controlled robot, UBROBO. While Xavior, RHINO and MINERVA operate in
known environments, it works in unknown environment using camera images.
Real-Time web-based control does not limit to control of a single device but its
application is expanded to distributed control systems where a number of different
devices can be controlled over the internet. Real-Time distributed control systems play
an important role in industries. These systems are used to monitor and control industrial
processes, telecommunication systems, manufacturing systems, robots, and commercial
on-line transaction processing systems. There are so many different real-time systems
and distributed control systems in the market. They run different operating systems and
software applications, which makes them communicate with each other over the internet.
In order to integrate the heterogeneous applications, fundamental technologies:
CORBA and DCOM are suggested in [13]. Both control functionality and data are
distributed in WDCS. CORBA can be used to provide a platform-independent, language-
independent architecture for Writing distributed, object- oriented applications. DCOM
runs only on Microsoft operating system, there is a concern if COMA is a more portable
system. CORBA provides network transparency and Java provides implementation
transparency. Together they allow various objects communicate under all circumstances
on the internet. In order to make communication between devices which use different
languages a native resource accessing interface JNI is used in [13]. JNI enables CORBA
objects written in Java interoperate with drivers or applications written in other
programming languages easily.
An appropriate network is required in distributed control systems to establish
communication. Ethernet is best suited for this. In order to ensure the real time
performance some measures of a suitable Ethernet are outlined in [14]. These include
adoption of Ethernet Switch, Full Duplex Communication Mode, VLAN and Quality of
Service. A comparative study of different approaches in web-based control has been
carried out to select a suitable architecture (Table 2.1).
Table 2.1 Comparative study of different approaches in web-based control
1 Embedded controller in Process Temperature control of a tube Large time delay due to restricted Applicable to relatively slow
control bandwidth and network transmission processes. Possible solution is using
large bandwidth and network traffic
control.
2 Real-Time Operating Control of mag-lav ball Time delay Applicable in Distributed control
Environment using RTAI 24.1.2 systems
with Redhat Linux 7.3, UDP
3 Mobile agent Manufacturing and machine Decreases time delay by reducing Applicable to asynchronous
conditioning network traffic transactions, low-bandwidth, high
latency and distributed systems
4 Trinomial Protocol in place of Networking Decreases time delay Applicable to solve problems of
TCP and UDP internet transmission delays, delay
jitter and not-guaranteed bandwidth
5 Wise Shop Floor CNC Machine Tool, Tripod Time delay and network traffic Reduces network traffic and
using Sensor driven Java 3D Manipulator increase system performance in
realization communication by sending of
commands and data instead of large
images
9
Table 2.1 continued
7 Ethernet using Full Duplex Distributed Control System Real-Time Performance, Network Full bandwidth available to all
Communication Mode, VLAN, Traffic equipments due to switch, so
embedded server. reduces network traffic
8 CORBA and COM Distributed Control System Real-Time Performance, Network To provide a platform-independent,
Transparency language-independent architecture
9 Space Browser: Internet and A flying space browser (tele-mobot) Real-time performance of object
wireless transmission, camera, detection and avoidance.
microphone, speaker
10 Robotic manipulator (Web- Control of Autonomous Robots Robust control using all the system
server and CGI, Java and Web- architecture in Java
cam )
11 Multi-sensor based control of Three-wheeled mobile robot with 20 Efficiency, operating environment, Behavior control superior to direct
Autonomous Robots. CGI for tactile and 16 sonar sensors, CCD complex task handling and control control
wireless transmission and Fuzzy- Camera, wireless communication, capability
logic for navigation algorithm.
10
Table 2.1 continued
12 Java server and image feedback Ceiling Camera, a remote robot, Object avoidance and path planning. Use of better encoders, sensors and
by camera of mobile robot in internet interface and RF wireless Time delay in transmitting images. motors can improve object detection
unknown environment. Web- interface, IR sensors for object and avoidance as well as smooth
server path planning and robot detection and wheel encoding, starting and stopping.
obstacle detection. PID
controller for straight line path.
11
12
Web-based control has been discussed with respect to time delay. Low bandwidth and
network traffic are the main sources of time delay. Researchers have devised methods of
reducing time delays. Trinomial protocol and mobile agent are software specific
programs. They aid in increasing the network speed thereby reducing the network traffic
and hence time delay. Sending data over the Internet in place of images further reduces
traffic. Wise shop floor implements the communication using sensor driven data and
Java3D technology.
Virtual engineering lab experiment uses Labview, datasockets, camera and dialup
connection. The dialup connection introduces time delay. Another experiment on robotic
manipulator uses web-cam and cgi script on server to capture the images and transmit
them on internet. The webcam images are sent from the server along with other data. It
increases the traffic and hence time delay. In supervisory control of autonomous robots,
the server has local intelligence of robots. The client sends the high level commands
using joy-stick.
In this problem the communication line comprises of three nodes. These are client,
server and working object. The client side interaction is accomplished using a GUI
13
webpage (Fig. 2.2). HTML is used to create web-page and Javascript to write code for
movement of graphics and calculations on client side.
RS232
Gantry PIC-
Web-cam Mechanism microcontroller
(Hex file)
The Apache server interacts with the client and working object. Executable files
are written in CGI language using in Visual Basic. The server can run these file to
communicate with the Gantry Mechanism. Commands written in CGI are sent to the
flexible webcam mechanism.
Selection of mechanism
The Adept manipulator has four degrees of freedom upto the end-effecter. Three are
rotational in the X-Y plane and the fourth is translational along the z-axis. The rotational
motion covers a radius of 800mm, and the vertical stroke is of length 203 mm (approx).
The working table has dimensions of 1235 x 1835. A border of 300 mm is kept to
accommodate the mechanism and the working space. The following is considered to
calculate the maneuvering space of mechanism:
a) The vertical distance between the top of table and the base of robot stroke is 400
mm. The stroke length is 203 mm. Therefore, the z-axis movement of mechanism can be
between 203 and 400mm to view the end-effecter and the object.
b) The robot has a working radius of 800mm. The mechanism can enter this space
based on figuring out available space using sensor feedback. However, the web-cam can
be held in the border area around the table because in this area it can give good quality
of image as well as viewing envelope.
c) Incorporation of a rotational motion of the camera will let the user view the space at
a point without moving it to another point.
Proposed Mechanisms
Ceiling
Rotation (θ)
Translational
(z)
Rotation (α)
Web-cam
Fig.-2.3 Cylindrical Mechanism
16
The analysis of different parameters (Table 2.2) leads to the selection of the
Gantry Mechanism for this application. It has more rigidity because of four supports
while cylindrical mechanism is supported at the center. More rigid structure leads to less
vibration problems and camera can be moved precisely to the specified location. The
Gantry mechanism has four degrees of freedom, which makes it more flexible, and also
enables it to cover more working space. The following chapters discuss the design,
implementation, control and evaluation of performance of the Gantry mechanism.
Table 2.2 Comparative study of Gantry Mechanism and Cylindrical Mechanism
4 Complexity X, Y , Z motion combined with rotation, Two rotations and one translational
so comparable complexity, but more motions, so comparable complexity,
parts but less parts
5 Space envelope Covers much space than cylindrical The space is restricted by fixed radial
distance
6 Control Needs to control more control Less control parameters needed to be
parameters as four dof’s controlled
7 Critical part Z-axis movement. Nut-screw θ-rotation and Z-axis rotation.
arrangement.
8 Vibration Less More, because of cantilever nature of
θ−motion
17
18
CHAPTER III
Introduction
The basis of design of the Gantry mechanism is the gantry robot, also known as a
Cartesian robot. A gantry robot contains a minimum of three elements of motion, each of
which represents a linear motion in a single direction. These motions are arranged to be
perpendicular to each other and are typically labeled X, Y, and Z. X and Y are located in
the horizontal plane and Z is vertical. The interior of this box is referred to as the
working envelope, the space in which the robot can move things anywhere.
The Gantry Mechanism designed, in this thesis, has one more degree of freedom,
which is rotation in the X-Y plane. The fourth degree of freedom enables the user to
horizontally observe the workspace by rotating the end-effecter.
The motion in X and Y direction is achieved by power transmission through timing belts
and pulleys assemblies (Fig. 3.1), while Z-direction motion comprise of a threaded rod
and nut arrangement (Fig. 3.2). The motor for θ-direction motion directly couples with a
shaft, the other end of which carries the camera.
Timing belts and pulleys provide synchronized motion. The grooves of timing
belts mate with the teeth on the timing pulleys, which make the drive positive. The slip
between the belt and the pulley is extremely minor, which ensures that the driven pulley
is always rotating at a fixed speed ratio to the driving pulley. These belts have an
operating efficiency of about 98% and they can operate successfully between 8000 and
12000 hrs.
Belt design procedure, based on power calculations, has following steps [16]:
1) The required driven power is calculated from the driven speed and the
maximum driven torque required (including inertia load, shock loads, friction, etc). A
19
service factor is obtained from the information on the driver, the driven equipment and
the operating period.
2) A design power is obtained based from the product of the driven power
required and the service factor.
Design Power = Driven Power x Service Factor
3) Based on design power a belt section is initially selected. A basic power for
the belt is calculated, assuming pulley diameters, using the Table 3.1.
Fig. 3.2 Side view of Gantry Mechanism showing Z and θ degrees of freedom
The design and selection of parts has been performed starting from θ-motion.
Subsequently, calculations for Z-motion, Y-motion and X-motion are made. A specimen
calculation is presented in Appendix-A. The inputs and results are shown in Table 3.2.
Table 3.2 Calculation of timing belts and pulleys dimensions
Linear Pulley Dia. Load (mass Factor of Pdesign (kW) PBasic Width Belt Width Pulley Pitch (Belt
Velocity (assumed) kg) safety (kW) factor (mm) PCD and Pulley,
(mm/s) (mm) (mm) mm)
X-Motion 100 20 2 2 1.43 x 10-3 5.13 x 10-3 3.58 9.5 16.2 5.08
22
23
Shafts
The shafts, which transmit power in the X-direction, are designed for torsional
loading. Diameter of a shaft in torsion is given by the following relation:
1
⎡16T ⎤ 3
d=⎢ ⎥ x1000 …………………………..………………………… (3.1)
⎣ πτ ⎦
where, d = diameter of shaft (mm);
T = Torque (0.1197Nm, Appendix-C2);
τ = Allowable shear stress;
= 260Mpa (Maximum Shear Stress Theory, τall = 0.5Sy, Sy = 520 MPa);
d = (16 x 0.1197 / (pi x 260 x 106))(1/3)x1000;
= 1.3285 mm;
Selected shaft dia = 6 mm.
The shafts for Y-direction undergo bending due to the sliding assembly for Z and θ-
motion. Diameter of a shaft in bending is given by the following relation:
1
⎡ 32M ⎤ 3
d=⎢ ⎥ x1000 ……………………….…..……………………… (3.2)
⎣ πσ ⎦
where, d = diameter of shaft (mm);
M = Bending Moment (Nm);
σ = Allowable bending stress;
= 260Mpa (Maximum Normal Stress Theory and Von Mises Theory, σall = Sut,
Sut = 860 MPa);
Bending Moment, M = Px L ( 2) .
Maximum bending stress in the shafts will happen when the hanging mass (m ) is
in the middle of the shaft (Fig. 3.4).
24
L/2
L
Px L (L
2
− b2 )
3
2
L2 − b 2
x=
3
where, I = area moment of inertia of the cross-section (πd4/64);
I = 6.3617e-011 m4;
δmax = 3.7541e-004 mm;
x = L/2.
The deflection is very small; therefore, the Carriage-2 can slide over the shafts
without shaft deflection constraint.
25
The shaft for the θ-direction is also designed for torsional loading. Diameter of a
shaft in torsion is given by the relation 3.1.
T = μ x P x r …………..(Fig. 3.5)
where, μ = Coefficient of static friction (0.61);
P = mw x g;
mw = mass of web-cam ( 1lb = 0.454 kg);
r = mean radius of loading;
Web-cam
The threaded rod and hex nuts of thread size 5/16 – 24 are selected. Pitch of
threads is 24 threads per inch.
DC motors
Power required to drive a DC motor is the product of current and voltage. This power is
transmitted through a motor-gearbox assembly to the body to be moved. The gearbox
reduces the speed and increases the torque at its output shaft. The torque generated by a
motor is directly proportional to the current passing through it.
Mo = kM x I ------------------------------------------- (3.4)
where, Mo = Torque produced;
kM = torque constant;
I = current.
A constant current produces a constant torque regardless of voltage. Input
voltage is given by
V = R x I + kw x n ----------------------------------------- (3.5)
where, V = input voltage;
kw = speed constant;
I = current;
R = resistance of winding;
n = motor shaft speed.
At constant voltage output speed and torque are inversely proportional. Increasing the
load torque decreases the speed and vice-versa (Fig. 3.6).
τ = τs – (τs / ωn) ω −−−−−−−−−−−−−−−−−−−−−−− (3.6)
ω = (τs – τ) ωn/ τs −−−−−−−−−−−−−−−−−−−−−−− (3.7)
where, τ = motor torque;
ω = motor speed;
τs = stall torque (no-load torque);
27
ωn = no-load speed.
ωn
Slope = τs / ωn
τs
τ
29
30
Sensors
Optical encoders feed back the position signals and angle signals from the output shafts
to the PIC microcontroller. For θ-motion, one optical encoder of bore size of 4mm, and
for X, Y and Z motion, three optical encoders of bore size 6mm, are selected.
H-Bridge motor controller
The motors require bi-directional motion control to execute motion in the
forward and reverse direction. A motor driver SN75441, also known as H-Bridge, drives
two motors independently (Fig. 3.7). The logic table (Table 3.4) shows the state of pins
for clockwise and anticlockwise rotation of the motors.
As an example, for one motor, three output pins of PIC16F877 send signals to
pins 1, 2 and 7 of H-bridge. Input voltage for the motors is supplied at pin 8, while input
voltage of 5V is supplied to the H-bridge. The output voltage to the motor is taken from
pins 3 and 6. Pins 4 and 5 are grounded. Switching between the states of pins 1A and 2A
enables the H-bridge to run the motor in clockwise and anticlockwise direction.
31
PIC microcontroller
A boot loader software program runs on the PIC microcontroller. The bootloader
program records the incoming data into the program area of the PIC microcontroller
memory. The purpose of a boot loader is to load programs onto a micro-controller over a
serial line, and also helps in loading programs much faster. A software program, called
ICProg, downloads the bootloader hex file to the PIC microcontroller through a serial
port and PIC-PG2 hardware.
CHAPTER IV
Introduction
Control of the Gantry Mechanism involves two steps. In the first step, a feedback loop is
built by making interfaces of PIC micro-controller with the server, the actuators and the
sensors. In the second step, the communication between the client and the server is
made, which provide reference command to the feedback loop of the Gantry Mechanism
(Fig. 4.1).
RS232 Motor
Server PIC
Microcontrol Web-cam
Gantry
Mechanism
Internet
Sensor
Feedback Loop
Client
The server and PIC16F877 are connected using RS-232 (DB-9) cable, which is 9-pin
male-to-female cable. The pin voltage range of RS-232 is –12V to +12V. The PIC
33
micro-controller requires low voltage (+5V). Therefore, RS-232 cable can not be
connected directly to the PIC microcontroller.
PIC micro-controller pins provide low currents (20mA), which is not sufficient to meet
the output torque requirement of motor. H-Bridge chip is used to drive the motors at
high currents as well as bi-directional motion control.
Optical encoders are used to measure the actual positions of the Gantry Mechanism. The
optical disc of the sensor is mounted on the output shaft. When the disc rotates along
with the shaft, the sensor produces pulses of high and low voltages at the output channel.
These pulses are counted to determine the actual speed and the position of the shaft (Fig.
4.2).
The feedback loop consists of the PIC microcontroller, the H-Bridge, the motors and the
encoders (Fig. 4.3). The PIC microcontroller receives the parameters from the server.
The PIC sends signals to H-Bridge which turns the motors. The encoders mounted on the
output shafts feed back the signal. This signal is used to control the voltage input of the
motors. A specimen calculation of position, direction and rotation control is outlined in
chapter V.
The movements of carriages in X, Y Z and θ directions can cause hitting of ends, when
the Gantry Mechanism travel over distances and over angle. Two methods are
implemented to avoid the over travel. Firstly, the Javascript program is so written that
the user can not enter distances and angles outside the limits. Secondly, a logic circuit,
which enables push-buttons when they are hit, is also designed (Fig. 4.4). The push
button makes the respective pin of OR gate to logic zero. The output of OR logic, which
is connected to the PIC microcontroller, switches its state. The PIC microcontroller
detects the state and stops the motor.
35
Electronic Actuators
PC (Server) Circuit (PIC) (DC Motors)
Sensors
Gantry
(Optical
Mechanism
Encoders)
(Output shaft)
Feedback Loop
+5V
Pushbutton (End-1) X-direction
Pushbutton (End-2)
+5V To PIC
Pushbutton (End-1)
Z-direction
Pushbutton (End-2)
+5V
Pushbutton
Pushbutton(End-1)
(End-2)
θ-direction
Pushbutton (End-2)
Quad 2-input 7432
(OR gates)
The user sends commands to the server over the internet. The server processes these
commands and prepares the commands for the PIC microcontroller. The various
programming languages used to develop programs and interfaces are shown in Fig. 4.5.
Design of web-page
A Graphic User Interface is designed to make interaction between the user and the web-
browser. The user selects the coordinates of the Gantry Mechanism either moving the
sliders of GUI using a computer mouse, or entering numeric data in the text boxes using
a computer keyboard (Fig. 4.6). The graphic images are drawn in Microsoft Paint.
Dynamic HTML, HTML and Javascript language, code is written to control the
movement of sliders. The slider-1 moves in X-direction, and the carriage-2 slides over
the slider-1 and makes Y-direction motion. The carriage4 slides over slider-3 and makes
motion in Z-direction. Rotation in θ-direction is achieved by rotating the yellow circular
slider inside the green area.
Apache server, installed on the server, communicates in the real time mode. After
receiving the user request, the server sends the GUI to the web-browser. The user selects
the parameters in the GUI, and clicks the button named “Move”. The CGI executable
file, stored in the cgi-bin directory of the server, processes the HTML form and prepares
38
input commands for the PIC microcontroller. The CGI executable files are programmed
using Visual Basic. The CGI file then opens the port, and sends data to the PIC
microcontroller circuit.
The server receives the distances and angle values from the webpage when the user
clicks “MOVE” button. The Visual Basic program on the server calculates the number
of counts, and determines the direction of motion. The number of counts and the
direction are sent to the PIC-microcontroller.
39
Many applications of control design require precise positioning of an object and fast
point to point movement. Reduction in time of movement requires reduction of inertia,
which results low frequency dynamics [15]. Precise placement requires that the
vibration of the object should be zero or close to zero. Feedback controllers are designed
to minimize the error between the reference command and the output. Input shaping of
the reference command is another technique of reducing the unbalanced vibrations.
In order to produce such responses amplitude of impulses and time between the impulses
are required. The two responses can be represented as
A1ωn
y1 (t ) = e−σ (t −t1 ) sin( wd (t − t1 )) = B1 sin( wd t − wd t1 )) = B1 sin( wd t − φ1 ))
1− ζ 2
A2ωn
y2 (t ) = e−σ ( t −t2 ) sin( wd (t − t2 )) = B2 sin( wd t − wd t2 )) = B2 sin( wd t − φ2 ))
1− ζ 2
----------------------------------- (4.6)
42
The amplitude of the resultant response Ares is zero if both the terms in the square root
are zero.
B1 cos(φ1 ) + B2 cos(φ2 ) = 0
B1 sin(φ1 )) + B2 sin(φ2 ) = 0
B1 cos(ωd t1 ) + B2 cos(ωd t2 ) = 0
ωn
e−σ t [ A1eσ t1 cos( wd t1 ) + A2 eσ t2 cos( wd t2 )] = 0
1− ζ 2
ωn
e−σ t [ A1eσ t1 sin( wd t1 ) + A2 eσ t2 sin( wd t2 )] = 0
1− ζ 2
nπ nπ
t2 = =
wd wn 1 − ζ 2
For n=1,
π π
t2 = = , and t1 =0 ----------------------------------- (4.10)
wd wn 1 − ζ 2
The amplitude constraint to obtain a normalized solution requires that the sum of
amplitudes is one [15].
A1 + A2 = 1 --------------------------------- (4.11)
The solution of equations 4.7, 4.9 and 4.11 give A1 and A2.
eσ t2
A1 = --------------------------------- (4.12)
1 + eσ t2
1
A2 = --------------------------------- (4.13)
1 + eσ t2
43
A step input is convolved with the impulse amplitudes (equations 4.12 and 4.13) at time
interval given by equation 4.10.
The Gantry Mechanism has belt and pulley drive in X and Y direction motion.
Considering Y-direction motion, the model is represented as a combination of spring and
dashpot arrangement (Fig. 4.8)
Equation of motion of the model is given by
.. .
m y + c y + ky = F --------------------------------- (4.14)
T kt iGR
F= = --------------------------------- (4.15)
r r
where, F = force due to torque produced by motor;
T = kt iGR , Torque produced by motor;
kt = torque constant;
i = current;
GR= gear ratio;
r = radius of pulley.
y
k
F
m
.. . kt GR
m y + c y + ky = i --------------------------------- (4.16)
r
Laplace transform of equation 4.16, with zero initial conditions, is given by
Y ( s) kt GR
= --------------------------------- (4.17)
I ( s ) r (ms 2 + cs + k )
Comparing equation 4.17 with equation 4.1, the response is given as
y (t ) A ωn
= 2 e −σωn (t −ti ) sin( wd (t − ti )) --------------------------------- (4.18)
1(t ) ωn 1 − ζ 2
kt GR
where, A = Ai ;
r
k
ωn = ;
m
c
ζ = .
2 km
45
CHAPTER V
EVALUATION OF RESULTS
In this chapter, calculations of position of Gantry Mechanism have been performed. The
actual measurements of positions and angle, and input parameters are compared. Further
calculations are performed to generate input shape commands to reduce unbalanced
vibrations. Two impulse commands have been considered to obtain amplitudes and time
intervals. These values are convolved with input unshaped commands.
The values of current position of Gantry Mechanism are: xc = 100, yc = 100, zc = 30,
and θc = 90. The previous position values of Gantry Mechanism are: xp = 0, yp = 0, zp
= 0, and θp = 0.
CPR values of encoders are: cprx = 16, cpry = 16, cprz = 16, and cprθ = 16. The
radius of each pulley is: radpulleyx (mm) = 8.1.
The pitch of the threaded rod and the nut is: pitchz (mm) = 1/24 x 25.4 = 1.058.
The difference between the current and the previous distances and angles is calculated
as: dx = 100; dy = 100; dz = 30; dθ = 90.
All the differences are positive; therefore, the direction of rotation of all motors
is clockwise (as per convention).
The number of counts calculated are: ncountsx = 16 / ( 2 x π x 8.1) x 100 = 32
(integer rounded); ncountsy = 16 / ( 2 x π x 8.1) x 100 = 32; ncountsz = 16 / 1.058 x 30
= 454; ncountsθ = 16 / 360 x 90 = 4.
Least distance moved and least angle rotated varies between zero and that which
correspond to one count of encoder. So the error in measurement varies from zero to the
value corresponding to one count of encoder.
46
Expected Error in
X Y Z θ X Y Z θ ΔX ΔY ΔZ Δθ
0 0 0 -2
1 20 20 10 45 20 20 10 43
1 4 0 15
2 40 40 20 90 41 44 20 105
0 -1 -1 0
3 60 60 30 135 60 59 29 135
0 3 -1 20
4 80 80 40 180 80 83 39 200
1 2 0 0
5 100 100 50 225 101 105 50 225
3 -2 -1 20
6 150 150 60 270 153 148 59 290
1 5 20
7 200 200 315 201 205 335
-2 -2 20
8 250 250 360 248 248 380
-3
9 300 297
The error in input distance in X direction varies from -3mm to 3mm (Fig. 5.1).
The negative value is due to the system dynamics. The elasticity of belt and friction due
to wheels and the railing are the causes of this difference. As the distance of travel
increases, the system becomes more and more accelerated, so the fluctuation in error
also increases.
48
2
*Error (mm)
0 *Error-X
20 40 60 80 100 150 200 250 300
-1
-2
-3
In case of Y-direction motion the error varies between -2 mm and 5mm, which
can again be accounted for the same reason as for X-direction motion (Fig. 5.2). The
fluctuation in error also increases with the distance traveled. However, since the inertia
reduces, so the fluctuation is not as high as in the case of X-direction motion.
The error in case of Z-direction motion is between -1mm to zero, which is quite
close to the predicted value (Fig. 5.3). In case of θ-motion, the error is again within the
range of predicted range (Fig. 5.4). As the angle of rotation increases the error becomes
constant.
49
6
5
4
*Error (mm)
3
2
1
*Error-Y
0
20 40 60 80 100 150 200 250
-1
-2
-3 Input distance (mm)
*Error: It is the difference between the input
distance and the measured distance.
0
10 20 30 40 50 60
-0.2
*Error (mm)
-0.4
-0.6 *Error-Z
-0.8
-1
25
20
*Error (degree)
15
10 Error-theta
5
0
45 90 135 180 225 270 315 360
-5 Input angle (degree)
*Error: It is the difference between the input
distance and the measured distance.
kt GR
where, A = Ai ;
r
k
ωn = ;
m
c
ζ = .
2 km
51
The data, from datasheets of the motors and properties of neoprene belt, used to
calculate the amplitudes and time intervals of impulse responses is: kt = 4.95 mNm/A,
GR = 76, r = 8.1 mm, m = 1 kg, c = 0.1, and k = 35 kN/mm.
⎡ A1 A2 ⎤ ⎡0.5066 0.4934 ⎤
⎢t =
⎣ 1 t2 ⎥⎦ ⎢⎣ 0 0.5310 ⎥⎦
The superposition of two impulse responses which cancel each other to generate
zero vibration are shown in Fig.5.3. The first impulse starts at zero time and the second
starts at 0.531 sec.
CHAPTER VI
Summary
The research objective is to build a Gantry Mechanism and control it over the Internet.
The mechanism will be used to view the working of a SCARA robot. A model of the
Gantry Mechanism is designed, built and controlled over the Internet. The Gantry
Mechanism maneuvers the camera in the working envelope. The camera captures the
images and transmits them over the Internet. In this way, the user virtually sees the
working space from different positions.
The control of the Gantry Mechanism is implemented in two parts. The feedback
control loop is built using motors, H-bridge, logic gates, encoders and PIC-
microcontroller. The reference input is obtained from the user, who uses a Graphical
User Interface in the web-browser on the client side. The reference command is
processed on the server to generate input commands for the feedback loop.
Future work
Improvement in the design of feedback control loop along with input shaping will,
further, reduce the error in input parameters and measured parameters. The setup
designed is cost-effective. Motor controllers with position feedback can be used with
53
MATLAB to make more robust system. However, one has to learn how to write
programs and make interfaces which would bridge between client, MATLAB programs
and PIC-microcontroller. Finally, the Graphical User Interface can be improved by
shifting from HTML and Javascript programming to Java3D.
Conclusions
In this research the objective of designing a Gantry Mechanism and its control through
the Internet has been achieved. A model of the Gantry Mechanism was built and also
developed its control through the Internet. The experimental results were evaluated by
comparing the predicted errors and actual errors. Suggestions for the system
improvement and error reduction were outlined. The design can be scaled up to develop
an actual Gantry Mechanism for the experimentation of the SCARA Robot. Finally, the
unbalanced vibrations can be reduced by implementing the input shaping algorithm and
improvement in feedback control loop.
The applications of the Gantry Mechanism, which maneuvers the camera and is
controlled over the Internet, include industry, viewing inaccessible places like nuclear
plants, shop floors, hospitals, underwater, space and home security systems.
54
REFERENCES
[2] W.J. Kim, K. Ji, Kun, A. Ambike, “Real time operating environment for networked
control systems”, IEEE Transactions on Control Systems Technology, submitted for
publication.
[3] P.X. Liu, , M. Meng, Q. H. Max, J. Gu, S.X. Yang, C. Hu, “Control and data
transmission for internet robots”, in Proc. - IEEE International Conference on
Robotics and Automation, vol 2, 2003, pp 1659-1664.
[4] S.K. Ong, W.W. Sun, “Application of mobile agents in a web-based real-time
monitoring system” International Journal of Advanced Manufacturing Technology,
vol 22, no. 1-2, 2003, pp 33-40.
[7] L. Wang, R. Sams, M. Verner, F. Xi, “Integrating Java 3D model and sensor data
for remote monitoring and control”, Robotics and Computer-Integrated
Manufacturing, vol 19, no. 1-2, pp 13-19, 2003.
[10] R.C. Luo, M. C. Tse, C. C. Yih, “Intelligent autonomous mobile robot control
through the internet”, IEEE International Symposium on Industrial Electronics, vol
1, pp PL6-PL11, 2000.
[14] H. Wu, J. Ming, Y. Yang, S. Zhu, “Integrating embedded-web technology and real-
time Ethernet for modern distributed control” in Proc. World Congress on
Intelligent Control and Automation (WCICA), WCICA 2004 - Fifth World Congress
on Intelligent Control and Automation, Conference Proceedings, vol 2, 2004, pp
1323-1325.
APPENDIX
Appendix A
Inputs
Calculations
= 1.4362 x 10-3 kW
Appendix B
Inputs
Calculations
Motor selected
Appendix-C
VITA