AN2350
Application note
Guidelines for the control of a multiaxial planar robot
with ST10F276
Introduction
This application note describes how to implement a PID control with the ST10F276 16-bit
microcontroller for the control of a multiaxial planar robot.
The document provides guidelines for the complete development of a control system, able
to fulfill all the requirements needed to drive an industrial manipulator.
The first chapter is an introduction to the robotic manipulators. It focuses on their working
space, forward kinematics and the problem of the inverse kinematics. In particular it
describes the main characteristics of an industrial wafer handler used as a case study for a
multiaxial planar manipulator family.
The second chapter is a brief description of the ST10F276 16-bit microcontroller with a
focus on its architecture and its peripherals. Moreover, an overview is given of the control
board, named Starter Development Kit - ST10F276 and its three dedicated connectors for
motion control.
The third chapter provides an overview of the hardware and mechanical equipment of a
wafer handler. More specifically, it describes the encoder conditioning and motor driver
circuits.
The fourth chapter is dedicated to the description of the basic routines for implementing PID
control. The inverse kinematics of the wafer handler and the planning of the trajectory are
also explained. The implementation of the
teach and repeat
technique and the
homing
procedure are shown.
See associated datasheets and technical literature for details of the components related to
the devices and board used in this application note:
http://www.st.com/stonline/books/ascii/docs/9944.htm
(L6205 Product Page)
November 2006
Rev 1
1/41
www.st.com
Contents
AN2350
Contents
1
An overview on robotics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1
Structure of a manipulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1.1
1.1.2
Kinematics analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Singularity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2
The industrial wafer handler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2.1
1.2.2
Forward kinematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Inverse kinematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2
The SDK-ST10F276 control board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.1
Brief description of the SDK-ST10F276 . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.1.1
2.1.2
User Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
On board motor control connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2
ST10F276 16-bit microcontroller - architectural overview . . . . . . . . . . . . 14
2.2.1
2.2.2
2.2.3
2.2.4
Basic CPU concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Memory organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
On-chip peripheral blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Managing Interrupts (hardware) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3
Hardware and mechanical equipments . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.1
3.2
3.3
3.4
The Dual DC motor and the power stage . . . . . . . . . . . . . . . . . . . . . . . . . 17
Cables and connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
The encoders and the conditioning circuit . . . . . . . . . . . . . . . . . . . . . . . . 20
Schematics of the driver board and the interface board. . . . . . . . . . . . . . 23
4
Control algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.1
4.2
4.3
4.4
Motion and path planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
PID position control algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Homing procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Teach and Repeat procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
2/41
AN2350
An overview on robotics
1
1.1
An overview on robotics
Structure of a manipulator
A manipulator, from a mechanical point of view, can be seen as an open kinematic chain
constituted of rigid bodies (links) connected in cascade by revolute or prismatic joints, which
represent the degrees of mobility of the structure. These manipulators are also known as
serial manipulators.
Only relatively few commercial robots are composed of a closed kinematic chain (parallel)
structure. In this case there is a sequence of links that realize a loop. From this point on, we
refer only to serial manipulators.
In the chain mentioned above, it is possible to identify two end-points: one end-point is
referred to as the base, and it is normally fixed to ground, the other end-point of the chain is
named the end-effector and is the functional part of the robot. The structure of an end
effector, and the nature of the programming and hardware that drives it, depends on the
intended task.
The overall motion of the structure is realized through a composition of elementary motions
of each link respect to previous one.
A revolute joint allows a relative rotation about a single axis, and a prismatic joint permits a
linear motion along a single axis, namely an extension or retraction.
It is assumed throughout that all joints have only a single degree-of-freedom: the angle of
rotation in the case of a revolute joint, and the amount of linear displacement in the case of
a prismatic joint.
The degrees of mobility must be suitably distributed along the mechanical structure in order
to furnish the needed degrees of freedom (DOF) to execute a task. If there are more
degrees of mobility than degrees of freedom the manipulator is said to be redundant.
The workspace of a point H of the end-effector is the set of all points which H occupies as
the joint variables are varied through their entire ranges. The point H is usually chosen as
either the center of the end-effector, or the tip of a finger, or the end of the manipulator itself.
The workspace is also called work volume or work envelope.
Size and shape of the workspace depend on the coordinate geometry of the robot arm, and
also on the number of degrees of freedom.
The workspace of a robot is a fundamental criterion in evaluating manipulator geometries.
Manipulator workspace may be described in terms of the dexterous workspace and the
accessible workspace. Dexterous workspace is the volume of space which the robot can
reach with all orientations. That is, at each point in the dexterous workspace, the end-
effector can be arbitrarily oriented.
The accessible workspace is the volume of space which the robot can reach in at least one
orientation. In the dexterous workspace the robot has complete manipulative capability.
However, in the accessible workspace, the manipulator's operational capacity is limited
because of the terminal device can only be placed in a restricted range of orientations.
In other words, the dexterous workspace is a subset of the accessible workspace.
Table 1
shows a classification of the manipulators accordingly to the type and sequence of
the degrees of mobility of the structure, and of their workspaces.
3/41
An overview on robotics
Table 1.
Open chain manipulators classification
Type
Workspace
Joints
AN2350
Cartesian
– Three prismatic joints
– A Cartesian degree of
freedom corresponds to every
joint
Cylindrical
– One revolute joint and two
prismatic joints
– Cylindrical coordinates
Spherical
– Two revolute joints and one
prismatic joint
– Spherical coordinates
SCARA
– Two revolute joints and one
prismatic joint
– Selective Compliance
Assembly Robot Arm
Anthropomorphic
– Three revolute joints
– It is the most dexterous
structure
4/41
AN2350
An overview on robotics
1.1.1
Kinematics analysis
Robot arm kinematics deals with the analytical study of the geometry of motion of a robot
arm with respect to a fixed reference coordinate system as a function of time without regard
to the forces/moments that causes the motion.
Thus, it deals with the analytical description of the spatial displacement of the robot as a
function of time, in particular the relations between the joint space and the position and
orientation of the end-effector of a robot arm.
In kinematics, we consider two issues:
1.
Forward analysis:
for a given manipulator, given the joint angle vector
q(t)=(q1(t), q2(t), …., qN(t))
T
and the geometric link parameters, where n is the number of degrees of freedom,
what is the position and orientation of the end-effector with respect to a reference
coordinate system?
Inverse analysis:
given a desired position and orientation of the end effector and the
geometric link parameters with respect to a reference coordinate system, can the
manipulator reach the desired manipulator hand position and orientation. And if it can,
how many different manipulator configurations will satisfy the same condition?
2.
For serial robots, the forward analysis problem is usually easy and straightforward.
Unfortunately, the inverse analysis problem is of much more interest. For example, in
industrial applications, the end-effector must follow some desired path; then, we need to find
the joint angles for each position in the path.
For redundant robots, the inverse kinematics problem has then an infinite number of
solutions. The extra degrees of freedom can then be used for other purposes, for example
for fault tolerance, obstacle avoidance, or to optimize some performance criteria.
A simple block diagram indicating the relationship between these two problems is shown in
the following figure.
Figure 1.
The direct and inverse kinematics problems
Link parameters
Joint angles
q
1
(t), q
2
(t), ..., q
N
(t)
Direct
kinematics
Position and
orientation
of the end-effector
Link parameters
Joint angles
q
1
(t), q
2
(t), ..., q
N
(t)
Inverse
kinematics
5/41