Unit V

You might also like

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

STEPPER MOTOR INTERFACING A stepper motor is a digital motor. It can be driven by digital signal. Fig.

shows the typical 2 phase motor rated 12V /0.67 A/ph inter aced with the !0!" microprocessor system #sing !2"". $otor shown in the circ#it has two phases% with center&tap winding. 'he center taps o these windings are connected to the 12V s#pply. (#e to this% motor can be e)cited by gro#nding o#r terminals o the two windings. $otor can be rotated in steps by giving proper e)citation se*#ence to these windings. 'he lower nibble o port A o the !2"" is #sed to generate e)citation signals in the proper se*#ence. 'hese e)citation signals are b# ered #sing driver transistors. 'he transistors are selected s#ch that they can so#rce rated c#rrent or the windings. $otor is rotated by 1.!0 per e)citation.

SOFTWARE FOR STEPPER MOTOR CONTROL As port A is #sed as an o#tp#t port% control word or !2"" is !0+. Stepper Motor Control Program: 6000+ ,)cite code (- 0.+% 06+%0/+% 01+ 2 'his is the code se*#ence or cloc3wise rotation

4#bro#tine to rotate a stepper motor cloc3wise by .605 & 4et the co#nts2 MVI C, 32H START: MVI B, 04H "#I H, $000H BAC'(: M)V A, M ).T /)RTA CA"" 0,"A1 I3# H 0CR B 536 BAC' % : Set repetition count to 50 : Counts excit tion se!uence : Initi %i&e pointer : *et t+e ,xcite co-e : Sen- ,xcite co-e : 2 it : Incre4ent pointer : Repe t 4 ti4es

Delay subroutine:
0e% 7: "#I 0, Count B c8: 0C# 0 M)V A, 0 )RA , 536 B c8 R,T FLOWCHARTS Source Program

Stepper motor subroutine

Delay routine

You might also like