Showing posts with label stepper motor. Show all posts
Program for half stepper motor
half stepper motor:
ORG 0000H
MOV P2,#00H ;initialize as o/p port
////////////////////////////////////////METHOD-2 HALF STEPPING//////////////////////////////////////////
exit:
mov dptr,#msg
rpt:clr a
movc a,@a+dptr
jz exit
inc dptr
mov p2,a
acall delay
sjmp rpt
/////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////METHOD-1//////////////////////////////////////////
/*MOV A,#66H
AGAIN:MOV P2,A
JNB P1.0,NXT ;check status of switch
RR A
ACALL DELAY
SJMP AGAIN
NXT:RL A
ACALL DELAY
SJMP AGAIN */
/////////////////////////////////////////////////////////////////////////////////////////////
DELAY:
MOV R1,#01H
H3:MOV R2,#0FFH
H2:MOV R3,#0FFH
H1:DJNZ R3,H1
DJNZ R2,H2
DJNZ R1,H3
RET
msg:
db 08h,0ch,04h,06h,02h,03h,01h,09h,0
END
Half stepper motor using 8051
This is the circuit diagram of interfacing of half stepper motor with 8051.

Stepper motors consist of a permanent magnet rotating shaft, known as rotor, and electromagnets on the stationary portion that surrounds the motor, known as stator. You can see in the figure given below. In half stepping rotor moves with 45 degree. At position 1, we see that the rotor is beginning at the upper electromagnet, which is currently active because we have applied voltage. To move the rotor clockwise, the upper electromagnet is still activated and the right electromagnet is activated also, causing the rotor to move 45 degrees clockwise, aligning itself with the active magnet because both stator attracts rotor with same force. This process is repeated in the same manner at the south and west electromagnets until we once again reach the starting position.
Program for full stepper motor
full stepper motor:
ORG 0000H
MOV P2,#00H ;initialize as op port
/*
////////////////////////////////////////METHOD-2 HALF STEPPING//////////////////////////////////////////
exit:
mov dptr,#msg
rpt:clr a
movc a,@a+dptr
jz exit
inc dptr
mov p2,a
acall delay
sjmp rpt */
/////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////METHOD-1//////////////////////////////////////////
MOV A,#66H
AGAIN:MOV P2,A
JNB P1.0,NXT ;check status of switch
RR A
ACALL DELAY
SJMP AGAIN
NXT:RL A
ACALL DELAY
SJMP AGAIN
/////////////////////////////////////////////////////////////////////////////////////////////
DELAY:
MOV R1,#01H
H3:MOV R2,#0FFH
H2:MOV R3,#0FFH
H1:DJNZ R3,H1
DJNZ R2,H2
DJNZ R1,H3
RET
msg:
db 08h,04h,02h,01h,0
END
CLICK HERE TO SEE CIRCUIT DIAGRAM
ORG 0000H
MOV P2,#00H ;initialize as op port
/*
////////////////////////////////////////METHOD-2 HALF STEPPING//////////////////////////////////////////
exit:
mov dptr,#msg
rpt:clr a
movc a,@a+dptr
jz exit
inc dptr
mov p2,a
acall delay
sjmp rpt */
/////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////METHOD-1//////////////////////////////////////////
MOV A,#66H
AGAIN:MOV P2,A
JNB P1.0,NXT ;check status of switch
RR A
ACALL DELAY
SJMP AGAIN
NXT:RL A
ACALL DELAY
SJMP AGAIN
/////////////////////////////////////////////////////////////////////////////////////////////
DELAY:
MOV R1,#01H
H3:MOV R2,#0FFH
H2:MOV R3,#0FFH
H1:DJNZ R3,H1
DJNZ R2,H2
DJNZ R1,H3
RET
msg:
db 08h,04h,02h,01h,0
END
CLICK HERE TO SEE CIRCUIT DIAGRAM
full stepper motor using 8051
This is the circuit diagram of interfacing of full stepper motor.

CLICK HERE TO SEE PROGRAM FOR FULL STEPPER MOTOR
Stepper motors consist of a permanent magnet rotating shaft, known as rotor, and electromagnets on the stationary portion that surrounds the motor, known as stator the stator. You can see in the figure given below. At position 1, we see that the rotor is beginning at the upper electromagnet, which is currently active because we have applied voltage. To move the rotor clockwise, the upper electromagnet is deactivated and the right electromagnet is activated, causing the rotor to move 90 degrees clockwise, aligning itself with the active magnet. This process is repeated in the same manner at the south and west electromagnets until we once again reach the starting position.
CLICK HERE TO SEE PROGRAM FOR FULL STEPPER MOTOR
stepper motor with speed controller using 8051
It is a nice project and easy to implement. This project is all about speed controlling of stepper motor.

Now i will explain how to control speed of stepper motor.
This is the circuit diagram of stepper motor.There is a rotor in the center of the stepper motor consisting of a south pole and a north pole. It rotate according the potential applied at coil connected to the wire. If we have applied potential so that upper coil becomes south pole and lower coil becomes north pole then north pole of the rotor will be attracted towards the coil of south pole and south pole of the rotor will be attracted towards the coil of north pole. If we are not changing the direction of potential further then rotor will not rotate further.
If we are changing the direction and pin of applied potential then rotor will move according to the applied potential. If we are applying potential in sequence then it will start rotating either clockwise or anticlockwise as i wish.
The speed of the motor depends on the delay between two applied potential. If we are increasing delay then speed will decrease or if we are decreasing delay then speed will increase.
I have connected 5 switches to the port 3 and each particular switch has its fixed delay value that will be provided after pressing the key.
CLICK HERE TO SEE THE PROGRAM IN ASSEMBLY LANGUAGE
Now i will explain how to control speed of stepper motor.
This is the circuit diagram of stepper motor.There is a rotor in the center of the stepper motor consisting of a south pole and a north pole. It rotate according the potential applied at coil connected to the wire. If we have applied potential so that upper coil becomes south pole and lower coil becomes north pole then north pole of the rotor will be attracted towards the coil of south pole and south pole of the rotor will be attracted towards the coil of north pole. If we are not changing the direction of potential further then rotor will not rotate further.
If we are changing the direction and pin of applied potential then rotor will move according to the applied potential. If we are applying potential in sequence then it will start rotating either clockwise or anticlockwise as i wish.
The speed of the motor depends on the delay between two applied potential. If we are increasing delay then speed will decrease or if we are decreasing delay then speed will increase.
I have connected 5 switches to the port 3 and each particular switch has its fixed delay value that will be provided after pressing the key.
CLICK HERE TO SEE THE PROGRAM IN ASSEMBLY LANGUAGE