Sunteți pe pagina 1din 99

(In The Name Of Allah,

The Most Beneficent


The Most Merciful)

STUDY REPORT OF DC SERVO MOTOR


A REPORT SUBMITTED IN PARTIAL FULFILLMENT OF
THE REQUIREMENTS FOR THE DEGREE OF
Bachelor of Technology
In
Electrical Technology

BY
Muhammad Adeel (19E2-113010)
Department of Electrical Technology
Preston University Faisalabad
2013-2014

CERTIFICATE
This is to certify Th at this Report entitled STUDY REPORT OF DC
servo motor. submitted by Muhammad Adeel Sarwar in partial
fulfillment of

the requirements for

the

award

of Bachelor of

Technology degree in Electrical Technology at Preston University


Faisalabad is an authentic work carried out by him under my supervision
and guidance. To the best of my knowledge the matter embodied in the
report not been submitted to any other University/Institute for the
award of any degree or diploma.

PENNEL OF EXAMINERS

Assigned by:
____________________________
Internal Examiner:
____________________________
External Examiner:

_________________________

ABSTR

ABSTRACT

The DC servo motor has applications in automotive market in


applications ranging from heating and ventilation to power
mirror positioning. It is also in use in Industrial and Consumer
Markets for entertainment equipment, HVAC ventilation control
and myriad number of other applications. In all these applications,

either speed or position control of the DC servo motor is used.


In this Report, we have achieved DC servo motor using For a more
efficient speed control, closed loop control system of the servo
motor.

ACKNOWLEDGEMENT
We would like to take this opportunity to express my gratitude and
sincere thanks to our respected Prof. Eng Toseef Abid for his
guidance, insight, and support he has provided throughout the course
of this work. We would like to thank all faculty members and
staff of the Department of Electrical Technology, Preston University
Faisalabad for their help throughout the course. We would specially
like to thank to my parents for their time and help with our project.

Muhammad Adeel (19E2-113010)

Contents
Chapter 1. Introduction Of Servo Motor
1) The Servo System8
2) Servo Mechanism9
3) Servo Motor.........14
4) Dc Servo Motor Model........17
5) Analysis of Armature Circuit..........18
6) Mechanical Model of Motor19
7) Electrical Time Constant of a DC Servomotor..21
8) Mechanical Time Constant of a DC Servomotor...22
9) Control Aspects Of Servo Motor.23
10)
Applications...24
11)
Local Speed Control Of DC Servo Motor...25
12)
Running The Motor In Open Loop.26
13)
Model Estimation...................33
14)
Comparison Of The Open Loop Response Of The
Transfer Function And That Of The Motor43
15)
Servo Motor Information..................45
16)
X-ray View Standard Servo Motor...................46
17)
SERVO RATINGS47
18)
SERVO SPEED.48
19)
SERVO TORQUE (Power)...48
20)
SERVO POWER (4.5- 6.0 VDC)...................50

21)
22)
23)
24)
25)

Servo Wire Code.52


Servo Centering...........53
How to Determine the Center Position.55
Automated Servo Center Position
Manual Servo Center Position - Steps.56
DC Servo Motor Performance Selection Guide..58

26) Controlling The Servo Motor...59


27) Suggestion to reduce noise in signals...59
28)
Sample code for Servo and Motor control..60
29)
Driver explanation62
Chapter 2. Types of Servo Motor
31) Series motors70
32)

Split series motors71

33)

Shunt control motor72

34)

Permanent magnet shunt motor73

Chapter 3. Aplication of Servo Motor


35)

Arc Welding Robot Automation Systems..74

Chapter 4

Conclusion

..95
REFERENCES.

The Servo System


A closed-loop control system is another name for a servo system. To
be classified as a servo, a control system must be capable of the
following:
1. Accepting an order that defines the desired result.
2. Determining the present conditions by some method of
feedback.
3. Comparing the desired result with the present conditions and
obtaining a difference or an error signal.
4. Issuing a correcting order (the error signal) that will
properly change the existing conditions to the desired result
5. Obeying the correcting order.

Servo Mechanism
A powered mechanism producing motion or forces at a higher level
of energy than the input level, e.g. in the brakes and steering of
large motor vehicles, especially where feedback is employed to make
the control automatic. servomechanism, automatic device used to
correct the performance of a mechanism by means of an errorsensing feedback. The term servomechanism properly applies only
to systems in which the feedback and error-correction signals
control mechanical position or one of its derivatives such as velocity
or acceleration. Servomechanisms were first used in gunlaying
(aiming) and in fire-control and marine-navigation equipment.
Today, applications of servomechanisms include their use in
automatic machine tools, satellite-tracking antennas, celestialtracking systems on telescopes, automatic navigation systems, and
antiaircraft-gun

control

systems.

In

many

applications,

servomechanisms allow high-powered devices to be controlled by


signals from devices of much lower power. The operation of the
high-powered device results from a signal (called the error, or
difference, signal) generated from a comparison of the desired

position of the high-powered device with its actual position. The


ratio between the power of the control signal and that of the device
controlled can be on the order of billions to one.

All

servomechanisms have at least these basic components: a controlled


device, a command device, an error detector, an error-signal
amplifier, and a device to perform any necessary error corrections
(the servomotor). In the controlled device, that which is being
regulated is usually position. This device must, therefore, have some
means of generating a signal (such as a voltage), called the feedback
signal, that represents its current position. This signal is sent to an
error-detecting device. The command device receives information,
usually from outside the system, that represents the desired position
of the controlled device. This information is converted to a form
usable by the system (such as a voltage) and is fed to the same error
detector as is the signal from the controlled device. The error
detector compares the feedback signal (representing actual position)
with the command signal (representing desired position). Any
discrepancy results in an error signal that represents the correction
necessary to bring the controlled device to its desired position. The
error-correction signal is sent to an amplifier, and the amplified

voltage is used to drive the servomotor, which repositions the


controlled device. A typical system using a servomechanism is the
communications-satellitetracking antenna of a satellite Earth
station. The objective is to keep the antenna aimed directly at the
communications satellite in order to receive and transmit the
strongest possible signal. One method used to accomplish this is to
compare the signals from the satellite as received by two or more
closely positioned receiving elements on the antenna. Any difference
in the strengths of the signals received by these elements results in a
correction signal being sent to the antenna servomotor. This
continuous feedback method allows a terrestrial antenna to be
aimed at a satellite 37,007 km (23,000 miles) above the Earth to an
accuracy measured in hundredths of a centimetre.

Fig 1.1

FIG 1.2

Uses
Position control
A common type of servo provides position control. Servos are
commonly electrical or partially electronic in nature, using an
electric motor as the primary means of creating mechanical force.
Other types of servos use hydraulics, pneumatics, or magnetic
principles. Servos operate on the principle of negative feedback,
where the control input is compared to the actual position of the
mechanical system as measured by some sort of transducer at the
output. Any difference between the actual and wanted values (an
"error signal") is amplified (and converted) and used to drive the
system in the direction necessary to reduce or eliminate the error.

This procedure is one widely used application of control theory.

Speed control
Speed control via a governor is another type of servomechanism.
The steam engine uses mechanical governors; another early
application was to govern the speed of water wheels. Prior to World
War II the constant speed propeller was developed to control engine
speed for maneuvering aircraft. Fuel controls for gas turbine
engines employ either hydromechanical or electronic governing

Other
Positioning servomechanisms were first used in military fire-control
and marine navigation equipment. Today servomechanisms are
used in automatic machine tools, satellite-tracking antennas, remote
control airplanes, automatic navigation systems on boats and
planes, and antiaircraft-gun control systems. Other examples are
fly-by-wire systems in aircraft which use servos to actuate the
aircraft's control surfaces, and radio-controlled models which use
RC servos for the same purpose. Many autofocus cameras also use a
servomechanism to accurately move the lens, and thus adjust the
focus. A modern hard disk drive has a magnetic servo system with
sub-micrometre positioning accuracy. In industrial machines, servos
are used to perform complex motion, in many applications

Servo Motor
A servo motor is an electric motor with a built in rotation sensor,
they are needed for robotics. Say a robot moves its arm by turning a
servo motor, the motor would send information concerning the
degree of rotation on its axis back to the robot so the robot can keep
tabs on the position of its arm, so if something bumps its arm it will
know it and so-on.
Electric motors are the commonly used actuator in electromagnetic
systems of all types. They are made in a variety of configurations
and sizes for applications ranging from activating precision
movements to powering diesel-electric locomotives. The laboratory
motors are small servomotors, which might be used for positioning
and speed control applications in a variety of automated machines.
They are DC (direct current) motors. The armature is driven by an
external DC voltage that produces the motor torque and results in
the motor speed. The armature current produced by the applied
voltage interacts with the permanent magnet field to produce
current and motion. - (Modeling of DC Servo Motor)

The servo DC motor is basically a transducer that converts electric


energy into mechanical energy. The torque developed on the motor
shaft is directly proportional to the field flux and the armature
current. The dc servo motor servo motors are very expensive in
comparison to ac servo motors because of brushes and commutators
.These motors have relatively low torque to volume and torque to
inertia ratio, however the characteristics of dc motors are quite
linear and are easy to control.
With the development of rare earth magnet dc motors which have
high torque to volume ratio at reasonable cost. Advancement in
technology has also lead to brushless dc motors. quite popular in
high performance control system the sketch of the basic components
of dc motor is given in fig below. The non-turning part called stator
and has magnet which establishes a field across the rotor the
turning part. The magnet may be electromagnet or permanent one.
In electromagnet motor the stator has wire wound across and
current through winding called field winding. For a constant field
current if, the magnetic flux is constant; the flux can be varied by
varying the field current.

FIG 1.3

FIG 1.4

FIG 1.5

DC Servomotor Model

FIG 1.6
Figure 1 depicts a generic model of a DC motor that includes two
windings; a stationary field winding on the stator and a second
winding for the rotating armature. This type of motor can

be controlled by varying either the field current or the armature


current. Most modern servomotors are somewhat different in
construction. The field winding is replaced with two or more
powerful rareearth magnets on the stator. Since the field strength
of these motors is constant, they can only be controlled by varying
the armature current In a permanent magnet motor the output
torque, , is directly proportional to the armature current,. The
constant of proportionality is referred to as the torque constant of
the motor and is represented by . The transfer function relating
motor torque to armature current can be expressed as follows:

Analysis of Armature Circuit


The armature current, can be expressed in terms of the applied
motor voltage ,by applying Kirchhoff's Voltage Law (KVL) to the
armature circuit in Figure . As with most windings, the impedance
of the armature can be represented by a resistive component, , in
series with an inductive component, The voltage, represents the
back Electromotive Force (back EMF). Most permanent magnet

DC motors can also operate generators. In other words, if the motor


shaft is rotating, a voltmeter connected across the motor terminals
will indicate a voltage that is proportional to the angular velocity of
the motor shaft, . This generator phenomenon occurs even when
the motor is operating in the normal manner (i.e., as a motor).
According to Lenz's law, the polarity of the induced back EMF
voltage, is such that it always opposes the applied voltage, The net
result is that a DC motor with no load (and in the absence of
friction) will reach a maximum steadystate angular velocity
corresponding to the operating point where the induced voltage,
completely offsets the applied voltage,The back EMF voltage, can
be expressed as a function of the angular velocity of the motor The
back EMF constant, , is often numerically identical to the torque
constant of the motor, (at least in the SI system of units). This is not
surprising since both terms are related to the geometry of the motor,
the field strength, and the length of wire moving through the
magnetic field. All three terms are constant in a permanent magnet
DC motor. An expression relating the armature current, to the
applied motor voltage, and the angular velocity of the motor

Mechanical Model of Motor


In order to complete the transfer function of the motor, a means
of relating torque to angular velocity must be found. This can be
accomplished by considering the mechanical model of the motor.
The torque generated by the motor accelerates the armature of the
motor as well as any additional load inertia on the motor shaft.
Some of the torque also goes towards overcoming friction. In order
to maintain a linear system model, only the viscous motor friction
will be considered for the time being. For a mechanical system
undergoing pure rotational motion, Newtons second law states that
the sum of the applied torques is equal to the product of the mass
moment of inertia, and the angular acceleration of the body, In the
case of the DC servomotor, is equal to the sum of the mass moment
of inertia of the motor armature, and the load. The net torque
generated by the motor is equal to the motor torque, minus the
rotational viscous friction. The rotational viscous friction associated
with the motor is proportional to the motor angular velocity, where
is the motor viscous damping coefficient. Replacing the angular

acceleration of the motor with the rateofchange of angular


velocity yields Assuming zero initial conditions.

Electrical Time Constant of a DC Servomotor


The electrical time constant of a DC motor, is an indication of how
long it takes for the current to develop in the armature winding for
a step change in the applied voltage. represents the steadystate
gain and the time constant. The transfer function representing the
armature current The steadystate gain is simply the reciprocal of
the armature resistance, This resistance determines the maximum
possible current through the armature. In the case of the motor
used in the laboratory (Pittman 9232S003), the armature resistance,
is provided by the manufacturer in the datasheet as 7.38 and the
armature inductance, as 4.64 mH. This yields an electrical time
constant, of 0.63 ms; a value which is also confirmed in the
datasheet. Since the maximum recommended motor voltage is 24V,
the armature current is limited by the armature resistance to a

maximum of 3.25A. The maximum motor power dissipation is


therefore 78W although this power level cannot be tolerated
indefinitely.

Mechanical Time Constant of a DC Servomotor


As demonstrated above, a DC servomotor can be modeled as a
secondorder transfer function. If the electrical time constant of the
motor is very small, it can be neglected and the motor can
be modeled as a firstorder transfer. Neglecting the electrical time
constant implies setting the motor inductance, to zero which yields
In the case of the motor used in the laboratory (Pittman 9232S003)
the various parameters are listed in the data sheet. They can be
summarized as follows:
the armature resistance=7.38
the mass moment of inertia of the motor armature= 1.9 10 -6
kg m2
the motor viscous damping coefficient=1.8 10-6 N m s
the back EMF constant=3.11 10-2V/rad/s
the torque constant of the motor=3.1110-2N m/A

The mechanical time constant is listed in the motor datasheet as


14.4 ms. Given that the electrical time constant is 22.6 times smaller
than the mechanical time constant, it can be
Neglected in many applications and the motor can be effectively
modeled as a firstorder system. The noload response to a 24V step
input for both the secondorder motor model (top) and first order
motor model (bottom) are shown below for the motor used in the
lab.

FIG1.7

Control Aspects Of Servo Motor


An open-loop system has no feedback from the system being
controlled. This is sort of shoot and forget approach to control. An
input signal or value is provided and the controller commands the
system to go to a definite speed, whatever, and hopes that the system

responds accordingly. There is no information from the system


under control to show that it even got the command or acted upon
it. In a closed-loop control system there is feedback. If speed is being
controlled, a small amount of the current speed is provided back to
the controller, allowing it to adjust its commands as the system
responds to the commands. Likewise true with position.
The performance of a closed-loop system is partially a function of
the speed at which the feedback is returned to the controller. This
closing of the loop will always take a set amount of time, and the
longer that time is the less responsive the controller will be to fast
changing conditions. Depending on the performance requirements
of the application, either a closed-loop or open-loop control system
can be used to control motor position, speed, or other similar
application.- (Servo Motor Control)

Applications
In Automotive Market:
1. Power mirror positioning.
2. Power seats positioning motors.
3. Power door and trunk lock mechanisms.

4. Windshield wiper motors.


5. Heating, Ventilation, and Air Conditioning (HVAC) vent controls.
6. Power sliding door, sunroof, and convertible top actuators.
7. Headlight positioning and leveling actuators.
In Industrial and Consumer Markets:
1. Proportioning valves for gasses and liquids.
2. Paper and materials handling equipment.
3. HVAC ventilation control.
4. Entertainment equipment (powered, remotely controlled volume
controls for audio receivers and mixers)

Local Speed Control Of DC Servo Motor


For the local speed control of DC servo motor, the following steps
have been followed:
1. Running the motor in open loop
2. Model estimation
3. Comparison of the open loop response of the transfer function
and that of the motor
4. Designing the PID controller for the estimated model
5. Real-time execution of the system in closed loop, and comparison
of the open-loop and closed-loop responses
These steps have been explained in detail, in the following subsections:

Running The Motor In Open Loop


When a system operates in the open loop configuration, the desired
input is fed into the system, using only the current state and the
model of the system. The system does not need a feedback from the
output, as it does not observe the output of the process that it
controls. As a result, an open loop system cannot engage in machine
learning. It can neither compensate for disturbances in the system,
nor engage in error-correction.
Open loop configuration is suited for systems where the relationship
between the input and the resultant state can be modeled by a
mathematical formula, and the load is predefined and fixed. For
example, for a motor driving a constant load, the desired speed can
be easily obtained in open loop by appropriately changing the input
voltage. But, if the load were unpredictable, the motor-speed would
be a function of the input voltage as well as the load. In such a case,
open loop control would not give satisfactory results.
Thus, an open loop system is used because of its advantages of
simplicity and low cost, where the use of feedback is not critical. The
Simulink model for running the motor in open loop is shown below:

FIG1.8
Blocks Used:

1. Signal Generator
2. Analog IP/OP
3. Scope

Analog Input Block


Select and connect analog input channels

Library
Real-Time Windows Target

Description
The Analog Input block allows us to select and connect specific
analog input channels to our Simulink model. After we add an
Analog Input block to your model, we can enter the parameters for

its I/O driver. The following procedure is used to configure


Advantech 1716 PCI card:

Double-click the Analog Input block. The Block Parameters:


Analog Input dialog box opens

FIG1.9

In the Sample time box, enter the same value you entered in
the Fixed step size box from the Configuration Parameters
dialog box, or an integer multiple of that value.
In the Input channels box, enter a channel vector that selects
the analog input channels you are using on this board. The
vector can be any valid MATLAB vector form. To select all

sixteen analog input channels on the Advantech 1716 board,


enter [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16] or [1:16]
If you want to use the first three analog input channels, enter
1,2,3
From the Input range list, choose the input range for all of the
analog input channels you entered in the Input channels box.
The Advantech 1716 board has input range of 15V to -15V. If
you want the input range to be different for different analog
channels, you need to add an I/O block for each different input
range.
From the Block output signal list, choose from the following
options:

Volts Returns a value equal to the analog voltage.


Normalized bipolar Returns a full range value of -1 to +1
regardless of the input voltage range.
Normalized unipolar Returns a full range value of 0 to +1
regardless of the input voltage range. For example, an analog
input range of 0 to +5 volts and -5 to +5 volts would both be
converted to 0 to +1.
Raw Returns a value of 0 to 2n -1. For example, a 12-bit
A/D converter would return values of 0 to 212 -1 (0 to 4095).

The advantage of this method is the returned value is always


an integer with no round-off errors.
Set Output data type to specify the type of data that the block
will output to the model.
Click OK or Apply.

Analog Output
Select and connect analog output channels

Library
Real-Time Windows Target

Description
The Analog Output block allows us to select and connect specific
analog output channels to our Simulink model. After we add an
Analog Output block to our model, we can enter the parameters for
its I/O driver. The following procedure is used to configure
Advantech 1716 PCI card:
1. Double-click the Analog Output block. The Block Parameters:
Analog Output dialog box opens:

FIG 1.10 Analog Input Block Parameters Dialog Box

2. In the Sample time box, enter the same value you entered in the
Fixed step size box from the Configuration Parameters dialog box,
or an integer multiple of that value.
3. In the Output channels box, enter a channel vector that selects
the analog output channels you are using on this board. The vector
can be any valid MATLAB vector form. To select both analog
output channels on the Advantech 1716 board, enter [1,2] or [1:2]

4. From the Output range list, choose the input range for all of the
analog input channels you entered in the Input channels box. The
Advantech 1716 board has input range of 15V to -15V. If you want
the input range to be different for
different analog channels, you need to add an I/O block for each
different input range.
5. From the Block input signal list, choose from the following
options: Same as the Analog IP Block discussed earlier.
6. Enter the initial value for each analog output channel you entered
in the Output channels box. For example, if you entered [1,2] in the
Output channels box, and you want an initial value of 0 volts, enter
[0,0].
7. Enter a final value for each analog channel you entered in the
Output channels box. For example, if you entered [1,2] in the
Output channels box, and you want final values of 0 volts, enter
[0,0].
8. Click OK or Apply.

FIG . 1.11 Open loop response of the motor

Model Estimation
For the purpose of any form of analysis on a plant, be it designing a
controller for it, or studying its response, a convenient way is
modeling the plant. In the given case, from the open loop response
of the motor, it is seen that the output of the motor in open loop,
does not track the input. So, the motor needs to be run in closed
loop configuration. To design the controller for closed loop
operation, first, modeling of the plant has been done, as explained in
detail, in the following sub-sections. Transfer function modeling of

the plant is one of the methods. A transfer function (also known as


the system function or network function) is a mathematical
representation, in terms of spatial or temporal frequency, of the
relation between the input and output of a linear time-invariant
system. The transfer function that relates the input voltage and the
speed of the DC servo motor is a second order one, as already
proved in section 1. This transfer function can be estimated in
MATLAB using the following procedure:
The System Identification Toolbox comes in handy for this purpose.
The whole progress of the transfer function identification is
represented by a system identification tool session.
Step-1: Importing relevant data from the model to MATLAB
workspace:
To Workspace blocks are used in the Simulink model of the plant,
for importing the following to MATLAB workspace:
a) The voltage input from the signal generator and
b) The speed output from the taco-generator of the plant (which is
obtained at the Analog Input block of the model)

FIG1.12 Simulink Model to get the system response.


The analog input and output blocks are set with values as shown
previously.
The model is then run, to import the voltage input and speed output
to the workspace.
Step-2: Starting a new session in the System Identification Tool
GUI, or opening a saved session: A new session can be started by
either typing ident in the MATLAB command window, or by
selecting Start -> Toolboxes -> System Identification -> System
Identification Toolbox GUI in the MATLAB Desktop:

Fig 1.13: System Identification Tool

Fig 1.14: System Identification Tool Dialog Box

The data board contains rectangular icons which show the data
imported into the GUI. The model board contains icons which
represent the models estimated or imported into the GUI. Model
icons can be dragged and dropped in the model board into open
dialog boxes. The current session may be closed by selecting File ->
Close Session. This prompts to save the current session, if it has not
already been saved.
Step-3: In the Import Data dropdown menu, select Time
domain data. The following window opens, where the name of the
input and output To Workspace blocks have been entered. Also,
depending on the starting time of the data in the data acquiesced,
the starting time is entered; and depending on the sampling time set
in the model of the plant, the sampling interval is entered.

Fig 1.15: Import Data Dialog Box


Step-4:
Click on Import. The following window opens, where the input
and output data from the model, have been imported into the data
board by the name of mydata:

FIG 1.16 System Identification Tool Dialog Box


Step-5:
In the Estimate drop-down menu, click on Process Models. The
following window opens, where the model has been chosen to have 1
zero and 2 poles, but no delay and integrator:

Fig 1.17 Process Models Dialog Box


The transfer function of the model, in abstract form, is also given in
the window on the top left corner.
Step-6:
Click on Estimate. The following window opens.

Fig 1.18 System Identification Tool Dialog Box


Step-7:
As shown in the above window, check Model Output. The
following estimate of the plant, is obtained in a new window

Fig 1.19: Model Output


Dialog Box

With the chosen configuration of 1 zero and 2 poles, and no delay or


integrator, as shown above, a best fit of 97.68% is obtained. This is a
satisfactory estimation. If the fit had been less than satisfactory,
then changing of the configurations would have been required.
Once, a satisfactory fit is obtained, the next and final step is
followed
Step-8:
The model which gives the most satisfactory fit, is dragged and
dropped from the model board into the To Workspace area. This
moves the values of Kp, Tz, Tp1 and Tp2 to the workspace, from
which, the corresponding transfer function is estimated.
For the fit of 97.68% shown above, the transfer function parameters
are:
Kp = 0.74153
Tp1 = 0.30208
Tp2 = 0.0012424
Tz = 0.039167

And the corresponding transfer function is:


0.02904 s + 0.7415
---------------------------0.0003753 s^2 + 0.3033 s + 1

Comparison

Of

The

Open

Loop

Response Of The Transfer Function


And That Of The Motor
The Simulink block diagram for comparison of open-loop response
of the transfer function and that of the motor is shown on the next
page.

FIG 1.20:

Simulink model for comparison of open-loop response of the transfer

function and that of the motor

The analog input and output blocks are se with values as shown
previously. And the transfer function block Is set with the transfer
function obtained in the previous sub-section.

Fig 1.21 Transfer function output

Fig 1.22: Plant output


From these results, it is seen that the transfer functions open loop
response is more or less, same as the open loop response of the
motor. But, neither open loop response successfully tracks the input
(or the reference) which is set as a square wave varying between -10
volts and +10 volts. This indicates the necessity of a closed loop
control system for the motor, so that the transfer function (and the
plant) output successfully tracks the reference. This is achieved with
the help of a PID controller, which has been described in the next
sub-section.

Servo Motor Information


A servo is a mechanical motorized device that can be instructed to
move the output shaft attached to a servo wheel or arm to a
specified position. Inside the servo box is a DC motor mechanically

linked to a position feedback potentiometer, gearbox, electronic


feedback control loop circuitry and motor drive electronic circuit

FIG 1.23

FIG 1.24

X-ray View Standard Servo Motor


A typical R/C servo looks like a plastic rectangular box with a
rotary shaft coming up and out the top of the box and three
electrical wires out of the servo side to a plastic 3 pin connector.
Attached to the output shaft out the top of the box is a servo wheel
or Arm. These wheels or arms are usually a plastic part with holes

in it for attaching push / pull rods, ball joints or other mechanical


linkage devices to the servo. The three electrical connection wires
out of the side are V- (Ground), V+ (Plus voltage) and S Control
(Signal). The control S (Signal) wire receives Pulse Width
Modulation (PWM) signals sent from an external controller and is
converted by the servo on board circuitry to operate the servo.
R/C Servos are controlled by sending pulse width signals (PWM)
from an external electronic device that generates the PWM signal
values, such as a servo controller, servo driver module or R/C
transmitter and receiver. Pulse Width Modulation or PWM signals
sent to the servo are translated into position values by electronics
inside the servo. When the servo is instructed to move (Received a
PWM signal) the on board electronics convert the PWM signal to a
electrical resistance value and the DC motor is powered on. As the
motor moves and rotates the linked potentiometer also rotates.
Electrical resistance value from the moving potentiometer are sent
back to the servo electronics until the potentiometer value matches
the position value sent by the on-board servo electronics that was
converted from the PWM signal. Once the potentiometer value and
servo electronic signals match, the motor stops and waits for the
next PWM signal input signal for conversion. A pulse width signal
(PWM) of approximately 1.5 mS (1500 uS) is the "neutral" position
for the servo. The servo, neutral is defined to be the point where the
servomotor has exactly the same amount of potential rotation in
the counter clockwise direction as it does in the clockwise direction.
When the pulse width signal (PWM) sent to a servo is less than 1.5
mS. the servo moves some number of degrees counterclockwise
from the neutral point. When the pulse is greater than 1.5mS the
servo moves some number of degrees clockwise from the neutral
point. Generally the minimum pulse will be about 1.0 mS and the
maximum pulse will be 2.0 ms with neutral ( Stop)
movement at 1.5 Ms R/C servos run on 5 volts DC but they often
work with voltages V-, V+ between 4 and 6 volts DC power, near
1 Amp of current. (Torque load on the servo arm determines amps
and can be from 200 mA to 1 Amp depending
on moving or holding force the servo needs for position)

SERVO RATINGS

The most common details available on a servo are its speed and
torque rating. Nearly all servo packages are listed
with brand name, model name/ number, speed, and torque output at
4.8 volts and 6.0 volts. Some information about
metal, plastic gears or ball bearings may also be listed.

SERVO SPEED
60 Degrees
Servo Speed is defined as the amount of time ( in seconds)
that a servo arm attached to the servo output shaft will SERVO
move from 0 to 60 degrees
.

SPEED
Note: The lower the time (Seconds) the faster the servo

60
can move an attached wheel or arm.Servo Speed is measured by the
amount of time (in seconds) it takes a 1 inch servo arm to sweep left
or right through a 60 degree arc at either 4.8 or 6.0 volts. A servo

rated at 0.22 seconds/60 degrees takes 0.22 seconds to sweep through


a 60 degree arc. Some of the fastest servos available move in the
0.06 to 0.09 second range. In some servos, faster speeds may
lower torque available.

SERVO TORQUE (Power)


Servo Torque is defined as ounce-inch (oz-in)
The total push / pull power a servo can apply on
a 1" servo arm when moving.

Servos have a certain amount of torque (strength) that is SERVO


generally proportional to their size. Servos come in all kinds of
TORQUE sizes, strengths and weight. Torque is the measurement of
force given over a distance. For most servos in the USA, torque is
16 oz-in on 1" measured in oz-in (force in ounces times inches, or
arm = 1 lbs lift 1" Arm ounce-inch). Servo Torque is measured by
the amount of weight (in ounces) that a servo can hold at 1-inch out
on the servo output arm in the horizontal plane, again at either 5.0
or 6.0 volts to see when the servo stalls as it tries to lift the weight
horizontally. The reported result is a measurement like this:
Servo XYZ = 100 oz/in. @ 6.0 V. That means that Servo XYZ

is capable of holding 100 ounces using a 1 inch output arm


without excessive deflection at 6.0 input volts. To convert oz-in
to kilogram-centimeters (kg-cm) just divide by 13.9

Examples:
Servo-A has 42 oz-in of torque
Weight 42 divided by 16 = 2.63 pounds of force on a 1" servo arm
(16 Ounces) Servo-B has 2.5 oz-in of torque 2.5 divided by 2 = 1.25
pounds of force on a 2" servo arm 16 ounces (oz) = 1 pound (lbs)
Servo-C has 36 oz-in of torque 36 divided by 4 = 9 pounds of force
on a 4" servo arm

Note:
If you need to know how many pounds a servo can push or lift on a
1" servo arm, divide the oz-in by the number 16.

Different sized

arms can be used. Use the length of the arm and divide the oz-in
value by the arm length

SERVO POWER (4.5- 6.0 VDC)

Servo Power is defined as the amount of DC Voltage needed to


operate a Servo without damage. Servo operate from 4.5 to 6.0 volts
DC. At the higher voltage servos tend to be faster and sometimes
stronger, but can heat up faster when stalled or in a hold position
with stress forces against the servo output shaft. Some servo
controllers require a separate power source from the control source
to deliver the higher 6.0 Vdc. The current drain (Amps required)
depends on the torque being put out by the servo motor and can be
in excess of one amp if the servo is stalled under load. It is best to
calculate 1 Amp per servo when figuring power supply needs for
most servos
4.5 to 6.0 Voltage
Servo Connector
(S)Si
gnal=Yellow(PWM Signal)
(+) 5 Vdc = Red
(-) Ground = Black

FIG 1.25

9-12 Vdc to +5 Vdc Converter


7805

Voltage Regulator

10 uF

Capacitor

Heatsink

Servo Wire Code

FIG 1.26

Servo Type

Positive (+)

Cirrus

Red

White

Black

Futaba - J

Red

Whit
e

Black

JR

Red

Orange

Brown

Red

Yellow

Black

Hitec

Airtronics
Airtronics Z

Fleet
GW

Red

Signal (S)

White

Red

Blue

Red

White

Red

Negative (-)

Blac
k
Black
Black

Orange
Brown

Centering

Servo

R/C servos are usually mechanically stopped from moving at full


rotation. They have limited rotation through a mechanical, plastic
block on the internal gearing and can rotate about 90 to 180 degrees
or less only. Servos are unable to continually rotate and usually
can't be used for driving rotating wheels. A servos precision
positioning makes them ideal for robotics and animatronics, since
servos are self contained with control loop circuitry, drive circuits,
servo position, speed control, and are very easy to control by an
external device such as a electronic servo controller board used in
animatronic character and robotic applications.
Servos are dynamic devices that when instructed to move position,
will actively move to hold the position, If for example a servo is
instructed to move in the clockwise position and an external force is
present and pushing against the servo such as a mechanical linkage,
the servo will resist being moved out of that position or continue
to try and move to the instructed position, even if the servo arm is
incorrectly placed on the motor shaft, until powered off. It is for this
reason that every servo output arm or servo wheel used should be
placed into the neutral position before instillation into your project.

Setting the servo arm or wheel to the neutral position prevents


stress to the servo motor, damages to the electronics and provides
wider movement ranges and angles for operating the mechanical
linkages connected to the servo arm or servo wheel.

FIG 1.27

How to Determine the Center Position


Automated Servo Center Position

There are several ways to do this:


( See Servo Checker Operation Guide )
The best and easiest way to set a servo's center position is to connect
the servo to a servo checker or tester. There are several low cost
servo checkers worth purchasing and having in your tool box if you
plan to work with servos. To use a Servo Checker simple set the
Servo Checker to its automated center position and let the
controller move the connected servo to center. If the servo arm is
pre-attached, you may have to remove the servo arm on top of the
servo shaft and re-position it back onto the servo shaft center point.
The servo is now ready for instillation.Once centered place the servo
arm on top of the servo shaft, secure it with servo screw and install
the servo as needed or carefully remove the servo arm from the
servo if not needed for instillation. Do not move the shaft at this

point, if it moves, simply repeat the above procedure to find the


servo center again.

Manual Servo Center Position - Steps:


Carefully place one of the servo arms or wheel onto the servo shaft,
mark a reference line through(across) the servo arm or wheel center
point. Slowly and carefully rotate the servo arm or wheel by hand as
far to one side as it will go, do not force servo arm / wheel. Mark a
line on the servo base where the servo arm or wheel reference line
stops. Slowly and carefully rotate the servo arm or wheel by hand to
the opposite position, as far to one side as it will go, do not force
servo arm / wheel. Should travel about 180 degrees. Mark a line on
the servo base where the servo arm reference line stops. Rotate the
servo arm back to 90 degrees between the two end reference line
positions (A,B) marked on the servo base. You may have to remove
the servo arm on top of the servo shaft and re-position it back onto
the output shaft to get the center point if the arm is off center
position. This should put the servo arm close to center position.

Carefully remove the servo arm from the servo if not needed for
instillation or place the servo arms on top of the servo shaft, secure
it with servo screw and install the servo as needed. Do not move the
shaft at this point. If it moves, simply repeat the above steps to find
the servo center again.

Torque

Cont.

Nominal Moto
Volts
r
RPM

Peak

Stall
lbin

Nm

lbin

Nm

1.8
1.8
3.1

0.21
0.21
0.35

13
13
19

1.4
1.4
2.1

50
30
50

3500
3000
3500

Motor
Inertia
lb-insec2

KgCm
2

0.0003
0.0003
0.0005

0.35
0.35
0.54

Current Order Numb


Cont. at
Stall
Amp

2.1
3.4
3.4

MT-2240 ACYAN
MT-2240-BCYAN
MT-2250-ACYAN

3.1
6.2
6.2
8.8
8.8
11.2
11.2
12.5
12.5
21.5
21.5
28
28
40
40
30
30
30
40
40
40
40
50
50
50
58
58
58

0.35
0.71
0.71
0.99
0.99
1.27
1.27
1.41
1.41
2.43
2.43
3.16
3.16
4.52
4.52
3.39
3.39
3.39
4.52
4.52
4.52
4.52
5.65
5.65
5.65
6.55
6.55
6.55

19
44
44
59
59
75
75
45
45
72
72
125
125
185
185
130
130
130
190
190
190
190
250
250
250
283
283
283

2.1
4.9
4.9
6.7
6.7
8.5
8.5
5.0
5.0
8.1
8.1
14.1
14.1
20.9
20.9
14.7
14.7
14.7
21.5
21.5
21.5
21.5
28.2
28.2
28.2
31.8
31.8
31.8

30
100
50
100
100
100
100
100
100
100
100
100
100
100
100
150
150
150
150
150
150
150
150
150
150
150
150
150

3000
2800
2000
2800
5000
2800
4000
3000
4500
1500
2300
1500
2300
1500
2300
2200
3200
4400
1400
2200
2700
4500
1700
2300
3300
1500
2100
2900

0.0005
0.0016
0.0016
0.0024
0.0024
0.0033
0.0033
0.007
0.007
0.011
0.011
0.014
0.014
0.024
0.024
0.014
0.014
0.014
0.021
0.021
0.021
0.021
0.028
0.028
0.028
0.035
0.035
0.035

0.54
1.84
1.84
2.75
2.75
3.67
3.67
7.91
7.91
12.43
12.43
15.82
15.82
27.12
27.12
15.82
15.82
15.82
23.73
23.73
23.73
23.73
31.64
31.64
31.64
39.55
39.55
39.55

5.5
2.8
5.1
3.8
6
4.9
6.3
5.5
7.9
5
7
6.2
9.2
9
13
6.1
9.2
12
5.7
8.3
11.2
16.4
8
10.6
15.7
8.5
12.1
15.3

MT-2250-BCYAN
MT-3353-BLYAN
MT-3353-DLYAN
MT-3358-BLYAN
MT-3358-CLYAN
MT-3363-BLYAN
MT-3363-CLYAN
MT-4050-ALYBE
MT-4050-BLYBE
MT-4060-ALYBE
MT-4060-BLYBE
MT-4070-ALYBE
MT-4070-BLYBE
MT-4090-ALYBE
MT-4090-BLYBE
MT-4525-BTYCN
MT-4525-CTYCN
MT-4525-DTYCN
MT-4535-ATYCN
MT-4535-BTYCN
MT-4535-CTYCN
MT-4535-DTYCN
MT-4545-ATYCN
MT-4545-BTYCN
MT-4545-CTYCN
MT-4555-ATYCN
MT-4555-BTYCN
MT-4555-CTYCN

DC Servo Motor Performance Selection Guide

Controlling the Servo motor


The signal that controls the servo motor in this example is given by
series of pulses (Figure 1) with a period of 200 ms or 5 Hz and the
duration depends on the required direction. For most servo motors,
pulses of 1 ms represent a 0 degree turn, and 2 ms represent a 180
degree turn, but it can vary. This information shall be specified in

the data sheet of each servo motor and can be tested by trying
different PWM signals. To send the signal by software, the MCU
must generate a PWM signal with a duty cycle of 0.5% to 1% and a
period of 200 ms. It is recommended to elaborate a function that has
a position parameter and sets the servo motor to the desired
position to simplify the code (as implemented in the example code
for this document).

Suggestion to reduce noise in signals


When elaborating PCBs or designing circuits involving motors that
consume large amounts of current, it is useful to separate
completely signals with high and low current within the hardware.
For PCBs, signals such as motor outputs, analog ground and power
supply voltage should be with wide area and low resistance and it is
recommended to use heat sinks to prevent some components from
melting. Another useful tip is to capacitate as much as possible
important analog signals, in order to reduce noise caused by the
motor or long wires. It is essential to connect capacitors to all steady
state pins or signals vulnerable to noise (and power supplies).

Sample code for Servo and Motor control

System Architecture
The drivers (Figure 5) are implemented for the
MPC560xB to control a servo motor and a DC
motor.

In

the

following

sections,

detailed

explanation of each function on the medium and


low level drivers is given:
High level

Main

motor

control

algorithm

(high

level

driver

(Driver_Servo.c

and

driver

(Driver_Motor.c

and

program done by user)


Medium level

Servo

motor

Driver_Servo.h)

Main

motor

Driver_Motor.h)
Low level
ADC driver (Driver_ADC.c and Driver_ADC.h)

eMIOS

driver

(Driver_EMIOS.c

Driver_EMIOS.h)
SIU driver (Driver_SIU.c and Driver_SIU.h)

and

Initialization:
Driver_MPC5604B.h

FIG 1.28 Software Architecture-APIs distribution

Driver explanation

Medium level drivers


Function

vfnSet_Servo

Return

Sets the servo motor to a position


relative to the maximum and
minimum values established. For
example, if a reading in SAIC has a
value of 10 as a minimum because
less is invalid, and a maximum of
510, then a call to vfnSet_Servo
(260,10,510) sets the servo motor
exactly at the middle,and
vfnSet_Servo(10,10,510) sets the
servo motor to the left (all left
possible).
u16Position: The desired position of the servo motor, with
relative values to the minimum and maximum values.
u16MinVal: The minimum value possible for u16Position (if
u16Position is equal to u16MinVal then the servo motor turns all
the way left).
u16MaxVal: The maximum value possible for u16Position (if
u16Position is
equal to u16MaxVal then the servo motor turns all the way right).
Null

Function

vfnInit_Servo

Parameters

Definitions

involved

for SERVO_CTRL

both functions
SERVO_CTRL_PCR

SERVO_MIN_US

SERVO_MAX_US

Initializes the MCB counters for


both the servo motor and the main
motor modules and the OPWM
channel for the direction pin of the
servo motor (and its respective SIU
pin initialization).
The eMIOS channel used for the
signal
for servo control.
The pad number of the signal for
servo control used for pad
initialization in SIU.
The value representing a 0 degree
turn in the wheels controlled by the
servo motor. This value is in
microseconds,and is the width of
the 20ms-period signal pulse which
determines direction.
The value representing a 180
degree
turn in the wheels controlled by the
servo motor. This value is in
microseconds, and is the width of
the 20ms-period signal pulse which
determines direction.

All the drivers are explained in detail in this section.


SERVO_MCB_CHANNEL

The eMIOS channel used as


Modulus
Up Counter Buffered which is the
counter for the servo signal. This
means that the counter must have a
20ms period.

Functions on Driver_Motor.c
Function

Parameters
Return
Function

Function

vfnSet_Motor_Forward
vfnSet_Motor_Reverse
vfnSet_Motor_Stop

Sends pulses to the motor


equivalent to the percentage
parameter u16Perc. It is
polarized normal (forward) or
reverse depending on the
function, and for motor
stop, IN1 and IN2 control
outputs are turned to 5V to
stop the motor from the
H Bridge.
u16Perc; with a 100 being 100% power (Vcc), 0% is GND,
and 50% is equivalent to a clock signal with 50% duty
u16Get_Feedback_Current; Returns the current consumed
by the motor by reading an ADC port.
vfnSet_Motor_Velocity
Sets the motor forward to a
desired velocity by increasing
the PWM signal (more duty)
to the motor if the measured
velocity is too slow or by
decreasing the PWM signal if
the measured velocity is
too fast. It works with a
proportional integral
algorithm.
vfnRead_Period
If a SAIC scan is done, this
function replaces the last
value of i32Period with the
period measured, else it does
nothing. i32Period is in micro
seconds and represents the
time it takes to the back
wheels to give one revolution
because
the signal the SAIC scans has
a rising edge each time the

Function

vfnInit_Motor

Definitions involved

MOTOR_MCB_CHANNEL

MOTOR_IN_1_PIN

MOTOR_IN_2_PIN

wheels give a complete


revolution. From this variable
velocity can be measured:
Velocity = Circumference of
wheel /
i32PeriodThis function must
be called frequently in case
the SAIC scan is done, and if
it
is called long after the SAIC
scan is done, it will lose
precision. It also checks if an
overflow occurs in the MCB
so that the i32Period variable
is increased by the time to
overflow (period of MCB).
Also, to measure the period
accurately, it has to know if
the MCB had an overflow,
to sum the corresponding
value to the i32Period counter,
so each time it has an
overflow, this function takes
care of adding the variable.
Initializes the GPIO pins for
the direction of the motor, the
OPWM channel for the
enable pin of the motor (and
its respective SIU pin
initialization), the analog pin
for the ADC scan of the
current, and the SAIC
channel for the velocimeter
(and its respective SIU pin
initialization).
The eMIOS channel used as
Modulus Up Counter
Buffered which is the counter
for the motor signal. This
means that the period of the
counter will be the period
of the motor PWM signal.
The GPIO pin used for logic
output IN1, which is a control
signal for the H Bridge
controlling the motor.
The GPIO pin used for logic
output IN2, which is a control

MOTOR_EN

MOTOR_EN_PCR

MOTOR_SENSE_CH
VELOCIMETER

VELOCIMETER_PCR

MAX_CURRENT

CIRCLE

CONTROL

DELAY
THRES and THRES2

signal for the H Bridge


controlling the motor.
The eMIOS channel used for
the signal of Motor Enable for
the H Bridge controlling the
motor.
The pad number of the signal
of Motor Enable used for pad
initialization in SIU.
The ADC channel used for
current feedback of the motor.
The eMIOS channel used for
the signal of the
Velocimeter,input that
measures the speed of the
wheels.
The pad number of the signal
of Velocimeter used for pad
initialization in SIU.
Number equivalent to the
current consumed when
feedback pin returns 5V.
The measure of the
circumference of the wheels in
nanometers.
Control and delay are
constants used in the
proportional integral control
unit of
speed. The constant Kc is 1/
(CONTROL* DELAY), where
CONTROL is the
proportional constant, and
DELAY is the
number of times the program
waits to execute the code
(executes 1 of DELAY times).
These threshold constants
define a threshold of
maximum and minimum
speed where the motor starts
up fast or stops to get to the
desired speed quickly.

Low level drivers

Driver_ADC.c

Function

vfnInit_NormalConversion_Ad
c

Parameters

u8ChannelType: The type of


the channel (Precision,
extended or external) defined
in Driver_ MPC5604B.h as
ADC_CHANNEL_
TYPE_tag.
u32Channel: The ADC
channel
used for convertions defined in
Driver_MPC5604B.h as
ADC_CHANNEL_tag.
Null
u16Read_Adc

Return
Function

Parameters

Return

Initialize ADC in scan mode,


Configure ADC clock to 32
MHz, set an ADC Channel
from a channel type as a
Normal Conversion, and start
conversions by setting
NSTART to 1.

Checks for the last ADC


conversion to be complete,
reads the value of the
conversion, scale the read
value in a range from 0 to
Maximum Value and returns
the scaled value.
u8Channel: The channel used for ADC. Channels appear in
Driver_
MPC5604B.h.
u8MaximumValue: The maximum possible value for the
result. It is the value returned if a 10 bit conversion returns
1023.

..
Driver_eMIOS.c
vfnSetup_Emios_0 and vfnInit_Emios_0

vfnInit_Emios_0_Mcb

Enables eMIOS clock, configure prescaler to


generate 4 MHz eMIOS clock, enables global
time base, enables Freezing channel to freeze
them when in debug mode. Also enable eMIOS
counters to start pulse generation and
processing.
Defines eMIOS channel as Modulus up
counter buffered with the selected period,
configure prescaler to produce 1 MHz
time base. The parameters of the function are
the following: u8Channel: eMIOS channel to
be configured as Counter (0,8,16,23,24).

vfnInit_Emios_0_Opwm

vfnInit_Emios_0_Saic

u16Period: Sets A register to establish period


in clock pulses.
Defines eMIOS channel as positive OPWM
with time base corresponding to the counter
bus B, C, D or E and establish its raising and
falling edge.
The parameters are the following:
u8Channel: eMIOS channel to be configured
as
OPWM.
u16A: Sets A register to establish leading
edge.
u16B: Sets B register to establish trailing
edge.
Defines eMIOS channel as SAIC with time
base corresponding to the counter bus B, C, D
or E. Allow channel freezing and set required
polarity.

vfnSet_Duty_Opwm

Establish Duty Cycle in counter pulses for an


eMIOS channel.
The parameters are the following:
u8Channel: eMIOS channel configured as
OPWM.
u16Duty: Sets B register to establish trailing
edge (register A is set to zero).

vfnSet_Duty_Perc_Opwm

Establish Duty Cycle in a percentage for an


eMIOS channel.
The parameters are the following:
u8Channel: eMIOS channel configured as
OPWM.
u16DutyPerc: Duty cycle in a percentage (0
100).
u16McbChannel: eMIOS channel used as
counter bus time base.

u16Read_Saic

Returns the value of counter when SAIC flag


occur for a
channel of EMIOS module, if the reading is
not ready of between
minimum and maximum parameters, then it
returns 0.
The parameters are the following:

u8Channel: eMIOS channel configured as


SAIC.
u16MinVal: Minimum accepted read value.
u16MaxVal: Maximum accepted read value.
u16Get_Counter

u16Get_Period_Mcb

Returns the counter value of the MCB of the


channel selected
when the function is executed, it has a channel
parameter
which determines the MCB channel.
Returns the fixed period value of the MCB of
the channel selected.
It has a channel parameter which determines
the
MCB channel.

SIU is the module that assigns functions to the physical pins. These
drivers were implemented because there are many functions each
pin can have, so there are pad configuration register values for each
pin (refer to MPC5604BCRM Reference Manual available from
https://www.freescale.com ).

Driver_SIU.c
vfnInit_Emios_Output_Pad

Initializes and assigns a pin as eMIOS, and for


output purpose.
vfnInit_Emios_Input_Pad
Initializes and assigns a pin as eMIOS, and for
input purpose
vfnInit_Adc_Pad
Initializes and assigns a pin as ADC for input
purpose.
The following functions are not part of the SIU but GPIO, yet both are used to control pad
configuration.
vfnInit_Gpio_Out
Initializes and assigns a pin as GPIO for
output purpose.
vfnSet_Gpio
Sets the value of the pin initialized as GPIO to
the parameter value u8Val which can be 0 or 1

Parameter

(0V or 5V).
u8PcrVal which is the SIU pad configuration
register value for a pin selected

.
Setup.c
vfnDisable_Watchdog
vfnInit_Peri_Clk_Gen
vfnInit_Modes_And_Clock

vfnInit_All

Disables the watchdog by clearing the


watchdog enable.
Enables peripheral set 3 and divides by 1 the
system clock.
Initializes the general modes RUN0, and for
ADC, SIU, EMIOS, and clock, with PLL to 64
MHz.
Calls all the functions in this file. This is the
only function of Setup.c required to be called
in the main file.

Driver_MPC5604B.h
This file has no functions, and contains only useful definitions that
relate modules and make easier the programming. Includes an ADC
channel selection masks, pad configuration register values for ADC
channels, pad configuration register values for eMIOS channels and
pad configuration register values for GPIO. An example to know
when to use them is the following: #define PCR_EMIOS_0_1345
/*PC13*/ This means that Channel 13 of eMIOS 0 can be assigned
to port C13, and the value that the SIU uses to assign that pin is 45
(which is the pad configuration register for that pin). For a complete
reference on how these registers are defined, please refer
to the MPC5604BCRM available from https://www.freescale.com.

Types Of Servo Motor


Unlike large industrial motors, dc servomotors are not used for
continuous energy conversion . The basic operating principle is
same as other electromagnetic motors . Design, construction and
mode of operation are different. The rotors of this kind of motor are
designed with long rotor lengths and smaller diameters . They have
large size than that of conventional motors of same power ratings .

There are various types of dc servomotors which are series


motors, split series motors, shunt control motor and permanent
magnet shunt motor. We will now discuss these types of dc
servomotors in brief.

Series motors
The series motor has a high starting torque and draws large current
.Speed regulation of this kind of motor is poor . Reversal can be
obtained by reversing the polarity of field voltage with split series
field winding (i.e one winding for direction of rotation). This method
reduces motor efficiency to some extent .

FIG1.29

Split series motors


Split series motor are the dc series motor with split-field rated with
some fractional kilowatt . This type of motor can operate as a
separately excited field-controlled motor. The armature is supplied
with a constant current source. Split series motor has a typical
torque-speed curve . This curve denotes high stall torque and a
rapid reduction in torque with increase in speed. This results in
good damping.

FIG 1.30

Shunt control motor

FIG 1.31
DC shunt type servomotor is not different from any other dc shunt
motor . It has two separate windings field windings placed on
stator and armature winding placed on the rotor of the machine .
Both windings are connected to a dc supply source. In a
conventional dc shunt motor , the two windings are connected
inparallel across the dc supply . In case of a servomotor , the
windings are supplied with separate dc source.

Permanent magnet shunt motor

Permanent magnet shunt motor is a fixed excitation motor where


the field is actually supplied by a permanent magnet . Performane is
similar to armature controlled fixed field motor that we are going to

know

in

the

next

Arc Welding Robot Automation Systems

section.

Robot automation systems are rapidly taking the place of the


human work force. One of the benefits is that this change provides
the human work force with the time to spend on more creative
tasks. The highest population of robots is in spot welding, spray
painting, material handling, and arc welding. Spot welding and
spray painting applications are mostly in the automotive industry.
However, arc welding and material handling have applications in a
broad range of industries, such as, automotive sub-suppliers,
furniture manufacturers, and agricultural machine manufacturers.
The number of arc welding automation robot stations is growing
very rapidly. The two most common stations are the GMAW (Gas
Metal Arc Welding) station and the GTAW (Gas Tungsten Arc
Welding) station. These two stations are the most common because
they are so well suited to robot systems. Typically, a robot arc
welding station is comprised of a robot, a robot controller, arc
welding equipment, a work clamp and motion devices to hold work
pieces accurately in position (considering heat deformation), robot
motion devices to move around the robot for a larger working range
and better weld positions, sensors, and safety devices. A typical arc
welding robot station is illustrated in Figure

FIG1.33

A Description of the System Components


The Robot and the Controller

A robot is programmed to move the welding torch along the weld


path in a given orientation. The robot is typically comprised of a
large number of links and linkages, which are interconnected by
gears, chains, belts, and/or screws. The majority of industrial robots
are actuated by linear, pneumatic, or hydraulic actuators, and/or
electric motors. Most of the high-end robots currently use AC servo
motors which have replaced the use of hydraulic actuators and,
more recently, DC servo motors. AC servo motors are essentially
maintenance free which is very important in industrial applications.
In an arc welding robot system, the torch is attached to the wrist of
the robot which has two or three axes of motion. As technology
develops, however, there is less application for a robot with a twoaxis wrist motion. In the case of three-axis motion, the motion is
composed of yaw, pitch, and roll, similar to the human wrist. The
robot has the most effective motion when the center point of the
wrist is aligned with the center line of the upper arm. A robot with a
three-axis lower arm and a three-axis wrist will permit the torch
action that is necessary for a complicated three-dimensional welding
process. The torch can satisfy all the angle requirements, such as,
the work angle, the transverse angle, the travel angle, and the

longitudinal

angle.

Important

factors,

when

considering

manufacturing performance are the frequency of failure, the mean


time between failure (MTBF), the average time for repair, and the
time for robot replacement. Also, with regards to system design,
important issues are the robot work envelope, the reach of the robot
tip, the number of joints (i.e., the degrees of freedom), the travel
velocity, and the repeatability, accuracy, and resolution of motion.
The controller is the brain of the robot arc welding system. This is
because the controller stores the robot programming and arc
welding data, and performs the necessary computations for robot
control, typically by a high-speed microprocessor. The controller
provides a signal to the actuators and the motors by programmed
data and position, speed, and other information obtained from
various sensors. The controller is now integrated to govern not only
the robot but also any peripheral devices, such as manipulators.
When the system is required to weld a work piece that has a
complicated geometry, the simultaneous coordinated control of the
integrated controller is inevitable. Memory backup devices, such as,
a floppy disc drive, are recommended for storing important data as
a safeguard in the event of a break down with the controller. In the

case of a power failure, or some other unforeseen event, storing the


data from an absolute resolver,or encoder, in controller memory will
ensure that the robot can restore the programmed position without
returning to the zero configuration.
The Welding Equipment (Power Source)
The welding equipment generates power to generate the arc for
welding. One of the most important characteristics is stability of
power. It is recommended that the welding equipment generates a
short arc with less spatter for a good welding quality even at high
speeds.The arc sensor detects the current value so that the power
source can supply the correct amount of power to the wire feeder,
which then controls the wire feeding speed. The wire feeder has
wheel rollers to advance the wire. Some feeders have four rollers
speed sensors for more accurate wire feeding by push-pull action.
Also, a wire feeder with shorter length to the torch is better in terms
of a response time. Therefore, a good location for the wire feeder for
a robot system is at the end of the upper arm of the robot. A slender
welding gun is better for maneuverability but, in case of a collision,
sufficient strength must be guaranteed. It is also necessary to ensure
that the torch is equipped with shock absorption devices such as

springs. It is also important to have a cooling system (a circulating


water, in general) to protect the torch against heat deformation. All
the connections for welding, such as, electric power, the wire, and
the coolant are usually integrated into one cable unit. It is
recommended that the cable unit be as short as possible for a
quicker response and a better reliability.

Manipulators
A robot has a limited working range and accessibility, therefore, in
many cases a manipulator has to be considered. A manipulator is a
device holding the work piece and is moved around (typically with
linkages) for better access and welding positions. The advantages of
a manipulator include:
(1) A manipulator can easily be moved around the work piece for
the best welding positions.
(2) A manipulator can reduce the variation in the lead and the lag
angles of the tip.
(3) Welding can be performed in a stable flat welding position by a
synchronized and simultaneous control of a robot and a
manipulator.
(4) Any hard-to-reach positions can be accessed more easily.

(5) A manipulator increases the working range of a fixed floor


mounted robot or an inverted robot. In general, a robot can
maintain a better flat welding position which will produce a better
deposition and, thereby, reduce any repair work by the cooperation
with a manipulator. This also makes possible higher welding speeds
and, thereby, an increase in productivity. There are two types of
actuation systems for manipulators; namely, the indexing type
system, and the servo-controlled system. The indexing type system is
for economic models and is commonly actuated by pneumatic and
AC motors. This type of system is usually controlled by signals for
target position with constant speed. The servo-controlled type
system is for speed and direction. This can be an expensive system
since it has a complex structure with servo motors, worm gear
reducers, and encoders or resolvers. However, the servo-controlled
type system has higher accuracy and variable speed control in both
directions of rotation. Errors are compensated for by feedback
control. Various types of manipulators, depending on the types of
motion and the degrees of freedom that are required, are shown in .
Several examples of rather simple one-degree-of-freedom
manipulators are shown inFIG

FIG1.34
shows more sophisticated manipulators for higher maneuverability,
but with an associated higher cost. In selecting the best type of
manipulator, it is important to consider control types, load carrying
capacity, and working environment. Also, repeatability, accuracy,
mechanical configuration, and degrees of freedom are important
issues that should be considered.

FIG1.35
A decision on the type of control depends on the
condition of the weld that is required. In terms of

the load carrying capacity, not only the mass or


weight of the work piece, but also the moment
caused by the off-center distance of the mass
center of the work piece must be considered. For
example, a work piece with a mass of 227 kg and
an off-center distance of 50mm is equivalent to a
work piece with a mass of 1135 kg and an offcenter distance of 10mm. Typically, the load
carrying capacity is evaluated at a distance
between 76152 mm. For purpose of illustration,
Fig. 4 shows a plot of the load carrying capacity
against the offcenter distance of the mass center
of a work piece.

FIG1.36

Sensors

Sensors collect information from the robot, peripheral devices, and


process and transfer this information to a controller. In arc welding,
it is critical to consider deformation from high heat input and,
therefore, a closed loop control with a sensor is necessary. Also, in
an automatic welding system the errors caused by manufacturing
tolerances of manipulator and work pieces have to be considered.
Various types of sensors for robot arc welding Stations are
available, see Table 1, and the right type must be chosen depending
on the application.

Sensor type
Contact type
(Weld seam tracking)

Non-contact type
(Various Purposes)

Sensors
Mechanical Type - Roller Spring.
Electromechanical type:
1) Two probes across the seam line.
2) A probe in the seam line.
Electric control type with probe.
A. Physical type:
1) Acoustic arc length control.
2) Capacitance distance control.
3) Eddy current seam tracking.
4) Induction seam tracking.
5) Infrared radiation penetration control.
6) Ultrasonic penetration and weld quality.
7) Magnetic detecting electromagnetic field.
B. Through-the-arc type:
1) Arc length control (arc voltage).

2) Weaving with electric measurement


(GTAW, GMAW).
C. Optical/vision (image capture and process):
1) Vision sensors.
2) Laser sensors.
3) Opto-electric sensors.

A Contact Type Sensor.

A Non-Contact Type Sensor.

Optical systems for guiding a weld seam. Figure 6 shows a system that
will detect an upcoming weld joint. This sensor may be used for grooves
such as V and J, lap joints, fillet joints, butt joints, or corner joints.
However, since it is located near the torch there is a limitation in access.

Optical System for Guiding a Weld Seam.

The system in Fig. 7 is used for detecting minor changes of the joints
that lie ahead. This system can be used for thin welds and at high
speeds. The system is good for lap, fillet, or butt joints. However, it

is important to note that there is the possibility of a collision with


the work piece.

A Sensor for Detecting Minor Changes of Upcoming Joints.

Track, Gantry, Column, and Peripheral


Equipment
When a work piece is too large for the robot workspace, or a robot
cannot reach some welding points, peripheral devices such as a
track, a gantry, or a column should be considered. These devices
have advantages of expanded work space, flexibility, and increased
productivity. Also, it is possible that a robot may work on a multiple
of work pieces and, thereby, increase the arc time. For efficient use
of these devices, it is advantageous to provide all the axes of the

system (including the robot and peripheral devices) with


simultaneous or synchronized control function. The standardized
and modularized system may be chosen based on load carrying
capacity, stability, accuracy and repeatability, and the maximum
number of axes that the controller can handle. However, the
productivity proven by practice is the most important criteria.
A Track. To increase the working range, the robot is mounted on a
track as shown in Fig. .The track also this provides flexibility for the
future consideration of the size of the work piece.In addition, a
track is useful when the breadth of the pieces is less than 1 meter
and a travel

distance greater than 1.5 meter is required. Most common work


pieces for track application are automotive panels, rear axles,
tractor frames, bed and furniture frames, window frames, container
doors, and computer racks. For increased arc time and productivity,
the concept of one robot with multiple work stations is used. This is
also illustrated in Fig.

A Robot Mounted on a Track.

A Gantry. A gantry is a steel structure where the robot is suspended


and inverted. Using a gantry, a robot can weld work pieces of
different sizes. A very large work piece can be welded with multiple
robots suspended on a single gantry or multiple gantries. Figure
shows two robots suspended from a gantry (i.e., a grinding robot
and a welding robot) working on a double station manipulator.

Two Robots Suspended from a Gantry.

A Column. A column is developed from the concept of


modularization. While the track moves in a single horizontal
direction, the column may fix the robot or move the robot in a
vertical direction and a horizontal direction. A column occupies less
space in the plant and makes possible efficient utilization of the
space. Also, the wirings of welding wire, power and signal cables
may be placed in a duct inside the column to avoid unnecessary
exposure. As shown in Fig. , a robot suspended from a column may
have better accessibility and weld position than a floor mounted
robot. There are stationary (fixed), traveling, rotary, and
rotary/traveling types of columns.

A Robot Suspended from a Column.

Welding Fixtures. Manufacturing a welding fixture requires experience


and know-how. A designer should have a profound knowledge of

tolerances of work pieces before and after welding. Also, a designer


should obtain information from experienced welding experts. The
geometry of a fixture is based upon the geometry of the work piece and
the clamping device of the manipulator. The fixture should guarantee a
good welding position and should be protected against heat, smoke, and
spatter. Figure shows an example of a welding fixture.

An Example of a Welding Fixture.

Safety
An arc welding robot system should be on a firm foundation so that any
vibrations will not produce a shaking effect on the system. Also, the
emergency switch button (with colors of yellow and red) should be
located at a position that is easily accessible. The switch should stop the
robot without shutting off the power. There should also be a safety fence

to protect the work force from spatter and arc flash. Figure 12 shows a
complete system of a safety fence. For safety, the robot operator should
have a rigorous training on robot speed, working range, emergency
stopping, and functions of teach pendant. The training should also
provide the operator with the opportunity to become familiar with the
robot system. While designing the robot system, sufficient time for
system modification and operator training is indispensable. Also,
obstacles inside the working area of the operator should be
eliminated and the system should be designed so that the welding is
perfomed at a safe distance from the operator. For this purpose, a
manipulator should be designed with dual stations with safeguards so
that the operator can work safely on loading and unloading. This will
also increase productivity. After the system is designed, installed, and
tested, all the detailed information in the design process should be
documented and transferred to the operator.

Important Functions of an Arc Welding Robot


The Robot Program

(A) Programming Method. First generation robots were programmed by


manual operation.
However, in modern technology, there are four common methods for
robot programming; namely:
(i) Programming by a Teach Pendant. The operator uses a dedicated
teach pendant for robot teaching and program editing. Teaching is
carried out for the tool center point (TCP) and the LCD display panel is
adopted for menu guide. It is easy to use but restricted in application and
extension. A teach pendant (such as the one shown in Fig. ) is the most
popular device in robot programming

A Robot Teach Pendant.

(ii) Programming by Manual Lead-Through. A well trained welding


expert will hold the holder near the torch and program by manual lead-

through. This was common in first generation robots, however, in


modern technology, this is only used for spray painting robots.
(iii) Programming by a Robot Language. The robot is programmed by a
program language using a monitor and a keyboard. There exist several
command, motion, and operation level languages. Commonly used
robots can take advantage of a broad range of motion level languages.
The operation level language only describes the final goal of the
process, and the sequence of motion and data are generated
automatically. This programming method still remains very much in the
research stage.
(iv) Programming by a Simulator. A graphic simulation is performed
and it is translated into the language of the robot. This is also referred to
as off-line programming.
(B) Welding Data. Welding data is special data of parameters that are
used for the welding process. The welding data is composed of start
data, main data, end data, and weaving data. Figure 14 shows an
example of welding data.

Conclusion
The tutorial was able to cover everything I had hoped it would
and we had success in controlling servos which was our main purpose &
goal. I will have more projects coming which use servos so you can see
how they fit into projects which are doing many things at once.
Having now gone over how to control DC Motors & Servo
Motors I'll be able to move onto stepper motors in a future tutorial. So
for those of you who have been waiting to see it, a stepper motor tutorial
is in the works & coming.

REFERENCES
1) ^ Baldor Electric Company - Servo Control Facts. Accessed 25 September 2013
2) Jump up ^ Anaheim Automation: Servo Motor Guide. Accessed 25 September 2013
3) Jump up ^ BusinessDictionary.com definition. Accessed 25 September 2013
4) Jump up ^ Eugine L. Ragonnet, Controlling Mechanism for Locomotives, U.S. Patent
930,225, Aug. 9, 1909.
5) Jump up ^ IEEE Industry Applications Magazine March/April 1996, pg 74
6) Jump up ^ G. W. Younkin, Industrial Servo Control Systems - Fundamentals and Applications
- Second Edition, Taylor and Francis, 2007.
7) J. D. Lane, Robotic Welding, IFS, 1987.
8) H. B. Cary, Modern Welding Technology, Third Edition, Regents/Prentice Hall Book
Company, Inc., Upper Saddle River, New Jersey, 1994.
9) N. S. Seo, Modern Manufacturing Processes, Dongmyungsa, Korea, 2002
10) P. F. Ostwald, and J. Munoz, Manufacturing Processes and Systems, John Wiley and
Sons, Inc., New York, 1997.
11) S. Kalpakjian, Manufacturing Engineering and Technology, Addison Wesley
Publishing Company, Inc., Reading, MA, 1992.
12) J. J. Craig, Introduction to Robotics, Mechanics and Control, Addison Wesley
Publishing Company, Inc., Reading, MA, 1989.
13) K. S. Fu, Robotics, McGraw-Hill International Book Company, Inc., New York, 1987

S-ar putea să vă placă și