APPLICATION NOTE
STEPPER MOTOR DRIVER CONSIDERATIONS
COMMON PROBLEMS & SOLUTIONS
by Thomas L. Hopkins
This note explains how to avoid same of the more common pitfalls in motor drive design. It is
based on the author sexperience in responding to enquiries from the field.
Bipolar driven motors. In the past unipolar motors
INTRODUCTION
were common and preferred for their simple drive
Over the years while working with stepper motor
configurations. However, with the advent of cost
users, many of the same questions keep occur-
effective integrated drivers, bipolar motors are
ring from novice as well as experienced users of
now more common. These bipolar motors typi-
stepper motors. This application note is intended
cally produce a higher torque in a given form fac-
as a collection of answers to commonly asked
tor [1].
questions about stepper motors and driver de-
sign. In addition the reference list contains a num-
ber of other application notes, books and articles Drive Topology Selection
that a designer may find useful in applying step-
Depending on the torque and speed required
per motors.
from a stepper motor there are several motor
Throughout the course of this discussion the drive topologies available [5, chapter3]. At low
reader will find references to the L6201, L6202 speeds a simple direct voltage drive, giving the
and L6203. Since these devices are the same die motor just sufficient voltage so that the internal re-
and differ only in package, any reference to one sistance of the motor limits the current to the al-
of the devices should be considered to mean any lowed value as shown in Figure 1A, may be suffi-
of the three devices. cient. However at higher rotational speeds there
is a significant fall off of torque since the winding
inductance limits the rate of change of the current
Motor Selection (Unipolar vs Bipolar)
and the current can no longer reach it s full value
Stepper motors in common use can be divided in each step, as shown in Figure 2.
into general classes, Unipolar driven motors and
Figure 1: Simple direct voltage unipolar motors drive.
1/12
AN460/0392
APPLICATION NOTE
higher voltage is used and the current limit is set
Figure 2: Direct voltage drive.
by an external resistor in series with the motor
A - low speed;
winding such that the sum of the external resis-
B - too high speed generates fall of
tance and the internal winding resistance limits
torque.
the current to the allowed value. This drive tech-
nique increases the current slew rate and typically
provides better torque at high rotational speed.
However there is a significant penalty paid in ad-
ditional dissipation in the external resistances.
To avoid the additional dissipation a chopping
controlled current drive may be employed, as
shown in Figure 3. In this technique the current
through the motor is sensed and controlled by a
chopping control circuit so that it is maintained
within the rated level. Devices like the L297,
L6506 and PBL3717A implement this type of con-
trol. This technique improves the current rise time
in the motor and improves the torque at high
speeds while maintaining a high efficiency in the
drive [2]. Figure 4 shows a comparison between
One solution is to use what is commonly referred
the winding current wave forms for the same mo-
to as an L/nR drive (Fig. 1B). In this topology a
tor driven in these three techniques.
Figure 3: Chopper drive provides better performance.
Figure 4: Motor current using L/R, L/5R and chopper constant current drive.
2/12
APPLICATION NOTE
bridge transistors will be forward biased by the
In general the best performance, in terms of
transformer action of the motor windings, provid-
torque, is achieved using the chopping current
ing an effective short circuit across the supply.
control technique [2]. This technique also allows
Secondly the L298N, even though it has split sup-
easy implementation of multiple current level
ply voltages, may not be used without a high volt-
drive techniques to improve the motor perform-
age supply on the chip since a portion of the drive
ance. [1]
current for the output bridge is derived from this
supply.
Driving a Unipolar Motor with the L298N or
L6202
Selecting Enable or Phase chopping
Although it is not the optimal solution, design con-
When implementing chopping control of the cur-
straints sometimes limit the motor selection. In
rent in a stepper motor, there are several ways in
the case where the designer is looking for a
which the current control can be implemented. A
highly integrated drive stage with improved per-
bridge output, like the L6202 or L298N, may be
formance over previous designs but is con-
driven in enable chopping, one phase chopping or
strained to drive a unipolar wound (6 leaded) mo-
two phase chopping, as shown in Figure 6. The
tor it is possible to drive the motor with H-Bridge
L297 implements enable chopping or one phase
drivers like the L298N or L6202. To drive such a
chopping, selected by the control input. The
motor the center tap of the motor should be left
L6506 implements one phase chopping, with the
unconnected and the two ends of the common
recirculation path around the lower half of the
windings are connected to the bridge outputs, as
bridge, if the four outputs are connected to the 4
shown in Figure 5. In this configuration the user
inputs of the bridge or enable chopping if the odd
should notice a marked improvement in torque for
numbered outputs are connected to the enable
the same coil current, or put another way, the
inputs of the bridge. Selecting the correct chop-
same torque output will be achieved with a lower
ping mode is an important consideration that af-
coil current.
fects the stability of the system as well as the dis-
A solution where the L298N or L6202 is used to
sipation. Table 1 shows a relative comparison of
drive a unipolar motor while keeping the center
the different chopping modes, for a fixed chop-
connection of each coil connected to the supply
ping frequency, motor current and motor induc-
will not work. First, the protection diodes needed
tance.
from collector to emitter (drain to source) of the
Figure 5: Driving a unipolar wound motor with a bipolar drive
3/12
APPLICATION NOTE
Table 1: Comparative advantages of chopping modes
Chopping Mode Ripple Current Motor Dissipation Bridge Dissipation * Minimum Current
ENABLE HIGH HIGH HIGH LOWER
ONE PHASE LOW LOW LOWEST LOW
TWO PHASE HIGH LOW LOW Ipp/2
(*) As related to L298N, L6203 or L6202.
Figure 6a: Two Phase Chopping.
Figure 6b: One Phase Chopping.
Figure 6c: Enable Chopping.
4/12
APPLICATION NOTE
RIPPLE CURRENT In the L6202 and L6203, the internal gate drive
circuit works the same in response to either the
Since the rate of current change is related directly
input or the enable so the switching losses are
to the voltage applied across the coil by the equa-
the same using enable or two phase chopping,
tion:
but would be lower using one phase chopping.
di
V = L
However, the losses due to the voltage drops
dt
across the device are not the same. During en-
the ripple current will be determined primarily by able chopping all four of the output DMOS de-
vices are turned off and the current recirculates
the chopping frequency and the voltage across
the coil. When the coil is driven on, the voltage through the body to drain diodes of the DMOS
across the coil is fixed by the power supply minus output transistors. When phase chopping the
the saturation voltages of the driver. On the other DMOS devices in the recirculation path are driven
hand the voltage across the coil during the recir- on and conduct current in the reverse direction.
Since the voltage drop across the DMOS device
culation time depends on the chopping mode
chosen. is less than the forward voltage drop of the diode
for currents less than 2A, the DMOS take a sig-
When enable chopping or two phase chopping is
nificant amount of the current and the power dis-
selected, the voltage across the coil during recir-
sipation is much lower using phase chopping than
culation is the supply voltage plus either the V of
F
enable chopping, as can be seen in the power
the diodes or the RI voltage of the DMOS devices
dissipation graphs in the data sheet.
(when using the L6202 in two phase chopping).In
With these two devices, phase chopping will al-
this case the slope of the current rise and decay
ways provide lower dissipation in the device. For
are nearly the same and the ripple current can be
discrete bridges the switching loss and saturation
large.
losses should be evaluated to determine which is
When one phase chopping is used, the voltage
lower.
across the coil during recirculation is V (V for
on sat
Bipolar devices or I Å" R for DMOS) of the tran-
DSon
sistor that remains on plus V of one diode plus MINIMUM CURRENT
F
the voltage drop across the sense resistor, if it is
The minimum current that can be regulated is im-
in the recirculation path. In this case the current
portant when implementing microstepping, when
decays much slower than it rises and the ripple
implementing multilevel current controls, or any-
current is much smaller than in the previous case.
time when attempting to regulate a current that is
The effect will be much more noticeable at higher
very small compared to the peak current that
supply voltages.
would flow if the motor were connected directly to
the supply voltage used.
MOTOR LOSSES With enable chopping or one phase chopping the
only problem is loss of regulation for currents be-
The losses in the motor include the resistive
low a minimum value. Figure 7 shows a typical re-
losses (I2R) in the motor winding and parasitic
sponse curve for output current as a function of
losses like eddie current losses. The latter group
the set reference. This minimum value is set by
of parasitic losses generally increases with in-
the motor characteristics, primarily the motor re-
creased ripple currents and frequency. Chopping
sistance, the supply voltage and the minimum
techniques that have a high ripple current will
duty cycle achievable by the control circuit. The
have higher losses in the motor. Enable or two
minimum current that can be supplied is the cur-
phase chopping will cause higher losses in the
rent that flows through the winding when driven
motor with the effect of raising motor tempera-
by the minimum duty cycle. Below this value cur-
ture. Generally lower motor losses are achieved
rent regulation is not possible. With enable chop-
using phase chopping.
ping the current through the coil in response to
the minimum duty cycle can return completely to
zero during each cycle, as shown in figure 8.
POWER DISSIPATION IN THE BRIDGE IC.
When using one phase chopping the current may
In the L298N, the internal drive circuitry provides
or may not return completely to zero and there
active turn off for the output devices when the
may be some residual DC component.
outputs are switched in response to the 4 phase
When using a constant frequency control like the
inputs. However when the outputs are switched
L297 or L6506, the minimum duty cycle is basi-
off in response to the enable inputs all base drive
is removed from output devices but no active ele- cally the duty cycle of the oscillator (sync) since
the set dominance of the flip-flop maintains the
ment is present to remove the stored charge in
output on during the time the sync is active. In
the base. When enable chopping is used the fall
constant off time regulators, like the PBL3717A,
time of the current in the power devices will be
the minimum output time is set by the propaga-
longer and the device will have higher switching
tion delay through the circuit and it s ratio to the
losses than if phase chopping is used.
selected off time.
5/12
APPLICATION NOTE
Figure 7: The transfer function of peak detect current control is nonlinear for low current values.
Figure 8: A Minimum current flows through the motor when the driver outputs the minimum duty cycle
that is achievable.
gerous. In this case the reverse drive ability of the
For two phase chopping the situation is quite dif-
two phase chopping technique can cause the cur-
ferent. Although none of the available control
rent in the motor winding to reverse and the con-
chips implement this mode it is discussed here
trol circuit to lose control. Figure 9 shows the cur-
since it is easy to generate currents that can be
rent wave form in this case. When the current
catastrophic if two phase chopping is used with
reaches the peak set by the reference both sides
peak detecting control techniques. When the
of the bridge are switched and the current decays
peak current is less than 1/2 of the ripple (I ) cur-
pp
until it reaches zero. Since the power transistors
rent two phase chopping can be especially dan-
6/12
APPLICATION NOTE
Figure 9: Two phase chopping can loose control of the winding current..
are now on, the current will begin to increase in a Figure 10. If the magnitude of this spike is high
negative direction. When the oscillator again sets enough to exceed the reference voltage, the com-
the flip-flop the inputs will then switch again and parator can be fooled into resetting the flip-flop
the current will begin to become more positive. prematurely as shown in Figure 11. When this oc-
However, the effect of a single sense resistor curs the output is turned off and the current con-
used with a bridge is to rectify current and the tinues to decay. The result is that the fundamental
comparator sees only the magnitude and not the frequency of the current wave form delivered to
sign of the current. If the absolute value of the the motor is reduced to a sub-harmonic of the os-
current in the negative direction is above the set cillator frequency, which is usually in the audio
value the comparator will be fooled and reset the range. In practice it is not uncommon to encoun-
flip-flop. The current will continue to become more ter instances where the period of the current
negative and will not be controlled by the regula- wave form is two, three or even four times the pe-
tion circuit. riod of the oscillator. This problem is more pro-
For this reason two phase chopping is not recom- nounced in breadboard implementations where
mended with bridge circuits like the L298N or the ground is not well laid out and ground noise
L6203 and is not implemented in any of the cur- contributes makes the spike larger.
rently available driver IC s. The problem can be
When using the L6506 and L298N, the magnitude
avoided by more complex current sense tech-
of the spike should be, in theory, smaller since
niques that do not rectify the current feedback.
the diode reverse recovery current flows to
ground and not through the sense resistor. How-
Chopper Stability and Audio Noise.
Figure 10: Reverse recovery current of the
One problem commonly encountered when using
recirculation diode flows through the
chopping current control is audio noise from the
sense resistor causing a spike on the
motor which is typically a high pitch squeal. In
sense resistor.
constant frequency PWM circuits this occurrence
is usually traced to a stability problem in the cur-
rent control circuit where the effective chopping
frequency has shifted to a sub-harmonic of the
desired frequency set by the oscillator. In con-
stant off time circuits the off time is shifted to a
multiple of the off time set by the monostable.
There are two common causes for this occur-
rence.
The first cause is related to the electrical noise
and current spikes in the application that can fool
the current control circuit. In peak detect PWM
circuits, like the L297 and L6506, the motor cur-
rent is sensed by monitoring the voltage across
the sense resistor connected to ground. When the
oscillator sets the internal flip flop causing the
Reverse Recovery Current
bridge output to turn on, there is typically a volt-
Recirculation Current
age spike developed across this resistor. This
spike is caused by noise in the system plus the
reverse recovery current of the recirculating diode
that flows through the sense resistor, as shown in
7/12
APPLICATION NOTE
Figure 11: Spikes on the sense resistor caused by reverse recovery currents and noise can trick the
current sensing comparator.
ever, in applications using monolithic bridge driv- DMOS drivers, like the L6202, the reverse recov-
ers, like the L298N, internal parasitic structures ery current always flows through the sense resis-
often produce recovery current spikes similar in tor since the internal diode in parallel with the
nature to the diode reverse recovery current and lower transistor is connected to the source of the
these may flow through the emitter lead of the de- DMOS device and not to ground.
vice and hence the sense resistor. When using
In constant off time FM control circuits, like the
CALCULATING POWER DISSIPATION IN BRIDGE DRIVER IC S
The power dissipated in a monolithic driver IC like the L298N or L6202 is the
sum of three elements: 1) the quiescent dissipation, 2) the saturation losses
and 3) the switching losses.
The quiescent dissipation is basically the dissipation of the bias circuitry in the
device and can be calculated as Vs Å" ls where Vs is the power supply voltage
and Is is the bias current or quiscent current from the supply. When a device
has two supply voltages, like the L298N, the dissipation for each must be cal-
cualted then added to get the total quiescent dissipation. Generally the quies-
cent current for most monolithic IC s is constant over a vide range of input
voltages and the maximum value given on the data sheet can be used for
most supply voltages within the allowable range.
The saturation loss is basically the sum of the voltage drops times the current
in each of the output transistors. For Bipolar devices, L298N, this is Vsat Å" I.
For DMOS power devices this is I2 Å" R .
DSon
The third main component of dissipation is the switching loss associated with
the output devices. In general the switching loss can be calculated as:
Vsupply Å" Iload Å" tcross Å" fswitch
To calculate the total power dissipation these three compnents are each cal-
culated, multipled by their respective duty cycle then added togther. Obviously
the duty cycle for the quiescent current is equal to 100%.
8/12
APPLICATION NOTE
PBL3717A, the noise spike fools the comparator ping circuit is to stop the motor movement (hold
and retriggers the monostable effectively multiply- the clock of the L297 low or hold the four inputs
ing the set off time by some integer value. constant with the L6506) and look at the current
wave forms without any effects of the phase
Two easy solutions to this problem are possible.
changes. This evaluation should be done for each
The first is to put a simple RC low pass filter be-
level of current that will be regulated. A DC cur-
tween the sense resistor and the sense input of
rent probe, like the Tektronix AM503 system, pro-
the comparator. The filter attenuates the spike so
vides the most accurate representation of the mo-
it is not detected by the comparator. This obvi-
tor current. If the circuit is operating stability, the
ously requires the addition of 4 additional compo-
current wave form will be synchronized to the
nents for a typical stepper motor. The second so-
sync signal of the control circuit. Since the spikes
lution is to use the inherent set dominance of the
discussed previously are extremely short, in the
internal flip-flop in the L297 or L6506 [1][3] to
range of 50 to 150 ns, a high frequency scope
mask out the spike. To do this the width of the os-
with a bandwidth of at least 200 MHz is required
cillator sync pulse is set to be longer than the sum
to evaluate the circuit. The sync signal to the
of the propagationdelay (typically 2 to 3µs for the
L297 or L6506 provides the best trigger for the
L298N) plus the duration of the spike (usually in
scope.
the range of 100ns for acceptable fast recovery
diodes), as shown in figure 12. When this pulse is The other issue that affects the stability of the
applied to the flip-flop set input, any signal applied constant frequency PWM circuits is the chopping
to the reset input by the comparator is ignored. mode selected. With the L297 the choppingsignal
After the set input has been removed the compa- may be applied to either the enable inputs or the
rator can properly reset the flip-flop at the correct four phase inputs. When chopping is done using
point. the enable inputs the recirculation path for the
current is from ground through the lower recircu-
The corresponding solution in frequency modu-
lation diode, the load, the upper recirculation di-
lated circuits, is to fix a blanking time during which
ode and back to the supply, as shown in Figure
the monostable may not be retriggered.
6c. This same recirculation path is achieved using
The best way to evaluate the stability of the chop-
two phase chopping, although this may not be im-
Figure 12: The set-dominanct latch in the L297 may be used to mask spikes on the sense resistor that
occur at switching.
9/12
APPLICATION NOTE
plemented directly using the L297 or L6506. In the comparator. The current control circuit is com-
this mode, ignoring back EMF, the voltage across pletely content to keep operating in this condition.
the coil during the on time (t ) when current is in- In fact the circuit may operate on one of two sta-
1
creasing and the recirculation time (t ), are: ble conditions depending on the random time
2
when the peak current is first reached relative to
V =V - 2V - V
1 s sat Rsense
the oscillator period.
and
The easiest, and recommended, solution is to ap-
V =V +2V
2 ss F
ply the chopping signal to only one of the phase
inputs, as implemented with the L297, in the
The rate of current change is given by (ignoring
the series resistance): phase chopping mode, or the L6506.
Another solution that works, in some cases, is to
di
V = L fix a large minimum duty cycle, in the range of
dt
30%, by applying an external clock signal to the
sync input of the L297 or L6506. In this configura-
Since the voltage across the coil (V ) during the
2
tion the circuit must output at least the minimum
recirculation time is more than the voltage (V )
1
duty cycle during each clock period. This forces
across the coil during the on time the duty cycle
the point where the peak current is detected to be
will, by definition, be greater than 50% because t
1
later in each cycle and the chopping frequency to
must be greater than t2. When the back EMF of
lock on the fundamental. The main disadvantage
the motor is considered the duty cycle becomes
of this approach is that it sets a higher minimum
even greater since the back EMF opposes the in-
current that can be controlled. The current in the
crease of current during the on time and aides the
motor also tends to overshoot during the first few
decay of current.
chopping cycles since the actual peak current is
not be sensed during the minimum duty cycle.
In this condition the control circuit may be content
to operate stability at one half of the oscillator fre-
quency, as shown in Figure 13. As in normal op-
EFFECTS OF BACK EMF
eration, the output is turned off when the current
reaches the desired peak value and decays until As mentioned earlier, the back EMF in a stepper
the oscillator sets the flip-flop and the current motor tends to increase the duty cycle of the
chopping drive circuits since it opposes current in-
again starts to increase. However since t is
1
longer than t the current has not yet reached the creased and aids current decay. In extreme,
2
peak value before the second oscillator pulse oc- cases where the power supply voltage is low
curs. The second oscillator pulse then has no ef- compared to the peak back EMF of the motor, the
fect and current continues to increase until the set duty cycle required when using the phase chop-
ping may exceed 50% and the problem with the
peak value is reached and the flip-flop is reset by
Figure 13: When the output duty cycle exceeds 50% the chopping circuit may sinchronize of a
sub-harmonic of the oscillator frequency.
10/12
APPLICATION NOTE
stability of the operating frequency discussed to the speed of the switching device and main-
above can occur. At this point the constant fre- tains a V that limits the peak voltage within the
F
quency chopping technique becomes impractical allowable limits. When the diodes are not inte-
to implement and a chopping technique that uses grated they must be provided externally. The di-
constant off time frequency modulation like imple- odes should have switching characteristics that
mented in the PBL3717A, TEA3717, TEA3718, are the same or better than the switching time of
and L6219 is more useful. the output transistors. Usually diodes that have a
reverse recovery time of less than 150 ns are suf-
ficient when used with bipolar output devices like
Why Won t the motor move
the L298N. The 1N4001 series of devices, for ex-
Many first time users of chopping control drives ample, is not a good selection because it is a
first find that the motor does not move when the slow diode.
circuit is enabled. Simply put the motor is not gen-
Although it occurs less frequently, excess current
erating sufficient torque to turn. Provided that the
can also destroy the device. In most applications
motor is capable of producing the required torque
the excess current is the result of short circuits in
at the set speed, the problem usually lies in the
the load. If the application is pron to have shorted
current control circuit. As discussed in the pre-
loads the designer may consider implementing
vious section the current sensing circuit can be
some external short circuit protection [7].
fooled. In extreme cases the noise is so large that
Shoot through current, the current that flows from
the actual current through the motor is essentially
supply to ground due to the simultaneous conduc-
zero and the motor is producing no torque. An-
tion of upper and lower transistors in the bridge
other symptom of this is that the current being
output, is another concern. The design of the
drawn from the power supply is very low.
L298N, L293 and L6202 all include circuitry spe-
cifically to prevent this phenomena. The user
should not mistake the reverse recovery current
Avoid Destroying the Driver of the diodes or the parasitic structures in the out-
put stage as shoot through current.
Many users have first ask why the device failed in
the application. In almost every case the failure
was caused by electrical overstress to the device,
specifically voltages or currents that are outside
SELECTED REFERENCES
of the device ratings. Whenever a driver fails, a
careful evaluation of the operating conditions in [1]Sax, Herbert., Stepper Motor Driving (AN235)
the application is in order.
[2] Constant Current Chopper Drive Ups Stepper-
The most common failure encountered is the re- Motor Performance (AN468)
sult of voltage transients generated by the induc-
[3]Hopkins, Thomas. Unsing the L6506 for Cur-
tance in the motor. A correctly designed applica-
rent Control of Stepping Motors (AN469)
tion will keep the peak voltage on the power
[4] The L297 Steper Motor Controller (AN470)
supply, across the collector to emitter of the out-
put devices and, for monolithic drivers, from one [5]Leenouts, Albert. The Art and Practice of Step
output to the other within the maximum rating of Motor Control. Ventura CA: Intertec Communica-
the device. A proper design includes power sup- tions Inc. (805) 658-0933. 1987
ply filtering and clamp diodes and/or snubber net-
[6]Hopkins, Thomas. Controlling Voltage Tran-
works on the output [6].
sisnts in Full Bridge Drivers (AN280)
Selecting the correct clamp diodes for the appli-
[7]Scrocchi G. and Fusaroli G. Short Circuit Pro-
cation is essential. The proper diode is matched
tection on L6203 . (AN279)
11/12
APPLICATION NOTE
Information furnished is believed to be accurate and reliable. However, SGS-THOMSON Microelectronics assumes no responsibility for the
consequences of use of such information nor for any infringement of patents or other rights of third parties which may result from its use. No li-
cense is granted by implication or otherwise under any patent or patent rights of SGS-THOMSON Microelectronics. Specifications mentioned
in this publication are subject to change without notice. This publication supersedes and replaces all information previously supplied. SGS-
THOMSON Microelectronics products are not authorized for use as critical components in life support devices or systems without express
written approval of SGS-THOMSON Microelectronics.
© 1995 SGS-THOMSON Microelectronics - All Rights Reserved
SGS-THOMSON Microelectronics GROUP OF COMPANIES
Australia - Brazil - France - Germany - Hong Kong - Italy - Japan - Korea - Malaysia - Malta - Morocco - The Netherlands - Singapore - Spain -
Sweden - Switzerland - Taiwan - Thaliand - United Kingdom - U.S.A.
12/12
Wyszukiwarka