You are on page 1of 4

Experiment 6

Interfacing of Stepper Motor with 8086

6.1 Aim(s) / Objective(s) / Purpose.

The purpose of this experiment to trigger a stepper motor with +5V, at an angle of 15
degree in each step in both clockwise and anticlockwise 

6.2 Introduction / Background

The purpose of this experiment is to learn about the stepper motor and their operation
through interfacing with 8086.

Stepper motor is a device used to obtain an accurate position control of rotating shafts. A
stepper motor employs rotation of its shaft in terms of steps, rather than continuous rotation
as in case of AC or DC motor. To rotate the shaft of the stepper motor, a sequence of pulses
is needed to be applied to the windings of the stepper motor, in proper sequence. The
numbers of pulses required for complete rotation of the shaft of the stepper motor are equal to
the number of internal teeth on its rotor. The stator teeth and the rotor teeth lock with each
other to fix a position of the shaft. With a pulse applied to the winding input, the rotor rotates
by one teeth position or an angle x. The angle x may be calculated as.

x = 360 / no. of rotor teeth

After the rotation of the shaft through angle x, the rotor locks itself with the next tooth in the
sequence on the internal surface of the stator. The typical schematic of a typical stepper
motor with four windings is as shown below.

The stepper motors have been designed to work with digital circuits. Binary level pulses of 0-
5V are required at its winding inputs to obtain the rotation of the shafts. The sequence of the
pulses can be decided, depending upon the required motion of the shaft. By suitable sequence
of the pulses the motor can be used in three modes of operation.
•    One phase ON (medium torque)
•    Two phase ON (high torque)
•    Half stepping (low torque)
MOTION STEPS A B C D HEX VALUE
CLOCKWISE 1 0 0 1 1 03H
2 0 1 1 0 06H
3 1 1 0 0 0CH
4 1 0 0 1 09H
ANTI CLOCKWISE 1 0 0 1 1 03H
2 1 0 0 1 09H
3 1 1 0 0 0CH
4 0 1 1 0 06H

6.3 Materials / Equipment

1. K. M. Bhurchandi and A. K. Ray, "Advanced Microprocessors and Peripherals-with ARM and an


Introduction to Microcontrollers and Interfacing ", Tata McGraw Hill, 3rd edition 2015 

2. Doughlas.V.Hall, “Microprocessor and Interfacing : Programming and Hardware”, 3rd edition,


McGraw Hill, 2015 

6.4 Software Requirement


   
Emulator 8086.

6.5 Procedure
a.Load the program in the emulator.
b. Load the input values to the corresponding address location or directly into the
registers.
c.Save, Compile and Emulate the program.
d. Execute the program using Single run or Run until termination process. 
e.Store the results of the process in the destination register
f. Terminate the program
6.6 Program Logic:
           There are three different stepping schemes for a stepper motor.
1. Wave scheme
2. 2- phase scheme
3. half stepping and mixed scheme

6.6.1 Wave scheme

The stepper motor windings A1, A2, B1, B2 can be cyclically excited with a DC
current to run the motor in the clockwise direction. Consider the four rotor positions of the
motor along with the stator excitations. The switching scheme for the wave mode excitation
is given as follows.
Clockwise Anti-Clockwise
Step   A1    A2    B1     B2 Step   A1   A2   B1     B2
1          1      0       0        0 1          1     0      0        0
2          0      0       0        1 2          0     0      1        0
3          0      1       0        0 3          0     1      0        0
4          0      0       1        0 4          0     0      0        1

6.6.2    2- Phase scheme:

In this scheme the two adjacent stator windings are energized. There are two magnetic fields
achieved in quadrature and none of the rotor pole faces can be in a direct alignment with the
stator poles.
The switching scheme for the 2- phase mode excitation is given as follows.

Clockwise Anti -Clockwise


Step   A1    A2    B1     B2 Step   A1   A2   B1     B2
1          1      0       0        1 1          1     0      1        0
2          0      1       0        1 2          0     1      1        0
3          0      1       1        0 3          0     1      0        1
4          1      0       1        0 4          1     0      0        1

6.6.3   Half stepping scheme:

The previously discussed two schemes have a step size of 30 degrees for the stepper motor
under consideration. However, there is an offset of 15 degrees between these two schemes.
By interleaving these two schemes, the step size can be reduced to 15 degrees there by
improving the accuracy of the motor. This is called half stepping scheme.
The switching sequence is as follows.
1. A1 on
2. A1 and B1 on
3. B1 on
4. B1 and A2 on
5. A2 on
6. A2 and B2 on
7. B2 on
8. B2 and A1 on
9. A1 on etc.

Program 6

ADDRESS LABEL MNEMONICS OPCODE COMMENTS


#start=stepper_motor.exe#
START MOV BX, 1100H
MOV SI, 0
NEXT_STEP
WAIT IN AL,07H
TEST AL,10000000b
JZ WAIT
MOV AL, [BX][SI]
OUT 7, AL
INC SI
CMP SI, 4
JC NEXT_STEP
MOV SI, 0
JMP NEXT_STEP

Observation

IN PUT ADDRESS CLOCKWISE ANTI-CLOCKWISE


1100
1101
1102
1103

6.7 Pre-Lab Questions


1. State applications of stepper motor in control systems
2. Draw the 4 possible rotor positions and the corresponding stator excitations in a
stepper motor
3. What is stepper motor?
4. What is meant by two phase mode of operation?

6.8 Post Lab Questions 


1. Write a program to run the stepper motor for any number of steps and to stop it.
2. What is meant by step angle? How it is calculated.
3. State the advantages and disadvantages of stepper motor
4. What is synchronism in stepper motor?

6.9 Results and Conclusion


Thus, the stepper motor interfaced with 8086 and the output is executed in port 07.

You might also like