0% found this document useful (0 votes)
20 views22 pages

MPMC Part 11

Uploaded by

rohan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views22 pages

MPMC Part 11

Uploaded by

rohan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 22

8051

Interfacing
Stepper Motor
Interfacing
Stepper Motor Interfacing

• Stepper motor is a widely used device that


translates electrical pulses into mechanical
movement.
• Stepper motor is used in applications such as;
disk drives, dot matrix printer, robotics etc.
• Stepper motors commonly have a permanent
magnet rotor (also called the shaft) surrounded by
a stator
Stepper Motor Diagram
Construction of Stepper Motor
• Commonly used stepper motors have four stator
windings that are paired with a center – tapped
common. Such motors are called as four-phase or
unipolar stepper motor.
• It has a permanent magnet rotor which is surrounded by
a stator.
• A practical PM stepper motor will have 1.8 degrees step
angle and 50 tooth on its rotor.
• There are 8 main poles on the stator, each having 5 tooth
in the pole face
Unipolar Stepper motors
Stepper Motor Selection
• Permanent Magnet / Variable Reluctance
• Unipolar vs. Bipolar
• Number of Stacks
• Number of Phases
• Degrees Per Step
• Microstepping
• Pull-In/Pull-Out Torque
• Detent Torque
• Most common stepper motors have 4 stator windings that
are paired with a center-tapped common as shown in the fig.
• This type of stepper motor is commonly referred to as a four
phase or unipolar stepper motor
• The center tap allows a change of current direction in each of
two coils when a winding is grounded, there by resulting in a
polarity change of the stator
• The stator is a magnet over which the electric coil is
wound.
• One end of the coil is connected commonly either to
ground or +5V. The other end is provided with a fixed
sequence such that the motor rotates in a particular
direction.
• Stepper motor shaft moves in a fixed repeatable
increment, which allows one to move it to a precise
position. Direction of the rotation is dictated by the
stator poles. Stator poles are determined by the
current sent through the wire coils.
Step Angle
• Step angle is defined as the minimum degree of rotation with a single
step.
• No of steps per revolution = 360° / step angle
• Steps per second = (rpm x steps per revolution) / 60
• Example: step angle = 2°
• No of steps per revolution = 180
One Phase on
(Wave drive four step sequence)

(Normal four step sequence)


8051 connection to stepper motor
Write an ALP to rotate the stepper motor clockwise / anticlockwise continuously
with full step sequence.

MOV A,#66H
BACK: MOV P1,A
RR A
ACALL DELAY
SJMP BACK
DELAY: MOV R1,#100
UP1: MOV R2,#50
UP: DJNZ R2,UP
DJNZ R1,UP1
RET
Note: motor to rotate in anticlockwise use instruction RL A instead of RR A
: A switch is connected to pin P2.7. Write an ALP to monitor the status of the SW. If SW = 0,
motor moves clockwise and if SW = 1, motor moves anticlockwise.

ORG 0000H
SETB P2.7
MOV A, #66H
MOV P1,A
TURN: JNB P2.7, CW
RL A
ACALL DELAY
MOV P1,A
SJMP TURN
CW: RR A
ACALL DELAY
MOV P1,A
SJMP TURN
• Write an ALP to rotate a motor 90° clockwise. Step angle of motor is 2°.

• Step angle = 2°
• Steps per revolution = 180
• For 90° rotation the no of steps is 45

• ORG 0000H
• MOV A, #66H
• MOV R0, #45
• BACK: RR A
• MOV P1, A
• ACALL DELAY
• DJNZ R0, BACK
• END
Programming stepper motor in ‘c’
• #include <reg51.h>
• void main ()
• {
• while (1)
• {
• P1=0x66;
• MSDELAY (200);
• P1=0x33;
• MSDELAY (200);
• P1=0x99;
• MSDELAY (200);
• P1=0xCC;
• MSDELAY (200);
• }
• }
• void MSDELAY (unsigned char value)
• {
• unsigned int x,y;
• for(x=0;x<1275;x++)
• for(y=0;y<value;y++);
• }
#include <REG51xD2.H>
void delay(unsigned int x) /* Delay Routine */
{ for(;x>0;x--);}
main(){
unsigned char Val,i;
while(1) {
Val = 0x88;
for(i=0;i<4;i++) {
P0 = Val;
Val = Val>>1;
delay(575); }}}

You might also like