0% found this document useful (0 votes)
109 views

KKKL3293 - Sem 1 20212022 - Lab 4 - Stepper Motor

1) The document describes a lab experiment on simulating stepper motor control using an 8086 microprocessor. 2) It explains the principles and operation of permanent magnet and variable reluctance stepper motors, as well as different excitation modes. 3) The experiment involves using assembly language programs to control the rotation of a simulated stepper motor in EMU8086 software by writing data to I/O port 7.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
109 views

KKKL3293 - Sem 1 20212022 - Lab 4 - Stepper Motor

1) The document describes a lab experiment on simulating stepper motor control using an 8086 microprocessor. 2) It explains the principles and operation of permanent magnet and variable reluctance stepper motors, as well as different excitation modes. 3) The experiment involves using assembly language programs to control the rotation of a simulated stepper motor in EMU8086 software by writing data to I/O port 7.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

LAB 4 KKKL3293

Department of Electrical, Electronic and System Engineering


Faculty of Engineering and Built Environment
Universiti Kebangsaan Malaysia

KKKL3293: Microcomputer and Microprocessor Lab 4

Stepper Motor Simulation

OBJECTIVES
1. To understand the interfacing and assembly language programming between 8086
microprocessor and a stepper motor.
2. To write the assembly language program to interface 8086 microprocessor to a stepper motor.

INTRODUCTION
Data acquisition and control represent the most popular applications of microprocessors. Stepper
motor control is a very popular application of microprocessors in the control area, as stepper motors
can accept pulses directly from the microprocessor and move accordingly. Two types of stepper
motors are a permanent magnet (PM) and variable reluctance (VR). The principle and operations
of these motors are as follows.

Permanent Magnet Stepper Motor


Figures in Appendix A show a PM stepper motor in its simplest form. It consists of two stator
windings of A, B, and a motor having two magnetic poles, N and S. When a voltage +V is applied
to the stator winding A, a magnetic field Fa is generated, as shown in Figure A. The rotor positions
itself such that its poles lock with corresponding stator poles.

With the winding 'A' excited as before, winding 'B' is now switched on to a voltage +V, as shown
in Figure B. This produces a magnetic field Fb in addition to Fa. The resulting magnetic field F
makes an angle 45o as shown in Figure B. Consequently, the rotor moves through 45o (in the
counterclockwise direction) again to locking rotor poles with corresponding stator poles.

While winding 'B' has voltage +V applied to it, winding 'A' is switched off in Figure C. The rotor
then moves through a further 45° in an anticlockwise direction to align itself with stator field Fb.
With voltage +V on winding 'B,' a voltage -V is applied to winding 'A' as shown in Figure D. Then
the stator magnetic field has two components; Fa, Fb and their resultant F make an angle of 135°
position.

In this way as the pattern of excitation of the state of windings is changed, the rotor moves
successively through 45° steps through Figures E to H and completes one full revolution in the
counterclockwise direction. The figures are meant only to illustrate the principle of operation of the
PM stepper motor. A practical PM stepper motor has 1.8° step angle and 50 teeth on its rotor, there
are eight main poles on the stator, each having five teeth in the pole face. The step angle is given
Universiti Kebangsaan Malaysia 1
LAB 4 KKKL3293

by:

A = 360/(N*K) degrees

where N = number of rotor tooth


K=excitation sequence factor

PM stepper motors have 3 modes of excitation:


• Single-phase mode
• Two-phase mode
• Hybrid mode

Single-Phase Mode: In Appendix A, Figures A, C, E, G illustrate the pie single-phase mode in


which only one of the motor windings is excited at a time. There are 4 steps in the sequence, the
excitation sequence factor K = 2, so that step angle is 90°.

Two-Phase Mode: Here, both the stator phases are excited at a time as shown in Appendix A,
Figure B, D, F, H. There are 4 steps in the excitation sequence, K = 2, and step angle is 90°.
However, the two phases' rotor positions are 45° away from those in single-phase mode.

Hybrid Mode: This is a combination of single-phase and two-phase modes, as shown in Figures
A to H. There are 8 steps in the excitation sequence, K = 2, and step angle = 45°.

Variable Reluctance Stepper Motor


The schematic diagram of a simple Variable Reluctance (VR) stepper motor is shown in Appendix
A, Figure K. There are 12 teeth on the stator and 8 on the rotor. The rotor does not carry either a
permanent magnet or winding; it is assembled from soft iron punching. The stator is also assembled
from soft iron punching and carries stator windings A, B, and C, as shown in Figure K. When stator
winding 'A' is excited, it creates a pattern of N and S poles as shown in Figure I. The rotor then
positions itself, as shown in Figure I, to minimize the reluctance of the magnetic circuit. When
phase 'B' is excited next, the rotor moves through 15° to seek minimum reluctance position again.
VR stepper motors are available as 3-5 phase motors with a step angle given by

B = 360(N1 - N2)/(Nl*N2)

where N1 = number of the stator tooth


N2 = number of rotor tooth

N1 and N2 are related by N1 = N2 + n = p*n

where n = number of stator tooth per phase


p=number of phases

Universiti Kebangsaan Malaysia 2


LAB 4 KKKL3293

Applications of Stepper Motors


There are several areas of stepper motor applications like instrumentation, computer peripherals,
and machine tools drives. Tiny stepper motors are used in quartz analog electronic watches for
driving the second, minute, and hour hands. These motors operate directly with the button cells
used in these electronic watches. Bigger stepper motors are used for driving the hands of slave
clocks on railway platforms, bus stations, offices, factories, etc. Computer peripherals form an
important area of stepper motor applications. Card readers/punches, paper tape readers/punchers,
teleprinters and teletypes represent the first application area of stepper motors. Digital X-Y plotters
and dot matrix printers use stepper motors for driving the rum and pen, and the paper respectively.
Stepper motors find application inline printers to drive the paper advance mechanism. Floppy disks
and hard/Winchester disks have their magnetic reading/writing heads positioned by stepper motors.
Stepper motors find application in positioning the spraying gun in spray painting machines. In the
medical field, positioning servos for X-ray machines or radio-isotope heads employ stepper motor
drives. The latest application of stepper motors is in industrial robots for actuating the robot joints.

Description of Simulated Stepper Motor


The stepper motor is an electrical motor that can be precisely controlled by signals from a computer.
The motor rotates at a precise angle each time it receives a signal. The simulated stepper motor in
EMU8086 software is shown in Figure 1. In EMU8086, the stepper motor is controlled by sending
data to I/O port 7. By varying the rate at which signal pulses are produced, the motor can run at
different speeds, rotate through an exact angle, and then stop. Figure 1 depicts a basic 3-phase
stepper motor. It has 3 magnets controlled by bits 0, 1, and 2 of port 7. Other bits (3 to 7) in port 7
are unused. When the magnet is energized, it becomes red. The arrow at the left upper corner in
Figure 1 shows the direction of the last motor movement. The green line on top of the stepper motor
is for motor rotation visualization to see that it is rotating.

Figure 1: Simulated stepper motor

The motor can be half-stepped by turning on a pair of magnets, followed by a single magnet. The
motor can be fully stepped by turning on a pair of magnets, followed by another pair of magnets,
then in the end, followed by a single magnet, and so on. The best way to make a full step is to make
two half steps. A half step is equal to 11.25 degrees. Meanwhile, the full step is equivalent to 22.5
degrees. The motor can be rotated both clockwise and counterclockwise. For example, the code
Universiti Kebangsaan Malaysia 3
LAB 4 KKKL3293

below rotates the motor three clockwise half steps.

MOV AL, 001B ; initialize


OUT 7, AL

MOV AL, 011B ; half step 1


OUT 7, AL

MOV AL, 010B ; half step 2


OUT 7, AL

MOV AL, 110B ; half step 2


OUT 7, AL

Besides, the data from port 7 can be acquired using IN instruction, for instance:

IN AL, 7

In addition, the stepper motor sets the most significant bit (MSB) of byte value in port 7 when it is
ready.

EXPERIMENT:
1) Open the stepper motor program sample in the EMU8086 software folder, as shown in Figure
2. The filename is "stepper_motor.asm". Figure 3 depicts a part of this program.

Figure 2: Folder containing the stepper motor sample program


(C:\emu8086\examples\stepper_motor.asm)
Universiti Kebangsaan Malaysia 4
LAB 4 KKKL3293

Figure 3: Part of the stepper motor sample program

QUESTION:

i. Execute the program. Observe and record the motor's direction either clockwise (CW),
counterclockwise (CCW), or both. Discuss the flow of the program using a flowchart.
ii. Modify the program so that the motor rotates in these conditions, separately. Provide the
programs and screenshot of each condition in the lab report.
(a) The stepper motor moves CW at one full rotation 5 times.
(b) The stepper motor rotates alternately 360° in CCW and 360° in CW direction 4
times.
(c) The stepper motor rotates 90° in CCW and 180° in CW direction 4 times.

Universiti Kebangsaan Malaysia 5


LAB 4 KKKL3293

Appendix A: Illustration of stepper motor operating principle

Universiti Kebangsaan Malaysia 6


LAB 4 KKKL3293

Universiti Kebangsaan Malaysia 7

You might also like