Professional Documents
Culture Documents
Velocity and Position Control of The Burshless DC Motor.
Velocity and Position Control of The Burshless DC Motor.
Velocity and Position Control of The Burshless DC Motor.
THESIS
BRUSHLESS DC MOTORS, VELOCITY AND POSITION
CONTROL OF THE BRUSHLESS DC MOTOR
by
Nezih
Y.
Durusu
June 1986
Thesis Advisor:
George
J.
Thaler
T230364
UNCLASSIFIED
CURIfY CLASSIFICATION OP THIS PAGE
lb.
RESTRICTIVE
MARKINGS
UNCLASSIFIED
SECURITY CLASSIFICATION AUTHORITY
DECLASSIFICATION
/DOWNGRADING SCHEDULE
>.
6b OFFICE
(City,
(City,
State,
and
Code 62
ADDRESS
7b
(If
State,
(C/ty,
and
ZIP Code)
Monterey, California
8b OFFICE SYMBOL
7a
93943-5000
onterey, California
I
SYMBOL
applicable)
State,
(If
93943-5000
applicable)
ZIP Code)
10
PROGRAM
PROJECT
TASK
WORK
ELEMENT NO
NO
NO
ACCESSION NO
UNIT
Purusu. Nfisih Y
a
TYPE OF REPORT
13b
Master's Thesis
TIME COVERED
DATE OF REPORT
14
FROM
(Year,
Month, Day)
15
PAGE COUNT
103
1986 June
TO
SUPPLEMENTARY NOTATION
COSATI CODES
FIELD
GROUP
ABSTRACT {Continue on
18
reverse
if
if
SUB-GROUP
DiSTni3UTlON/AVAILABILlTY OF ABSTRACT
GJ?L'NCLASSIFIEQ/TJNLIMITED
a
21
SAME AS RPT
FORM
1473. 84 mar
UNCLASSIFIED
DTIC USERS
408-646-2134
83
APR
edition
All
may be used
until
exhausted
22c
OFFICE
SYMBOL
62Tr
SECURITY CLASSIFICATION OF this PAGE
UNCLASSIFIED
by
Nezih Y. Durusu
Lieutenant Junior Grade, Turkish Navy
B.S. ,' Turkish Naval Academy, 1978
^-^
ABSTRACT
A
motor was
addition,
the
was developed
position
control
of
the
motor
position control.
and
brusnless DC
In
#1
brushiess DC motor
for
TABLE OF CONTENTS
I.
II.
INTRODUCTION
11
III.
A.
15
B.
17
C.
21
D.
25
V.
27
A.
GENERAL
27
B.
30
34
C.
IV.
15
39
A.
GENERAL
39
B.
40
C.
43
D.
46
58
A.
GENERAL
53
3.
58
C.
59
D.
MICROCOMPUTER SYSTEM
62
E.
SOFTWARE DESIGN
65
VI.
VII.
70
A.
GENERAL
70
B.
SYSTEM CALIBRATION
71
C.
71
76
A.
76
B.
77
...
APPENDIX
A:
APPENDIX
3:
APPENDIX
APPENDIX
APPENDIX
C:
D:
E:
.30
SYSTEM
31
32
84
35
APPENDIX
APPENDIX
APPENDIX
MAIN PROGRAM
.37
.39
91
LIST OF REFERENCES
101
102
LIST OF TABLES
WITH MAGNITUDE
50
74
LIST OF FIGURES
Figure 2.1.
Figure 2.2.
15
16
Conventional DC
Essential Parts of
Motor
Figure 2.4.
Essential Parts of
Figure 2.5.
Figure 2.6.
22
Figure 2.7.
24
Figure 2.8.
25
Figure 3.1.
28
Figure 2.3-
13
Brushless DC Motor
.19
Figure 3.2.
Figure 3.3.
.29
Figure 3.4.
Figure 3.5.
Figure 3.6.
33
Figure 3.7.
33
Figure 3.8.
Digital
Figure 3.9.
35
Figure 3.10.
36
Figure 3.11.
37
Figure 3.12.
to
Analog Conversion
.29
.31
.32
34
39
41
42
42
43
Figure 4.6.
Dither Signal
44
Figure 4.7.
45
45
Figure 4.1.
Figure 4.2.
Figure 4.3.
Figure 4.4.
Figure 4.5.
Figure 4.3.
for
Figure 4.9.
Figure 4.10.
.46
47
Figure 4.11a
Figure 4.11b
Figure 4.12.
53
Figure 4.13.
54
Figure 4.14.
55
56
56
57
Figure 4.15.
Figure 4.16.
Figure 4.17.
Figure 5.1.
the.
59
Figure 5.2.
Direction Sensor
60
Figure 5.3.
60
Figure 5.4a
Figure 5.4b
Figure 5.5.
Microcomputer System
Figure 5.6.
Figure 5.7.
Figure 6.1.
Figure 6.2.
.63
64
.
.68
69
System
.72
73
Figure 6.3.
Figure 6.4.
75
75
Figure 6.5.
.73
ACKNOWLEDGMENT
wish
to
express
my
deepest
thanks
to
Dr.
George
gratitude
to
my
wife,
Candi,
her
10
loving support as
recent years,
In
I.
INTRODUCTION
the
It offers long
is
magnets and
motor differ
motor
On
the
motor
is
other
are
done
the
in
The
by
hand,
performed
is
the
by
usually transistors.
dissipated through
decline in
The
is
to
in
the conventional
amplifier design.
DC
Besides this,
the stator.
DC motor
and
brushless DC
the
commutator and
brushes.
is
controlled fashion.
brushless DC
motors
in
tne
stator.
11
are the most commonly used methods for the angular position
sensing system.
The
Hall
placed
the
in
It
is
most
commonly
rotating disk,
#1
Hall sensor
encoder as well.
The velocity control of the system was designed by using
the fact that the Hall sensor gives two pulses per revolution
for
pole
four
motor.
each revolution,
this
idea
the
mind,
in
By
digital
speed
can
be
obtained.
V/iuh
The
analog signal.
The
digital
speed
to
to
an
analog
Two
of them are the logic signals from the Hall effect sensors.
One
of
the
inputs
is
the
direction command.
12
The
other
input
used
is
for
on-off control
for
in mind,
speed
apply
to
of
a
tdrque control.
and
the
motor which
is
In
brushless DC motor,
and
the
microprocessor control
brushless DC motor.
Of
its
new
software program.
be
used
for
Assembly language or
the
of
Fortran,
C,
high level
to
the
EPROM.
the
modulator.
the
In
velocity control
The
position
In Chapter Six
14
II.
A.
said
that
the
multi-coil stator.
brushless DC motor
basic
is
essentially an
of
conventional DC motor
equivalent version of
2.2.
Here we can
see
is
shown
in
It can be
Figure 2.1
cut-away
and
an
multi-coil stator.
MAGNET
ROTOR
Figure 2.1.
STATOR
PERMANENT
MAGNET
ROTOR
Figure 2.2.
magnet locations.
and
in
contrast,
the
stator.
DC
motor
is
thermal
point of view.
tional
DC
brushes.
motor
is
done
by
mechanical
commutated electronically.
16
on
the
commutator and
other
hand,
is
B.
Figures 2.3
in
2.4.
and
In
Figure
the
is
power
DC
In Figure
conventional DC motor.
the
the
2.4
have
2.3 we
supply.
that
the
is
By
way
electronic commutator,
an
the
from one
coil
to
can
place
the
next
four
times
electronic commutation,
in
per
revolution for
four
be
applied
sensor
creates
to
the
circuit.
logic
pulses
to
generate
The
logic
position
shaft
signals which
One
the
of
circuits
is
simple,
shown
in
each winding
logic control
is
three-phase
Figure 2.5.
a
brushless DC
This
is
used one
of the system is
"half-wave"
conduction angle of
third of the
motor
120.
time
not complicated.
As
and
is
the
The speed
the
power
supply voltage
17
In
the
lower
part
of
the
torque reversal
in
in
reversed
torque.
In the brushiess DC
motor the same tning can be done by shifting all the logic
180.
functions by
This example
is
ignored.
Due
to
the
voltage
0RivE=
C.PCblT
17
LOGIC
ORCuiT
CGMMANO
SIGNAL
BRUSHES
LOGIC POWER
INPUT
POWER
POWER
COMMUTATOR
Supply
AC OR
DC
Figure 2.3.
Essential Parts of
18
Conventional DC Motor
COMMUTATION CONTROLLER
STAGE
Figure 2.4.
Essential Parts of
Brushless DC Motor.
low-power systems,
tolerated.
However,
if
reverse breakdown
can
be
Therefore
inductive energy
in
each winding.
two
supplies +V
19
+v
Sha
GO
120
130
240
300
360
60
It
angle
120
POSI TIVE
TORQUE
Figure
2.5.
Three-Phase,
Controller.
20
Half Wave
Brushless Motor
diodes.
the
rotor
shaft
given
velocity.
can be seen that the current Iq^
It
initial increase to
has an exponential
Then Q1 is switched
Tnus there is
Q2.
in
in Ipo,
the
is
turned
off
and
the
next
is
turned on.
C.
Appendix A)
is
four
four
pole structure:
i)
ii)
iii)
21
V
.
02
CO
n
nrjy^-, D
>
D4
f
D4
90
180
270
360
90
o-^WJP-o
ISO
iiKirmi dcgrM*
Transistor
2 Tranirstor
Figure 2.6.
ON
OFF
The
BCD
logic
outputs
from
are connected
sensors
the
to
"B"
to
inputs.
"D"
input
"D"
used
is
for
input to apply
logic
later
the
sections.
The
flux
rotation
on,
signal
for
convenient
The
provided
is
When
transistor
it
by
The
excitation.
For
the clock-wise
transistors Q1 and Qg
rotation,
phase will
have
will
be
phase
Q2
'
To
reverse
the
transistors QU
and
Q2
transistors Q2 and Q4
voltage,
and
'
on,
on.
'
nave
the
on
and tran-
direction,
and
Q3
'
angle
position,
23
on,
on,
phase
Figure 2.8.
This will
flux
Q1
transistors
'
phase.
transistors Q3 and Q1
on.
tat or
phase will
Q2 and Q4
sistors QU
on.
and
are on.
the
(CW)
negative voltage.
the
related windings.
in
3NI1
t?
01 3NH 8
n
a3aoo3a
<
CD
O Q
Nouo3yia
;
-N/vSr
WMd
Sb0SN3S
319NV 13VHS
Figure 2.7
24
CW
TORQ.UE
PHASE
angular
position
A
2
02
90
03
130
270
-t-
GL4-'
0.4
02
01
4-
Ol'
Ol
-r
03'
Ol'
COW TORQUE
I
270
04-'
03
180
04
02
4-
02'
-4-
90
03'
-h
Figure 2.3.
D.
Advantages
Brushless DC motors are more expensive for the same
because
does
not
a)
b)
c)
There is
d)
e)
long
life
it
The
DC motor.
25
f)
2.
Disadvantages
following are
The
brushless DC motor:
a)
b)
c)
Even
DC motors.
26
III.
General
A.
Before
motor,
it
will
speed
helpful
be
to
control
study
brushless DC
the
of
components of the
the
system.
is
studying the
are
sense the
field
in
gap.
The
position of the
Hall
sensors
are
to
The flux
in
As can be seen
3.3.
switches
sensor
sensed
for
rotor
flux
in Figure
from logic
3.3,
the rotor
in
Figure
high to logic
low when
the
[Ref 4]
gates
in
controls
power
to
give
transistors in such
DIRECTION
ref
PWM
PWM
tach
D/A
CONVERTER
MOTOR
A DRIVE
B [76-6-1]
DIGITAL
TACHOMETER
ii
0A
0B
HALL
SENSOR
PITTMAN
Figure 3.1.
rrrr
MOTOR
5111
WDGttl
DIRECTION OF ROTATION
N
ROTOR MAGNETS
HALL SENSORS
STATOR
WINDINGS
Figure 3.2.
FLUX
'
\
f
Time
ZERO CROSSING
SENSORS
SENSOR A
5V
OV
Time
SENSOR
5V
OV
TIME
Figure 3.3
The
Hall
sensor will
speed.
related
digital
to
the
tachometer
The
"D"
input
of
B.
to
the
in
apply
pulse
for speed
be discussed
decoder
the
motor drive
is
width modulation
More details will
later sections.
in
the
square waves
found.
measured,
be
the
Hall
sensors
If elapsed
produce
time
for
each
DC motor
is
^The arrows
of
each rotation.
for
revolution can
sensors.
revolution.
The
revolution and the speed of the motor can be shown with the
following example:
Period
speed
=
=
Revolution
50
10~3 sec
(RPS).
designed
by
the
author.
The main
idea was
to
measure the
30
Mb/DlV
Figure 3.4.
A
Fig.,
A
used
oV/DiV
obtain
3.6.
each period.
this design
the
16
bit
appropriate from
was running at
slow RPM,
high and
the
to
be
tne
For
most
From an overflow
REGISTER (74374)
REGISTER (74374)
osc
>i
600 KHZ
Figure 3.5.
PERIODIC
<
\_i
o
>
T IME(SEC)
Figure 3.6.
have
exceeded 65536.
Keeping in mind
tnat wnen
counter overflows,
the motor
runs under
600
became
the
RPM
the
this
criteria
A
pulses
for
(one shot)
the
is
counters.
The
PERIODUJ
<
\_i
>
23NAN0SEC
T
Figure 3.7.
ME(SEC)
33
The 7^374 Register stored the counts for each period until
the new count came.
The
logic
of
Digital
the
it
related
to
Analog conversion
to
the
is
The
volts.
be
is
between
and
10
When the speed is -40 rpm the output of the DAC will
is
10
is
equal to
0,
the
volts.
0/A
MOST
CONVERTER
SIGNIFICANT 3ITS
9 TO 16
Figure 3.8.
C.
0/A
CONVERTER
TO
3ITS
to
7 9ITS
applied.
It
should
be
recognized
that
low mechanical
tine
speed
obtained by mixing
a
instantaneous
low duty
cycle
is
low frequency
Twenty kilohertz
The sum of
Figure 3.9.
2T
35
'dJ/tSt u\\J
5v'.'
DlV
Figure 3.10.
An e(t)
level
signal
e'(t)
shown
as
in
Figure
3.103.
signal.
assumed
is
to
DC
volts and
two
signal
volts.
signal was
added
then fed to
shown
be
The
The
to
to
volts,
e
to
and
produce
has
e(t).
period,
This
T.
This
result was
volts
(logic
1)
to
volts
(logic 0)
A
in
Figure 3.11.
and
artwork
20K
o-A/W?
of
the
circuit
is
is
shown
shown
in
Figure
in Appendix
3.12.
The
C.
20K
D(t)0-A/W
Figure 3.11.
37
I*
iS
I) ll
it
10
13
i)
(.
i*
lb
> 8
.2
2
IT
N
it
11
l>
Ji
<
5
S
I*
lb IS IH II I?
ir5
II
10
7474.
11 k S
t>
13
11
Ik If
1
2
1
J
i 'i
II
'i
'o
74LSIol
mn
> t
5 o > 51
S
it
It
'III
HO
r
ia
7404
"
zO_bg
Figure 3.12.
in
10
11
74LSIGI
liu mi
~
I
IK >>
74LSI6I
74=LSI6I
>
1*
11
.0
K)
3 8
741ZI
I
I
1
2 J
LI
II
9.
PWM
IV.
GENERAL
A.
how
the
some
system works.
The
instruments used
for
these
2.
3.
4.
5.
6.
7.
8.
PS 150E
Power supply unit
Hewlett-Packard 6216A power supply
.Wavetek model 145 pulse/function generator
Textronix 2213 oscilloscope
Textronix 464 storage oscilloscope
Hewlett-Packard 3582A spectrum analyzer
Hewlett-Packard 85 plotter
Hewlett-Packard 124A camera.
+5V,
-10V, -15V.
PWM
DIP
SWITCH
(E>D/A
CONVERTER
DIGITAL
(CK)
Figure 4.1.
D/A
CONVERTER
TACHOMETER
(0A
For simplicity,
block diagram
test
(and
points)
of
the
system is shown in
Figure 4.1.
These test points are the same on the circuit board.
velocity command,
For
Fifteen
The
accurate data.
For
important
calibration purposes,
to
getting
many adjustable
the
15V.
open
loop
The
(OL)
Speed
position.
command was
given
by
dip
switch.
to
The
3peed (RPM)
3000
3260
3410
3570
3660
3750
3300
3845
0001
0010
0011
0100
0101
0110
0111
1000
40
first experiment.
motor
is
V/UIV
Figure 4.2.
rev
210"3
16
msec.
1/16 msec
60
3750 RPM.
(test point P)
is shown
in
Figure 4.3.
When the shaft of the motor is held, the motor slows down
and
no
seen.
The
41
Figure 4.3.
In
=
the
show that
this
is
open
loop
speed
(dip
an
RPM
1 iVIb/UIV
Figure 4.4.
Div
42
^O/Ji
Figure 4.5.
C.
'
ZV
on
to
the closed
set to 30 V.
Speed (RPM)
0100
0101
1275
1500
1580
1375
01 10
0111
16
For
that
reason -2
Dither signal.
steady
added
to
the
43
ov/uiv
ZQ)i6iQiv
Figure 4.6.
control
For the first experiment on closed loop velocity
the speed of 1275 RPM was chosen.
0100.
Figure
The Hall sensor output of the motor is shown in
4.7.
calculated
Its
4.8.
speed
in
is
the
1275
same
RPM.
PWM signal
is
shown
in
Figure
PWM
When the shaft of the motor was held slightly the
command
signal was changed to keep up with the given speed
(see Figure 4.9).
observed.
No change
in
system.
44
closed loop
?y/ uiy
b/pjy
Figure 4.7.
l_
Figure 4.8.
0/Jo
'
bV/ uiV
UlV"
DV
Figure 4.9.
'
D.
spectrum analyzer.
Random noise was used in the system and was fed to the
summing junction (test point N).
the
to the noise.
the
to
0.2.
46
The
frequency
response of
the
MOTOR
HP SPECTRUM ANALYZER
12
NOISE
?
test/
POINTS
CIRCUIT BOARD
Figure 4.10.
FCTN
MK R
+
-
29dB
2 3
FS
2dB
9dB
III
CD
r ".
,
-20
rj
-30
'M A,
<
v>
r
il
i
1
1
it
L
r
9
K R
Hz
1
Hz
I
Bl' 1
.5
1"
:5 _H
2 i rnHz
25
frequencyChz)
4.11a. Open Loop Frequency response of the system
with magnitude curve.
47
in
FR
FR
FCTN
FCT N
+ 89dB
MK R
1
F 3
So
9 d B D
5 o/d
IV
i
Lj
\
no
uu
ift ITT
1
f 4
LU
LU
<
X
--
H-.
u
rt
I
i
i1
'I it
"jit"jTl"
on
VJ VJ
rx
II
\_
Hz
..
1KR
25
19.2 Hz
1
B U
'
72 6
mHz
25
2.5
frequency(hz)
Figure 4.11b.
In
the
D/A converters.
The
such as
flip-flops,
number of
counters
this
means
they
use
in
the
clock
pulses
The following events take place in the system.
1.
Wait for
2.
3.
4.
Go to step
clock pulse.
48
control
The
there
sampling interval
equal
motor.
speed
is
chosen was
RPM.
1360
time delay
D/A converter
the
revolution of the
one
to
holds
the
is
function measurements,
the
one
/0.044
71.2 rad/sec or
11.3 hz.
At
frequency,
the
than
Nyquist
the
both the gain and phase curves can be seen in Figure 4.11a
and
4.11b.
The
frequency,
Table
The
1.
data in Table
is
Bode
are shown
drawn by using
the
Figure
4.16.
On
the
other
hand,
the
49
to
get
rpm to
1035
1305
rpm)
was applied
to
system as
the
step
input.
shown
in
Figure 4.17.
transient
This
response correlates
with the transient response which was found from the strip
chart (see Figure 4.16).
As can be seen, the system is type
pole
at
7.0
rad/sec
and
one
pole
[Ref.
1]
at
rad/sec.
GCa)
-^
(s/7.0+1 )(s/27.0+1
TABLE 4.1
FREQUENCY RESPONSE WITH MAGNITUDE AND PHASE
Magnitude(db)
w(rad/sec)
2.5
2.6
2.6
0.7
-0.9
-3.3
-6.8
-9.2
6. 2
8. 7
10
15
20
25
-11 .7
30
35
-13.5
-14.8
40
45
50
55
60
65
70
-17.
-18.3
-19.6
-22.2
-24.9
-28.9
Phase(desrrees)
-91
-91
-94
-107
-111
-123
-138
-153
-164
-176
-195
-207
-212
-230
-241
-246
-250
the
system.
The
50
system is
shown
Figure
in
4.13
and
transient response
the
loop transient
response
Figure 4.15).
(see
The
time
it
of
system.
the
found
to
be
140
milliseconds.
On
the
other hand,
the
constant
142 milliseconds
7.0
This
This indicates
thai:
the frequency response of the system which was found from the
HP spectrum analyzer was accurate.
The
calculated
transient
Figure
in
4.16.
response of the
From the
figure,
seconds.
was
loop
320
Thus
the
time
milliseconds/4
80
51
milliseconds.
It
can be
seen
that the time constant of the closed loop system was faster
than the open loop system.
Another
converter
D/A
creates
cause phase
lag
the
in
the
in
Since
system.
related
delay
system.
D/A converter
the
sampling rate,
the
to
will
this
with
that
calculated
from
transfer
the
function.
The
It
is
seen
that
measured
the
phase
7.0 rad/sec.
<P
37.4 milliseconds
The
time
that
the
time
is
This difference
It is obvious
faster
is
than
caused
by
the
the
time delay of the pulse width modulator and the D/A converter.
52
FREQUENCYCW,RAD/SEC)
Figure 4.12.
(2fap)
asVHd
0*581-
O-CT-
0'C2-
(ap)
Figure 4.13-
0'BB-
<TB>-
0-B3-
(T08T-.
0*B-
O'Si-
aanxiNovw
o1E
s
1
j
!
i
!
i
i i
i
1
1
1
2
1
T*T
O'l
6*0
9-0
i'O
9*0
9-0
ro
S'O
ro
ro
^r
o-o
Figure 4.14.
1-
-i
ggagSB
ts2
:v..~
TTfvr^
it-
-j
^;~Uh*t
i:
-:M:
i-
...
n 1
^-H
-:-:i
"i^::r:
r^MMrSEe
H
Figure 4.15.
1-
PRINTED
^
-S-
t.
U S *
TVVT
h
^_i._L
HP*f
2SBMZSBS
H
Figure 4.16.
1-
-+
-I
It
1
(-
Figure 4.17.
57
V.
GENERAL
A.
since
that
it
can
be
built with
couple of integrated
is
its
implementation as well.
Some of
2)
be used
B.
3)
4)
approach
approach.
is
One
58
is
used
to
turn
the
servo on
and
off.
{Ref.
In
2]
this
The position
PWM
MICROPROCESSOR
MOTOR
CONTROLLER
DIRECTION
DRIVE
A
B
Figure 5.1.
and
<
"
"
"
ii
OPTICAL
0A 0B
HALL
ENCODER SENSOR
MOTOR
(CRT)
terminal.
controller
is
the
Another
actual
input
to
the
microprocessor
is
C.
encoders
provide
59
pulse
for
each
Incremental
increment
of resolution.
a
light source,
rotation disk,
Heds-6000 series
incremental
stationary mask,
[Ref.
optical
2]
DIRECTION
SENSORS
SENSOR
LIGHT
(
LAMP, LED)
PHOTOVOLTAIC CELL,
PHOTOTRANSISTOR,
PHOTODIODE
)
STATIONARY
ROTATING
DISK
Figure 5.3.
MASK
Hewlett-Packard
the system.
SOURCE
and
for
The
Heds-6000
optical encoder.
body,
series
It
is
high resolution
incremental
the encoder
rotation of
An aperture
plate.
with
Therefore, during
molded
lens
into
silicon
detector.
The encoder body contains the phase plate and the detection
similar
phase
difference
in
is
90
electrical.
The
The direction of
index channel
is
61
An
index
is
generated
each
for
channel A,
wheel,
channel
B,
and
characteristics,
operating conditions
recommended
Encoding
and
E.
MICROCOMPUTER SYSTEM
The general block diagram of the microcomputer system is
shown
in
Figure 5.5.
(MPU),
Z-80,
It
includes
an
and
arithmetic-logical
a
The
The data
unit
in
16 bit
unidirec-
control bus.
bus carries
the
data
being exchanged
by
the
The
which will
select one
o.
t"be
.CHANNEL A
-r
UJ
CHANNEL B
CHANNEL
TIME OR ROTATION
Figure 5.4a.
CHANNEL
CHANNEL
LU
Q
_J
<
CHANNEL
TIME OR ROTATION
Figure 5.4b.
osc
^> PORT A
^> PORT
*!
Microcomputer System.
Figure 5.5.
Z-80
supplied by
requires
a
precise
timing
the
reference which is
system.
MOSTEK MK 4118
is
(P/N)
series,
1KX8
static
in
64
to
Appendix
F.
An
Intel
M8255A
for
load
the
The
function of the
SOFTWARE DESIGN
E.
General
The
fashion that
to
its destination.
(Appendix H)
at
using
Z-80
SYS19 routine.
an
interfacing
2)
3)
65
CRT
2.
The
control word to
mode.
First
is
For simplicity,
count of pulses.
represents 0.36.
1000
the
If
command
is
100
counts,
it
is
determined
is
in
the
greater than
clockwise (CCW).
The program takes 300 states to calculate the position
of
the
actual
motor
time
determine the
and
the
program takes
new
to
control
command.
execute can
be
found
for
this
microcomputer,
so
The
by
A
the
10 6
0.2035 microsecond.
time.
By
to
period,
it can be
to execute.
300 states
0.2035 microseconds
from the
sent
60.6 microsecond.
Otherwise,
sufficient speed
microseconds long.
for the motor.
This corresponds to
error signal.
speed
of
the
motor will
be
600
rpm.
The
decreasing
O
torque
-^
'
at
the
this
subroutine gets
the
terminal
The
terminal
Recall
67
to
the
CRT
'
The
..
'
in
<t
r-
rt
m
+
n
Z
r- h- N. o
IS
IT
^r
+
co
U.
'
> I
O (Mr^^m^r-oOcnO
<MKW
'
'
'
'
'
'
IT)
rOKjrorOw-itorOKlrorOr}-
2ur
f-
.1
_l
_)
in
INI
(0
3 3
"3
Z2
ro
>z
to
N.(T>
I9IS1
tf
r 1
**>/> f\Jc0t^-<r>O
08Z
WTT
00
ro
i
o
o O
2 2
N.
m * o
1
1 5
91
01
%
.
o
-t
N.
:0
Z>
INITIALIZE
STA RT
PORTS
DECREMENT
POSITION
GET POSITION
/-SPEED
-DIR=CW
COMMAND
INCREMENT
CHECK ENCODER
PULSE i
DIRECTION
POSITION
GET ACTUAL
DIRECTION
ERROR
DlR=CCW/
YES
DIRECTION
SPEED
/_
ERROR
_DIR=CW
GET ACTUAL
FIND POSITION
FIND POSITION
'-SEPEED
GET ACTUAL
DIRECTION
INCREMENT
POSITION
.SPEED
DECREMENT
DlR-CCW/
POSITION
INCREMENT
GET ACTUAL
DIRECTION
POSITION
DIR=CCW/
'-SPEED
DIRzCW
SPEED
DICREMENT
POSITION
Figure 5.7.
-SPEED
-DIR=CW
VI.
GENERAL
A.
for
the
During
the
testing
the
2.
Hewlett-Packard 121
3.
4.
5.
power supply.
6A
power
A four
The
system is important.
processor
and
supply
the motor
of
First,
motor drive
The
power
set.
the
an
The
dial
on
the
shaft
to
observe
SYSTEM CALIBRATION
B.
The calibration of
using
system.
the
written.
was
For
After
the
purpose
this
"
"
options
two
system calibration,
for
The
calibration program
After entering
"C"
set
of
should
adjusted
be
to
-4.96 volts.
C.
set
of
1000,
resolution
position command
should
be
given
as
counts.
The
relation
was
dial
used
to
The
2.
the motor.
The
shown
in
Figure 6.4.
position control
The
error
is
maximum the
system is
velocity will
be
rpm.
When
the
will
be
600
rpm.
is
minus,
tne
to
the
CCVJ
The
zero
is
the
in
such
motor will
way
not
that
shop.
create
is
reversed
dither signal
This dither
behavior
again.
This
algorithm will
hold
the
motor shaft at
USE?
t-SKIHT
2-R^lliffliaHTSDL
Figure 6.1.
is
72
tne
mi shut a^iiiluE
- IF YOU OH Kn fflJlKTHIW
FWB
Figure 6.2.
[C
Pflr
mnVM COHTraLflEOQWf t
-EMTIS IHb H1K111UH
- wixonr a
Iff
courts c
OHWTS
j&a oekees)
Figure 6.3.
73
TABLE 6.1
COUNTS AND ANGULAR POSITIONS
Angular Position (degrees)
Counts
000
142
15
083
30
45
60
75
90
135
180
125
167
208
250
375
500
625
750
875
997
225
270
315
359
fashion that
the program
than
130
and
fifty
runs
for
the
all
the runs,
position
The
chips and
by
writing
new software
program.
74
This
is
MICROPROCESSOR
]
VELOCITY
y^-^
ry~M
COMMAND*" V-^y
position.
1
POSITION
!/
ERROR^
PWM
MOTOR
DRIVE
^"-1
1
l_
MOTOR
J\
OPTICAL
ENCODER
Figure 6.4.
POSITION
Figure 6.5.
ERROR(DEG)
VII.
A.
The brushless
motor has
DC
been
shown
to
have
some
Brushless
Since commutation
is
a
and
be
highly practical
velocity control
the
time
than
the
the measured
time
constant.
This was
the
result of
and
the
D/A
converter
The
The
constant of tne
time
to
be
identical
microprocessor controller.
76
Position feedback
The encoder
This
brought
the
4.915 MHz
done
and
found
to
be
accurate.
Since the
incremental
the
torque on the
shaft.
The
B.
By
"a
16
bit
(4x4
bit
counter
the
the
increased
from 0.2
Instead
of
the
Hall
effect
sensor,
an
incremental
The
sampling
rate
will
then
77
be
2222 transistor
2N
signal
PWM
the
in
motor drive
is
transistor logic
To avoid this,
(TTL)
signal
collector
open
the
used
is
which
to
the
i -f
the
transistor
for
the
PWM
signal.
with an
signal
logic
820 ohms pull-up resistor should be used for the PWM signal.
system.
may
used
be
There
such as
many
are
Forth,
high level
Basic,
Ada.
Fortran,
using
in
languages that
C,
a
Pascal
high-level
readable and
with
written
and
modifying
by
the
one output as
programmed
It
to
the
interfacing devices
program
by
(Intel
to
faster clock.
is
modify
Since the
with
takes
8255A)
be
easier
therefore,
it
high-level language.
The
using
system.
and
build
the
it would be better
78
to
improve
errors
79
APPENDIX
MOTOR PARAMETER
UNITS
MOTOR CONSTANT
R)
(K /
N.m/(rad/s)
N.m/ W
ms
cj/v
tvv
MOMENT OF INTERIA
VISCOUS DAMPING
kg.m
*D
*M
T
T
ras
.
SYMBOL
N.m/(rad/s)
M
E
VALUE
1.42xl0~
37.7xl0~
FRICTION TORQUE
N.m
MOTOR MASS
kg
min
C/W
14.4
0.155
20.5xl0"
#1
13xl0~
3.0xl0~"
0.60
TH
TH
~MX
15
3.2
155
WINDING PARAMETER
UNITS
SYMBOL
TORQUE CONSTANT
N.m/A
**
29.9xl0"
29.9xl0~
V/(rad/s)
STATOR RESISTANCE
ohms
STATOR INDUCTANCE
mH
80
*T
L
VALUE
0.631
0.0975
3
3
APPENDIX
to -10
To
following
1)
2)
3)
Connect the
4)
Adjust the
5)
test-
P1
point
'0'
to the ground.
81
APPENDIX
TacHOfMTER
niGiTai.
NEIU
on
ooa
a a a a
fl
oia
8tt,ftaof
aaaJ
aoj ao>-
aa oa
o)
10?
pwm
aa aJ
aaa?
ff
(Li
^
iota
^s
o o o o o a
i-~A aoo
aooaoeoa
)<<ti
oooooooa
aoaisosoo
S-aaaaaa
JooooJo
"\9J>fy
0;
a
^T
82
"*
*3
Q
I
io
\\
tr
83
APPENDIX
to
performance
After
tne
If
it
program will
ask
After selecting
not,
tne P1
34
APPENDIX
shaft rotation
cycle
electrical cycles
360 electrical degrees.
Position Error:
The
and
its
cycles
Cycle Error:
An indication of cycle uniformity.
lution
revo-
Phase
The angle between the center of pulse A and the center of
pulse
B.
Index Phase:
For counter-clockwise
rotation
is
illustrated above,
the
is the angle,
in
*2
edge of
and
falling
electrical degrees,
rising edge of
edge
of
B.
is
the
angle,
in
I.
A$ 9
86
APPENDIX
the MC 68661B
Prior to
by
performing write
The EPCI can
program.
The MC 68661B register formats are summarized as follows:
MODE REGISTER
MR 17
(MR
1)
MR 16
MR1S
Sync Asvnc
Async: Stop
Invalid
00
01 =
stoo
2 stoo
Type
Parity
Parity Control
MR12
MR
MR
10
Character
Length
Rate Factor
Length
=
bit
10
1'i
Bit
MR13
MR 14
Odd
* Even
00 =
= Di'aplfd
= Enabled
10
00 = Synchronous IX rate
01 = Asynchronous IX rate
10 = Asynchronous 16X rate
= Asynchronous 64X rate
5 bits
0i=6
stoo oils
bits
T hits
n=8 bits
oils
Sync:
Sync:
Number of
SYN char
Transparency
Control
Normal
Oouble
SYN
Transparent
Single
SYN
MODE REGISTER
(MR2)
MR27 -MR24
0000
0001
00 10
0011
0100
0101
1
RiC
P\n 9
Pin 25
E
1
T.C
T.C
RC
IX
IX
R.C
10 10
IX
IX
T.C
TC
R.C
16X
R.C
16X
I6X
01 10
01
T.C
16X
COMMAND REGISTER
CR7
R.C
Pin 9
Pin 25
1000
XbVNC
1001
R.C T-C
BKOET
R.C
BKDET
R.C T.C
BKDET
R.C
BKOET
lOi
i
ioo
T.C
XSYNC
IX
xSmnC
101
T.C
10
xsrNC
I6X
Sync
async
sync
async
See baud
rates
CR4
CR3
CR2
Request
Mod*
To
00 = Normal rj^waiiun
Ol ASyDC
Sand
Normal
Foicm RTS
output n.ijn
Sync Aiync
Reset Error
CRO
CR1
Heiel
error flags
ecno
rm.tl*
ditbf r*brt
Sync
SYN
ii ii./j'-i"
fc
.,nx3
stripping
Local
or
moo
i-ioo r>acn
= flemoie in
<u
Force
TS
Normal
slfu<. rmjister
uulot
Transmit
Control
Oat* Terminal
Control
iR>EN)
Ready
(TEN>
Async
Force oreah
Automatic
Ol
i0
labia
sync
async
Receive
Operating
in
sync
async
(CR)
CR5
CH6
MR23-MR20
Mode
T.C
=*Foir.e fwea*
Force OTR
* Onarjtt)
i
- Endtiie
output
i
OUtPut
rl
Output low
oa^h
Sync.
Send OLE
u a Normal
i
87
Sena OLE
riign
* Force OTR
luaat
Disable
i
Enable
address is CE Hex,
mode register
88
Hex.
Mode register
APPENDIX G
INTEL 8255A OPERATION AND PROGRAMMING
Intel
The
C).
8255A contains
in
8-bit
three
a
ports
(A,
B,
Mode
Basic Input/Output
Mode
Strobed Input/Output
Mode
Bi-directional Bus
CONTROL WORD
D
ID,
GROUP
PORT
(LOWER)
- INPUT
- OUTPUT
PORT 3
- INPUT
I
- OUTPUT
MODE SELECTION
0- MODE
_ MODE
GROUP
PORT C(UPPER)
- INPUT
- OUTPUT
PORT A
I
INPUT
0- OUTPUT
MODE SELECTION
00 -MODE
-MODE
02-MODE
I
89
and
-ACTIVE
39
is
Hex.
at
input mode.
90
Port address
port
5 H
APPENDIX
MAIN PROGRAM
POSITION CONTROL
PPIA
FFI3
PPIC
FPICONT
EDATA
EST AT
emote
ECOMD
RAM BASF
PCS
DIR
DIRE
CHAR
COUNT
PEA I
MFRAD
I"!
RES AD
SUM1
SDM2
CUM 3
ML1
ML2
M.L3
VEL
CR
L001
1522.1
1 32 1
V^
2DP.
1=23?
1222P.
1ZZ1H
1Z22H
1223F.
3223
SZ1H
32 3 P
32 1i
5ZSH
325B
SZ7H
309 H
32EH
S1ZH
5125
514H
51 ~H
317H
31 5 P.
51 3R
2
CP.3
2222
?P 2EFEH
AH
,
(zmode:
A
(
1
,a
j_
L-
*ODEl
P.EC-ISTE?.
FOR EPCI
L.
-T.
A,
TQQ^^
^
A.S9H
'PPICONT
A
(
>
,A
FOP.
,2
FP I A
IX.HEAD1
ECHO
I
SET
>
ECHC
IX.HEAD2
ECHO
IX.HEAD3
ECHO
STACK POINTER
.7DR
CMor
J r
CALL
CALL
CALL
SEI
A.ZCEE
LD
LD
:all
1S2 2P.
ECU
CALL
LCQ11
EOJ
r CU
EOJ
ZCJ
ECJ
EOJ
fou
ECJ
EOJ
ECU
ec:
ECJ
ECU
ECJ
ECJ
ECU
ECJ
ECJ
ECU
ECJ
EOJ
ECU
ECJ
ECU
LD
LD
LD
LD
LD
LD
LD
LD
LD
LD
LD
LD
CALIBRATION PROGRAM
S.
P A C
C-E7CHAF.
[A
91
ACT
ED
ro
C!
PPI
l:
RECALL
ALL
LD
*.3EH
C?
J?
LE
SBC
A, (CHAR)
A, 523
CP
JF
(CHAR)
Z.LCC2
Z.STARTl
ERROR
JP
LD
LCOll
CALL
ECHO
IX, SPACE
ECHO
IX.5EAD5
ECHO
IX.HEAD7
ECHO
IX, HEADS
ECHO
IX, HEADS
ECHO
LD
CALL
Lr
CALL
LE
CALL
LC
CALL
LC
CALL
IX. HEADS
7 EH
(ppia; ,a
LD
LE
CALL
GETCHAR
CP
JP
LE
:r
CALL
START1
SEC
CALL
L002:
x caa?
J?
LE
CALL
LE
CALL
LE
CALL
LD
CALL
Z.LOOl
IX, ERROR
ECHO
L002
IX.EEAD12
ECHO
IX.HEAE11
ECHC
IX.HEAE12
ECHC
IX.EEAD12
ECHO
CALIBRAIION PROGRAM
IS
IT
CARRIAGE
LE
IX.HEAD14
ECHO
CETCHAR
LD
LE
A, (CHAR)
IX. CHAR
CALL
RECALL
SBC
LD
CALL
GETCHAR
A, (CHAR)
IX. CHAR
CALL
RECALL
A.32H
PRINT HEADER
STRIP ASCII
FIRST DIGIT
GET POSITION FROM CRT
POSITION (ASCII
> A
,3ZH
(KL1) ,A
LD
LD
CALL
CALEBRAIION PF.D3PJW
CALL
CALL
SBC
LD
STRIF ASCII
SECOND DIGIT
GET POSITION E"OM CRT
(ML2) ,A
GETCHAR
92
LD
Lr
CALL
SEC
LD
CALL
CP
JF
LD
CALL
JP
LD
LD
LD
LD
LD
LD
GO:
A.32H
(MLS) ,A
C-ETCEAR
CH
z,c-c
IX.IP.P.CR
ECHO
START1
LD
LD
LD
LD
LD
LD
ADD
LD
ADD
LD
LD
LD
LD
LD
AND
SIC
JP
JP
JP
LD
LD
JP
LD
LD
>
STRIP ASCII
I3IRE DIGIT
IT
CARRIAGE RETURN
I?
yes, CONTINUE
5,2
L.54E
(KPMD; ,HL
E,2
A, (ML1)
L.A
(MPP.AD) ,51
LD
POSITION (ASCII)
',
CPY89
ix,Tresad)
LD
CCVD:
LD
CALL
A. (CHAR)
IX.C-AF.
P.ZCALL
CALL
LD
LD
LD
LD
LD
LD
LD
LD
LD
CVD
(SMI)
,IX
MJLTIPLEXTION
FIRST BINARY
MJLTIPLEXTION
SECOND BINARY
TEIRC BINARY
5,2
L.ZAE
(MPDAD) ,EL
5,2
A,(ML2)
L,A
(MPRAD) ,HL
CPY3B
IX,(RESAD^
(SUM2) ,IX
5.2
A, (MLS)
L,A
(SUM3),EI
ix, (scmi:
DE,(SUM2)
IX, DE
DE.(SUMS)
IX, DF
(POS) ,IX
E,2
C,2
',
DE.(PCS)
5L.21F4E
POSITION
IN
BIMARY
v
LOAD POSITION
DE
132 DEGREES (530 COUNT)
IS
Ca'=0
ccv=i
LIMIT
BL,DE
Z.CVD
P.CWD
M.CCVD
A,
(DIE),
ANSC
A,l
(DIR) .A
93
IT
AA
3
ANSC
START2:
Lr
Lr
LC
LD
LD
AND
JF
JP
LD
W2
C0.NT2A
P0SIT2:
CV2A:
A.(DIR)
(ppib;,a
A.S2E
(PPIA),A
A.(DIR)
Z1H
Z.STAP.T2
STRTZA
A,(PPIC)
j
;
LE
3,
AND
JR
3ie
LD
A,H
223
Z.CW2
A,l
(EIRE) ,A
C0NT2A
A.Z
(EIRE),
HL,(F0S)
AND
CCW2:
JP
LD
LD
JP
LD
LD
LD
AND
SBC
JP
JP
JP
LD
AND
JP
IMC
LD
AND
SEC
JP
LD
SEP1:
CONT1
WAIT1
>
SET POSITION
HL.BC
Z.ME5AT2
M..NEGAT2
P.POSIT2
A, (DIRE)
213
NZ.CCW2A
CCtf = l
EC
3L, (PCS)
EL, EC
,P0S1A
CV.'=2
A, 3
LC
LD
A.L
CPL
ADD
LD
A,l
L.A
LE
LD
LD
LD
SEC
JF
LD
JR
LD
LD
LD
LD
LE
LD
Z.START2
CFL
P0S1A
c*=? ccw=i
DIRECTION
>
CV
> ccv:
direction
check the sncoeer
CCMFLE M EMT
COMPLEMENT
3.
3
i'.i
D
L.13E
.76
de:
POSITION LIMIT
3.2
5L.DE
M.SEP1
A.2D5B
CONT1
SPEED COMMAND
,ZES5
3,2
A
(PFIA),A
A,
(PPIE).A
A.(PPIC)
94
SFNB DIRECTION
CHECK THE ENCODER
a
2
CCW2A
AND
JF
JP
DEC
LD
AND
SEC
JP
LD
31H
NZ.VAIT1
STAP.T2
EC
5L, (POS)
3L,BC
P .PDS2A
',
A ,a
J
COMPLEMENT
COMPLEMENT
D,a
E.L
L.1ZH
a,
CPL
P0S2A:
SFP2:
C0NT2
WAIT2:
NEGAT2:
CV2B:
LD
LD
CPL
a, a
ADD
A ,1
LD
LD
LD
LD
LD
SEC
J?
LD
JR
LD
ED
LD
LD
LD
LD
AND
J?
JP
LD
A,L
L.A
HL.DE
M.SEP2
A.2DSH
C0NT2
A.ZESH
a,
(PPIA) ,A
A.H
(PPIB).A
A.(PPIC)
Z1E
SPEED COMMAND
ctf=e
',
21H
NZ.CCW2B
INC
LD
BC
HL, (F3S)
AND
SBC
HL.EC
P.P0S3A
A,H
LD
LD
LD
LD
LD
LD
SBC
JP
LD
JR
CCW=1 CV.=2
CLOCK WISE ROTATION
LOAD POSITION
CLEAR FLAGS
COMPARE THE POSITIN
COMPLEMENT
COMPLEMENT
SPEED COMMAND
H,A
A,L
CPL
ADD
LD
SEND DIRECTION
CHECK THE ENCODER
NZ.WAIT2
STARTS
A.(DIRD)
AND
JF
JP
LD
CPL
P0S3A:
A .1
L.A
D,E
E.L
L.12H
H, 2
HL.DE
M
,SEP3
A,2D2H
CCMT3
95
2
a
SZP3
CCNT3
:
V-AIT3:
CCV2B
LC
LD
le
LD
LE
LD
AND
JP
JP
DEC
LD
AND
SEC
JP
LE
.ZEES
2.1
A.
CPL
ADD
P0S4A
LE
LE
LE
LE
LE
SEP4:
C0NT4:
WAIT4:
SEC
JP
LD
JR
LE
LB
LE
LD
LE
LD
A"'E
STRT2A
STARTS:
JP
JP
LE
LE
AND
SEC
LE
LD
LE
AND
J
CCW3:
CW3
P.
LD
AND
JP
LE
LE
JP
LD
LD
A.E
(PPIB) ,A
A.(PPIC
SEND DIRECTION
CHECK TEE ENCODE?.
J
;
Z1H
NZ.WAIT2
STARTS
COMPLEMENT
COMPLEMENT
SPEED COMMAND
EC
HL.(PDS)
HL.BC
P .P0S4A
A
,fl
CFL
LD
LD
:r*=i
SEND SPEEE COM1ANE
(FPU), A
H.A
A,L
A,l
L,A
D ,H
E,I
L.10H
a.
HL.DP
M.SEP4
A.2DSH
CQNT4
A.2EEH
3,1
(PPIA).A
CCrf=l
A,
(PPIE) ,A
A.(PPIC)
Z1E
M7.WAIT4
STARTS
SEND DIRECTION
CHECK THE ENCODER
192 DEC.
DE. (PCS)
HL.Z3E7E
LIMIT
3L.DE
(POS) ,HL
A.(PPIC)
H.A
215
Z, STARTS
A,H
Z2K
Z
C V/3
A.l
(EIRD).A
C0NT3A
A, 2
(DIRD),A
96
SHORTEST PATH
CHECK THE ENCODER
cv=? ccw=i
P0SIT3:
CW3A:
LD
3L,(FCS)
AMD
S EC
P.L.EC
JP
JP
JP
LD
AND
JF
DEC
LD
AND
SBC
JP
LD
.NEGA.T3
P.P0SIT3
M.NZGAT3
A.fDIRD)
aiH
NZ.CCW3A
HL.EC
ccw=i cv=?
CLOCK WISE ROTATION
LOAD POSITION
CLEAR FLAGS
COMPARE THE POSITIN
COMPLEMENT
COMPLEMENT
SPEED COMMAND
BC
-,
HL.(PDS)
P.FCS5A
A ,H
CPL
P0S5A:
SEP5:
C0NT5:
WAITS:
CCV3A:
LD
LD
E,A
A,L
CPL
ADD
A .1
LD
LD
LD
LD
LD
SBC
JP
LD
JR
LD
LD
LD
LD
LD
LD
AND
JP
JP
INC
LD
AND
SBC
JF
LD
L,A
D,H
E ,L
L.12E
a, 2
HL.DE
M.SEP5
A.2DSB
C0NT5
,ZESH
H.l
A
(PPIA),A
A,H
(PPIE),A
A.(PPIC)
21H
NZ, WAITS
START3
P0S5A:
LD
LD
SBC
CCW = 1
SEND DIRECTION
CHEC? THE ENCODER
HL.(POS)
BC
HL.EC
P.PCS5A
A.H
CLEAR FLAGS
COMPARE THE POSITIN
COMPLEMENT
COMPLEMENT
H.A
A,L
CPL
ADD
LD
LD
LD
CPL
LD
LD
GET FCSITIG."
A.l
L,A
D,H
E.L
L.1ZS
',
a,
HL.DE
97
::
JP
M ,?EPS
LD
A.3D8E
C0NT5
A.ZESE
SEP6:
CONTS
WAIT6:
NEGAT3:
W3 B
P.
LD
LD
LC
LD
LD
LD
EP 7
C0NT7
WAIT7:
CCW3B:
c:w=i
SEND SPEED COMMAND
A ,H
(PPIE) ,A
SEND DIRECTION
CHECK THE- ENCODER
GO CHECK
AND
JP
JP
LD
A.(DIP.D)
AND
JP
DEC
Z1H
NZ.CCWSl
BC
LD
HL.(POS)
AND
SEC
JP
LD
CPL
LD
LD
a.
LD
LD
LD
LD
LD
SEC
JF
LD
JR
S
3,1
(PPIA) ,A
A.(PPIC)
Z1H
NZ, WAITS
START3
CPL
ADD
P0S7A:
SPEED COMMAND
LD
LD
Lr
LD
LD
LD
AND
JP
JP
INC
LD
AND
SEC
JP
LD
COMPLEMENT
COMPLEMENT
E,L
L.1ZH
5.75
H.2
>
HL.3C
P.POS7A
A,H
A,L
A,l
L.A
D.H
HL.DE
M.SEP7
A,ZD9H
CONT7
A.ZESa
H.Z
(PPIA) ,A
A,H
(PPIE) ,A
A.(PPIC)
31H
NZ.WAIT7
START3
BC
SFEED COMMAND
cw=0
SEND SPEED COMMAND
SEND DIRECTION
CHECK THE ENCODER
COMPLEMENT
COMPLEMENT
A, 3
H,A
A,L
A.l
98
POSITION LIMIT
',
EL.BC
P .POSSA
DEC-.
HL.(PCS)
CPL
ADD
ENCODER
CPL
LC
LD
POP.
pose a
SEP 9:
C0NT3:
WAIT8:
HEAD1
HEAD2:
head:
HEAD4:
HEADS:
HEAD5:
HEAD7:
HEADS:
FEAD9:
HEAD12:
HEAD11:
HEAD12:
HEAD13:
HEAD14:
SPACE:
QUEl:
0UE2A:
3UE2E:
SONM
ERROR:
COUN:
:
Rl:
R2:
LD
LE
LD
L,A
D,H
E,L
LD
LD
SBC
JP
L.1ZH
LC
A.2DSH
CONTS
A.ZESH
JR
LD
LD
LC
LD
LD
LD
AMD
JP
JP
DB
DE
D3
DB
DE
DB
DB
DE
DE
DB
DE
DB
DE
DE
DB
DB
DB
DE
DB
DE
DE
DE
DB
'
'
SPEED COMMAND
3.2
HL.DF
M .SEP^
B,2
SEND DIRECTION
CHECK THE ENCODER
(PPIC
zia
NZ. WAITS
A
cw=e
SEND SPEED COMMAND
(PPIA).A
A.H
(PPIB),A
>
START3
CR.LF,
'CR.LF,
CR.LF.
CR.LF,
CR.LF,
CR.LF,
CR,LF.
CR.LF.
CR.LF,
CR.LF,
CR.LF,
CR.LF,
CR.LF,
CR.LF.
CR.LF,
CR.LF,
CR.LF.
CR.LF,
CR.LF,
CR.LF,
CR.LF,
CR.LF,
CR.LF,
'
'
EC
'
<p
'
'
CV =
ccv;
' ,
Z P.
LI ,
'
99
subroutines
HTCHAR:
LD
AND
JR
LD
LD
(ESTAT)
CHARACTER ENTERED
CHECK AGAIN
ITES
C-ET CHARACTER
STORE IN A
J
Z.GETCHAR
A
(EDATA
X
(CHAR),
IS
;\'C,
RET
ECHO
ir
A,(ESTAT
AND
JR
LC
CP
A, (IX)
J P.
Z.FIN
(EDATA) ,A
LD
INC
JP.
'%'
IX
ECHO
RET
FIN
RECALL:
CPY83:
NOADD
ESTAT)
LD
A,
AND
JR
LD
LD
RET
A, (IX)
LD
LD
BC
LD
MUL
Z.ECH3
LD
LD
SRL
JR
ADD
SLA
RL
DFC
JP
LD
RET
DS
5ND
Z,
(
<
RECALL
EDATA), A
(YPRAD)
E,S
DE. (MPDAD)
D,3
HL.2
,
NOADD
HL.DE
NC
JC-ET
E
D
B
NZ.MULT
(RESAD) ,HL
22
100
EPCI STATUS
LOAD CHARACTER
SEND CHARACTER
LIST OF REFERENCES
1.
Thaler,
J.
Hutchingson
G.
&
Design of Feedback
Ross,
Inc.,
Systems
Dowden,
1973.
DC Motors
1978.
and Co ntrol
Systems
2.
3.
Zaks,
4.
R.
101
1982.
,
2.
3.
4.
5.
6.
7.
Tuzla/Istanbul
TURKEY
8.
Cochrane, M.S.
Lake Hazel
Meridian, Idaho 83642
Mr.
J.
C.
665 W.
9.
Mr.
10.
102
DTr
LIBRARY
,,DU ATE SCHOOL
A 93945-6003
Thesis
D906
c.l
219517
Durusu
Brushless DC motors,
velocity and position
control of the brushless
DC motor.
213517
Thesis
D906
c.l
Durusu
Brushless DC motors,
velocity and position
control of the brushless
DC motor.