A4980
Automotive, Programmable Stepper Driver
The magnitude of the resultant will be the square root of the sum
of the squares of these two currents:
| I 28 |
I
2
A
I
2
B
0.1406 0.8499 0.9953 (A)
So the resultant current magnitude is 99.53% of full scale. This
is within 0.5% of the target (100%) and is well within the ±5%
accuracy of the A4980.
The reference angle, zero degrees (0°), within the full electrical
cycle (360°), is defined as the angle where IB is at +100% and IA
is zero. Each full step is represented by 90° in the electrical cycle
so each one-sixteenth microstep is: 90°/16 steps = 5.625°. The
target angle of each microstep position with the electrical cycle
is determined by the product of the Step Angle Number and the
angle for a single microstep. So for the example of figure 5:
A 28(TARGET ) 28 5.625 157.5
The actual angle is calculated using basic trigonometry as:
A 28( ACTUAL)
180
tan 1
I A28
I B28
180 22.1 157.9
So the angle error is only 0.4°. Equivalent to about 0.1% error in
360° and well within the current accuracy of the A4980.
Note that each phase current in the A4980 is defined by a 6-bit
DAC. This means that the smallest resolution of the DAC is
100 / 64 = 1.56% of the full scale, so the A4980 cannot produce
a resultant motor current of exactly 100% at each microstep. Nor
can it produce an exact microstep angle. However, as can be seen
from the calculations above, the results for both are well within
the specified accuracy of the A4980 current control. The resultant
motor current angle and magnitude are also more than precise
enough for all but the highest precision stepper motors.
With the phase current table, control of a stepper motor is simply
a matter of increasing or decreasing the Step Angle Number
to move around the phase diagram of figure 5. This can be in
predefined multiples using the STEP input, or it can be variable
using the serial interface.
Using Step and Direction Control
The STEP input moves the motor at the microstep resolution
defined by the two microstep select variables, MS0 and MS1,
logic levels. The DIR input defines the motor direction. These
inputs define the output of a translator which determines the
required Step Angle Number in the phase current table. The MS0
and MS1 can be set to select full step, half step, quarter step, or
sixteenth step microstepping as follows:
MS1
0
0
1
1
MS0
0
1
0
1
Microstep Mode
Full step
Half step
Quarter step
Sixteenth step
MS0 and MS1 can be accessed through the serial interface or
directly on pins 13 and 12 respectively. The values of MS0 and
MS1 are defined as the logical OR of the logic level on the input
pins and the value in Configuration Register 0. The bits in the
register default to 0 so if the serial interface is not used then MS0
and MS1 are defined by the input pins alone. If only the serial
interface is used to set the microstep resolution, then the MS0 and
MS1 logic input pins should be tied low to ensure that the register
retains full control over all resolutions. Note that the microstep
select variables, MS0 and MS1, are only used with the STEP
input; they can be ignored if the motor is fully controlled through
the serial interface.
In sixteenth step mode the translator simply increases or
decreases the Step Angle Number on each rising edge of the
STEP input, depending on the logic state of the DIR input. In the
other three microstep resolution modes the translator outputs spe-
cific Step Angle Numbers as defined in the phase current table.
Full step uses four of the entries in the phase current table. These
are 8, 24, 40, and 56 as shown in figure 7. Note that the four posi-
tions selected for full step are not the points at which only one
current is active, as would be the case in a simple on-off full step
driver. There are two advantages in using these positions rather
than the single full current positions. With both phases active, the
power dissipation is shared between two drivers. This slightly
improves the ability to dissipate the heat generated and reduces
the stress on each driver.
The second reason is that the holding torque is slightly improved
because the forces holding the motor are mainly rotational rather
than mainly radial.
Half step uses eight of the entries in the phase current table.
These are 0, 8, 16, 24, 32, 40, 48, and 56 as shown in figure 8.
Quarter step uses sixteen of the entries in the phase current table.
These are 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56,
and 60 as shown in figure 9.
Allegro MicroSystems, Inc.
23
115 Northeast Cutoff
Worcester, Massachusetts 01615-0036 U.S.A.
1.508.853.5000; www.allegromicro.com