33991
22
Go to: www.freescale.com
The motor is stepped by providing index commands at
intervals. The time between steps defines the motor velocity,
and the changing time defines the motor acceleration.
The state machine uses a table defining the allowed time
steps, including the maximum velocity. A useful side effect of
the table is, it also allows the direct determination of theposition
the velocity should reduce to allow the motor to stop at the
desired position.
The motor equations of motion are generated as follows:
The units of position are steps, and velocity and acceleration
are in steps/second, and steps/second2.
From an initial position of 0, with an initial velocity
u
, the
motor position,
s
at a time
t
is:
=
For unit steps, the time between steps is:
This defines the time increment between steps when the
motor is initially travelling at a velocity μ. In the ROM, this time
is quantized to multiples of the system clock by rounding
upwards, ensuring the acceleration never exceeds the allowed
value. The actual velocity and acceleration is calculated from
the time step actually used.
Using
and
Table 13. Coil Step Value
STEP#
ANGLE
SINE Angle*
SINE Current
Flow
8-Bit Value
(DEC)
8-Bit Value
(HEX)
COS Angle*
COS Current
Flow
8-Bit Value
(DEC)
8-Bit Value
(HEX)
0
0
0
+
0
0
1
+
255
FF
1
15
0.259
+
66
42
0.965
+
247
F7
2
30
0.5
+
128
80
0.866
+
222
DE
3
45
0.707
+
181
B5
0.707
+
181
B5
4
60
0.866
+
222
DE
0.5
+
128
80
5
75
0.966
+
247
F7
0.259
+
66
42
6
90
1
+
255
FF
0
+
0
0
7
105
0.966
+
247
F7
-0.259
-
66
42
8
120
0.866
+
222
DE
-0.5
-
128
80
9
135
0.707
+
181
B5
-0.707
-
181
B5
10
150
0.5
+
128
80
-0.866
-
222
DE
11
165
0.259
+
66
42
-0.966
-
247
F7
12
180
0
+
0
0
-1
-
255
FF
13
195
-0.259
-
66
42
-0.966
-
247
F7
14
210
-0.5
-
128
80
-0.867
-
222
DE
15
225
-0.707
-
181
B5
-0.707
-
181
B5
16
240
-0.866
-
222
DE
-0.5
-
128
80
17
255
-0.966
-
247
F7
-0.259
-
66
42
18
270
-1
-
255
FF
0
+
0
0
19
285
-0.966
-
247
F7
0.259
+
66
42
20
300
-0.866
-
222
DE
0.5
+
128
80
21
315
-0.707
-
181
B5
0.707
+
181
B5
22
330
-0.5
-
128
80
0.866
+
222
DE
23
345
-0.259
-
66
42
0.966
+
247
F7
Notes: * Denotes Normalized values.
2
2
1
at
ut
s
+
a
a
u
u
t
2
2
+
+
=
as
u
v
2
2
2
+
=
at
u
v
+
=
F
Freescale Semiconductor, Inc.
For More Information On This Product,
n
.