Interfacing Stepper Motor

Interfacing a stepper Motor

Definition:

These stepper motors are made of permanent magnet rotor with stator field excitation. Unlike the DC motors which move continuously, the stepper motors move in incremental steps.

Figure-1: Stepper Motor

The stepper motor is a type of DC motor with the field placed on the rotor in the form of permanent magnets with two, three or four sets of coils called phases, placed in the stator around the rotor.  Common step size of stepper motor is 0.9 to 30 degree.

Applications Area:

Robotics, printers, object handling, plotters, disk drives etc.

Types of Stepper Motors:

Stepper motor can be a two phase stepper or a four phase stepper motor. A two phase stepper motor has two stator poles whereas a four phase stepper motor has four stator poles. The stators are excited by pulses, application of the excitation pulse on windings the pole can be made either a north or a south pole. On reverse excitation the pole move in reverse direction.

Step Angle:

A step angle is defined as the minimum degree of rotation associated with single step per revolution. A typical stepper motor has a step angle of 1.8 degree, this motor has 50 teeth on the rotor and eight poles on the stator.

Relationship between step angle and the steps per revolution

Step angle        Steps / revolution

0.72                500

1.8                   200

2.0                   180

2.5                   144

5.0                   72

7.5                   48

15                    24

30                    12

45                      8

90                      4

 

The steps/revolution in Table-A means that after completing those steps (or sequences) the same two windings will be “ON”.

Movement is associated with these four-steps

  • So how much movement is associated with these four-steps?
  • After completing four steps the rotor moves only one tooth pitch.
  • In a stepper motor with 200 revolution, the rotor has 200/4=50 teeth because 4×50=200 steps are needed to complete one revolution.
  • This means that the minimum step angle is a function of the number of teeth on the rotor, that means smaller the step angle more the teeth the rotor passes.

Type of Excitation:

There are two types of excitation of four phase stepper motor, these are:

One-phase excitation(wave EXCIATION): In one phase excitation only one phase is excited at a time and other phase is not excited at that time. It is also called a wave mode, and this type of excitation results in low current and hence low torque.

Figure-2: Wave Mode or 1-phase excitation

Rotational Sequence of 1-phase excitation

A
B
A’
B’
CLOCKWISE SEQUENCE
ANTI-CLOCKWISE SEQUENCE
HEX
0
0
0
1
1
4
01
0
0
1
0
2
3
02
0
1
0
0
3
2
04
1
0
0
0
4
1
08

 

Two-phase excitation

(a) Full Step excitation :

In this type both the phases are excited at a time. The excitation sequence decides the direction of rotation of the stepper motor and is always fixed. This type of excitation results in high current and hence high torque. However this doesn’t improve the resolution of the stepper and again the rotor will make a full cycle in 4 steps.

 

Figure-3: Full-step 2-phase excitation

Rotational sequence for full step exciation

A
B
A’
B’
CLOCKWISE SEQUENCE
ANTI-CLOCKWISE SEQUENCE
HEX
0
0
1
1
1
4
03
0
1
1
0
2
3
06
1
1
0
0
3
2
0C
1
0
0
1
4
1
09

(b) Half step excitation

For increasing the resolution of the stepper we use the Half Step Drive mode. This mode is actually a combination of the previous two modes.

Here we have one active coil followed by 2 active coils and then again one active coil followed by 2 active coils and so on. So with this mode we get double the resolution with the same construction. Now the rotor will make full cycle in 8 steps.

Figure-4: Half Step Excitation

Number of switching Sequences:

Example-1: Find the number of times the four step sequence must be applied to a stepper motor to make movement by different angles. Assume that the motor has a 2 degree step angle.

Solution:

Step angle=2 degree

Steps per revolution at 2 degree step = 360/2 = 180

Number of teeth on rotor = (steps/revolution ) / phase = 180/4 = 45

the movement per 4-step sequence = 2×4 = 8 degree

Therefor to move the stepper motor by different angles the number of times the sequence is to be repeated is

 

Sequence Stepper step angle Number of consecutive switching steps and the count required for movement by certain angle of rotation
4-step sequence motor Step Size =2 degree

Steps per revolution= 360/2=180

Number of teeth=180/4=45

Movement per 4-step sequence= 8 degree

3200 Movement

No of switching steps=3200/2 = 160

Count = 160/4 = 40

1600 Movement

No of switching steps=1600/2=80

Count =80/4=20

800 Movement

No of switching steps=800/2=40

Count =40/4=10

400 Movement

No of switching steps=400/2=20

Count =20/4=5

4-step sequence motor Step Size =1.8 degree

Steps per revolution= 360/1.8=200

Number of teeth=200/4=50

Movement per 4-step sequence= 7.2 degree

No of switching steps=3600/1.8=200

Count = 200/4 = 50

No of switching steps=1800/1.8)=100

Count =100/4 = 25

No of switching steps=720/1.8)=40

Count = 40/4 = =10

No of switching steps=360/1.8=20

Count = 20/4 = 5

Interfacing stepper motor with 8085

interfacing of a four phase stepper motor with 8086 using 8255PPI for  is shown below in figure.

Figure-5 interfacing of stepper motor
  1. Write a program to drive a stepper motor continuously at 60rpm using the interface diagram shown above. Assume that the address of 8255 are 80h, 82h, 84h, 86h assigned to PA, PB, PC and CWR respectively

Solution:

Assume step size = 1.8 degree

Speed (N) = 60 rpm

Speed in rev/sec  =  N/60 = 1REV/SEC

Time for 1 revolution (360 degree) = 60/N

Time for 1.8 degree step size = (60/N)*(1.80/3600) =  60* 1.8 / (360*N)=0.3/N

Hence time delay required is = 60*1.8 / (360*60) = 1/200 = 5 ms

If time delay introduces for each 1.8degree rotation is 0.3/N (5ms), then for continuous rotation the speed will be N rpm.

Count = 360/2*4=40

Program

 

8086 Programming  style- 1
8086 Programming  style- 2
1000h: 2000h           db       03, 06, 0Ch, 09

1000h: 2004h           db       09, 0Ch, 06, 03

1000h: 2008h           db       01, 02, 04, 08

1000h: 200Ch          db       08, 04, 02, 01

Start:

MOV AL, 80H      // INITIALIZE

OUT 86H, AL

MOV BX, 1000H

MOV DS, BX   // INITIALIZE DS

L1:   MOV CL, 04h

MOV BX, 2008

REPEAT: MOV AL, [BX]

OUT 80h, AL

CALL DELAY

INC BX

DEC CL

JNZ REPEAT

JMP L1  // TO start from beginning

DELAY:   MOV DL, COUNT

L2:   NOP

NOP

Loop  L2

RET

Data segment

Seq1  db 03, 06, 0Ch, 09//2-phase clkwise

seq2 db 09, 0Ch, 06, 03//2-phase Anticlkwise

Seq3 db 01, 02, 04, 08   //1-phase clkwise

Seq4   db  08, 04, 02, 01//1-phase Anticlkwise

Count DB 40

Data ends

Code segment

Assume CS: Code, DS :data

MOV AX, data

MOV DS, AX

MOV SI, OFFSET Seq

L1     :  MOV CL, 04

MOV AL, 80h

OUT 86h, AL

REPEAT :   MOV AL, [SI]

OUT 80h, AL

CALL delay

INC SI

DEC CL

JNZ REPEAT

JMP  L1

PROC delay

DELAY:   MOV DL, Count //(No of steps)

L2        :  NOP

NOP

Loop  L2

RET

 

 

 

 

 

Leave a Reply

Top
error: Content is protected !!