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

interfacing-of-stepper

A stepper motor converts electrical pulses into mechanical movements, with rotation based on the sequence, frequency, and number of input pulses. It can operate in half-step and full-step sequences, allowing for precise control of rotation angle and speed. The document also includes assembly language programs for interfacing a stepper motor with an 8051 microcontroller to achieve specific rotations.

Uploaded by

deepfakebigcake
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)
6 views

interfacing-of-stepper

A stepper motor converts electrical pulses into mechanical movements, with rotation based on the sequence, frequency, and number of input pulses. It can operate in half-step and full-step sequences, allowing for precise control of rotation angle and speed. The document also includes assembly language programs for interfacing a stepper motor with an 8051 microcontroller to achieve specific rotations.

Uploaded by

deepfakebigcake
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/ 4

Interfacing of Stepper-Motor

Principle of Working
A stepper motor is an electromechanical device which converts electrical pulses into
discrete mechanical movements. The shaft or spindle of a stepper motor rotates
indiscrete step increments when electrical command pulses are applied to it in the
proper sequence. The motors rotation has several direct relationships to these applied
input pulses. The sequence of the applied pulses is directly related to the direction of
motor shafts rotation. The speed of the motor shafts rotation is directly related to the
frequency of the input pulses and the length of rotation is directly related to the number
of input pulses applied.

Stepper motor can be operated in two types of sequences:


1. Half step: In this sequence single coil is energized and then both coils are
energized at the same time and motor shaft rotates. Refer figure 1 shown above.
Step Angle = 45 degree
No of steps = 8
2. Full step: In this sequence single coil is energized or both coils are energized at
the same time and motor shaft rotates. Refer figure 1 shown above.
Step Angle = 90 degree
No of steps = 4

Half step Sequence


Half Step Sequence

Step A B A' B' Hex Value

0 1 0 0 0 08H

1 1 1 0 0 0CH

2 0 1 0 0 04H

3 0 1 1 0 06H

4 0 0 1 0 02H

5 0 0 1 1 03H

6 0 0 0 1 01H

7 1 0 0 1 09H

Full Step Sequence


Full step sequence

Step A B A' B' Hex value

0 1 0 0 0 08H

1 0 1 0 0 04H

2 0 0 1 0 02H

3 0 0 0 1 01H

Full step sequence

Step A B C D Hex codes

0 1 1 0 0 0CH

1 0 1 1 0 06H

2 0 0 1 1 03H
3 1 0 0 1 09H

When to use a stepper motor

 A stepper motor can be a good choice whenever controlled movement is


required.
 They can be used to get advantage in applications where you need to control
rotation angle, speed, position and synchronism.
 Because of inherent advantages listed previously, stepper motor have their place
in many different applications.

Interfacing
Algorithm for Interfacing
Interfacing Diagram

Assembly Language Program for Interfacing


Program: Write an ALP to rotate stepper motor 90 degree in the clockwise direction
which is interfaced to 8051 microcontroller.
ORG 00H
MAIN:MOV A,#OCH
ACALL DELAY
MOV A,#06H
ACALL DELAY
MOV A,#03H
ACALL DELAY
MOV A,#09H
ACALL DELAY
SJMP MAIN
DELAY:MOV R7,#4
UP2:MOV R6,#0FFH
UP1:MOV R5,#0FFH
HERE:DJNZ R5,HERE
DJNZ R6,UP1
DJNZ R7,UP2
RET
END

Note:-In order to rotate stepper motor in anticlockwise direction just reverse the
sequence of excitation of windings (from bottom to top) refer table above

Program: Write an ALP to rotate stepper motor 45 degree in the clockwise direction
which is interfaced to 8051 microcontroller.
ORG 00H
MAIN:MOV A,#O8H
ACALL DELAY
MOV A,#OCH
ACALL DELAY
MOV A,#O4H
ACALL DELAY
MOV A,#06H
ACALL DELAY
MOV A,#O2H
ACALL DELAY
MOV A,#03H
ACALL DELAY
MOV A,#O1H
ACALL DELAY
MOV A,#09H
ACALL DELAY
SJMP MAIN
DELAY:MOV R7,#4
UP2:MOV R6,#0FFH
UP1:MOV R5,#0FFH
HERE:DJNZ R5,HERE
DJNZ R6,UP1
DJNZ R7,UP2
RET
END

You might also like