Upload
others
View
6
Download
0
Embed Size (px)
Citation preview
Tooling Ball Detecting Method
Design for ABB Welding Robot in
Automatic TIG Welding Process
by
Zhenhao Li
A thesis
presented to the University of Waterloo
in fulfillment of the
thesis requirement for the degree of
Master of Applied Science
in
Mechanical Engineering
Waterloo, Ontario, Canada, 2010
c⃝ Zhenhao Li 2010
I hereby declare that I am the sole author of this thesis. This is a true copy of the thesis,
including any required final revisions, as accepted by my examiners.
I understand that my thesis may be made electronically available to the public.
ii
Abstract
This thesis provides the design process for a new tooling ball detection method to cal-
ibrate moulds in automatic TIG welding. A mechanical component is designed to locate
the tooling ball and convert the position information into analog signals. An electrical
component is designed to process signals from the mechanical component and achieve
the signal communication process. Finally, the computational component is designed and
programmed to receive bits from the electrical component and convert information into
position values for the tooling ball. The homogeneous transformation process is mathe-
matically modeled for position computation in a robot system.
The method is significantly different from current methods that have been developed
and applied. Firstly, it uses a mechanical-touch style operation to locate the tooling ball
with only a one-time detection operation. Secondly, it introduces a new approach for
utilizing the joystick. Rather than as a manually operated direction controller for mobile
control of devices, the joystick is used as a passive detection angle sensor. In order to
properly use the joystick as an angle sensor, the joystick calibration method is also designed
and tested.
The designs of the three components are all implemented and tested separately. The re-
sults of these tests prove the feasibility of the new detecting method; however, the accuracy
of detection is not yet acceptable and further improvements need to be made.
In addition, a vision-based detecting method is also discussed at the end of the thesis.
Compared to mechanical touch-style detection, the vision-based detecting method is de-
signed to obtain better performance in a high temperature environment and to automate
the tooling ball detecting process.
iii
Acknowledgements
I gratefully acknowledge the assistance provided to me by many people during my research.
I especially would like to thank Professor Huissoon for affording me the opportunity to
spend two years in Canada as an international student. His invaluable support, knowledge
and experience helped guide me through the complexties of mechatronics and Canadian
culture. Without his valuable suggestions and insights, I cannot imagine how my two years’
research and study would have gone.
I also wish to thank Robert for his excellent machining of all the parts. Without his
hard work, all my designs would just be on paper. His experience in mechanical design
was very important to my research.
As well, I wish to thank the Department of Mechanical Engineering and Ontario Centers
of Excellence for providing me with a world-class study environment.
And to my friends in Canada, especially Jiheng and Zhiyue, Vladimir and Murtasim,
I extend a big thank-you for the advice on my research and assistance in my day-to-day
life. They have made my time here full of happiness and pleasure.
Finally, I owe my sincere appreciation to my parents. No words could describe how
much I love them and no words could describe they’ve shown their love for me over the
past twenty-five years of my life.
I thank everyone for all their help, I truly appreciate it.
iv
Contents
List of Tables ix
List of Figures xiii
1 Introduction 1
1.1 Automatic TIG Welding Project . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1.1 Mould Modification and TIG welding . . . . . . . . . . . . . . . . . 2
1.1.2 Project of Automatic TIG welding . . . . . . . . . . . . . . . . . . 3
1.1.3 Direction of the research . . . . . . . . . . . . . . . . . . . . . . . . 12
1.1.4 Requirements for the New Tooling Ball Detecting Method . . . . . 15
1.2 Current Methods for Position Measurement . . . . . . . . . . . . . . . . . 16
1.2.1 Methods Currently Applied in the Project . . . . . . . . . . . . . . 16
1.2.2 Other Developed Methods . . . . . . . . . . . . . . . . . . . . . . . 17
1.3 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.3.1 Brief conclusion of Chapter 1 . . . . . . . . . . . . . . . . . . . . . 19
1.3.2 General Description of Other Chapters in the Thesis . . . . . . . . 19
v
2 Tooling Ball Detecting Method Design 20
2.1 Basic Rule for Tooling Ball Detecting Method Design . . . . . . . . . . . . 20
2.2 Cell System Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.3 Mechanical Component Design . . . . . . . . . . . . . . . . . . . . . . . . 23
2.3.1 Analog Biaxial Joystick . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.3.2 Detecting Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.4 Implementation of Mechanical Component . . . . . . . . . . . . . . . . . . 27
2.4.1 Version 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.4.2 Version 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.5 Electrical Component Design . . . . . . . . . . . . . . . . . . . . . . . . . 36
2.6 Computational Component Design . . . . . . . . . . . . . . . . . . . . . . 38
2.6.1 Compute Deflection angles of joystick . . . . . . . . . . . . . . . . . 41
2.6.2 Compute position of tooling ball in joystick coordinate system . . . 43
2.6.3 Transformation process in tooling ball detecting process . . . . . . . 43
2.6.4 Coefficients for Computation . . . . . . . . . . . . . . . . . . . . . . 46
2.7 Cell System Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
2.8 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
3 Calibration and Detecting Test 49
3.1 NC Milling Machine with Indexing Head & Tooling Ball . . . . . . . . . . 50
3.1.1 NC Milling Machine with Indexing Head . . . . . . . . . . . . . . . 50
3.1.2 Tooling Ball . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
vi
3.2 Joystick Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
3.2.1 Method for Joystick Calibration . . . . . . . . . . . . . . . . . . . . 54
3.2.2 Result of Joystick Calibration Experiment . . . . . . . . . . . . . . 68
3.3 Detector Calibration and Testing . . . . . . . . . . . . . . . . . . . . . . . 72
3.3.1 Objectives of Detector Calibration Experiment . . . . . . . . . . . . 72
3.3.2 Detector Calibration Procedure . . . . . . . . . . . . . . . . . . . . 75
3.3.3 Transformation Process . . . . . . . . . . . . . . . . . . . . . . . . . 78
3.3.4 Method for Data Processing . . . . . . . . . . . . . . . . . . . . . . 80
3.3.5 Detector Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
3.3.6 Results of Data Processing . . . . . . . . . . . . . . . . . . . . . . . 84
3.4 Evaluation and Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
4 An Extension: Optical Detecting Method Design 95
4.1 Hardware Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
4.2 Optical Characteristics of Tooling Ball . . . . . . . . . . . . . . . . . . . . 98
4.3 The Reflection Phenomenon . . . . . . . . . . . . . . . . . . . . . . . . . . 98
4.4 Vision-Based Tooling Ball Detecting Method Design . . . . . . . . . . . . . 100
4.4.1 Pre-described Concepts . . . . . . . . . . . . . . . . . . . . . . . . . 100
4.4.2 Procedures for Acquiring Position of Tooling Ball in Photos . . . . 106
4.4.3 Transformation from Photo Coordinate System to World Coordinate
System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
4.5 Experiment and Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
4.6 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
vii
5 Conclusion 112
5.1 Thesis Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
5.2 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
APPENDICES 116
A Technical Specifications of Joysticks and Tactile Switch 117
B Programs 121
B.1 Program in Microprocessor . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
B.2 RAPID Code for Computational Component . . . . . . . . . . . . . . . . . 130
Bibliography 137
viii
List of Tables
3.1 Results of Joystick Calibration Experiment . . . . . . . . . . . . . . . . . . 68
3.2 Amplitudes and Phases Offsets of Data in Group 1 . . . . . . . . . . . . . 71
3.3 Amplitudes and Phases Offsets of Data in Group 2 . . . . . . . . . . . . . 71
3.4 Ideal Detecting positions of TCP (mm) . . . . . . . . . . . . . . . . . . . . 78
3.5 Actual Detecting positions of TCP (mm) . . . . . . . . . . . . . . . . . . . 81
3.6 Voltage Signal Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
3.7 Results of Deflection Angle Computation . . . . . . . . . . . . . . . . . . . 85
3.8 Results of Detector Calibration Experiment . . . . . . . . . . . . . . . . . 86
3.9 Average Values of ��, L and Δz at Calibration Positions . . . . . . . . . . 86
3.10 Results of Detector Calibration Experiment . . . . . . . . . . . . . . . . . 88
3.11 Errors of Tooling Ball Position Detection (mm) . . . . . . . . . . . . . . . 89
ix
List of Figures
1.1 Robot Cell Setting for TIG Welding . . . . . . . . . . . . . . . . . . . . . . 5
1.2 Working Flow of Robot Automatic Welding in General . . . . . . . . . . . 8
1.3 Differences Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.4 General Description of the Mould Calibration Process . . . . . . . . . . . . 11
1.5 Vertices of the mould . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.6 Mould with tooling balls . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.1 Cell System for Tooling Ball Detection . . . . . . . . . . . . . . . . . . . . 22
2.2 Illustration of Tooling Ball Detecting Process . . . . . . . . . . . . . . . . 25
2.3 Joystick . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.4 Shaft Deflection of the Joystick . . . . . . . . . . . . . . . . . . . . . . . . 28
2.5 Tooling Ball Locating . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.6 Mechanical Component of Version 1 . . . . . . . . . . . . . . . . . . . . . . 31
2.7 the Broken Shaft of Joystick . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.8 Mechanical Component of Version 2 . . . . . . . . . . . . . . . . . . . . . . 34
2.9 Signal Transmission Flow of Tooling Ball Detecting Process . . . . . . . . 36
x
2.10 LPC2131 ARM7 Microcontroller with the Development Board EasyARM
2131 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
2.11 Program Flow Chart of ARM7 Microprocessor . . . . . . . . . . . . . . . . 39
2.12 RAPID Program Flow Chart . . . . . . . . . . . . . . . . . . . . . . . . . 40
2.13 Joystick Coordinate system . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.14 Transformation Process in Robot System . . . . . . . . . . . . . . . . . . . 44
3.1 Milling Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.2 Tooling Ball . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
3.3 Dimension of the Tooling Ball . . . . . . . . . . . . . . . . . . . . . . . . . 51
3.4 The output voltage of joystick is proportional to the deflection angle. . . . 52
3.5 Configuration Example of Joystick Coordinate System . . . . . . . . . . . 53
3.6 Mechanism for Joystick Calibration . . . . . . . . . . . . . . . . . . . . . . 55
3.7 Center the tool holder on the steel rod. . . . . . . . . . . . . . . . . . . . . 57
3.8 Three Coordinate Systems in Joystick Calibration Process . . . . . . . . . 59
3.9 Deflection Angles of Joystick in Calibration Process . . . . . . . . . . . . . 62
3.10 Output Voltage Values of Joystick at Two Heights in Joystick Calibration
Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3.11 Fit to the Data of Joystick Calibration Experiment . . . . . . . . . . . . . 70
3.12 The relationship between L and d . . . . . . . . . . . . . . . . . . . . . . . 74
3.13 Obtain z value of the tooling ball center by the chuck. . . . . . . . . . . . . 76
3.14 Coordinate Systems in Detector Calibration Process . . . . . . . . . . . . . 77
3.15 Positions of TCP for Tooling Ball Detection . . . . . . . . . . . . . . . . . 79
xi
3.16 Consistency of Angle Computation . . . . . . . . . . . . . . . . . . . . . . 84
3.17 �� . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
3.18 L . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
3.19 Δz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
3.20 Errors of Tooling Ball Position Detection . . . . . . . . . . . . . . . . . . . 90
3.21 Relationship between (�x1 − �x2)2 and (�y1 − �y2)2 and Correspondent Posi-
tions of TCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
3.22 Relationship Between �� and Correspondent Positions of TCP on Xm . . . 91
3.23 Relationship Between L and Correspondent Positions of TCP on Ym . . . . 92
3.24 Relationship Between Δz and Correspondent Positions of TCP on Ym . . . 92
3.25 Relationship between Errors of Position Detection and Correspondent Posi-
tions of TCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
4.1 Partial Ring Shaped Light Source . . . . . . . . . . . . . . . . . . . . . . . 96
4.2 Position Relationship among the Camera, Light Source and the Tooling Ball 97
4.3 Reflection Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
4.4 Pixel in Photo Coordinate System . . . . . . . . . . . . . . . . . . . . . . . 100
4.5 Dark Region . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
4.6 Dark Region at the Gap of ’C’ Shape . . . . . . . . . . . . . . . . . . . . . 105
4.7 8 Dark Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
4.8 9 Types of Same Photos . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
4.9 A Sample Image for Describing Center Deviation . . . . . . . . . . . . . . 110
4.10 Center Deviation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
xii
A.1 J1R6AAA00 Copied from: Elobau Sensor Technology . . . . . . . . . . . . 118
A.2 J6R6AAA00 Copied from: Elobau Sensor Technology . . . . . . . . . . . . 119
A.3 B3F5000 Tactile Switch Copied from: Omron Electronic Components LLC 120
xiii
Chapter 1
Introduction
In the ABB welding system for automatic TIG welding, the spherical centers of tooling
balls can be considered as reference points in robot working space. Place tooling balls on
the mould; detect positions of spherical center of tooling balls in robot working space; then,
position information can be applied by robot for calibrating the position and orientation of
the mould in robot working space. Applying a fast tooling ball detecting method in mould
calibration procedure can increase the efficiency.
A fast one-time mechanical touching tooling ball detecting method is developed and
the method will be introduced in this thesis. This chapter introduces the background and
direction of the research. The automatic TIG welding process for mould modification is
first described, and then the mould registration and calibration processes are outlined in
detail. Several methods which have been previously applied or developed are considered
and compared. Next, a tooling ball detection method designed for use with an ABB
welding robot in the mould registration process is proposed. Finally, a brief conclusion of
the chapter is provided, together with an outline of the following chapters.
1
1.1 Automatic TIG Welding Project
1.1.1 Mould Modification and TIG welding
In the mould fabrication industry, moulds are commonly machined from a large billet
of expensive tool steel using NC machining, programmed to remove material based on
a CAD model of the desired mould cavity. According to the requirements of practice,
mould machine always need adjustment. This is because a mould may be not be made
to specifications due to a machining error. Materials that are over-machined need to be
added and excess materials should be removed. Also when a previous mould design is not
suitable and needs to be improved, the mould machined has to be adjusted. Moreover,
when an old unused mould is similar to a new mould designed, doing a mould adjustment
for the old mould is obviously an efficient choice for time- and cost-saving. As a result,
mould adjusting, including removing excess materials and adding missing materials, is
necessary and unavoidable in the mould fabrication industry, and the techniques for the
mould adjusting process have a great impact on production efficiency. [1]
The mould adjusting process can be achieved by NC machines to remove excess ma-
terials and by welding techniques to add missing materials. TIG (Tungsten Inert Gas)
welding, also known as GTAW (Gas Tungsten Arc Welding), is a commonly used welding
technique. In the TIG welding process, metal is melted by the heat from a current passing
between the non-consumable tungsten electrode and the workpiece. During the welding
process, inert gas (e.g. argon) is continually provided, preventing materials from reacting
with atmospheric contamination. By applying this technique, almost all types of materials
can be welded by TIG welding, and the weld is clean and of high quality. Unlike MIG
(Metal Inert Gas) welding, there are no pinholes in the welds and no sparks during the
welding process. However, tungsten electrodes cannot sustain a high current, the weld-
ing speed is limited and becomes time-consuming. According to data from experienced
2
welders, the speed of MIG welding is about 6lb/hour while the speed of TIG welding in
manual operation mode is only 0.5lb/hour. Another reason that limits the efficiency of TIG
welding is that it requires skilled welders as it is a labor-intensive process. As a result, in
order to increase the efficiency of production while still maintaining the high quality of the
weld, methods for automatic robotic TIG welding are now being considered and developed.
[2]
1.1.2 Project of Automatic TIG welding
A project called ’Automatic TIG Welding based on ABB Welding Robot’ is being developed
by Tool-Tec Welding Inc.1 The project is set up based on automotive mould adjusting task.
The automotive mould is made of P-20 tool steel with several projections to be added,
while the surface of the desired mould is required to be a Class-A tool steel surface. The
actual mould and CAD data of both actual mould and desired mould in 3D CAD software
(solidworks for instance) are provided by the customer.
There are three main steps in achieving the task. First, remove materials at the posi-
tions where the projections are added in order to obtain a new ground surface. Second,
based on this new ground surface, materials are welded to the desired position, with the
volume of materials being slightly more than the one desired. Finally, excess materials are
removed and the desired surface is achieved.
The welding accuracy and efficiency of the second step are important in saving time and
lowering costs. An accurate welding operation makes the excess materials to be removed
at the final step as little as possible so that machining time and the cost of welding
materials can be maximally reduced. In order to satisfy the requirements of surface quality,
the project applies TIG welding as the welding technique used in the second step. A
1ABB welding robot is the product from ABB company. Details of the robot can be found from
http://www.abb.ca/product/us/9AAC100735.aspx.
3
programmable ABB welding robot (robot IRB4450s with robot controller IRC5) is also
utilized to automate the welding operation to increase the working efficiency and accuracy.
Working Environment Setting of the Project
Figure1.1 describes the whole setting of the robot cell for TIG welding. There are seven
components within the robot cell: ABB Welding Robot, Robot Controller, Mould, Heating
Table, Temperature Controller, PC (Robot) and PC (Office).
∙ ABB Welding Robot & Robot Controller: ABB welding robot IRB4450s and robot
controller IRC5 are applied for the welding task. The robot controller contains a
user interface called FlexPendant, with which the operator can operate the robot
and control the program flow of welding.
∙ Heating Table, Temperature Controller & Mould:
Tool steel TIG welding for the automotive mould requires the mould to be preheated
to a temperature of about 700F ∘. This temperature should be maintained throughout
the whole welding process. Therefore, the mould to be worked on is placed on a
heating table designed by Tool-Tec Inc. The heating table generates a flame for
heating the mould and the temperature of the mould is reflected to the temperature
controller through a temperature sensor. The temperature controller controls the
power of the heating table and, according to the temperature setting and mould
temperature sensed, the temperature of the mould can be controlled.
The heating table is used to maintain the temperature of the mould instead of heating
the mould to the required temperature. The heating table is not able to heat the
mould to 700F ∘. The reason is that the speed of heat missing from large areas of
the mould surface is higher than the speed of absorbing heat from the heating table.
4
Figure 1.1: Robot Cell Setting for TIG Welding
5
As a result, the mould is heated in an oven until 700F ∘ is reached, after which, the
mould is moved to the heating table to be worked on.
∙ PC (Robot) and PC (Office): PCs are used for robot programming, welding tool path
planning and welding parameters controlling. There are two PCs: one is placed in
the robot’s working environment for direct robot programming and control, and the
other one is placed in the office (for engineers) for off-line programming, simulating
and working status monitoring.
Spaces and Coordinate Systems in ABB Robot System
There are two spaces in a robot system: one is robot space representing the actual working
space of the robot and the other is CAD space which is a virtual space in 3D CAD software.
Space can be numerically described by a coordinate system in the form of coordinate
values (x, y, z). There are five coordinate systems defined in the ABB robot system: the
base coordinate system, the world coordinate system, the tool coordinate system, the
workpiece coordinate system and the user coordinate system. Definitions of each coordinate
system can be found in the ABB robot user manual: they are not mentioned here. [3]
The relationship among different coordinate systems in robot space can be described by
homogeneous transformation. [4]
∙ World coordinate system and base coordinate system (Fworld : Xw − Yw − Zw)
Since there is only one ABB robot in the project, the world coordinate system and
the base coordinate system coincide with each other, and both are to be called the
world coordinate system. The world coordinate system can be used to describe the
position information of robot space.
∙ Workpiece coordinate system (FworkpieceorFCAD : Xc − Yc − Zc)
6
The workpiece coordinate system located on the mould and the CAD data of work-
piece (mould) in 3D CAD software are described based on the workpiece coordinate
system. The workpiece coordinate system can be used to describe the position infor-
mation of CAD space.
∙ Tool coordinate system (Ftool : Xt − Yt − Zt)
The robot system is able to have several different tool coordinate systems at the same
time representing information of different tools applied. Take the welding task, for
example. A torch for TIG welding is designed and mounted on the sixth axis of the
robot, so there is a tool coordinate system representing the torch. The torch moves
with the robot arm and the pose of the torch in robot space can be described by the
pose of its tool coordinate system in the world coordinate system. 2
∙ User coordinate system (Fuser : Xu − Yu − Zu)
The user coordinate system is located on the heating table and its pose in the world
coordinate system represents the location of the heating table in the robot space.
Working Flow of Welding Task
Figure1.2 describes the main flow of the working process for the robot’s automatic TIG
welding task. There are six main sections: Difference Computation, Path Generation,
Welding Process Simulation, Welding Parameters Adjusting, Mould Calibration and Au-
tomatic Welding.
∙ Differences Computation:
Figure 1.3 describes the differences computation process briefly.
2Word ’pose’ in the thesis represents position and orientation.
7
Figure 1.2: Working Flow of Robot Automatic Welding in General
8
Figure 1.3: Differences Computation
Compare actual mould data with ideal mould data and obtain the differences simply
by subtracting with the 3D modeling software Solidworks. There is a customized ap-
plication called robot designer developed for the purpose of achieving this computing
process. The data of differences are position information of materials to be welded.
The position data is located within CAD space.
∙ Welding Parameters Adjusting:
Skilled welders achieve the TIG welding task manually using traditional manual op-
eration mode based on experience.However, in the automatic welding process, the
human experiences of welding techniques should be transferred into welding param-
eters for automated robot welding operation control. According to actual welding
practices and manual welding experience of welders, parameters such as feed rate
of filler metal, voltage and current supplied for arc generation, welding angle of the
torch, moving speed of robot arm and so on are decided after large numbers of weld-
ing experiments and a mathematical model is created for the welding task. Using
such a mathematical model of welding parameters, a welding tooling path can be set
up in the next step.
∙ Path Generation:
After obtaining the differences data and setting welding parameters, the welding
9
paths for the robot in the welding process are generated. The differences data are
usually several pieces of 3D solid parts and the can be formed by welding layer by
layer. As a result, the robot designer separates the 3D solid into several layers and
then separates the layers into welding paths that are connected with each other. The
robot works following these paths and the solid piece can be formed.
∙ Welding Process Simulation:
Welding simulation is necessary for analyzing programs of robot control to avoid
conflicts in the actual welding process. If conflicts arise in the simulation process,
the actual welding task can not be carry out and the welding tool path should be
rebuilt until the simulation pass.
∙ Mould Calibration:
The mould calibration process aims to obtain the transformation matrix from the
CAD coordinate system in the CAD space to the world coordinate system in robot
space. Within the project, the SVD algorithm based on least square method devel-
oped by Arun et al.[5] is applied in solving the calibration problem.
{P SpaceNamei } means a point set in space SpaceName. The first step of the mould
calibration procedure is to select several reference points on the surface of the mould
in CAD space, obtaining the point set {PCADiRef }. Next, the operator operates the
robot arm carrying the detecting tool to detect reference points in robot space and
obtaining the point set {P robotiRef } under the condition of existing detecting error ViRef .
The algorithm supposes that there is a fixed linear relationship between positions
of points in robot space and in CAD space represented by Equation 1.1. R is a
rotation matrix and T is a translation matrix. {PCADi } is the point set in CAD space
and {P roboti } is the point set in robot space corresponding to {PCAD
i }. Since the
existence of the detecting error, the point sets {PCADiRef } and {P robot
iRef } can be fitted
10
Figure 1.4: General Description of the Mould Calibration Process
into an improved Equation 1.2 in solving the optimal transformation matrixes R̂ and
T̂ instead of R and T. Finally, All points in the point set {PCADi } can be transformed
into point set {P roboti } using Equation 1.3 and R̂ and T̂ are the target transformation
matrices. The mould calibration process is illustrated in Figure 1.4.
P roboti = RPCAD
i + T (1.1)
P robotiRef = RPCAD
iRef + T + ViRef (1.2)
P roboti = R̂PCAD
i + T̂ (1.3)
∙ Automatic Welding:
After finishing all the five previous procedures, the robot knows what is to be welded
and how the welding works should be carried out. Then robot starts doing the actual
11
welding process following the programs in the robot controller, and finishes the TIG
welding task automatically.
1.1.3 Direction of the research
There are two types of reference points that are usually selected in the mould calibration
process. They are spherical centers of tooling balls and vertices of the mould itself (in-
tersection points of edges, for instance). Figure 1.5 and figure 1.6 illustrate vertices and
tooling balls. In figure 1.5, A, B, C and D are four vertices of the mould. The mould is
symmetric and thus, there are four vertices in another side of the mould are also required
to be selected as reference points. The tooling ball in figure 1.6 is specified by figure 3.2
in page 51.
Vertices are easier to detect because they can be found directly at the point using a
detecting pin. However, it may confuse the operator in the reference point detecting process
when the mould surface is complicated with large quantities of vertices in high intensity.
On another hand, a tooling ball is easy for the operator to capture but it can only be
detected in an indirect way, as the reference point of a tooling ball is the spherical center
which is a point located inside the solid. Considering the terrible working environment of
welding, if a detecting tool for a detecting tooling ball with high efficiency can be applied for
the mould calibration process for reference points detecting, incorrect detecting operation
could be avoided and the efficiency of the calibration process will be improved.
As a result, this research aims to develop a tooling ball detecting method for the mould
calibration process of automatic TIG welding system. Applying this detecting method,
a robot controller should know the position of the tooling ball in the world coordinate
system. The efficiency of the tooling ball detecting process should increase with the new
method and the detecting accuracy should locate within the range of requirement.
12
Figure 1.5: Vertices of the mould
13
Figure 1.6: Mould with tooling balls
14
1.1.4 Requirements for the New Tooling Ball Detecting Method
The following requirements are considered in the research process.
∙ Work robustly in a heavy-duty working environment of TIG welding:
High temperature, dusty air, strong illumination from surrounding welding works,
high possibility of causing impact by collision between robot arm and objects are five
main factors that have negative effects on the tooling ball detection process. The
new tooling ball detecting method should avoid being effected by these factors.
∙ Be able to be integrated with the whole system of automatic TIG welding:
The new tooling ball detecting method is designed for the Automatic TIG Welding
system and therefore, the design should be able to be easily integrated into the whole
system.
∙ Strike a balance among detecting accuracy, detecting efficiency and the cost of the
product:
The accuracy of robot motion is 1mm on three axes of the world coordinate system.
Base on the experimental results in the mould calibration process, calibration results
which are obtained from setting a vertex as the only type of reference point is ac-
ceptable. This means that the accuracy of the new detecting method for tooling ball
spherical center detection should be the same as for vertex detection by a detection
needle which is still 1mm on each axis.
Currently, the tip of a tungsten electrode is used to detect the vertex and the accuracy
is the same as for robot motion. Therefore the accuracy for tooling ball detection is
required to be 1mm on three axes of the world coordinate system.
∙ Be able to be applied in a different calibration application:
15
As a product design, the detector should not be limited to the project of TIG welding
but should be appicable to other types of applications, such as the CNC machine
calibration process. As a result, the additional value of the detector itself can be
increased.
1.2 Current Methods for Position Measurement
1.2.1 Methods Currently Applied in the Project
∙ Ball Surface Point Detecting by Tungsten Electrode Applying 4–point Method:
There is a sharp tip at the end of the tungsten electrode in TIG welding. The position
of the tip in the world coordinate system can be directly read by the robot controller
so that it can be utilized as a point detector. The position of the sphere can be
computed by its surface points (at least four points). Therefore,if four surface points
of the tooling ball can be detected by the tip of the tungsten electrode, spherical
center of the tooling ball can be figured out (4–point method, [6]).
This is the easiest tooling ball detecting method that can be applied for tooling ball
detection in an ABB robot system. A tungsten electrode is needed for TIG welding
in the entire working process and there is no need to mount any other detecting
tools. The detecting operation is simple for operators, especially when the operator
is familiar with robot operation.
However, this method is time-consuming because of the four times’ detecting oper-
ation required and its detecting accuracy is difficult to control because it is hard to
make touching judgements (whether the tip of the electrode touches the surface or
not) and also because it is difficult to control the position of surface points that are
detected. According to the analysis in [6], the most accurate result of detection can
16
only be obtained when four detecting points form a regular polyhedron and this is im-
possible for operators to achieve by operating the ABB robot. On the another hand,
the high temperature of the mould (about 700F ∘) is dangerous for operators working
around it for long periods of time, especially for work requiring careful operation.
∙ High accuracy probe:
As an improvement for the 4–point method using tungsten electrode as a point de-
tector, a high accuracy probe is applied to take the place of the electrode. The probe
is able to generate touched/not-touched digital signal as feed back information to
the robot controller. Once the tip of the probe touches the surface of the tooling
ball, the feed back signal is generated immediately to let the robot arm stop moving.
Touching status is judged by the feedback signal rather than by the eyes of operator.
Though the reliability of touching status judgment is enhanced by using the high
accuracy probe, time for the detecting operation is not reduced. The probe is ex-
pensive (about $5000), and the feeding speed of the robot arm’s movement has to be
set at the slowest level (0.1mm/increment) to protect the probe from collision. Also
because the working temperature range of the probe is 257F ∘ (which is much lower
than the temperature of the mould), the probe can be applied only when the mould
is cold.
1.2.2 Other Developed Methods
Currently, methods for tooling ball detecting can be divided into three types: mechanical
touching, optical sensor detecting, and vision-based object recognition. The mechanical
touching method is seldom considered because of its low accuracy compared to the other
two. Methods of optical sensor detecting ([7] [8] [9] [10] [11]) and vision-based object
recognition ([12] [13]) have their own advantages:
17
∙ There is no contact between the device and targets so collisions are avoided.
∙ The detecting accuracy is higher than in mechanical touching methods.
∙ Detecting targets are not limited by their physical characteristics. For example, not
only spherical objects can be detected but also other types of objects (cube, sheet,
etc) can be recognized.
However, there are also disadvantages in the application environment of this project:
∙ High accuracy is always related to strict requirements about operation and work-
ing environment. The working environment and requirements about ball detecting
operation cannot satisfy requirements of applying optical sensors or vision devices.
∙ Considering the accuracy requirement of tooling ball detection, optical sensing or
vision-based methods are too accurate which is not necessary.
As a result, the mechanical touching method is chosen to be developed because of the
following advantages:
∙ The method for position computation is deterministic.
∙ Mechanical components are cheaper and more robust than optical sensors and vision
devices.
∙ Applying standard parts, the mechanical touching style detector can be easily re-
paired when some components are broken.
In conclusion, in light of the shortcomings of current methods that have been developed
and applied, it is valuable to develop a new mechanical touching style tooling ball detector
for mould calibration of the automatic TIG welding process.
18
1.3 Chapter Summary
1.3.1 Brief conclusion of Chapter 1
In conclusion, this research will develop a mechanical contact style tooling ball detector for
an ABB welding robot in the mould calibration process of automatic TIG welding. The
detector should be able to sustain a high temperature working environment within the time
of operation and the position of the tooling ball’s spherical center detected by the detector
should be sufficiently accurate according to the requirements of the mould calibration
process. The operation and cell system design of the detector should be suitable to be
integrated by the whole TIG welding system. And finally, under the condition of achieving
the calibration task in the project of automatic TIG welding, the adaptability of the design
to other applications should be considered.
1.3.2 General Description of Other Chapters in the Thesis
Chapter 2 describes the whole designing process. The design of mechanical component,
electrical component and computational component are introduced in detail. Chapter 3
describes the calibration process of the joystick and the detector. A simulation of the tool-
ing ball detecting process based on the design in Chapter 2 is also described and, according
to the results of the simulation, the new tooling ball detecting method is evaluated. As
an extension and comparison between optical and mechanical detection methods, a simple
optical detecting method utilizing reflection image forming of light source is given and dis-
cussed in Chapter 4. Finally, Chapter 5 concludes the research with an overall summary,
conclusions, and thoughts towards future works.
19
Chapter 2
Tooling Ball Detecting Method
Design
This chapter introduces the design of the new tooling ball detecting method for the mould
calibration process of the automatic TIG welding task. First, the basic rule for designing
the detecting method is given. Next, the cell system for tooling ball detection, which is
the structure of whole designing process, is described. Third, three components in the cell
system are described separately in detail. Finally, some points about integrating the cell
system with the automatic TIG welding system are discussed.
2.1 Basic Rule for Tooling Ball Detecting Method De-
sign
The target of research is to design a new tooling ball detecting method for an ABB weld-
ing robot in the mould calibration process of automatic TIG welding. The position of
the tooling ball’s spherical center in the world coordinate system is to be computed and
20
transmitted to the robot controller. Coordinate systems transform from one to another
following the rule of homogeneous transformation, which is also the basic rule for design-
ing the new detecting method. Coordinate systems utilized in the tooling ball detecting
process are mentioned again.
∙ World coordinate system (Fworld : Xw − Yw − Zw)
∙ Tool coordinate system (Ftool : Xt − Yt − Zt)
All tools that are applied in the robot system are described by their own tool coordinate
system F itool : Xti − Yti − Zti and every time after mounting a tool, the tool should be
calibrated to let robot know the pose of the tool coordinate system in the world coordinate
system. The origin of the tool coordinate system is defined as the Tool Center Point (TCP)
and both of the position of TCP and the orientation of the tool coordinate system can be
read by the robot controller directly.
Suppose the position of a point P in Fworld is Pw =(xwP ywP zwP 1
)T. A tool
is currently applied in robot system with tool coordinate system Ftool with position of
TCP in Fworld as TCPw =(xwTCP ywTCP zwTCP 1
)T. Position of P in Ftool is P t =(
xtP ytP ztP 1)T
. The robot arm is operated such that the directions of all the axes
of Ftool coincide with the direction of the axes of Fworld. According to homogeneous trans-
formation, we have Equation 2.1.
Pw =
⎛⎜⎜⎜⎜⎜⎜⎝xwP
ywP
zwP
1
⎞⎟⎟⎟⎟⎟⎟⎠ = TwtPt =
⎛⎜⎜⎜⎜⎜⎜⎝1 0 0 xwTCP
0 1 0 ywTCP
0 0 1 zwTCP
0 0 0 1
⎞⎟⎟⎟⎟⎟⎟⎠
⎛⎜⎜⎜⎜⎜⎜⎝xjP
yjP
zjP
1
⎞⎟⎟⎟⎟⎟⎟⎠ (2.1)
Matrix Twt is the transformation matrix from Fworld to Ftool with only a translating
process without rotation. The transformation matrix defines the pose of Ftool in Fworld.
21
Figure 2.1: Cell System for Tooling Ball Detection
Consider the position of tooling ball in Fworld as point P in Equation 2.1. Then if the
position of the tooling ball in Ftool is known, the position of the tooling ball in Fworld can
be computed. This is the basic rule for the tooling ball detecting method design.
2.2 Cell System Design
The flow chart in Figure2.1 describes the cell system designed for tooling ball detecting in
the robot system.
There are three components in the cell system: the mechanical component, the electrical
component and the computational component. The mechanical component contains a
detector that is mounted on the sixth axis of the robot arm for tooling ball detection.
The power to run the detector comes from robot controller (USB port for 5 volts voltage
output). The operator operates the robot arm to detect the tooling ball and the detector
generates output signals describing the position of the tooling ball with respect to the
22
detector. Output signals are transmitted into the electrical component which contains a
signal pre-processing unit and a microprocessor with a piece of development board.
The target of the electrical component is to let the robot controller know the content
of the output signals, value of voltage signal outputs, for instance. Because the robot
controller has a COM1 port for serials communication, output signals can be converted
into bits and sent to the robot controller by serial channels. The pre-processing unit adjusts
the original output signals into a suitable status for the microprocessor to receive. The
microprocessor achieves both the signal conversion task and the serial communication task.
The last component is the computational component, which translates output signals
into position information and computes the position of the tooling ball using programs
programmed in the controller. The results of position computation are displayed on the
LCD screen of FlexPendant.
The design of each component is carried out according to the flow chart in Figure2.1
described in detail in following sections.
2.3 Mechanical Component Design
The task of mechanical component design is to design a detector in order to obtain position
information of a tooling ball with respect to the detector. The detector is mounted on the
sixth axis of the robot arm as one of the tools applied in the robot system. It has its own
tool coordinate system, detector coordinate system Fd : Xd − Yd − Zd. All the position
information with respect to the detector is described in Fd.
The detector is designed as an analog biaxial joystick with a detecting part mounted
on the deflection shaft.1 The detecting part has a tactile switch that can be activated by
a sliding mechanism to generate a digital signal output showing the status of detection.
1The idea to use a biaxial joystick came from professor Jan Huissoon.
23
The detecting process is illustrated in Figure2.2 and details of the joystick and detecting
part are given in the following paragraphs. Before detecting the ball, the detector is set
vertical to the plane Xw−Ow−Yw of the world coordinate system and moved to a position
that allows the tooling ball to be located within the detecting range. Next, the detector
is dropped down as a ball detecting process. The tooling ball tangent contacts with the
cone’s inner surface of the detecting part and slides to the center position. Finally, once the
spherical center of the tooling ball coincides with the center axis of the joystick’s shaft, the
tangent points between the cone’s inner surface and the ball surface forms a tangent circle
and the tooling ball is properly located. In order to ensure the locating status, the detector
keeps being dropped down until the tactile switch is activated by a sliding mechanism and
the detecting process is finished. A compressing spring is applied to the sliding mechanism
to ensure the cone’s inner surface keeps contact with the ball’s surface.
2.3.1 Analog Biaxial Joystick
An analog biaxial joystick is a type of sensor that converts mechanical values (deflection
angles of the shaft) into analog voltage signals. As the joystick coordinate system shown
in Figure2.3, the shaft deflects about Xj, Yj and the origin of the coordinate system Oj is
the deflection center. Zj coincides with the center axis of the shaft when the shaft locates
at the center position with no deflection. Once the shaft is deflected, the joystick emits
voltage signals representing deflection angles of the two axes. The shaft deflects about each
axis in a range of [−�,+�] and there is a linear input-output relationship that is described
by Equation 2.2.
Vout = k�in + Vc (2.2)
k is the slope of the line and there is k = (Vmax− Vmin)/2�. Vout is the output voltage,
Vmax is the maximal output voltage when the shaft is deflected to angle +� and Vmin is
24
Figure 2.2: Illustration of Tooling Ball Detecting Process
25
Figure 2.3: Joystick
the minimal output value when the shaft is deflected to angle −�. Vc is the output voltage
when the shaft is not deflected.
According to the voltage outputs that represent deflection angles of the shaft about Xj
and Yj, it is easy to compute the position of a point that locates on the center axis of the
shaft. As shown in Figure2.4, �x and �y are defection angles of about Xj and Yj that are
obtained from output voltage signals. P is a point located on the center axis of the shaft
and the distance from Oj to P is L. (L is positive when P located on X+j , vice versa.)
The position of P in joystick coordinate system can be computed by Equation 2.3.
26
P j =
⎛⎜⎜⎜⎜⎜⎜⎝xjP
yjP
zjP
1
⎞⎟⎟⎟⎟⎟⎟⎠ =
⎛⎜⎜⎜⎜⎜⎜⎝L cos(−�x) sin �y
L cos �y sin(−�x)
L cos(−�x) cos �y
1
⎞⎟⎟⎟⎟⎟⎟⎠ (2.3)
If we let the spherical center of a tooling ball be located on the center axis of the
shaft which is the same condition as the point in Figure2.4, according to Equation 2.3, the
position of the tooling ball’s spherical center within the joystick coordinate system can be
computed. Also, the transformation from the joystick coordinate system to the detector
coordinate system is decided when the whole detector is manufactured and assembled,
and the position of the tooling ball in the detector coordinate system can be figured out.
Locating the ball to the center axis of the shaft is the task of the detecting part, as described
in next paragraph.
2.3.2 Detecting Part
Figure2.5 illustrates the tooling ball locating method of the detecting part. Only when the
tooling ball is properly located can the compressing spring start being compressed until
the digital signal is activated. After finishing the detecting process and lifting the detector,
the compressing spring is released and goes back to the original status.
2.4 Implementation of Mechanical Component
There are two design versions of design for implementing the mechanical component, as
discussed below.
27
Figure 2.4: Shaft Deflection of the Joystick
28
Figure 2.5: Tooling Ball Locating
29
2.4.1 Version 1
Figure2.6 illustrates the mechanical component of version 1.
Parts within Figure 2-6 are listed below:
Part 1: Joystick Mounting Base
Part 2: Joystick
Part 3: Connecting Cap
Part 4: PCB
Part 5: Tactile Switch
Part 6: Distance Fixing Part
Part 7: Locking Nut 1
Part 8: Locking Nut 2
Part 9: Linear Motion Bearing
Part 10: Cone Part
Part 11: Outer Compressing Spring
Part 12: Outer Spring Position Fixer
Part 13: M3 Nut
Part 14: M3 Washer
Part 15: M3-40 Socket Head Cap Screw
Part 16: Inner Compressing Spring
30
Figure 2.6: Mechanical Component of Version 1
31
Joystick that is applied in version 1 is J1 series joystick purchased from Elobau Sensor
Technology. The technical specifications of the joystick are provided in AppendixA. Part
5, the tactile switch, is the B3F-5000 one purchased from Omron Electronic Components
LLC. Its technical specifications are provided in AppendixA.
Feature description
The joystick mounting base is made of brass and thread-connected with the sixth axis of
the robot arm. The angular operating range of the joystick is ±15∘. The joystick is fixed
to the joystick mounting base through thread holes at the bottom of the base. The shaft
of the joystick is threaded and the connecting cap is thread-connected with the shaft.
A linear motion bearing is applied to achieve a sliding movement. The cone part is
made of steel and inserted into the bearing to enable the sliding movement. The space in
the connecting cap for the cone part to slide is kept at a distance by a distance fixing part.
The inner compressing spring is applied to activate the tactile switch which is soldered
onto the PCB. Once the cone part slides in, the spring is compressed until the elastic force
of the spring reaches the activating force of the switch and the digital signal is generated.
Another compressing spring is applied outside the bearing to enable it to return to a sliding
position. The bearing, the connecting cap and the distance fixing part are connected by
four pairs of M3 Socket Head Cap Screws and M3 nuts.
Analysis of the design
Generally speaking, the design of version 1 achieve the target function. However, two
defects regarding assembly, detecting durability and detecting accuracy are not able to
be overlooked. Firstly, the shaft of the joystick is not strong enough to sustain repeated
tooling ball detecting operation and assembly tasks. The shaft was broken already when
32
Figure 2.7: the Broken Shaft of Joystick
it was threaded with the connecting cap in the assembling process. The broken position is
at the shoulder of the shaft which can be seen in Figure2.7.
When the connecting cap is connected with the shaft, the threaded connection generates
axial tension force and tangential force on the shaft by the connecting cap. When the
connecting cap stops at the shoulder of the shaft, the tension force will increase sharply if
the tread keeps being tightened. The shaft is made of engineering plastic and the increased
force is much higher that the maximal force allowed of the shaft. However, the design is
not able to control the tightness of threading to avoid the increased force.
The other defect is a weakness related to distance control. The distance between
the deflection center of joystick and the ball center is a very important coefficient for
ball position computation. However, the threaded connection between the shaft and the
connecting cap is not able to control the tightness of the threading so that the distance is
not fixed. This will have negative effects on computing the position of the tooling ball.
As a result, improvements should focus on these two defects. The second version of
the mechanical component design is given in the next section, with improvements on the
defects.
2.4.2 Version 2
Figure2.8 illustrates the mechanical component of version 2.
33
Figure 2.8: Mechanical Component of Version 2
Parts within Figure2.8 are listed below:
Part 1: Cone Part
Part 2: PCB
Part 3: M3 Counter Sunk Screw
Part 4: Bottom Spring Fixer
Part 5: Tactile Switch
Part 6: Sliding Part
Part 7: Inner Compressing Spring
Part 8: Outer Compressing Spring
34
Part 9: Brass Pushing
Part 10: Joystick Mounting Base
Part 11: Joystick Mounting Post
Part 12: Stopper 1
Part 13: Stopper 2
Part 14: Top Spring Fixing
Part 15: Joystick
Joystick that is applied in version 2 is J6 series joystick purchased from Elobau Sensor
Technology. The technical specifications of the joystick are provided in AppendixA. Part
5, the tactile switch, is the B3F-5000 one purchased from Omron Electronic Components
LLC. Its technical specifications are provided in AppendixA.
Feature description
The joystick mounting base is made of 1045 steel and connected with the sixth axis of the
robot arm through the cylinder. The position of the joystick mounting base with the robot
arm is fixed by those two threaded holds. The angular operating range of the joystick is
±25∘ and the joystick is fixed to the joystick mounting base and the joystick mounting
post through four M5 counter sunk screws at the four corners of the joystick. A pusher
made of brass is fixed to the shaft of joystick by stopper 1 and 2. The sliding part slides
on the pusher and its position is fixed by the outer compressing spring and two stoppers.
The cone part is connected to the sliding part by three M3 counter sunk screws and the
PCB is fixed between the sliding part and the cone part with the tactile switch soldered
on. The method for generating the digital signal is the same as the method in version 1.
35
Figure 2.9: Signal Transmission Flow of Tooling Ball Detecting Process
Analysis of the design
The design of version 2 achieves the target functions without the deficiencies which occurred
in version 1. The tooling ball is properly located and the satisfactory performance of the J6
joystick increased the effects of the ball locating operation. The experiments and testing
process of the J6 joystick and the detector of version 2 will be introduced in Chapter 3.
2.5 Electrical Component Design
Figure2.9 illustrates the signal transmission flow of the tooling ball detecting process.
From the Figure2.9, we can see that there are five output signals of the mechanical
36
Figure 2.10: LPC2131 ARM7 Microcontroller with the Development Board EasyARM 2131
component: one digital signal from the tactile switch and four analog voltage signals from
the joystick. The electrical component should let the robot controller know the value of
the four voltage signals when the digital signal is generated. Therefore, two processes
are required to achieve the target: the AD conversion process and the communication
process. They are to be implemented by a Philips LPC2131 ARM7 microprocessor based on
the development board EasyARM 2131 which is developed by Zhouligong Microcontroller
Development Co. Ltd (Figure2.10).
Voltage signals are input into the development board from GPIO (General Purpose I/O)
and converted into bits by the AD converter that is integrated into the microprocessor.
From the serial port of the development board, bits are sent to the robot controller through
the COM1 port and read by programs within the robot system.
The values of four voltage signals range between 0.55V and 4.95V when the supply
voltage is 5.5V (the maximal input voltage of the joystick). The convertible voltage value
37
of the AD converter is from 0V to 2.48V because the reference voltage of the development
board is 2.48V [14]. As a result, output voltage signals from the joystick should be decreased
into half (0.275V to 2.475V) before being input into the microprocessor from GPIO. This
is achieved by the pre-processing unit.
The digital signal from the detecting part is considered as the External Interrupt to
the microprocessor. Once the interrupt is activated, the detector stops detecting the ball
and AD converter starts converting the voltage signals into bits.
UART (Universal Asynchronous Receiver/ Transmitter) that is integrated into the
microprocessor can be utilized for serial communication. There is also a COM1 port in
the robot controller for serial communication. The microprocessor and the robot controller
can communicate with each other through RS232 Cables, and bits converted by the AD
converter can be obtained by the robot controller.
The program that is burned in the microprocessor is provided in AppendixB and the
program flow chart is shown in Figure2.11.
2.6 Computational Component Design
The computational component designed contains two layers. The first layer is designed for
data processing, which is implemented by programs programmed in the robot controller.
The second layer is the computing layer which is designed for position computing utilizing
known parameters. The second layer is inserted into the first layer. The first layer’s
operating data that is required in the second layer. The program flow chart is given in
Figure2.12 and details of the program are provided in AppendixB.
In order to compute the position of the tooling ball in the second layer, bits representing
output voltage values of the joystick received from the microprocessor are first read and
translated into the deflection angles of the joystick. Next, according to Equation 2.3, the
38
Figure 2.11: Program Flow Chart of ARM7 Microprocessor
39
Figure 2.12: RAPID Program Flow Chart
40
position of the tooling ball in relation to the joystick is computed according to the values
of deflection angles. Third, according to the transformation in the tooling ball detecting
process, the position of the tooling ball in the world coordinate system is computed as
the final result. The final result of computation is saved into memory for the mould
calibration process of TIG automatic welding and, the results display the result on the
screen of FlexPendant to be checked by the operator.
2.6.1 Compute Deflection angles of joystick
Values of four output voltage signals of joystick are firstly read from the microprocessor.
Define joystick coordinate system as which is shown in Figure2.13. There is a group
of output voltage signals V x1out, V
x2out, V
y1out and V y2
out for a detecting process received from
microprocessor. V x1out is the voltage value of signal 1 for Xj and V x2
out is the voltage value of
signal 2 for Xj. Vy1out is the voltage value of signal 1 for Yj and V y2
out is the voltage value of
signal 2 for Yj.
Output voltage values are proportional to the deflection angle. Slopes of each signal kx1,
kx2, ky1, ky2 and output voltage values at center position V x1c , V x2
c , V y1c , V y2
c are obtained
from joystick calibration experiment which is described in Chapter 3. Then according to
Equation 2.2 we have:
�x1 = (V x1out − V x1
c )/kx1 = ΔV x1/kx1 (2.4)
�x2 = (V x2out − V x2
c )/kx2 = ΔV x2/kx2 (2.5)
�y1 = (V y1out − V y1
c )/ky1 = ΔV y1/ky1 (2.6)
�y2 = (V y2out − V y2
c )/ky2 = ΔV y2/ky2 (2.7)
�x1 is the deflection angle about the axis Xj computed from signal 1 and �x2 is the
deflection angle about the axis Xj computed from signal 2. �y1 is the deflection angle
41
Figure 2.13: Joystick Coordinate system
42
about the axis Yj computed from signal 1 and �y2 is the deflection angle about the axis Yj
computed from signal 2.
Then deflection angle about the axis Xj is �x = (�x1+�x2)/2 and deflection angle about
the axis Yj is �y = (�y1 + �y2)/2.
2.6.2 Compute position of tooling ball in joystick coordinate sys-
tem
According to the setting of the joystick coordinate system in Figure2.13, once the tooling
ball is appropriately located by the detector, Equation 2.3 can still be applied to compute
the position of the tooling ball in the joystick coordination system. L is the distance form
the deflection center of the joystick (the origin of the joystick coordinate system) to the
spherical center of the tooling ball. It is a negative value.
2.6.3 Transformation process in tooling ball detecting process
The transformation process in the robot system among coordinate systems is shown in
Figure2.14.
There are three coordinate systems in the process of tooling ball detection: the world
coordinate system Xw − Yw − Zw, the tool coordinate system Xt − Yt − Zt and the joy-
stick coordinate system Xj − Yj − Zj. P is the spherical center of a tooling ball. The
transformation process from a world coordinate system to a joystick coordinate system is
described by the following two transformations.
From Xw − Yw − Zw to Xt − Yt − Zt, there is a translation which is described by
transformation matrix in Equation 2.8.
43
Figure 2.14: Transformation Process in Robot System
44
Twt =
⎛⎜⎜⎜⎜⎜⎜⎝1 0 0 xwTCP
0 1 0 ywTCP
0 0 1 zwTCP
0 0 0 1
⎞⎟⎟⎟⎟⎟⎟⎠ (2.8)
From Xt − Yt − Zt to Xj − Yj − Zj, there is a translation followed by a rotation about
the axis Zj, which are described by transformation matrixes in Equation 2.9.
Ttj = T transtj T rottj =
⎛⎜⎜⎜⎜⎜⎜⎝1 0 0 Δx
0 1 0 Δy
0 0 1 Δz
0 0 0 1
⎞⎟⎟⎟⎟⎟⎟⎠
⎛⎜⎜⎜⎜⎜⎜⎝cos �� − sin �� 0 0
sin �� cos �� 0 0
0 0 1 0
0 0 0 1
⎞⎟⎟⎟⎟⎟⎟⎠ (2.9)
Describes the position of a tooling ball’s spherical center in the world coordinate system
by Pw =(xwP ywP zwP 1
)T. Describes position of a tooling ball’s spherical center in
the joystick coordinate system by P j =(xjP yjP zjP 1
)T. They can be converted to
each other in accordance with the relationship set forth in Equation 2.10.
Pw = TwtTtjPj
=
⎛⎜⎜⎜⎜⎜⎜⎝1 0 0 xwTCP
0 1 0 ywTCP
0 0 1 zwTCP
0 0 0 1
⎞⎟⎟⎟⎟⎟⎟⎠
⎛⎜⎜⎜⎜⎜⎜⎝1 0 0 Δx
0 1 0 Δy
0 0 1 Δz
0 0 0 1
⎞⎟⎟⎟⎟⎟⎟⎠
⎛⎜⎜⎜⎜⎜⎜⎝cos �� − sin �� 0 0
sin �� cos �� 0 0
0 0 1 0
0 0 0 1
⎞⎟⎟⎟⎟⎟⎟⎠
⎛⎜⎜⎜⎜⎜⎜⎝L cos(−�x) sin �y
L cos �y sin(−�x)
L cos(−�x) cos �y
1
⎞⎟⎟⎟⎟⎟⎟⎠(2.10)
After computing the right side of Equation 2.10, the position of the tooling ball in the
world coordinate system can be figured out. Equation 2.11 is derived from Equation2.10
and applied in the program of computational component.
45
Pw =
⎛⎜⎜⎜⎜⎜⎜⎝xwP
ywP
zwP
1
⎞⎟⎟⎟⎟⎟⎟⎠ =
⎛⎜⎜⎜⎜⎜⎜⎝L(cos �� cos �x sin �y + sin �� cos �y sin �x) + xwTCP + Δx
L(sin �� cos �x sin �y − cos �� cos �y sin �x) + ywTCP + Δy
L cos �x cos �y + zwTCP + Δz
1
⎞⎟⎟⎟⎟⎟⎟⎠ (2.11)
2.6.4 Coefficients for Computation
There are ten coefficients in Equation 2.11 for position computation:
1. Deflection angles �x and �y
2. Distance from the deflection center of the joystick to the spherical center of the
tooling ball L
3. The rotation angle of rotation transformation process ��
4. The position of the TCP in the world coordinate system xwTCP , ywTCP and zwTCP
5. The position of the joystick deflection center in the tool coordinate system Δx, Δy
and Δz
�x and �y can be computed from the output signals of the joystick using Equations 2.4
to 2.7. xwTCP , ywTCP and zwTCP can be directly obtained by a robot controller. However, L,
��, Δx, Δy and Δz are not previously known and therefore need to be figured out through
detector calibration which will be introduced in Chapter 3.
2.7 Cell System Integration
As a requirement mentioned in Chapter 1, the cell system designed should be able to be
integrated by the automatic TIG welding system. Though the integration work has not
46
been started, some points will be introduced here. Integration contains the following three
tasks:
1. Connection between the detector and the sixth axis of the robot arm
The detector is mounted on the sixth axis of the robot arm and the mechanism for the
connection needs to be designed. There are two requirements in the design process:
∙ The torch for welding task should not be removed when detecting the tooling
ball because of the complicated assembly work of the torch. In the other hand,
the detecting process should not be affected by the torch.
∙ The detector should be able to be connected with the robot arm quickly and
conveniently in order to increase work efficiency. Tooling ball detection is just
a small part of the entire welding task, so it is not necessary to spend a lot of
time on this.
2. Cables among components for signal transmission and power supply
Both joystick and electrical components require a 5V DC power supply. This is
provided by the USB port of the robot controller and cables are required to be
assigned. The joystick moves with the robot arm, so the cable that provides power
should be securely attached to the robot arm for the convenience of the detecting
operation. Lots of signals are to be transmitted among components. The selection of
cables for signal transmission and connecting method between cables and ports are
important for securing the transmission quality and operation durability.
3. Software integration
The softwares engineer at Tool-Tec Welding Inc developed an application for auto-
matic TIG welding tasks. It is installed in the FlexPendant for the operator to carry
47
out. All of procedures of the automatic TIG welding task can be achieved by run-
ning the application. Tooling ball detection is one of the steps in the task of mould
calibration. The program programmed for a computational component should be
integrated by the application and this is the software integration of cell detecting
system.
2.8 Chapter Summary
Other than for the integration process, the new tooling ball detecting method is designed
and implemented and it is theoretically described in this chapter. As mentioned in 2.6.1,
four slopes of joystick output signals are to be obtained by the joystick calibration process
and five coefficients need to be calibrated by the detector calibration process. Experiments
for joystick calibration and detector calibration are designed and will be described in the
next chapter. In addition, the next chapter also describes the simulation of the tooling
ball detecting process and evaluates the detecting method designed.
48
Chapter 3
Calibration and Detecting Test
The joystick needs to be calibrated in order to obtain the slopes of the input-output curves
for deflection angle computation. The detector also needs to be calibrated to obtain un-
known coefficients. Calibration experiments are designed to achieve these targets. They are
described in this chapter and include the calibration mechanism, experimental procedure,
mathematical modeling, results and analysis.
The mechanical component is first tested on the NC milling machine. The testing
process is combined with the detector calibration experiment. Base on the results of the
experiment, the mechanical component is also evaluated in this chapter.
49
Figure 3.1: Milling Machine
3.1 NC Milling Machine with Indexing Head & Tool-
ing Ball
3.1.1 NC Milling Machine with Indexing Head
The NC milling used in the experiments is described. The axes of the milling machine
coordinate system are illustrated in Figure3.1. The origin is defined by the operator which
is not fixed. To decide the position of the origin, select any point on the center axis of
the tool holder that is convenient for operation as the Tool Center Point (TCP), detect
another selected position in space as the origin of the milling machine coordinate system
and set the position of the TCP to zero. The position of the TCP is displayed on the
screen of the milling machine.
There is an indexing head mounted on the table of the milling machine, and the center
50
Figure 3.2: Tooling Ball
Figure 3.3: Dimension of the Tooling Ball
axis of both the chuck of milling machine and the indexing head are parallel to the vertical
axis of the milling machine. The indexing head can be rotated by the operator.
3.1.2 Tooling Ball
The tooling ball used for detection simulation is made of stainless steel and has a diameter
of 15.85mm (Figure3.2). The dimension of the tooling ball is provided in Figure3.3.
51
Figure 3.4: The output voltage of joystick is proportional to the deflection angle.
3.2 Joystick Calibration
The joystick used in the mechanical design, J6 series joystick, is a redundant biaxial joystick
from Elobau Sensor Technology. The outputs are two pairs of analog voltage signals and
each pair represents the deflection angle of one axis. One deflection angle is represented by
two output signals and this is why the joystick is called redundant. In each pair, there are
two voltage signals of which the values are opposite to each other. The most important
property of the output signals is that the output voltage is proportional to the deflection
angle as shown in Figure3.4.
In Figure3.4, Vmin and Vmax are the minimum and maximum values of the output
voltage signals for an operating voltage Vin. �max is the max deflection angle and Vc is the
value of the output voltage signal when the shaft of the joystick is spring returned to the
center position.
52
Figure 3.5: Configuration Example of Joystick Coordinate System
The joystick coordinate system is set as shown in Figure3.5. The deflection angle about
the axis Xj, �x, outputs voltage signals V x1out and V x2
out. The deflection angle about the axis
Yj, �y, outputs voltage signals V y1out and V y2
out. The slopes of V x1out and V x2
out are kx1 and kx2
respectively. The slopes of V y1out and V y2
out are ky1 and ky2 respectively. The output voltages
at the center position with no deflection are V x1c , V x2
c , V y1c and V y2
c for the axes Xj and Yj,
respectively. There are thus four input-output relationships as represented by Equation
3.1to 3.4 respectively.
53
V x1out = kx1�x + V x1
c (3.1)
V x2out = kx2�x + V x2
c (3.2)
V y1out = ky1�y + V y1
c (3.3)
V y2out = ky2�y + V y2
c (3.4)
3.2.1 Method for Joystick Calibration
First, a mechanism for joystick calibration is designed. Second, operation instructions
about applying the mechanism for calibration is described. Third, a mathematical model is
introduced describing the operation process for position computation. Finally, the method
for processing the data obtained is given.
Mechanism for Joystick Calibration
The mechanism designed for calibrating the joystick is illustrated in Figure3.6.
Parts within Figure3.6 are listed below:
Part 1: Joystick Mounting Base
Part 2: Joystick Mounting Post
Part 3: Joystick (3–1: body, 3–2: shaft)
Part 4: Shaft Extension
Part 5: Centering Shaft
Part 6: Linear Motion Bearing
54
Figure 3.6: Mechanism for Joystick Calibration
55
Part 7: Bearing Housing
The joystick mounting base is fixed by the jaw of the indexing head. The body of
the joystick is secured to the mounting base by means of the mounting post. The shaft
extension both extends the length of the joystick shaft and provides a smooth surface
for the linear motion bearing to slide along. The linear bearing is mounted in the bearing
housing which also provides a pivot by which the linear bearing is attached to the centering
shaft. The indexing head on the milling machine table is centered under the chuck and the
centering shaft is secured in the tool holder. The rotation axis is vertical during the whole
joystick calibration process. The deflection angles around each axis of the joystick change
as the indexing head is rotated. However, the combined deflection angle is not changed.
The combined deflection angle of the shaft, as is indicated in �f , is the angle between the
center axis of the shaft and the axis of joystick coordinate system. �f is a combination of
�x and �y.
Joystick Calibration Procedure
Step 1: Preset and fasten the indexing head and milling machine.
Locate the indexing head on the table of the milling machine.
Step 2: Align the rotation axes.
Fix a steel rod in the jaws of the indexing head. Adjust the position of the milling ma-
chine table until the chuck is centered on the steel rod (Figure3.7). Reset coordinate
values x and y displayed on the LCD screen to zero.
Step 3: Obtain V x1c , V x2
c , V y1c and V y2
c of joystick at the center position.
Attach the joystick onto the mounting base with the mounting post by M5 counter
sunk screws. Locate the mounting base stay in the indexing head jaws and close the
56
Figure 3.7: Center the tool holder on the steel rod.
jaws securely. With the chuck fully opened, raise the joystick with the mounting base
and post to get close to the chuck by operating the table of the milling machine on
its vertical axis until the joystick shaft is about 2cm into the chuck. Close the chuck
gently until it just makes contact with the joystick shaft (the joystick shaft should
still be able to rotate in the chuck). Rotate the indexing head while monitoring the
joystick output voltages. If the joystick is properly centered below the chuck, the
output voltages will not change significantly as the indexing head is rotated. If the
output voltages do change, adjust the position of the table along the axes Xm and
Ym of the milling machine until this voltage change in minimized over one rotation
of the indexing head. This is then the properly centered position with center voltage
outputs V x1c , V x2
c , V y1c and V y2
c .
Step 4: Mount all the parts in Figure3.6.
Open the chuck and lower the joystick with the mounting base and the post by
operating the table of the milling machine on its vertical axis. Attach the other parts
(4,5,6,7) to the joystick and then raise the whole mechanism so that the centering
shaft enters the chuck. Close the chuck on the centering shaft.
57
Step 5: Rotate the indexing head four degrees for each increment from 0∘ to 364∘. Record
output voltage values at the position of each increment.
Step 6: Record z value of milling machine as Z1.
Step 7: Change the position of the working table in Z direction of the milling machine.
Repeat Step 4 and Step 6 to obtain a second group of output voltage values and
another value of milling machine as Z2.
Step 8: Process two groups of data obtained and figure out kx1, kx2, ky1 and ky2.
Transformations in Calibration Process
There are three coordinate systems in calibration process, as illustrated in Figure3.8:
∙ Milling Machine Coordinate System Fm:
Axis Zm is vertical to the ground, pointing down. Axis Ym points toward the operator
and axis Xm follows the right-hand rule.
∙ Joystick Coordinate System Fj:
The setting of Fj is the same as that described in Figure3.5.
∙ Indexing Head Coordinate System Fc:
Axis Zc is vertical to the ground pointing down. Axis Xc maintains the same direction
as Xj rotating around axis Zc and axis Yc follows the right-hand rule. Plane Xc −
Oc − Yc coincides with plane Xj −Oj − Yj.
From Fm to Fc, the transformation process is a translation followed by a rotation. The
corresponding transformation matrix Tmc is given in Equation 3.5. Tmc describes the pose
of Fc in Fm.
58
Figure 3.8: Three Coordinate Systems in Joystick Calibration Process
59
Tmc =
⎛⎜⎜⎜⎜⎜⎜⎝1 0 0 xmc
0 1 0 ymc
0 0 1 zmc
0 0 0 1
⎞⎟⎟⎟⎟⎟⎟⎠
⎛⎜⎜⎜⎜⎜⎜⎝cos't − sin't 0 0
sin't cos't 0 0
0 0 0 0
0 0 0 1
⎞⎟⎟⎟⎟⎟⎟⎠ (3.5)
't is the angle from Xm to Xc about Zc. We have 't = '0 + 'i. '0 is the original
rotation angle of the indexing head and 'i is the rotation angle of the indexing head
which is accumulated from the original situation. It’s 4∘ for each increment of rotating
of the indexing head. If the indexing head has been rotated for i increments, we have
't = '0 + 4× i.
From Fc to Fj, the transformation process is a translation and there are transformation
matrix Tjc and its inverse matrix Tcj are shown in Equation 3.6. Tjc describes the pose of
Fc in Fj and Tcj describes the pose of Fj in Fc.
Tjc =
⎛⎜⎜⎜⎜⎜⎜⎝1 0 0 xjc
0 1 0 yjc
0 0 1 0
0 0 0 1
⎞⎟⎟⎟⎟⎟⎟⎠⇒ Tcj = T−1jc =
⎛⎜⎜⎜⎜⎜⎜⎝1 0 0 −xjc0 1 0 −yjc0 0 1 0
0 0 0 1
⎞⎟⎟⎟⎟⎟⎟⎠ (3.6)
As a result, from Fm to Fj, there is a transformation matrix Tmj shown in Equation
3.7. It can be simplified into Equation 3.8. Tmj describes the pose of Fj in Fm.
Tmj = TmcTcj =
⎛⎜⎜⎜⎜⎜⎜⎝1 0 0 xmc
0 1 0 ymc
0 0 1 zmc
0 0 0 1
⎞⎟⎟⎟⎟⎟⎟⎠
⎛⎜⎜⎜⎜⎜⎜⎝cos't − sin't 0 0
sin't cos't 0 0
0 0 0 0
0 0 0 1
⎞⎟⎟⎟⎟⎟⎟⎠
⎛⎜⎜⎜⎜⎜⎜⎝1 0 0 −xjc0 1 0 −yjc0 0 1 0
0 0 0 1
⎞⎟⎟⎟⎟⎟⎟⎠ (3.7)
60
Tmj =
⎛⎜⎜⎜⎜⎜⎜⎝cos't − sin't 0 xmc − xjc cos't + yjc sin't
sin't cos't 0 ymc − yjc cos't − xjc sin't
0 0 1 zmc
0 0 0 1
⎞⎟⎟⎟⎟⎟⎟⎠ (3.8)
Also since Tjm = T−1mj describing the pose of Fm in Fj, we have transformation matrix
Tjm for the transformation from Fj to Fm, as is shown in Equation 3.9.
Tjm =
⎛⎜⎜⎜⎜⎜⎜⎝cos't sin't 0 xjc − xmc cos't − ymc sin't
− sin't cos't 0 yjc − ymc cos't + xmc sin't
0 0 1 −zmc0 0 0 1
⎞⎟⎟⎟⎟⎟⎟⎠ (3.9)
Deflection Angles of Joystick in Calibration Process
Figure3.9 illustrates the geometrical relationship of the mechanism for the deflection angle
computing in the joystick calibration process. The pivot point P (the point at which the
linear bearing housing is attached to the centering shaft) is located on a virtual plane V
to which the axis of the shaft extension is normal. This means that the distance between
the pivot point and the shaft extension axis is fixed and in the present design measures
22.5mm, as shown in Figure3.9. The angle that the joystick axis is deflected can therefore
be set by adjusting the distance between the chuck of the milling machine and the indexing
head. This angle, indicated as �f in Figure3.9 is what we refer to as the combined deflection
angle, in that it is a combination of �x and �y.
According to Equation 2.3 in Chapter 2, the position of point P in the joystick coordi-
nate system is known by Equation 3.10:
61
Figure 3.9: Deflection Angles of Joystick in Calibration Process
62
P j =
⎛⎜⎜⎜⎜⎜⎜⎝xjP
yjP
zjP
1
⎞⎟⎟⎟⎟⎟⎟⎠ =
⎛⎜⎜⎜⎜⎜⎜⎝L cos(−�x) sin �y
L cos �y sin(−�x)
L cos(−�x) cos �y
1
⎞⎟⎟⎟⎟⎟⎟⎠ (3.10)
The position of point P in milling machine coordinate system Fm is Pm =(xmP ymP zmP 1
)Tand since the transformation matrix Tjm defines coordinate system Fm in the coordinate
system Fj, the position of point P in the joystick coordinate system is computed by Equa-
tion 3.11.
P j =
⎛⎜⎜⎜⎜⎜⎜⎝xjP
yjP
zjP
1
⎞⎟⎟⎟⎟⎟⎟⎠ =
⎛⎜⎜⎜⎜⎜⎜⎝L cos(−�x) sin �y
L cos �y sin(−�x)
L cos(−�x) cos �y
1
⎞⎟⎟⎟⎟⎟⎟⎠ = TjmPm
=
⎛⎜⎜⎜⎜⎜⎜⎝cos't sin't 0 xjc − xmc cos't − ymc sin't
− sin't cos't 0 yjc − ymc cos't + xmc sin't
0 0 1 −zmc0 0 0 1
⎞⎟⎟⎟⎟⎟⎟⎠
⎛⎜⎜⎜⎜⎜⎜⎝xmP
ymP
zmP
1
⎞⎟⎟⎟⎟⎟⎟⎠ (3.11)
and so, we have Equation3.12.
P j =
⎛⎜⎜⎜⎜⎜⎜⎝xjc + (xmP − xmc ) cos't + (ymP − ymc ) sin't
yjc + (ymP − ymc ) cos't + (xmP − xmc ) sin't
zmp − zmc1
⎞⎟⎟⎟⎟⎟⎟⎠ (3.12)
Then we can equate the two equations for P j as shown in Equation 3.13.
63
P j =
⎛⎜⎜⎜⎜⎜⎜⎝L cos(−�x) sin �y
L cos �y sin(−�x)
L cos(−�x) cos �y
1
⎞⎟⎟⎟⎟⎟⎟⎠ =
⎛⎜⎜⎜⎜⎜⎜⎝xjc + (xmP − xmc ) cos't + (ymP − ymc ) sin't
yjc + (ymP − ymc ) cos't + (xmP − xmc ) sin't
zmp − zmc1
⎞⎟⎟⎟⎟⎟⎟⎠ (3.13)
Solve Equation 3.13 and the deflection angles of the joystick can then be obtained by
Equations 3.14 and 3.15, respectively.
�x = − arctan(yjPzjP
) = − arctan[yjc + (ymP − ymc ) cos't + (xmP − xmc ) sin't
zmp − zmc]
wℎere : sgn(�x) = −sgn(yjP )
= −sgn[yjc + (ymP − ymc ) cos't + (xmP − xmc ) sin't] (3.14)
�y = arctan(xjPzjP
) = arctan[xjc + (xmP − xmc ) cos't + (ymP − ymc ) sin't
zmp − zmc]
wℎere : sgn(�y) = sgn(xjP )
= sgn[xjc + (xmP − xmc ) cos't + (ymP − ymc ) sin't] (3.15)
Equations 3.14 and 3.15 can also be simplified into Equations 3.16 and 3.17.
�x = − arctan[A sin(�− 't) +B]
wℎere : A =
√(ymP − ymc )2 + (xmP − xmc )2
zmp − zmc
B =yjc
zmp − zmc
sin� =ymP − ymc√
(ymP − ymc )2 + (xmP − xmc )2
cos� =xmP − xmc√
(ymP − ymc )2 + (xmP − xmc )2(3.16)
64
�y = arctan[A cos(�− 't) +D]
wℎere : A =
√(ymP − ymc )2 + (xmP − xmc )2
zmp − zmc
D =xjc
zmp − zmc
sin� =ymP − ymc√
(ymP − ymc )2 + (xmP − xmc )2
cos� =xmP − xmc√
(ymP − ymc )2 + (xmP − xmc )2(3.17)
Parameters xjc and yjc are distances between the axis Zj of joystick coordinate system
and the axis Zc of indexing head coordinate system. Ideally, they should both be zero.
The mounting base was designed so as to minimize them. However, it is necessary to
indicate them in the calibration process, although their values are both less than one-half
millimeter.
The value of zmP −zmc is the distance d/ tan �f in which d = 22.5mm, �f ∈ (0∘, 25∘)) and
corresponds to the distance between the pivot on the centering shaft and the pivot axes of
the joystick (which is not acceptable). This distance can be varied between 48.25mm and
53.24mm. Consequently, B and D in Equation 3.16 and 3.17 will be very small (< 0.01)
and can be safely ignored in the computations. (Equation 3.18 and 3.19)
�x = − arctan[A sin(�− 't)] (3.18)
�y = arctan[A cos(�− 't)] (3.19)
wℎere : A =
√(ymP − ymc )2 + (xmP − xmc )2
zmp − zmc(3.20)
sin� =ymP − ymc√
(ymP − ymc )2 + (xmP − xmc )2(3.21)
cos� =xmP − xmc√
(ymP − ymc )2 + (xmP − xmc )2(3.22)
65
Output Voltage Values for Result Estimating of Calibration Experimental Re-
sult
Equation 3.23 to 3.26 is derived from Equation 3.1to 3.4.
�x = (V x1out − V x1
c )/kx1 = ΔVx1/kx1 (3.23)
�x = (V x2out − V x2
c )/kx2 = ΔVx2/kx2 (3.24)
�y = (V y1out − V y1
c )/ky1 = ΔVy1/ky1 (3.25)
�y = (V y2out − V y2
c )/ky2 = ΔVy2/ky2 (3.26)
Considering Equations 3.18 and 3.19 and Equations 3.23 to 3.26, the voltage values of
the output signals can be written as Equations 3.27 to 3.30.
V x1out = {− arctan[Ax1 sin(�x1 − 't)]}kx1 + V x1
c (3.27)
V x2out = {− arctan[Ax2 sin(�x2 − 't)]}kx2 + V x2
c (3.28)
V y1out = {arctan[Ay1 cos(�y1 − 't)]}ky1 + V y1
c (3.29)
V y2out = {arctan[Ay2 cos(�y2 − 't)]}ky2 + V y2
c (3.30)
Method for Data Processing
Parameters Hi, d and the corresponding parameter �f,i in Figure3.9 are related as relation-
ship:
sin �f,i = d/Hi (3.31)
where subscript i refers to group number. This can be used for processing data from the
calibration experiments in order to obtain values for kx1, kx2, ky1 and ky2. Two groups of
66
outputs are measured at two different heights of the working table, following the calibration
procedure previously described.
For the itℎ group of data, �x,i = �f,i when �y,i = 0 and �y,i = �f,i when �x,i = 0. This
means that the maximum and the minimum output voltage values of signals represent the
same deflection angle �f,i. As a result, we have Equation 3.32 to 3.35 for computing �f,i
from the two groups of data.
�f,i = {[max(V x1out,i)−min(V x1
out,i)]/2− V x1c }/kx1 = arcsin(d/Hi) (3.32)
�f,i = {[max(V x2out,i)−min(V x2
out,i)]/2− V x2c }/kx2 = arcsin(d/Hi) (3.33)
�f,i = {[max(V y1out,i)−min(V y1
out,i)]/2− V y1c }/ky1 = arcsin(d/Hi) (3.34)
�f,i = {[max(V y2out,i)−min(V y2
out,i)]/2− V y2c }/ky2 = arcsin(d/Hi) (3.35)
Because the z values of the milling machine at each measuring position of the working
table are recorded as Z1 and Z2 at Step 6 and Step 7, the difference between H1 and H2
can be computed as ΔH = ΔH2 −ΔH1 = Z2 − Z1. Thus we have Equation 3.36 to 3.39.
{[max(V x1out,1)−min(V x1
out,1)]/2− V x1c }/kx1 = arcsin(d/H1)
{[max(V x1out,2)−min(V x1
out,2)]/2− V x1c }/kx1 = arcsin[d/(H1 + ΔH)] (3.36)
{[max(V x2out,1)−min(V x2
out,1)]/2− V x2c }/kx2 = arcsin(d/H1)
{[max(V x2out,2)−min(V x2
out,2)]/2− V x2c }/kx2 = arcsin[d/(H1 + ΔH)] (3.37)
{[max(V y1out,1)−min(V y1
out,1)]/2− V y1c }/ky1 = arcsin(d/H1)
{[max(V y1out,2)−min(V y1
out,2)]/2− V y1c }/ky1 = arcsin[d/(H1 + ΔH)] (3.38)
{[max(V y2out,1)−min(V y2
out,1)]/2− V y2c }/ky2 = arcsin(d/H1)
{[max(V y2out,2)−min(V y2
out,2)]/2− V y2c }/ky2 = arcsin[d/(H1 + ΔH)] (3.39)
67
Table 3.1: Results of Joystick Calibration Experiment
V x1c V x2
c V y1c V y2
c
2.55V 2.56V 2.55V 2.53V
kx1 kx2 ky1 ky2
−0.0836 +0.0828 +0.0828 −0.0812
There are only two unknown values kx1/kx2/ky1/ky2 and H1 in each group with only
two equations. Thus, kx1, kx2, ky1, ky2 and H1 can be solved.
3.2.2 Result of Joystick Calibration Experiment
The recorded data for the two heights are plotted in Figure3.10. The horizontal axis is the
values of 'i ranging from o∘ to 364∘ and the vertical axis is the output voltage values of
joystick V out. According to Equation 3.27 to 3.30, it is known that phases and periods of
output voltage values V outx1 and V out
x2 are the same with opposite values to the center output
voltage values. Output voltage values V outy1 and V out
y2 have the same condition as V outx1 and
V outx2 with �
2phase difference. Therefore, Figure3.10 shows that data obtained from the
calibration experiment are reasonable. Table3.1 shows the center position voltage outputs
and the slopes of each signal computed from the data obtained from the experiment, as
described in 3.2.1.
Two groups of data obtained from the calibration experiment follow Equations 3.27 to
3.30. Knowing the slopes of each signal, output voltages and angle of rotation, the other
four parameters, Axi, Ayi and �xi, �yi can be obtained using the nonlinear fitting tool box
in Matlab by the following steps. The results are given in Tables3.2 and 3.3. The fitting
curves are illustrated in Figure3.11.
Step 1: Create data set for two groups of data in the form of V out vs 'i.
68
Figure 3.10: Output Voltage Values of Joystick at Two Heights in Joystick Calibration
Process
69
Figure 3.11: Fit to the Data of Joystick Calibration Experiment
Step 2: Type ’cftool’ in Matlab to open the curve fitting tool box.
Step 3: Smooth data sets created previously in Step 1.
Step 4: Select ’Custom Equations’ as the fitting type and input Equation 3.27 to 3.30 for
fitting.
Step 5: For each smoothed data set of output voltage value, fit data with curves by
Levenberg-Marquardt fitting method which is a kind of least square fitting method
and output result. [15] The result of fitting contains amplitudes Axi, Ayi and phases
�xi, �yi for each data set.
According to Equation 3.20, ∣A∣ represents the value of tan �f . Since �f does not change
during the rotation of indexing head, ideally speaking, values of A that are computed from
four signals in each group should be the same and the eight values of � should also be
70
Table 3.2: Amplitudes and Phases Offsets of Data in Group 1
Axi, Ayi �xi, �yi Goodness of Fitting RMSE
Ax1 = −0.2387(�f = 13.4253) �x1 = −58.47 0.01580
Ax2 = −0.2408(�f = 13.5391) �x2 = −58.03 0.01535
Ay1 = −0.2381(�f = 13.3928) �y1 = −58.34 0.01409
Ay2 = −0.2440(�f = 13.7122) �y2 = −58.35 0.01983
Table 3.3: Amplitudes and Phases Offsets of Data in Group 2
Axi, Ayi �xi, �yi Goodness of Fitting RMSE
Ax1 = −0.1934(�f = 10.9459) �x1 = −58.43 0.01727
Ax2 = −0.1950(�f = 11.0342) �x2 = −57.94 0.01876
Ay1 = −0.1918(�f = 10.8575) �y1 = −58.39 0.01268
Ay2 = −0.1969(�f = 11.1390) �y2 = −58.39 0.01049
the same in the two groups of data. Therefore, considering the data in Table3.2 and 3.3,
the values of A and � are reasonable. The average value of �f is 13.5175∘ in group 1 and
10.9942∘ in group 2. The average value of � is −58.29∘ which is computed from eight
values of two groups.
Deflection angle computation
After obtaining voltage outputs for joystick (V x1out, V
x2out, V
y1out and V y2
out), the deflection angles
�x and �y can be computed using Equation 3.40 and 3.41.Values of kx1, kx2, ky1, ky2, and
V x1c , V x2
c , V y1c , V y2
c are listed in Table3.1.
71
�x = (�x1 + �x2)/2 (3.40)
wℎere : �x1 = (V x1out − V x1
c )/kx1
�x2 = (V x2out − V x2
c )/kx2
�y = (�y1 + �y2)/2 (3.41)
wℎere : �y1 = (V y1out − V y1
c )/ky1
�y2 = (V y2out − V y2
c )/ky2
3.3 Detector Calibration and Testing
3.3.1 Objectives of Detector Calibration Experiment
The objectives of the detector calibration experiment are to determine unknown coefficients
for position computation. As mentioned in Chapter 2, there are ten coefficients in Equation
2.11 for tooling ball position computation. These coefficients are described below:
1. Deflection angles �x and �y
Two coefficients depend on deflection angles of the joystick. They can be computed
according to the output voltage values, center voltage outputs and slopes obtained
from the joystick calibration experiment. Therefore, they are known values in Equa-
tion 2.11 after the joystick calibration experiment.
2. Distance from the deflection center of the joystick to the spherical center of the
tooling ball L
Once the parts of the detector have been machined, measured and assembled, this
parameter only depends on the diameter of the tooling ball to be detected. Before
72
locating the tooling ball on the mould, the diameter of the tooling ball is to be
measured and recorded for computing L.
Tooling balls with different diameters to be detected cause different L. As shown
in Figure3.12, the diameter of the tooling ball measured is d with corresponding
distance L. L′ is the distance from the deflection center of joystick to the peak of
cone surface. � is the angle between the center axis of the detecting part and the
cone surface. w is the width of the cone surface. Thus we have the relationship:
L = L′ + (d/2)/ sin � (3.42)
For different sizes of tooling ball, L′ does not change and L can be computed by L′
and �. However, because of machining tolerance and the activation distance of the
tactile switch, L may not be exactly as designed. As a result, obtaining the value of
L corresponding to the different values of the tooling ball diameter is the first target
of the detector calibration experiment. There is only one tooling ball to be detected,
so only L is computed in the detector calibration process without computing L′.
3. Rotation angle of rotation transformation process ��
The detector is mounted on the sixth axis of a robot arm or other type of machine.
Different mechanism designs for attaching the detector to the machine or robot are
required. After mounting the detector, the x axis of the joystick coordinate system
Xj usually does not coincide with the x axis of the tool coordinate system Xt. This
is the rotation angle �� as the second compact of detector calibration.
4. Position of TCP in world coordinate system xwTCP , ywTCP and zwTCP
These are obviously known values in the ABB welding system and are also known
in most of the systems of NC machines as the NC milling machine to be used for
detector calibration, for instance.
73
Figure 3.12: The relationship between L and d
74
5. The position of joystick deflection center in tool coordinate system Δx, Δy and Δz.
Determining the values of these three coefficients is the last target of detector cal-
ibration. They designate the position of the joystick’s deflection center in the tool
coordinate system so that different settings of tool coordinate system cause different
values of these three values.
In order to achieve the targets, the calibration method is designed based on the process
of solving Equation 2.11. Suppose the position of the tooling ball is known and simulate
the detecting process designed in Chapter 2, Equation 2.11 becomes an equation set with
three equations and five unknown coefficients. Once two of the unknown coefficients are
fixed, the other three can be determined. The NC milling machine with indexing head is
utilized for the detector calibration.
3.3.2 Detector Calibration Procedure
Step 1: Obtain x and y value of the tooling ball in the milling machine coordinate system.
In the later processes of tooling ball detection, the tooling ball is fixed in the jaws
of the indexing head. As a result, the x and y values of the tooling ball center are
positioned at the center axis of the indexing head in the milling machine coordinate
system. By repeating the first two steps of the joystick calibration experiment, the x
and y values of the tooling ball center can be obtained. For convenience in computing,
set the x and y values displayed on the screen of the milling machine to zero.
Step 2: Obtain z value of tooling ball center in milling machine coordinate system.
Remove the steel rod and fix the tooling ball with the jaws of the indexing head.
Close the chuck and let the bottom surface of the chuck tangent contact the surface
of the tooling ball, as shown in Figure3.13. Set the z value of the milling machine to
75
Figure 3.13: Obtain z value of the tooling ball center by the chuck.
zero. The origin of the milling machine coordinate system is then set at the highest
point of the tooling ball surface. With the radius of the tooling ball R(7.925mm)
measured previously, the position of the center of the tooling ball in milling machine
coordinate system is:
Pm =(xmp ymp zmp 1
)T=(
0 0 R 1)T
=(
0 0 7.925 1)T
.
Step 3: Set up the detector.
Mount the detector to the milling machine by the tool holder. Figure3.14 illustrates
the coordinate systems in the detector calibration process.
Step 4: Detect the tooling ball from different positions.
Change the position of the TCP and detect the tooling ball to obtain voltage signal
outputs. Record voltage values at each detecting position and position the TCP
when the digital signal is activated. (Use the multi-meter to measure the resistor
of the tactile switch; once the resistor changes from infinite to a very small value,
the digital signal is considered as being activated.) The position of the measured
locations should follow the x and y values of the TCP as shown in Table3.4 and as
76
Figure 3.14: Coordinate Systems in Detector Calibration Process
77
Table 3.4: Ideal Detecting positions of TCP (mm)
index xmTCP ymTCP index xmTCP ymTCP
1 25 0 11 -25 0
2 23.776 7.725 12 -23.776 -7.725
3 20.225 14.695 13 -20.225 -14.695
4 14.695 20.225 14 -14.695 -20.225
5 7.725 23.776 15 -7.725 -23.776
6 0 25 16 0 -25
7 -7.725 23.776 17 7.725 -23.776
8 -14.695 20.225 18 14.695 -20.225
9 -20.225 14.695 19 20.225 -14.695
10 -23.776 7.725 20 23.776 -7.725
illustrated in Figure3.15. The positions do not need to be exactly the same as the
data in Table3.4.
3.3.3 Transformation Process
The transformation process is similar to the process in the ABB robot system. Firstly,
there is a translation from the milling machine coordinate system to the tool coordinate
system. Secondly, there is a translation from the tooling coordinate system to the joystick
coordinate system followed by a rotation about the axis Zj. Then, according to Equation
2.11, the position of the tooling ball in the milling machine coordinate system can be
computed by Equation 3.43. The milling machine coordinate system is simply the world
coordinate system discussed in Chapter 2. The position of the TCP in the world coordinate
system is then represented by TCPm =(xmTCP ymTCP zmTCP 1
)Tinstead of TCPw =(
xwTCP ywTCP zwTCP 1)T
.
78
Figure 3.15: Positions of TCP for Tooling Ball Detection
Pm =
⎛⎜⎜⎜⎜⎜⎜⎝xmP
ymP
zmP
1
⎞⎟⎟⎟⎟⎟⎟⎠ =
⎛⎜⎜⎜⎜⎜⎜⎝L(cos �� cos �x sin �y + sin �� cos �y sin �x) + xmTCP + Δx
L(sin �� cos �x sin �y − cos �� cos �y sin �x) + ymTCP + Δy
L cos �x cos �y + zmTCP + Δz
1
⎞⎟⎟⎟⎟⎟⎟⎠ (3.43)
Equation 3.43 is simplified into Equation 3.44.
79
Pm =
⎛⎜⎜⎜⎜⎜⎜⎝xmP
ymP
zmP
1
⎞⎟⎟⎟⎟⎟⎟⎠ =
⎛⎜⎜⎜⎜⎜⎜⎝L√a2 + b2 sin(�� + �) + xmTCP + Δx
−L√a2 + b2 cos(�� + �) + ymTCP + Δy
cL+ zmTCP + Δz
1
⎞⎟⎟⎟⎟⎟⎟⎠ (3.44)
wℎere : a = cos �x sin �y
b = cos �y sin �x
c = cos �x cos �y
sin� = a/√a2 + b2
cos� = b/√a2 + b2
3.3.4 Method for Data Processing
After the detector calibration procedure, we have the following data and equations.
1. Positions of TCP at 20 detecting positions at which the digital signal is activated
(see Table3.5). Twenty detecting positions are predetermined in 3.3.2 according to
positions in Table3.4. Operate the position of table on axes Xm and Ym of the
milling machine until values of xmTCP and ymTCP become almost the same as the data
in Table3.4within the range of ±0.1mm. Coordinate values of TCP of the milling
machine are displayed on the LCD screen with three significant digits which can be
read directly and be recorded manually.
2. Twenty groups of voltage outputs of the joystick at which the digital signal is acti-
vated (see Table3.6). After recording the position of TCP at each detecting position,
multimeter is used for measuring output voltage values of the joystick. The voltage
values are measured by the multi-meter with three significant digits.
80
Table 3.5: Actual Detecting positions of TCP (mm)
index xmTCP ymTCP zmTCP index xmTCP ymTCP zmTCP
1 24.990 -0.005 -20.100 11 -24.965 -0.010 -20.085
2 23.770 6.715 -20.170 12 -23.770 -7.705 -20.000
3 20.230 14.695 -20.145 13 -20.200 -14.670 -20.010
4 14.690 20.225 -20.175 14 -14.690 -20.160 -20.070
5 7.745 23.770 -20.060 15 -7.730 -23.770 -20.040
6 0.005 24.990 -20.120 16 0.005 -24.990 -20.160
7 -7.730 23.775 -20.115 17 7.735 -23.745 -20.090
8 -14.700 20.230 -20.115 18 14.685 -20.235 -20.085
9 -20.210 14.685 -20.125 19 20.195 -14.700 -20.055
10 -23.8050 7.710 -20.110 20 23.775 -7.730 -20.025
Table 3.6: Voltage Signal Outputs
index V x1out/V V x2
out/V V y1out/V V y2
out/V index V x1out/V V x2
out/V V y1out/V V y2
out/V
1 3.694 1.364 2.268 2.796 11 1.338 3.756 2.757 2.288
2 3.713 1.352 2.556 2.495 12 1.317 3.786 2.438 2.624
3 3.642 1.432 2.982 2.070 13 1.409 3.699 2.058 3.008
4 3.445 1.640 3.310 1.749 14 1.610 3.499 1.724 3.340
5 3.149 1.936 3.556 1.508 15 1.909 3.206 1.476 3.588
6 2.780 2.309 3.694 1.373 16 2.265 2.835 1.343 3.725
7 2.427 2.644 3.714 1.351 17 2.604 2.470 1.318 3.749
8 2.049 3.025 3.622 1.442 18 2.982 2.089 1.403 3.663
9 1.719 3.363 3.421 1.638 19 3.316 1.759 1.602 3.462
10 1.472 3.621 3.125 1.925 20 3.561 1.507 1.904 3.162
81
3. Position of the tooling ball center in the milling machine coordinate system (Equation
3.45). This is obtained from the second step of the detector calibration procedure
described in 3.3.2.
Pm =
⎛⎜⎜⎜⎜⎜⎜⎝xmp
ymp
zmp
1
⎞⎟⎟⎟⎟⎟⎟⎠ =
⎛⎜⎜⎜⎜⎜⎜⎝0
0
R
1
⎞⎟⎟⎟⎟⎟⎟⎠ =
⎛⎜⎜⎜⎜⎜⎜⎝0
0
7.925
1
⎞⎟⎟⎟⎟⎟⎟⎠ (3.45)
4. Equation 3.44 for position computation.
The data are processed by the following steps:
Step 1: Compute the deflection angles according to the voltage outputs and results ob-
tained from the joystick calibration procedure for Equations 3.40 and 3.41.
Step 2: Compute a, b, c and � according to Equation 3.44.
Step 3: For Δx = 0 and Δy = 0, we have Equation 3.46.
Pm =
⎛⎜⎜⎜⎜⎜⎜⎝xmP
ymP
zmP
1
⎞⎟⎟⎟⎟⎟⎟⎠ =
⎛⎜⎜⎜⎜⎜⎜⎝L√a2 + b2 sin(�� + �) + xmTCP
−L√a2 + b2 cos(�� + �) + ymTCP
cL+ zmTCP + Δz
1
⎞⎟⎟⎟⎟⎟⎟⎠ (3.46)
Step 4: Solve �� as Equation 3.47:
�� = atan2(−xmTCP , ymTCP )− � (3.47)
where atan2() is a function in Matlab[16].
82
Step 5: Solve L as Equation 3.48:
L = −xwTCP/[√a2 + b2 sin(�� + �)] (3.48)
Step 6: Solve Δz as Equation 3.49:
Δz = r − cL− zmTCP (3.49)
Equations 3.47, 3.48 and 3.49 are derived from Equation 3.46. Any detecting position
with xwTCP = 0 cannot be selected for calibration because when xwTCP = 0, �� and L will
be zero in Equations 3.47 and 3.48.
3.3.5 Detector Testing
Detector testing is aimed at testing the performance of the detector, including the operating
condition of the mechanical components and the accuracy of detection. Firstly, the position
of the tooling ball to be detected should be known. Secondly, the coefficients for position
computing should be obtained from the detector calibration process. Finally, the position
of the tooling ball obtained from the computation process should be compared with the
position value that is known.
The procedure for detector calibration and detector testing are the same, so the data
obtained in the detector calibration process can be used for detector testing. There are
twenty groups of data obtained. Four groups of the data are used for detector calibration
and the other 16 groups are used for detector testing.
83
Figure 3.16: Consistency of Angle Computation
3.3.6 Results of Data Processing
Data are processed following the steps described in 3.3.4. Firstly, all voltage signals are
converted into deflection angles according to Equations 3.40 and 3.41, as given in Table3.7.
There are six voltage values obtained in each detecting position. Four values (�x1, �x2,
�y1 and �y2) are computed from output voltage values measured from the joystick according
to the result of joystick calibration experiment(3.2.2). �x1 and �x2 represent deflection angle
of the joystick shaft about axis Xj; �y1 and �y2 represent deflection angle of the joystick
shaft about axis Yj. Therefore, the smaller the value difference between �x1 and �x2 and
the value difference between �y1 and �y2, the better the results for joystick calibration.
Figure3.16 illustrates the consistency of angle computation.
The maximal difference of �x is 0.51∘ and the maximal difference of �y is 0.76∘.
Secondly, following Step 2 to Step 6 described in 3.3.4, we have ��, L and Δz computed
84
Table 3.7: Results of Deflection Angle Computation
index �x1/∘ �x2/
∘ �x/∘ �y1/
∘ �y2/∘ �y/
∘
1 -3.41 -3.28 -3.34 -14.44 -13.68 -14.06
2 0.07 0.43 0.25 -14.59 -13.91 -14.25
3 5.22 5.67 5.44 -13.62 -13.06 -13.34
4 9.18 9.62 9.40 -11.11 -10.71 -10.91
5 12.15 12.59 12.37 -7.54 -7.17 -7.35
6 13.82 14.25 14.03 -3.03 -2.75 -2.89
7 14.06 14.52 14.29 1.01 1.47 1.24
8 12.95 13.40 13.17 5.62 5.99 5.80
9 10.52 10.99 10.75 9.70 9.94 9.82
10 6.94 7.45 7.20 12.81 12.90 12.85
11 2.50 2.98 2.74 14.44 14.50 14.47
12 -1.35 -1.16 -1.26 14.81 14.75 14.78
13 -5.94 -5.89 -5.91 13.76 13.65 13.70
14 -9.98 -9.98 -9.98 11.34 11.24 11.29
15 -12.97 -13.03 -13.00 7.80 7.67 7.73
16 -14.58 -14.72 -14.65 3.32 3.41 3.37
17 -14.88 -15.01 -14.95 -1.08 -0.65 -0.87
18 -13.85 -13.95 -13.90 -5.69 -5.17 -5.43
19 -11.45 -11.48 -11.46 -9.67 -9.16 -9.42
20 -7.80 -7.78 -7.79 -12.72 -12.09 -12.41
85
Table 3.8: Results of Detector Calibration Experiment
index ��/∘ L/mm Δz/mm index ��/∘ L/mm Δz/mm
1 13.105 100.32 -69.125 11 10.529 98.341 -67.103
2 14.784 100.33 -69.145 12 13.212 97.651 -66.473
3 14.113 101.00 -69.758 13 12.969 97.519 -66.305
4 13.350 101.57 -70.295 14 12.545 97.059 -65.746
5 12.421 101.43 -70.281 15 12.454 96.648 -65.349
6 11.413 101.15 -69.961 16 12.691 96.584 -65.200
7 13.142 100.95 -69.765 17 14.800 96.687 -65.390
8 12.527 101.17 -69.960 18 14.969 97.581 -66.288
9 11.651 100.44 -69.180 19 14.667 98.611 -67.361
10 11.015 99.19 -67.907 20 13.877 99.731 -68.553
Table 3.9: Average Values of ��, L and Δz at Calibration Positions
��/∘ L/mm Δz/mm
Average Value 13.9845 98.9045 -67.6933
for each group of data using values of �x and �y in Table3.7. Results of computation are
shown in Table3.8 and plotted in Figure3.17, 3.18 and 3.19 respectively.
Thirdly, select the 2nd, 7tℎ, 12tℎ and 17tℎ detecting positions as positions for calibration.
The other positions are used for testing the detector. Compute average values of ��, L
and Δz at calibration positions are the final result of calibration and they are given in
Table3.9.
Finally, use results in Table3.9 and the other 16 groups of deflection angles in Table3.8
to compute positions of the tooling ball according to Equation 3.44. We also have positions
of tooling ball computations shown in Table3.10.
86
Figure 3.17: ��
Figure 3.18: L
87
Figure 3.19: Δz
Table 3.10: Results of Detector Calibration Experiment
index TCPx TCPy TCPz index TCPx TCPy TCPz
1 0.003 -0.384 9.356 11 -0.046 1.505 7.334
3 -0.033 0.046 9.990 13 -0.263 0.356 6.536
4 0.225 -0.161 10.527 14 -0.511 0.363 5.978
5 0.651 -0.202 10.513 15 -0.638 0.198 5.581
6 1.121 0.025 10.193 16 -0.564 -0.006 5.431
8 0.510 0.380 10.192 18 0.350 0.249 6.519
9 0.581 0.835 9.412 19 0.176 0.239 7.593
10 0.367 1.244 8.139 20 -0.014 -0.045 8.785
88
Table 3.11: Errors of Tooling Ball Position Detection (mm)
index x-error y-error z-error index x-error y-error z-error
1 0.003 -0.384 1.431 11 -0.046 1.505 -0.591
3 -0.033 0.046 2.065 13 -0.263 0.356 -1.389
4 0.225 -0.161 2.602 14 -0.511 0.363 -1.947
5 0.651 -0.202 2.588 15 -0.638 0.198 -2.344
6 1.121 0.025 2.268 16 -0.564 -0.006 -2.494
8 0.510 0.380 2.267 18 0.350 0.249 -1.406
9 0.581 0.835 1.487 19 0.176 0.239 -0.331
10 0.367 1.244 0.214 20 -0.014 -0.045 0.860
The differences between the position of the tooling ball in computation and the position
of the ball in actual space are the error of detection. Errors computed are given in Table3.11
and plotted in Figure3.20. As the accuracy of detection required in 1.1.4, position errors on
each axis of milling machine coordinate system should locate within the range of ±1mm.
Two black lines in the Figure3.20 are the boundaries of accuracy requirement. Result
points plotted in the figure should locate between two black lines. If not, the detection is
not as accurate as is required.
3.4 Evaluation and Analysis
The accuracy of position computation is not satisfied according to Figure3.20. All of
position errors on the three axis of the milling machine coordinate system do not fully
locate within the range of ±1mm, especially the value of ’z-error’ on axis Zm.
In order to determine what is causing the low detecting accuracy, a common phe-
nomenon within the distribution of errors and target values (difference between �x1 and
89
Figure 3.20: Errors of Tooling Ball Position Detection
�x2, difference between �y1 and �y2, ��, L and Δz) are found. The trends of errors and
target values are similar to the trends of positions of TCP as shown in Figure3.21 to 3.25.
Figure3.21 shows the relationship between curves of (�x1 − �x2)2 and (�y1 − �y2)2 and
correspondent positions of TCP on axis Xm and axis Ym. Values of (�x1 − �x2)2 and
(�y1 − �y2)2 are used to describe the difference between �x1 and �x2 and the difference
between �y1 and �y2 respectively.
Figures3.22 to 3.24 show the relationship between values of ��, L and Δz and corre-
spondent positions of TCP on axis Xm and axis Ym.
Figure3.25 shows the relationship between errors on axes Xm, Ym and Zm and corre-
spondent positions of TCP on axes Xm and Ym.
This phenomenon shows that the problem of generating unsatisfied results may happen
at the process of calibrating the joystick for computing deflection angle. After rethinking
90
Figure 3.21: Relationship between (�x1−�x2)2 and (�y1−�y2)2 and Correspondent Positions
of TCP
Figure 3.22: Relationship Between �� and Correspondent Positions of TCP on Xm
91
Figure 3.23: Relationship Between L and Correspondent Positions of TCP on Ym
Figure 3.24: Relationship Between Δz and Correspondent Positions of TCP on Ym
92
Figure 3.25: Relationship between Errors of Position Detection and Correspondent Posi-
tions of TCP
the design of the joystick calibration process, three deficiencies were found.
1. Loose fit caused by using the screw connecting the centering shaft and bearing fixer.
The centering shaft and bearing housing are connected by an M3-40 socket head cap
screw with nut. The screw is also utilized as the shaft for the bearing housing to
rotate about. The distance between the center axis of this shaft and the center axis
of the linear motion bearing (d) is one of the most important distances for slope
computation. The screw and the hole are loose fit so that distance d cannot be
satisfied as the one designed in 3D modeling software.
2. Scoring of shaft extension caused by the bearing balls.
The shaft extension is inserted into the linear motion bearing. In the process of ro-
tating the indexing head, the shaft extension keeps rotating in the bearing. However,
the hardness of stainless steel balls is much higher than the hardness of the shaft ex-
tension which is made of 1045 without being heat treated. After rounds of rotation,
93
the shaft extension is broken by the balls of bearing and the coaxiality between the
shaft extension and the linear motion bearing decreases. The combined deflection
angle �f can not be maintained the same in the whole rotation process.
3. Low accuracy of multi-meter for measuring the output voltage signals.
Finally, the accuracy of multi-meter for measuring the output voltage signals is too
low (with two significant digits) to secure the accuracy of the voltage value measure-
ment.
Future works is required to improve these three deficiencies in order to achieve better
results from the joystick calibration experiment.
94
Chapter 4
An Extension: Optical Detecting
Method Design
The idea of developing a vision-based detecting method comes from the project requirement
of course SYDE 677 ’Computer Vision’ taught by Professor Tizhoosh. According to the
knowledge of image processing and concepts of computer vision obtained from the course,
a simplified and specialized vision-based detecting method is designed. The simplification
and specialization are achieved by utilizing the geometry properties of reflection image
which is formed by a ’C’ shape light source onto the spherical surface of a stainless steel
tooling ball.
Because the vision-based detecting is a non-touch detection method and the distance
in taking photos can be controlled, it may perform better than mechanical touching in a
high temperature environment. Therefore, for tooling ball detecting purposes in a mould
calibration process in a high-temperature working environment at about 700F ∘, a vision-
based tooling ball detecting method can be applied as an extension for the mechanical
touch detection described in Chapters 2 and 3.
Due to lack of time and devices to achieve the entire detecting method based on an
95
Figure 4.1: Partial Ring Shaped Light Source
ABB robot, the target of the course project is simply to find out the ’C’ shape reflection
image in photos and compute the position of the tooling ball in a photo coordinate system
in order to test the feasibility of the vision-based method. Firstly, the hardware setting for
taking photos of the tooling ball is introduced. Secondly, relevant optical characteristics
are mentioned. Thirdly, a vision-based tooling ball detecting method is described with
the results of the experiment provided. Finally, the chapter summary concludes the vision-
based detecting method design and the compensation relationship between the mechanical-
touch detection and vision-based detecting methods are discussed.
4.1 Hardware Setting
∙ Light source:
The light source is a partial ring-shaped light source which is shown in Figure4.1.
∙ Camera:
96
Figure 4.2: Position Relationship among the Camera, Light Source and the Tooling Ball
’SONY T100 Cyber-shot’ digital camera is selected to take images of the tooling ball.
The resolution of the camera is 1536 by 2048 pixels.
∙ Position and Operation Configuration:
When the camera is taking images of tooling ball, the optic axis of the camera’s lens
should always coincide with the center axis of the ring-shaped light source. As well,
the optic axis should always be perpendicular to the Xw−Ow−Yw plane of the world
coordinate system. The position relationship amongst the camera, the light source
and the tooling ball is briefly displayed in Figure4.2.
97
4.2 Optical Characteristics of Tooling Ball
The fine polished surface makes the tooling ball appears as a spherical mirror with unique
optic characteristics regarding light reflection and reflection image formation, if it is com-
pared with the surface of work pieces like moulds of autos, for instance. Two differences
(O Difference) between optic characteristics of the tooling ball and the work piece are
described as followings.
O Difference 1: The ratio between the diameter of the tooling ball’s effective reflection
surface and the radius of the ball is always two. The ratio of the work pieces’ surface
is smaller than 1/3 in most cases. Geometrical characteristics of image formation
are totally different between the two types of reflection surfaces. A light source with
special shape will form different reflection images on two different types of surfaces.
[17]
O Difference 2: Since the spherical surface of a tooling ball is fine polished, the surface
smoothness of a tooling ball is always higher than the surface of a work piece. As
well, the surface of a tooling ball is always closer to the light source than the work
piece. As a result, the gray level of the pixels in the image which is formed by
reflecting light from the tooling ball is one of the highest areas of pixels within the
image. Moreover, dark regions with high contrast to the region where the reflection
image is formed will also be formed on the tooling ball’s spherical surface around the
brightened region.
4.3 The Reflection Phenomenon
According to the mirror reflection principle of light[17], if the stainless steel tooling ball
is located within the lighting environment which is described below, a ’C’ shape reflection
98
Figure 4.3: Reflection Image
image of the light source will be formed on the tooling ball’s spherical surface with the
following three properties (R Property):
R Property 1: A group of high gray value pixels (always higher than 128) will always
exist within the image, and these pixels will appear as a shape (”C” shape) similar
to the shape of the light source. The position of reflection image within the photo
can be considered an approximate position of tooling ball.
R Property 2: The gray values of the pixels which are close to the high gray value pixels
appear dark (the gray value is always lower than 128) because the reflected ray at
these regions cannot be captured by the camera.
R Property 3: The gray values of pixels which are surrounding dark regions of the tooling
ball are much higher than the dark regions.
A sample of the reflection image of the light source is shown in Figure4.3.
99
Figure 4.4: Pixel in Photo Coordinate System
4.4 Vision-Based Tooling Ball Detecting Method De-
sign
4.4.1 Pre-described Concepts
∙ Photo Coordinate System:
Figure4.4 defines the photo coordinate system of a photo. The position of a pixel
within the photo can be defined by a pair of coordinate values.
∙ Object Pixel and Background Pixel:
100
All the values of elements in the binary image are binary numbers 1 and 0. Binary
number 0 represents a background pixel of the color black and the binary number 1
represents an object pixel of the color white.
∙ Objects:
If a group of object pixels are called one object, they are 8-connected. [16]
∙ Fitting Circle:
Fit pixels of an object into a circle through direct least-squares circle fitting algorithm
by V. Pratt. [18] This circle is called the ”fitting circle” of this object. The fitting
circle is described by three parameters: position of circle center and its radius. In the
process of implementing the circle fitting algorithm, the direct circle fitting function
is programmed by Nikolai Chernov in Matlab according to V. Pratt’s paper.
∙ Position of Object:
The position of the object’s fitting circle center is the position of the object.
∙ Geometry Properties (G Property) of an Object:
An object within a photo has six geometric properties: similarity, area, compactness,
contour number, fullness, and the radius of fitting circle.
G property 1: Similarity
Similarity = [n∑i=1
(Di −R)]/nR (4.1)
wℎere : Di = ∣CPi∣
Equation 4.1 describes the degree of the fitting condition between the object
and its fitting circle. Parameter Di is the distance between object pixels P and
101
the center C of the object’s fitting circle and parameter R is the radius of the
fitting circle. There are n pixels in total belonging to the object.
G property 2: Area
Area is the size of the object measured by its number of pixels.
G property 3: Compactness
Compactness = AreaObject/AreaFilledCircle (4.2)
Compactness of an object is not able to be affected by the object’s scale. Thus,
it is useful for distinguishing an object with specific shape. As shown in Equa-
tion 4.2, parameter AreaObject represents the pixel number of the object and
parameter AreaFilledCircle represents the area of a fulfilled circle which has the
same perimeter as the object.
G property 4: Contour Number
There is only one contour for the fulfilled object, and the number is more than
one when the object has holes. [19]
G property 5: Fullness
Fullness describes how many percentages that the contour of the object’s fitting
circle is covered by object pixels. Project the object to another side of the fitting
circle with respect to the circle center. If the total object number becomes two,
then the fullness of the object is 2 or else the fullness of the object is 1.
G property 6: Radius
Radius of an object is the radius of the object’s Fitting Circle.
∙ Difference Matrix Mdiff :
102
Suppose we have two binary images and there are i and j objects within the images,
respectively. Compute all six G Properties and put the G Properties 1, 2, 3and 6
into two property matrices (Equations 4.3 and 4.4).
Mp1(m, 1 : 4) =(P 1m1 P 1
m2 P 1m3 P 1
m6
)(4.3)
wℎere : m = 1, 2 ⋅ ⋅ ⋅ i
Mp2(n, 1 : 4) =(P 2n1 P 2
n2 P 2n3 P 2
n6
)(4.4)
wℎere : n = 1, 2 ⋅ ⋅ ⋅ j
Where row vector(P 1m1 P 1
m2 P 1m3 P 1
m6
)represents the G properties of the mtℎ
object in the first image and row vector(P 2n1 P 2
n2 P 2n3 P 2
n6
)represents the G
properties of the ntℎ object in the second image.
Then we have a i× j difference matrix Mdiff through Equation 4.5.
Mdiff (m,n) = ∣14
s∑(p1msp2ns
)− 1∣ (4.5)
wℎere : s = 1, 2, 3, 6
Finally, Mdiff needs to be adjusted by G properties 4 and 5 of each Mdiff (m,n).
Once one of the G properties 4 of 5 of either the mtℎ object in the first image or
the ntℎ object in the second image is not equal to one, Mdiff (m,n) is reset to a very
large number so that this pair of objects cannot be selected as the target result. G
properties 4 of 5 sharply reduce the number of irrelative objects.
∙ Dark Region:
According to the three R properties of the ’C’ shape reflection image, the area of
the tooling ball within the photo has two types of region: a bright region and a dark
103
Figure 4.5: Dark Region
region. The dark region is divided into two parts by the bright region. Therefore from
the center position of the tooling ball to the outside in any directions the gray value
of each pixel has useful characteristics which is shown in Figure4.5. The vertical axis
represents the gray value of the pixel and the horizontal axis represents the distance
from the tooling ball center to the pixel in that direction. The changing condition
of gray values always has a peak first followed by a local minimum. Define the first
local minimum as the dark point.
Even if the gray values of the pixels in the direction of where the gap of shape ’C’
is, the gray value of the dark point is still the first local minimum after a peak, as is
shown in Figure4.6.
∙ 8 Dark Points:
104
Figure 4.6: Dark Region at the Gap of ’C’ Shape
Figure 4.7: 8 Dark Points
Create eight direction vectors from center of tooling ball to the outside. Vectors
and Y positive axis of the photo form angles from 0∘ to 135∘ with a step increase of
45∘. Eight dark points are the dark points along these eight directions. Figure4.7
illustrates one of the examples of these eight dark points.
105
4.4.2 Procedures for Acquiring Position of Tooling Ball in Pho-
tos
A simplified and specialized vision-based tooling ball detecting method is designed as
following steps.
Step 1: Set the camera and the light source.
Step 2: Take two photos for the tooling ball from two different positions. Two photos I1
and I2 are acquired, and then record two photos taking places in the world coordinate
system as Cw1 =
(xwc1 ywc1 zwc1 1
)and Cw
2 =(xwc2 ywc2 zwc2 1
)respectively.
Step 3: Process and analyze two photos I1 and I2.
Substep 3-1: Apply average filter to get two filtered images Ia1 and Ia2.
Substep 3-2: Threshold Ia1 and Ia2 using threshold value of 128 into two binary
images It1 and It2.
Substep 3-3: Segment It1 and It2 into several binary images with only one object
inside. Delete objects whose areas are less than 1/1000 of the whole image size.
The remaining objects are called the main objects of the two images.
Substep 3-4: Compute the G properties of the main objects.
Substep 3-5: Compute the difference matrix Mdiff using the G properties of the
main objects.
Substep 3-6: Find out the index (itm, itn) of the element in Mdiff with the minimal
value. We say the target object ’C’ shape reflection image of the tooling ball,
within the two images is the tmtℎ object in I1 and the tntℎ object in I2. The
center position of the target object’s fitting circle is utilized for finding dark
points.
106
Substep 3-7: Look for eight dark points within the dark region of the tooling ball
for two photos.
Substep 3-8: Find the fitting circle of eight-dark points for two photos.
Substep 3-9: Define the fitting circle’s center position of eight dark points as the
approximate center position of tooling ball within the photo frame.
4.4.3 Transformation from Photo Coordinate System to World
Coordinate System
The position transforming procedure cannot be implemented in this project because of the
limitation of equipment. The light source and camera used for the experiment are not set
exactly the same as is required. Also, the devices are not able to be mounted on the ABB
robot. Therefore, the method for position transformation is described in general without
being tested.
Firstly, after analyzing the two photos, the position of the tooling ball’s spherical center
within the photo frame of the two photos is known as P pℎoto1 = (px1, py1) and P pℎoto
2 =
(px2, py2). Also the positions of camera for taking the two photos in theworld coordinate
system are recorded as Cw1 =
(xwc1 ywc1 zwc1 1
)and Cw
2 =(xwc2 ywc2 zwc2 1
). The
focal length of the camera’s lens is also known as f .
Secondly, suppose there is a transformation matrix Twt representing the transformation
process from the world coordinate system to the photo coordinate system depending on Cw1 ,
Cw2 and f . Then, according to homogeneous transformation, we can have two position re-
sults for a tooling ball from the two photos represented by Pwball1 =
(xwball1 ywball1 zwball1 1
)and Pw
ball2 =(xwball2 ywball2 zwball2 1
).
Then finally, the position of the ball’s spherical center with respect to the world coor-
dinate system can be computed by Pwball = (Pw
ball1 + Pwball2)/2.
107
Figure 4.8: 9 Types of Same Photos
4.5 Experiment and Result
∙ Sample Photos:
There are 50 sample photos taken by camera. The position of the tooling ball within
the photos can be separated into nine main types: Center, Up-middle, Up-left, Up-
Right, Middle, Middle-left, Middle-right, Down-middle, Down-left and Down-right
(Figure4.8).
The background of the photos is a stainless steel block with several holes and edges.
Also, the surface of the block is mid-level polished so that it appears to have a similar
108
optic property as the one of the mould to be calibrated.
∙ Result: Because there are 50 sample photos in total and any two of them can be
selected for each time of detection, there are 1225 combinations for sample photos
to be tested. Finally, it was found that all of the 8 dark points within the photos
were captured correctly. However, the position of the tooling ball’s spherical center
in the photo coordinate system is not correct if the center position of the eight dark
points’ fitting circle is considered as the spherical center. Deviation occurs when the
tooling ball locates far away from the middle position of the photo. The reason is
that a small part of the dark region (unexpected lightened area) is lightened by the
ray which is reflected by the stainless steel block so that the areas of dark region
decrease.
Take one of the sample images as an example (Figures4.9 and 4.10). Eight small
white points represent dark points detected. The square white point is the center
of the dark points’ fitting circle. The round white point is the ideal circle center
of the contour of the tooling ball. The position of the tooling ball in the sample
image locates at the up-left of the whole image frame and the expected lightened
area locates at the bottom-right of the tooling ball. Obviously there is a deviated
distance between the actual center of the tooling ball and the circle center of the
dark points’ fitting circle.
4.6 Chapter Summary
According to the results of the experiment, the target of the course project is achieved,
in that the feature of the reflection image is distinguished correctly and the approximate
center position of the tooling ball in the photo is detected. Although the position of
the tooling ball in the photo coordinate system is detected with some error, the detected
109
Figure 4.9: A Sample Image for Describing Center Deviation
Figure 4.10: Center Deviation
110
eight dark points are possible to be compensated by doing research on figuring out the
relationship between the reflection image and tooling ball’s center so that a better fitting
circle of compensated dark points can be created to give better results.
The mechanical touching detecting method described in Chapters 2 and 3 have not
been tested in the ABB robot system for detecting the tooling ball when the mould is
heated up to about 700F ∘. However, high heat is a potential threat to the durability of
the detector. The experiment proves the feasibility of the vision-based detecting method
and, as a result, the vision-based detecting method can be applied to compensate for the
mechanical touching detecting method.
Divide the mould calibration process into two steps: cold calibration and hot calibra-
tion. The tooling ball can be firstly be detected by the mechanical touching method when
the mould is cold, obtaining position data in cold status. Since the mould will be extended
by the heat when it is heated, the position of the tooling ball will be changed within a
certain range. According to the position data in cold status, the camera with a partial
ring-shaped light source is carried by the robot arm to the positions tooling ball when
the mould is cold. After taking photos and applying the vision-based detecting method
designed, the position data of the tooling ball in hot status can be obtained. The whole
process can be controlled fully automatically so that dangerous working environment can
be avoided.
111
Chapter 5
Conclusion
5.1 Thesis Summary
The design of a mechanical touch-style tooling ball detecting method for the mould cal-
ibration process in the project of automatic TIG welding is described in this thesis from
Chapter 1 to Chapter 3. The design includes the mechanical design of the detector (the
mechanical component design), the programming design in the microprocessor for signal
processing (the electrical component design) and the design of the position computing
programmed in the robot controller (the computational component design).
The mechanical component has been implemented and tested base on the NC milling
machine as mentioned in Chapter 3. While the feasibility of the detecting method is proven,
the accuracy of the position detection of the tooling ball does not satisfy the requirement
especially on the Zw of the milling machine under the present design. The problem may
occur during the process of calibrating the joystick, where a good input-output relationship
is not obtained. Three deficiencies are thus to be improved for obtaining a better joystick
calibration result.
112
∙ Changing the connecting method between the bearing housing and the centering
shaft in order to obtain an accurate distance for computing the slopes of input-output
relationship curves.
∙ Changing the mechanism of deflecting and rotating the shaft of the joystick or ad-
justing the material of the shaft extension in order to avoid generating scores on the
shaft extension caused by the bearing balls.
∙ Using multi-meter with a higher accuracy to obtain better voltage measuring results.
Electrical components and computational components have been programmed and
tested on a personal laptop without being tested in an actual robot system. Further
experiments and improvements are still required:
∙ Improving the AD conversion process and serial communication process.
For AD conversion and serial communication purposes, an ARM7 microprocessor
is not the best choice. However, it is the most convenient choice for testing the
feasibility. It is better at selecting better chips for achieving these two processes.
The converting accuracy of an AD converter in a microprocessor is just 10 bits and
the maximum convertible voltage input is only 2.48V. If we can specialize the AD
conversion process by a chip with higher accuracy and convertible voltage value
(MAX187 with 12 bits accuracy of conversion, for instance), the electrical component
can be designed to be more integrated and more durable.
∙ Stabilizing the operating voltage supplied to the joystick at 5V by DC stabilizer.
A cell phone charger was used to provide DC power to the joystick. The output
voltage is 5.11V which locates within the range of allowance. However, if the voltage
was stabilized to 5V (as was recommended in the technical specifications of the
113
joystick), the input-output relationship of the joystick would not need to be re-
calibrated. Furthermore, the data from Elobau Sensor Technology regarding the
joystick can even be used to evaluate the performance of the design of the joystick
calibration.
∙ More research about error analyzing is required.
Errors exist in the mechanical machining and assembling process, the AD conversion
and signal communication process, and the position data of the ABB robot obtaining
process. How these errors affects the final result of position computation needs to be
analyzed.
∙ Integrate the tooling ball detecting system with the whole ABB robot system and
test the performance.
Though the mechanical component has been tested on the NC milling machine, the
settings of the joystick coordinate system, the detecting operation, the calibration
of the detector and the working environment all need to be changed if the detecting
processes are tested in the robot system.
∙ Test the detecting method on tooling balls with different dimensions.
The detecting method is tested based on only one tooling ball with a diameter of
15.85mm. It is necessary to test it on a differently dimensioned series of balls to
obtain the detecting range and the range of tooling ball sizes that can be detected
by the detecting method.
Finally, a vision-based tooling ball detecting method is also taken into consideration
to compensate for the performance of a mechanical style touching style detecting method
in environments with high temperature. The idea is only roughly proven here and further
works is required.
114
5.2 Future Work
Further developments of the detecting method is described in general by following points.
∙ Improve the mechanical design of the joystick calibration mechanism and the detec-
tor.
∙ Stabilize the operating voltage of the joystick.
∙ Increase the convertibility of AD conversion process and the stability of serial com-
munication process.
∙ Integrate the detecting method with the ABB welding robot system.
∙ Test the accuracy, repeatability, heat resistance and the durability of the detecting
method.
∙ Analyze the reasons that cause position errors in the tooling ball detecting process.
115
APPENDICES
116
Appendix A
Technical Specifications of Joysticks
and Tactile Switch
117
JoysticksJoysticksJoysticks
Technische Änderungen vorbehalten.We reserve the right to change specifications without notice.Sous réserve de modifications techniques.
285
www.elobau.com
Joystick – kleine BauformJoystick – small versionJoystick – version compacte
J1 ........
36,5
40,4
480
9,6
18,4
40,4
(4 x)
M6
18,4
M3
Lify-t 0,35 mm2
15° 15°15° 15°
X-AchseX-axisaxe X
Y-AchseY-axisaxe Y
SIG1 100%SIG2 000%
SIG1 100%SIG2 100%
SIG1 100%SIG2 000%
SIG1 100%SIG2 100%
maximale Einschraubtiefe ab Unterseite: 5,5 mmmaximum thread depth from rear side: 5.5 mmprofondeur de vissage maximale à partir de la partie inférieure
Darstellung ohne Litzenview without wiresreprésentation sans cordon
max
. 50
mm
Der Winkelmessbereich beträgt ±15°. Das Messprinzip ist kontaktlos; beim analogen Messprinzip dreht sich ein Magnetfeld um einen Hallsensor. Bei analoger Ausführung ist das System kurzschlusssicher (bei unbegrenzter Kurzschlussdauer) gegen Spannungsversorgung.J1 ist mit 6/8/10- oder 12-PIN Molex 5557 Stecker ausgerüstet. Alternativen auf Anfrage.
The angular operating range is ±15°. The operating principle is non-contacting:– analogue: rotating magnetic field over
hall-sensorShort circuit-proof with analogue version (short circuit duration: unlimited) toward power supply. J1 has a 6/8/10 or 12 PIN Molex 5557 connector, alternatives on request.
Le débattement angulaire est ±15°. Le principe de mesure est sans contact:– analogique: champ magnétique tour-
nant sur détecteur à effet HallProtégé contre les courts circuits avec version analogique (durée de court circuit: illimitée) en sens alimentation.J1 est équipé avec 6/8/10 ou 12 broches Molex 5557, alternative sur demande.
Kabelsätze siehe S. 366 (L2.D001A)Cable sets see p. 366 (L2.D001A)Câbles associés voir p. 366 (L2.D001A)
SIG2
BN/BK
GY/BKGY
RD/BKRD
WH
BN
WH/BKSIG1
0V GND
UB +5 VDC
SIG2
SIG1
0V GND
UB +5 VDC
RedundantX-Achse
redundantX-axis
redondantaxes X
RedundantY-Achse
redundantY-axis
redondantaxes Y
Analogjeweils X- und Y-Achse
Zur Erkennung der Mittel-stellung müssen die Ana-logsignale der X- und Y-Achse ausgewertet werden (typ. Wert 2,5 V).
BN
RD
WH
0V
B
UA
U
/IA
analogueeach X- and Y-axis
In order to obtain a “centre position” signal, the analogue outputs from both the x and y axes must be evaluated.
analogiqueaxes X et Y
point milieu réel (2,5 V) =point milieu pour l’axe X +point milieu pour l’axe Y
Figure A.1: J1R6AAA00 Copied from: Elobau Sensor Technology
118
JoysticksJoysticksJoysticks
www.elobau.com
Technische Änderungen vorbehalten.We reserve the right to change specifications without notice.Sous réserve de modifications techniques.
294
Joystick – kompakte BauformJoystick – compact designJoystick – version compacte
J6 .......
Analogjeweils X- und Y-Achse
Zur Erkennung der Mittel-stellung müssen die Ana-logsignale der X- und Y-Achse ausgewertet werden (typ. Wert 2,5 V).
BN
RD
WH
0V
B
U A
U
/I A
analogueeach X- and Y-axis
In order to obtain a „centre position“ signal, the analogue outputs from both the x and y axes must be evaluated.
analogiqueaxes X et Y
point milieu réel (2,5 V) =point milieu pour l’axe X +point milieu pour l’axe Y
S1S3S2
Digitaljeweils X- und Y-Achse
Zur Erkennung der Mittel-stellung müssen beideKontakte S2 der X- und Y-Achse UND verknüpftwerden.
BNBKBUWHGY
digitaleach X- and Y-axis
In order to obtain a „centre position“ signal, contact S2of both x and y axes must beclosed.
digitalaxes X et Y
point milieu réel =point milieu pour l’axe X +point milieu pour l’axe Y
Darstellung in Mittelstellung (S2 betätigt)shown with knob in centre position (S2 operated)état des contacts en position milieu
47,2
67,3
25°25°
76
84
25°25°
7258
72
584 x ø5,2
Ausführung Elektronikgehäuse CANConstruction with electronic case CANConstruction avec boîtier électronique CAN
Standardgriff ohne MicrotasteStandard knob without micro buttonPoignée standard sans micro-touche
Standardgriff mit MicrotasteStandard knob with micro buttonPoignée standard avec micro-touche
3-Tasten-Griff – max. 3 Microtasten 3-button knob – max. 3 micro buttonPoignée à 3 touches – max. 3 micro-touches
y-Achsey-axisaxe y
S30%
S2 S1100%
S10%
S2 S3100%
x-Achsex-axisaxe x
146
151
151
* Aufbauhöhe für AusführungDigital / Redundantpanel thickness for executiondigital / redundantépaisseur pour exécutiondigital / redondant
* *
Redundantjeweils X- und Y-Achse
redundanteach X- and Y-axis
redondantaxes X et Y
A A / I1
U
0V 1
U
A A / I2U
UB 1
B 2
0V 2
CAN
µCCAN-HCAN-L
(-) GND(+) UB
Figure A.2: J6R6AAA00 Copied from: Elobau Sensor Technology
119
Technical Specification of B3F5000 Tactile Switch
Type Plunger Type
(Color)
Switch height x pitch Operating force Model
Long service life Flat (Blue)
4.3 x 12.5 mm General-purpose: 130 g B3F-5000
Weight Approx. 0.85 g
Contact form SPST-NO
Switching
capacity
1 to 50 mA, 5 to 24 VDC (resistive load)
Contact
resistance
100 MΩ max. (Initial Value, Rated: 1mA, 5VDC)
Insulation
resistance
100 MΩ min. (at 250 VDC)
Dielectric strength 500 VAC, 50/60 Hz for 1 minute
Bounce time 5 ms max.
Vibration Malfunction durability: 10 to 55 Hz, 1.5 mm double amplitude
Shock Mechanical durability: 1,000 m/s2 (approx. 100 G)
Malfunction durability: 100 m/s2 (approx. 10 G)
temperature -25° to 70°C (with no icing)
Humidity 35% to 85% RH
Life Expectancy 10,000,000 operations min
Pre-travel (PT) 0.3 +0.2/-0.1 mm
Construction Contact Form
Figure A.3: B3F5000 Tactile Switch Copied from: Omron Electronic Components LLC
120
Appendix B
Programs
B.1 Program in Microprocessor
#include "config.h"
#define EINT0 14 /* Interrupt NO of EINT0 */
#define EINT3 17 /* Interrupt NO of EINT3 */
#define UART0 6 /* Interrupt NO of UART0 */
extern void DelayNS (uint32 dly)
{
uint32 loop;
for ( ; dly>0; dly--)
for (loop=0; loop<5000; loop++);
}
uint32 ToASCII(uint32 data0)
{
121
uint32 data;
if (data0<=9) data = data0+48;
else data = data0+55;
return data;
}
uint32 GetByte (void)
{
uint32 RecByte;
RecByte = U0RBR;
return (RecByte);
}
void GetStr(uint8 *s, uint32 n)
{
for (;n>0;n--)
{
*s++ = GetByte();
if ( (U0LSR & 0x01)==0 ) break;
}
}
void __irq IRQ_Eint0(void)
{
extern ADC_Data[4];
uint32 ADC_DataM;
extern SendData[14];
extern ADCmark;
uint8 s; //loop counter of UART0 data sending
uint8 i; //normal used loop counter (including ADC))
122
if (ADCmark == 0)
{
ADCmark = 1;
/* initialization of ADC process */
AD0CR = (1 << 0) |
((Fpclk / 1000000 - 1) << 8) |
(0 << 16) |
(0 << 17) |
(1 << 21) |
(0 << 22) |
(1 << 24) |
(0 << 27);
DelayNS(10);
ADC_DataM = AD0DR;
for (i = 0;i < 4;i++)
{
AD0CR = (1 << i) |
((Fpclk / 1000000 - 1) << 8) |
(0 << 16) |
(0 << 17) |
(1 << 21) |
(0 << 22) |
(1 << 24) |
(0 << 27);
DelayNS(10);
ADC_DataM = AD0DR;
AD0CR = (1 << i) |
123
((Fpclk / 1000000 - 1) << 8) |
(0 << 16) |
(0 << 17) |
(1 << 21) |
(0 << 22) |
(1 << 24) |
(0 << 27);
DelayNS(10);
while ((AD0DR & 0x80000000) == 0);
ADC_DataM = AD0DR;
ADC_DataM = ADC_DataM >> 6;
ADC_DataM = ADC_DataM & 0x000003FF;
ADC_Data[i] = ADC_DataM;
IO0PIN = IO0PIN & 0xFFFFFF7F;
DelayNS(100);
IO0PIN = IO0PIN | (0x01 << 7);
DelayNS(100);
IO1PIN = 0x03 << 18 + i*2; //LED Status Display2 -Finished
DelayNS(100);
ADC_DataM = 0x00000000;
}
//following program is for data processing
//so that the data can be converted into suitable format to be sent
SendData[0] = (ADC_Data[0] & 0x00000F00) >> 8;
SendData[1] = (ADC_Data[0] & 0x000000F0) >> 4;
SendData[2] = (ADC_Data[0] & 0x0000000F);
SendData[3] = (ADC_Data[1] & 0x00000F00) >> 8;
124
SendData[4] = (ADC_Data[1] & 0x000000F0) >> 4;
SendData[5] = (ADC_Data[1] & 0x0000000F);
SendData[6] = (ADC_Data[2] & 0x00000F00) >> 8;
SendData[7] = (ADC_Data[2] & 0x000000F0) >> 4;
SendData[8] = (ADC_Data[2] & 0x0000000F);
SendData[9] = (ADC_Data[3] & 0x00000F00) >> 8;
SendData[10] = (ADC_Data[3] & 0x000000F0) >> 4;
SendData[11] = (ADC_Data[3] & 0x0000000F);
SendData[0] = ToASCII(SendData[0]);
SendData[1] = ToASCII(SendData[1]);
SendData[2] = ToASCII(SendData[2]);
SendData[3] = ToASCII(SendData[3]);
SendData[4] = ToASCII(SendData[4]);
SendData[5] = ToASCII(SendData[5]);
SendData[6] = ToASCII(SendData[6]);
SendData[7] = ToASCII(SendData[7]);
SendData[8] = ToASCII(SendData[8]);
SendData[9] = ToASCII(SendData[9]);
SendData[10] = ToASCII(SendData[10]);
SendData[11] = ToASCII(SendData[11]);
SendData[12] = 0x24;
SendData[13] = 0x26;
for (s=0;s<14;s++) U0THR = SendData[s];
while ((U0LSR & 0x20) == 0);
}
while( (EXTINT&0x01)!=0 )
125
{
EXTINT = 0x01;
}
VICVectAddr = 0x00;
}
void __irq IRQ_Eint3(void)
{
extern ADCmark;
ADCmark = 0;
while( (EXTINT&0x08)!=0 )
{
EXTINT = 0x08;
}
VICVectAddr = 0x00;
}
uint32 ADC_Data[4];
uint32 SendData[14];
uint8 ReceiveData[14]; // UART0 buffer for receiving data
uint8 ADCmark;
uint8 SendMark;
int main (void)
{
const uint32 baud = 19200;
uint32 mid;//mid number for computing baud rate
uint8 s; //loop counter of UART0 data sending
//uint8 r; //loop counter of UART0 data receiving
PINSEL0 = PINSEL0|0x00000005;
126
//UART0 and GPIO
PINSEL1 = PINSEL1|0x15400301;
//AD0.0 ˜ AD0.3; EINT0(KEY1) and EINT3(KEY5)
PINSEL2 = PINSEL2|0x00000000;
//LED0 ˜ LED8 GPIO
IO0DIR = 0x01 << 7;
DelayNS(200); //BEEP
IO0PIN = IO0PIN | (0x01 << 7); //stop beeping
IO1DIR = 0xFF << 18; //LED
IO1PIN = 0x00 << 18; //Turn on all LEDs
//initialization of UART0
//setting of baud
U0LCR = 0x80;
mid = (Fpclk/16)/baud;
U0DLM = mid >> 8;
U0DLL = mid & 0xFF;
//UART initialization
U0LCR = (3 << 0) | //3->8Char,
(0 << 2) | //0-1 stop,1-2 stops,
(1 << 3) | //0-diable/1-enable odd/even
(1 << 4) | //odd/even selection
(0 << 6) | //0-disable/1-enable interval sending
(0 << 7); //divider lock
//FIFO setting
U0FCR = 0x81;
U0IER = 0x01;
//IRQ Setting
127
EXTMODE = 0x00;
//set EINT0 and EINT3 activated by level
EXTPOLAR = 0x00;
IRQEnable();
//Enable the function of IRQ
//open EINT0, EINT3 and UART0
VICIntSelect = 0x00000000;
//set all the interrupt as the IRQ
VICVectCntl0 = 0x20 | EINT0;
//set EINT0 to IRQ0
VICVectAddr0 = (uint32)IRQ_Eint0;
//address assignment for EINT0
//VICVectCntl1 = 0x20 | UART0;
//set UART0 to IRQ1
//VICVectAddr1 = (uint32)IRQ_UART0;
//address assignment for EINT3
VICVectCntl2 = 0x20 | EINT3;
//set EINT3 to IRQ2
VICVectAddr2 = (uint32)IRQ_Eint3;
//address assignment for EINT3
EXTINT = 0x09;
//clear the IRQ mark of EINT0 and EINT3
VICIntEnable = (1 << 14) | (1 << 17);
// Enable EINT0 and EINT3
ADCmark = 0;
SendMark = 0;
while(1)
128
{
IO1PIN = 0x03 << 18;
//LED Status Display3 - Waiting for IRQ
DelayNS(200);
IO1PIN = 0x0C << 18;
DelayNS(200);
IO1PIN = 0x30 << 18;
DelayNS(200);
IO1PIN = 0xC0 << 18;
DelayNS(200);
if ( (U0LSR & 0x01) == 1 )
{
GetStr(ReceiveData, 14);
if ((ReceiveData[0] == 0x53) && (ReceiveData[1] == 0x41)) //’SA’
{
for (s=0;s<14;s++) U0THR = SendData[s];
}
else if ((ReceiveData[0] == 0x4F) && (ReceiveData[1] == 0x4B)) //’OK’
{
for (s=0;s<14;s++) U0THR = ReceiveData[s];
}
else
{
for (s=0;s<14;s++) U0THR = 0x57;//’W’
}
ADCmark = 0;
}
129
}
return 0;
}
B.2 RAPID Code for Computational Component
%%%
VERSION: 1
LANGUAGE: ENGLISH
%%%
MODULE MainModule
PERS BallNum;
VAR num i;
VAR string OutStrCL{14};
VAR num OutByteCL{14};
VAR string OutStrSA{14};
VAR num OutByteSA{14};
VAR string OutStrOK{14};
VAR num OutByteOK{14};
VAR iodev channel;
PRES bool flag;
VAR pos TCPpos;
VAR num TCPx;
VAR num TCPy;
130
VAR num TCPz;
!-----------------------------------
VAR bool RecChec;
PERS string rec;
VAR string rec1;
VAR string rec2;
!-----------------------------------
VAR string aVstr1;
VAR num aVnum;
VAR string bVstr1;
VAR byte bVbit;
VAR string bVstr2;
VAR num bVnum;
VAR bool TempChec;
VAR num Vnum{4};
!-----------------------------------
VAR num k{4};
VAR num Vcx;
VAR num Vcy;
VAR num Amax;
VAR num Ax;
VAR num Ay;
!-----------------------------------
VAR num L;
VAR num dx;
VAR num dy;
VAR num dz;
131
VAR num dt;
PERS num X;
PERS num Y;
PERS num Z;
!-----------------------------------
PROC main ()
BallNum := 0;
FOR i FROM 1 TO 14 STEP 1 DO
OutStrCL{i} := StrPart ("CL000000000000", i, 1);
OutByteCL{i} := StrToByte(OutStrCL{i}\Char);
ENDFOR
FOR i FROM 1 TO 14 STEP 1 DO
OutStrSA{i} := StrPart ("SA000000000000", i, 1);
OutByteSA{i} := StrToByte(OutStrSA{i}\Char);
ENDFOR
FOR i FROM 1 TO 14 STEP 1 DO
OutStrOK{i} := StrPart ("OK000000000000", i, 1);
OutByteOK{i} := StrToByte(OutStrOK{i}\Char);
ENDFOR
Open "com1:", channel \Bin;
ClearIOBuff channel; ! Clear input buffer for com1
flag := TRUE
WHILE flag = TRUE Do
!Voltage string receiving
RecChec := FALSE;
WHILE RecChec = FALSE
ClearIOBuff channel; ! Clear input buffer for com1
132
rec1 := ReadStrBin(channel,14 \600); ! Wait for input from com1
rec2 := ReadStrBin(channel,14 \600); ! Wait for input from com1
IF rec1 <> rec2 THEN
WriteBin channel, OutByteSA, 14;
ELSE
rec := rec1;
WriteBin channel, OutByteOK, 14;
RecChec := TRUE;
ENDIF
ENDWHILE
TCPpos := CPos(\Tool:=tool0 \WObj:=wobj0);
TCPx := TCPpos.x;
TCPx := TCPpos.y;
TCPx := TCPpos.z;
!Voltage translation
FOR i FROM 1 TO 4 STEP 1 DO
aVstr1 := StrPart(rec,i*3-2,1);
TempChec := StrToVal(aVstr1,aVnum);
bVstr1 := StrPart(rec,i*3-1,2);
bVbit := StrToByte(bVstr1\Hex);
bVstr2 := ByteToStr(bVbit);
TempChec := StrToVal(bVstr2,bVnum);
Vnum{i} := aVnum*256+bVnum;
ENDFOR
!parameter value assignment
k{1} := 0.5;
k{2} := 0.5;
133
k{3} := 0.5;
k{4} := 0.5;
Vcx := 2500;
Vcy := 2500;
Amax := 15;
FOR i FROM 1 TO 4 STEP 1 DO
Vnum{i} := Vnum{i}/k{i};
ENDFOR
!Angle translation
Ax := ( (Vnum{3}-Vcx)*Amax/Vcx + (Vcx-Vnum{4})*Amax/Vcx )/2;
Ay := ( (Vnum{2}-Vcy)*Amax/Vcy + (Vcy-Vnum{1})*Amax/Vcy )/2;
!Position computation
a := Cos(Ax)*Sin(Ay);
b := Cos(Ay)*Sin(Ax);
c := Cos(Ax)*Cos(Ay);
X := (a*L+TCPx+dx)*Cos(dt)+(b*L-TCPy-dy)*Sin(dt);
Y := (a*L+TCPx+dx)*Sin(dt)-(b*L-TCPy-dy)*Cos(dt);
Z := c*L+TCPz+dz;
BallNum := BallNum + 1;
ENDWHILE
Close channel;
ENDPROC
ENDMODULE
134
Bibliography
[1] Tool-Tec Welding Inc. Full Proposal Document. 2007. 2
[2] William H.Minnick. Gas Tungsten Arc Welding handbook. Goodheart-Willcox Pub,
1996. 3
[3] ABB Automation Technologies AB Robotics. Operating manual, IRC5 with FlexPen-
dant. 2004. 6
[4] William W.Melek. ME547: Robot Manipulators: Kinematics, Dynamics, and Control.
2009. 6
[5] R.B. Fisher D.W.Eggert, A.Lorusso. Estimating 3-D rigid body transformations: a
comparison of four major algorithms. Machine Vision and Applications, 9:272–290,
1997. 10
[6] Zhang Defen Zhang Cuoxiong. The Optimal Plan for Measuring Center and Radius
of a Ball Part by 4-Point Method. Acta Metrologica Sinica, 14(4):247–250, 1993. 16
[7] Timothy J. Gill John A. Hanlon. Machine tool locator. United States Patent, 6301007,
2001. 17
[8] D. Scott Ackerson Robert E. Bridges, Lawrence B. Brown. Retroreflector for use with
tooling ball. United States Patent, 5861956, 1999. 17
135
[9] Tsing-Wong Hsu Louis J. Everett. Method and apparatus for locating physical objects.
United States Patent, 5177563, 1993. 17
[10] Hideaki Hashimoto. obot hand including optical approach sensing apparatus. United
States Patent, 4766322, 1988. 17
[11] Shinsuke Sakakibara Hajimu Inaba. Gripping device. United States Patent, 4423998,
1984. 17
[12] Hidekazu Araki all of Kadoma Japan Katsuhiro Sasada, Tomoharu Nakahara. Method
of Utilizing a Two-dimensional Image for Detecting the Position, Posture, and Shape
of a Three-dImensional Objective. United States Patent, 5692061, 1997. 17
[13] Hidekazu Araki Hiroyuki Fujii Haisong Gu, Tomoharu Nakahara. 3–Dimensional ob-
ject recognition method and bin-picking system using the method. United States
Patent, 6721444, 2004. 17
[14] Hua Zhang Ligong Zhou. Introduction to ARM7. Beijing Unversity of Aeronautics
and Astronautics, 2005. 38
[15] K. Levenberg. A method for the solution of certain non-linear problems in least
squares. Quarterly of Applied Mathematics, 2:164–168, 1944. 70
[16] Help Document of Matlab 7. 82, 101
[17] Abdul Al-Azzawi. Light and optics: principles and practices. CRC/Taylor and Francis,
2006. 98
[18] Vaughan Pratt. Direct Least-Squares Fitting of Algebraic Surfaces. Computer Graph-
ics, 21(4), 1987. 101
[19] Han Sun Mingwu Ren, Jingyu Yang. Tracing Boundary Contours in a Binary Image.
Image and Vision Computing, 20:125C131, 2002. 102
136
[20] Holbrook L Horton Henry H. Ryffel Christopher J. McCauley Ricardo Heald
Erik Oberg, Franklin D. Jones. Machinery’s handbook. Industrial Press, 2008.
137