Stepper Motor Control - A

You might also like

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

stepper motor control using 8085 kit

Stepper motor control with INTEL 8085 P kit

A stepper motor is a digital motor (actually, a synchronous motor).


It can be driven by digital signal.
Types: Unipolar (with centre tap) and bipolar (no centre tap).
Figure shows a typical 2-phase motor with windings for Phase 1 & Phase 2.
The motor can be rotated in steps by giving proper excitation sequence to
these windings.
A. Srinivasan, Department of Physics, Indian Institute of Technology Guwahati
stepper motor control using 8085 kit

The lower nibble of port A of the


8255A is used to generate
excitation signals in the proper
sequence (in counter clockwise).
Motor is rotated by 1.80 per
excitation.
Reversing excitation sequence
rotates motor clockwise.

A. Srinivasan, Department of Physics, Indian Institute of Technology Guwahati


stepper motor control using 8085 kit

PROCEDURE:
Find the right excitation sequence: From the table, for counter cw
rotation the lower nibble should be 05H, 09H, 0AH, 06H.
For cw rotation, sequence is in reverse, i.e., 06H, 0AH, 09H, 05H.
Control Word = 80H for setting Port A as output port.
Port designation: PA (10H), PB (11H), PC (12H) and CR (13H)
• One sequence gives 1.8 x 4 Program for continuous rotation in CCW dir.
START MVI A 80 H : 8255A CW for PA as O/P
steps of rotation in CCW dir.
OUT CR (13H) : CW sent to CR of 8255A
• Register B is used to count the LOOP MVI B 04H : Counts excitation seq.
four sequence steps. LXI H C0 E0 : Set memory pointer
• DELAY controls rotation time. BACK MOV A, M : Get the excitation code
Write a RP based delay sub- OUT PA (10H) : Send excitation code
CALL DELAY : Wait
routine. e.g., given in next slide INX H : Increment pointer
• In this program, the sequence DCR B : Repeat 4 times
CCW rotation is stored in C0E0H JNZ BACK
to C0E3H. JMP LOOP : Repeat 50 times
• Change contents of C0E0H to END RST1
DELAY : Delay sub-routine
C0E3H for CW rotation. <C0E0>=05, <C0E1>=09, <C0E2>=0A, <C0E3>=06
A. Srinivasan, Department of Physics, Indian Institute of Technology Guwahati
stepper motor control using 8085 kit

For counter cw rotation the lower nibble should be 05H, 09H, 0AH, 06H.
For cw rotation, it is in reverse, i.e., 06H, 0AH, 09H, 05H.
Control Word = 80H for setting Port A as output port.
• One step of the sequence gives Program for fixed step CCW/CW rotation
0
1.8 rotation. <B> keeps count. START MVI A 80 H : 8255A CW for PA as O/P
• DELAY controls rotation time. OUT CR (13H) : CW sent to CR of 8255A
• Sequence is in C0E0H to C0E3H. MVI C 32H : Set repeat count to 50ıο
LOOP MVI B 04H : Counts excitation seq.
• <C> keeps count of rotation LXI H C0 E0 : Set memory pointer
steps. It is 3216=5010 in this case. BACK MOV A, M : Get the excitation code
• RP delay program using <<DE>> OUT 10H : Send excitation code
DELAY LXI D FF FF : <DE>=FFFF, 10T CALL DELAY : Execute DELAY sub-rout
LOOP1 DCX D : Decr. RP 6T INX H : Increment pointer
MOV A, E : 4T DCR C : Decrement step counter
JZ END : Check 50 steps are over
ORA D : 4T
DCR B : Do 4 step sequence
JNZ LOOP1 : (10/7)T JNZ BACK :
RET 10T JMP LOOP
Delay time calc. for Tclock = 0.5 s END HLT
TLoop1 = (Tclock*24*6553510) – 3*Tclock <C0E0>=05, <C0E1>=09, <C0E2>=0A, <C0E3>=06
Ttotal = TLoop1+10*Tclock = 0.7864235 s <C0E0>=06, <C0E1>=0A, <C0E2>=09, <C0E3>=05
A. Srinivasan, Department of Physics, Indian Institute of Technology Guwahati

You might also like