Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

Like this presentation? Why not share!

- Microcontroller 8051 and its interf... by Ankur Mahajan 44332 views
- Interfacing stepper motor by PRADEEP 6105 views
- Interfacing LCD with 8051 Microcont... by Pantech ProLabs I... 42670 views
- Keyboard Interfacing with 8051 micr... by Mrinmoy-Sengupta 6281 views
- Stepper motor by Harshit Srivastava 24035 views
- Dc motor interfacing with 8051 micr... by Umar Shuaib 4002 views

38,992 views

Published on

Interfacing Stepper motor with 8051

Published in:
Education

No Downloads

Total views

38,992

On SlideShare

0

From Embeds

0

Number of Embeds

234

Shares

0

Downloads

0

Comments

7

Likes

62

No embeds

No notes for slide

- 1. Interfacing Stepper Motor with 8051<br />www.pantechsolutions.net<br />
- 2. <ul><li>A stepper motor (or step motor) is a brushless synchronous electric motor that can divide a full rotation into a large number of steps.
- 3. The motor's position can be controlled precisely without any feedback mechanism, as long as the motor is carefully sized to the application.
- 4. Stepper motors are similar to switched reluctance motor (which are very large stepping motors with a reduced pole count, and generally are closed-loop
- 5. The stepper motor can be interfaced with the 8051 using l293d connected to p1.0,p1.2,p1.3,p1.4
- 6. Stepper motor two types of step sequence 1) full step and 2) half step sequence
- 7. In the full step sequence, two coils are energized at the same time and motor shaft rotates. The order in which coils has to be energized is given in the table below</li></ul>WHAT IS STEPPER MOTOR ?<br />
- 8. Full step and half step sequence<br />In the full step sequence, two coils are energized at the same time and motor shaft rotates. The order in which coils has to be energized is given in the table below.<br />In Half mode step sequence, motor step angle reduces to half the angle in full mode. So the angualar resolution is also increased i.e. it becomes double the angular resolution in full mode. Also in half mode sequence the number of steps gets doubled as that of full mode. Half mode is usually preffered over full mode. Table below shows the pattern of energizing the coils.<br />
- 9. Full step sequence<br />
- 10. Full step sequence<br />
- 11. Half step sequence<br />
- 12. Confidential © Copyright 2008 Pantech solutions Pvt Ltd<br />Stepper motor interfacing<br />
- 13. Half step sequence<br />
- 14. org0Hstepper equP1main: mov stepper,#0CH acall delay mov stepper,#06H acall delay mov stepper,#03H acall delay mov stepper,#09H acall delay sjmp main<br />STEPPER MOTOR ASSEMBLY CODE<br />
- 15. delay: mov r7,#4wait2: mov r6,#0FFHwait1: mov r5,#0FFHwait: djnz r5,wait djnz r6,wait1 djnz r7,wait2 ret end<br />ASSEMBLY CODE CONTD<br />
- 16. #include <reg51.h> //Define 8051 registers<br />#include<stdio.h><br />void DelayMs(unsigned int); //Delay function<br />void Clockwise (void)<br />{<br /> unsigned int i;<br /> for (i=0;i<30;i++)<br /> {<br /> P0 = 0x01;DelayMs(5); //Delay 20msec<br /> P0 = 0x02;DelayMs(5);<br /> P0 = 0x04;DelayMs(5);<br /> P0 = 0x08;DelayMs(5);<br /> } <br />}<br />STEPPER MOTOR C CODE<br />
- 17. void AntiClockwise (void)<br />{<br /> unsigned int i;<br /> for (i=0;i<30;i++)<br /> {<br /> P0 = 0x08;DelayMs(5); //Delay 20msec<br /> P0 = 0x04;DelayMs(5);<br /> P0 = 0x02;DelayMs(5);<br /> P0 = 0x01;DelayMs(5); <br /> }<br />}<br />void main (void)<br />{<br /> P0 = 0; //Initialize Port0<br />C CODE CONTD<br />
- 18. C CODE CONTD<br />while(1) //Loop Forever<br /> {<br /> Clockwise ();<br />DelayMs (100);<br /> P0 = 0;<br /> AntiClockwise ();<br /> DelayMs (100);<br /> P0 = 0;<br /> }<br />}<br />void DelayMs(unsigned int n)<br />{<br />
- 19. unsigned int i,j;<br /> for(j=0;j<n;j++)<br /> {<br /> for(i=0;i<800;i++);<br /> }<br />}<br />C CODE CONTD<br />
- 20. For more details<br />www.pantechsolutions.net<br />http://www.slideshare.net/pantechsolutions<br />http://www.scribd.com/pantechsolutions<br />http://www.youtube.com/pantechsolutions<br />

No public clipboards found for this slide

×
### Save the most important slides with Clipping

Clipping is a handy way to collect and organize the most important slides from a presentation. You can keep your great finds in clipboards organized around topics.

i wanna cotrol d.c motor pleas snd me

but in lab there is problem i have a unipolar stepper motor with 48 steps. How am i suppose to connect the controller with motor please help me as soon as possible.

if possible send a circut diagram for that purpose.

The code is as follow

ORG 0H

MOV A,#66H

MOV R1,#48

MAIN:

H1: ACALL ROTATE_R

DJNZ R1,H1

AJMP M

ROTATE_R: MOV P1,A

RR A

ACALL DELAY

RET

DELAY: MOV R2,#10

H2: MOV R3,#200

H3: MOV R4,#250

H4: DJNZ R4,H4

DJNZ R3,H3

DJNZ R2,H2

RET

M: SJMP $

END