Stepper Motor Interfacing With 8051 MC

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

10.

6 STEPPER MOTOR INTERFACING


position of a movable part of a
AStepper used to control the
motor is widely
drives, dot matrix printers, and robots
for
18 normally used in floppy disk havea
control of sensor. Stepper motors commonly
P n without the need any
stator normally has
perneent magnet rotor surrounded by stator windings. The
four windings that are paired with a center tapped common as shown in figure 10.8
Red
O0000000 White - Common 1
A
Orange
O0000000

Blue
B
O00000O0 Black -o Common 2
Green
D -
O00000OO

Fig. 10.8 : Stepper Motor Stator Windings Configuration


The stepper motor moves in steps depending upon the pulse sequences given to
its stator windings. The minimum degree of rotation associated with single step is
alled step angle. Stepper motors are available with different step angles like 2,
L18, 0.72° etc. A stepper motor with step angle of 1.8° will rotate by one revolution
09 in 200 steps. Stepper motors can be made to work in half step angle mode. To
nange the direction of rotation, step sequences are to be reversed. To increase the
peed of rotation, the pulse sequence frequency is to be increased. Table 10.4 gives
p sequence for full step movement and Table 10.5 gives step sequences for half
ep movement. StePRer t r
h epene
e =o 6r fulLStePlig 36
s afe 3sY =
ISHAN'S Programmable Logic ntrollers and rocontrollers

246 Sequences

Full Step
Table 10.4: FelClockwise
D
C
B
Step A 1o
0

1 0 oh
0 1
1 1 h
0
1
0 0 Anti-Clockwise
Sequences
Table 10.5: Half Step

B C D
Step A
0 0 1
Clockwisee
0
1 0 0 Cip
0 1 0 0 o4h
1 0 o6h
0 1 0
0 0 1 1 3 Anti-Clockwise
8 0 0 1
0 0 1
Figure 10.9 shows interfacing of
stepper motor with 8051. Buffers are usea u
provide sufficient base current for the transistor
drivers. Transistors are sti cted
according to the current rating of the
stepper
path for energy dissipation due to stored motors. Diodes are used to pewhen
OvIde

transistors are turned off. magnetic energy in the col


Buffers
P1.2 Transistors
P1.0 000
P1.1 O00
Stepper Motor +Vcc
P13 O00
O00

Fig. 10.9:Stepper Motor


Connections with 8051
Designand Interface Using 8051
247
The following program can be used to rotate
directions if input signal on pin 2.0 is low andtheanti
wIse
stepper motor in full step, clock
clock wise direction if pin 2.0
s nigh. Portl (Pi.0 -P1.3) is connected with windings
high.
A, B, C and D of stepper
ntor through buffers and driver transistors. When pin
motor

output is made nign,


ansistor turns ON and current flows through the
tran
winding
ORG 0100H
MOV A, #99H ; Load step 1 sequence
SETB P2.0 Initialize Pin 2.0 as input bit
REP1 JB P2.0, ANTI Jumps if pin 2.0 is high
RR A
MOV P1,A
ACALL DELAY
SJMP REP1
ANTI RLA
MOV P1, A
ACALL DELAY
SJMP REP1
; DELAY SUBROUTINE
; Increase in delay time decreases speed and vice versa

DELAY MOV RO, #20H

REP2 MOV R1, #4EH

REP3 DJNZ R1, REP3


DJNZ RO, REP2

RET

END

10.7 RTC INTERFACE


Time Clock) is used keep track of seconds,
to
In a control system, RTC (Real
date, month and year at an instant. Chip
nutes, hours, days, day of the week,
dual in-line package. A lithium energy
US12C887 is a RTC available in 24-pin
urce, quartz crystal are included in it
S0ur and can maintain time-of-day and memory
a n pin diagram of the
10.10 shows block diagram
the absence of power. figure
TC DS 12c887

You might also like