DC Motor
DC Motor
DC Motor
1.3 Theory
a) STEPPER MOTOR
A motor in which the rotor is able to assume only discrete stationary
angular position is a stepper motor. The basic two-phase motor has two pairs
of stator poles with its own windings. The excitation of any one winding generates a
north and South Pole gets induced at the diametrically opposite sides. The stator frame
is continuous and magnetic field passes through the cylindrical annular ring. The
rotor magnetic system has two end faces. The left face is magnetized
permanently as south pole and right face as north pole. North pole structure
is twisted with respect to south pole structure such that south pole comes in
between two north poles. Step angle is the minimum degree of rotation
associated with single step. Revolution is the number of steps needed to complete one
rotation or 360 degree.
b) DC MOTOR
DC motors are simple two-lead, electrically controlled devices that convert
electrical power into mechanical power through the interaction of two magnetic fields.
One field is usually produced by a stationary permanent magnet (on the stator), and the
other field is produced by an electric current flowing in the motor coil (on the rotor). The
interaction of the two fields results in a torque that tends to rotate the rotor. By reversing
the polarity, the DC motor will move in the opposite direction. One can easily experiment
with the DC motor. For example, small fans used in many motherboards to cool the
CPU are run by DC motors.
Clockwise Rotation
Valve
Steps
A1
A2
B1
B2
1.
2.
3.
4.
Value
A1
A2
B1
B2
09
0A
05
06
06
05
0A
09
START
DELAY
DECREMENT COUNTER
YES
COUNT=0
NO
b) DC MOTOR
START
DELAY
DECREMENT COUNT
ISCOUNT=0
NO
YE
S
Figure 3 Flowchart of DC motor
1.6 Algorithm
a) STEPPER MOTOR
For running stepper motor clockwise and anticlockwise directions
(i) Get the first data from the lookup table.
(ii) Initialize the counter and move data into accumulator.
(iii) Drive the stepper motor circuitry and introduce delay
(iv) Decrement the counter is not zero repeat from step(iii)
(v) Repeat the above procedure both for backward and forward directions.
b) DC MOTOR
For running DC motor at constant speed
(i) Get the first data from the lookup table.
(ii) Initialize the counter and move data into accumulator.
(iii) Drive the DC motor circuitry and introduce delay
(iv) Decrement the counter is not zero repeat from step(iii)
(v) The motor rotates at constant speed above 80rpm and it stops rotating at 80.
Mnemonic
Label
Comments
1000
MOV DX,FF26
L1
1003
MOV AL, 80
1006
OUT DX, AL
;Control register
1007
MOV DX,FF20
100B
MOV AL, 05
100D
OUT DX, AL
100E
CALL DELAY
1011
MOV AL, 04
1013
OUT DX, AL
1014
CALL DELAY
1017
MOV AL, 06
1019
OUT DX, AL
101A
CALL DELAY
101D
MOV AL, 04
101F
OUT DX, AL
1020
CALL DELAY
1023
JMP
L1
1026
DELAY
1029
MOV AL, FF
102A
NOP
;No operation
102B
NOP
;No operation
102C
NOP
;No operation
102D
DEC AL
102E
JNE
1031
DEC BX
1032
JNE
1035
RET
;Jump on
;Move the delay value to BX
register
;Move the delay to AL register
1103
b) DC MOTOR
Address
Mnemonic
Label
Comments
1000
MOV AX,FF26
1003
MOV AL, 90
1005
OUT DX, AL
1006
MOV DX,FF22
1009
100C
OUT DX, AL
100D
CALL DELAY
1010
INT 3
1011
MOV CX,FFFF
DELAY
1012
MOV BX,FF
L2
1014
DEC BL
LI
1016
JNZ
1014
1019
DEC CX
101A
JNZ
101C
RET
;Jump on zero
;Decrement CX
1012
;Jump on zero
;Return
Program Area
1035
1000
b) DC MOTOR
1000
Program Area
101C
1000
1.9 Result
Thus the stepper motor was made to rotate in clockwise and anticlockwise direction
and DC motor runs in forward direction with a delay.