New Mach3 tutorial - Stepper Motor, Stepper Motor Driver,CNC
Controlling stepper motor using serial communication with computer
-
Upload
noumanahmed90 -
Category
Business
-
view
1.174 -
download
3
Transcript of Controlling stepper motor using serial communication with computer
![Page 1: Controlling stepper motor using serial communication with computer](https://reader035.fdocuments.net/reader035/viewer/2022062319/555cdc7dd8b42aeb2c8b533e/html5/thumbnails/1.jpg)
![Page 2: Controlling stepper motor using serial communication with computer](https://reader035.fdocuments.net/reader035/viewer/2022062319/555cdc7dd8b42aeb2c8b533e/html5/thumbnails/2.jpg)
Project Title:
TO CONTROL STEPPER MOTOR WITH COMPUTER
USING SERIAL PORT COMMUNICATION OF MICROCONTROLLER
![Page 3: Controlling stepper motor using serial communication with computer](https://reader035.fdocuments.net/reader035/viewer/2022062319/555cdc7dd8b42aeb2c8b533e/html5/thumbnails/3.jpg)
![Page 4: Controlling stepper motor using serial communication with computer](https://reader035.fdocuments.net/reader035/viewer/2022062319/555cdc7dd8b42aeb2c8b533e/html5/thumbnails/4.jpg)
STEPPER MOTORSTEPPER MOTOR
![Page 5: Controlling stepper motor using serial communication with computer](https://reader035.fdocuments.net/reader035/viewer/2022062319/555cdc7dd8b42aeb2c8b533e/html5/thumbnails/5.jpg)
Difference b/w Rotor & Stator of Stepper & other Motors
![Page 6: Controlling stepper motor using serial communication with computer](https://reader035.fdocuments.net/reader035/viewer/2022062319/555cdc7dd8b42aeb2c8b533e/html5/thumbnails/6.jpg)
Understanding Stepper Motor
![Page 7: Controlling stepper motor using serial communication with computer](https://reader035.fdocuments.net/reader035/viewer/2022062319/555cdc7dd8b42aeb2c8b533e/html5/thumbnails/7.jpg)
Understanding Stepper Motor
![Page 8: Controlling stepper motor using serial communication with computer](https://reader035.fdocuments.net/reader035/viewer/2022062319/555cdc7dd8b42aeb2c8b533e/html5/thumbnails/8.jpg)
Understanding Stepper Motor
![Page 9: Controlling stepper motor using serial communication with computer](https://reader035.fdocuments.net/reader035/viewer/2022062319/555cdc7dd8b42aeb2c8b533e/html5/thumbnails/9.jpg)
CONNECTIONS AND STEP SEQUENCES
![Page 10: Controlling stepper motor using serial communication with computer](https://reader035.fdocuments.net/reader035/viewer/2022062319/555cdc7dd8b42aeb2c8b533e/html5/thumbnails/10.jpg)
SERIAL SERIAL COMMUNICATIONCOMMUNICATION
![Page 11: Controlling stepper motor using serial communication with computer](https://reader035.fdocuments.net/reader035/viewer/2022062319/555cdc7dd8b42aeb2c8b533e/html5/thumbnails/11.jpg)
Serial communication uses 2 methods
• Synchronous method transfers a block of data at a time.
• Asynchronous method transfers a single byte at a time.
![Page 12: Controlling stepper motor using serial communication with computer](https://reader035.fdocuments.net/reader035/viewer/2022062319/555cdc7dd8b42aeb2c8b533e/html5/thumbnails/12.jpg)
Asynchronous serial datacommunication
• A protocol is a set of rules agreed by both the sender and receiver on
• How the data is packed.
• How many bits are for data.
• When the data begins and ends.
![Page 13: Controlling stepper motor using serial communication with computer](https://reader035.fdocuments.net/reader035/viewer/2022062319/555cdc7dd8b42aeb2c8b533e/html5/thumbnails/13.jpg)
Asynchronous
![Page 14: Controlling stepper motor using serial communication with computer](https://reader035.fdocuments.net/reader035/viewer/2022062319/555cdc7dd8b42aeb2c8b533e/html5/thumbnails/14.jpg)
![Page 15: Controlling stepper motor using serial communication with computer](https://reader035.fdocuments.net/reader035/viewer/2022062319/555cdc7dd8b42aeb2c8b533e/html5/thumbnails/15.jpg)
• RS323
• STANDARD
• TTL
• STANDARD
![Page 16: Controlling stepper motor using serial communication with computer](https://reader035.fdocuments.net/reader035/viewer/2022062319/555cdc7dd8b42aeb2c8b533e/html5/thumbnails/16.jpg)
![Page 17: Controlling stepper motor using serial communication with computer](https://reader035.fdocuments.net/reader035/viewer/2022062319/555cdc7dd8b42aeb2c8b533e/html5/thumbnails/17.jpg)
![Page 18: Controlling stepper motor using serial communication with computer](https://reader035.fdocuments.net/reader035/viewer/2022062319/555cdc7dd8b42aeb2c8b533e/html5/thumbnails/18.jpg)
![Page 19: Controlling stepper motor using serial communication with computer](https://reader035.fdocuments.net/reader035/viewer/2022062319/555cdc7dd8b42aeb2c8b533e/html5/thumbnails/19.jpg)
![Page 20: Controlling stepper motor using serial communication with computer](https://reader035.fdocuments.net/reader035/viewer/2022062319/555cdc7dd8b42aeb2c8b533e/html5/thumbnails/20.jpg)
![Page 21: Controlling stepper motor using serial communication with computer](https://reader035.fdocuments.net/reader035/viewer/2022062319/555cdc7dd8b42aeb2c8b533e/html5/thumbnails/21.jpg)
![Page 22: Controlling stepper motor using serial communication with computer](https://reader035.fdocuments.net/reader035/viewer/2022062319/555cdc7dd8b42aeb2c8b533e/html5/thumbnails/22.jpg)
Timers of 8051
• TMOD Register
![Page 23: Controlling stepper motor using serial communication with computer](https://reader035.fdocuments.net/reader035/viewer/2022062319/555cdc7dd8b42aeb2c8b533e/html5/thumbnails/23.jpg)
• TMOD=0x20; //use Timer 1, mode 2
• TH1=0xFA; //4800 baud rate
• TR1=1; //start timer
![Page 24: Controlling stepper motor using serial communication with computer](https://reader035.fdocuments.net/reader035/viewer/2022062319/555cdc7dd8b42aeb2c8b533e/html5/thumbnails/24.jpg)
![Page 25: Controlling stepper motor using serial communication with computer](https://reader035.fdocuments.net/reader035/viewer/2022062319/555cdc7dd8b42aeb2c8b533e/html5/thumbnails/25.jpg)
SCON=0x50;
![Page 26: Controlling stepper motor using serial communication with computer](https://reader035.fdocuments.net/reader035/viewer/2022062319/555cdc7dd8b42aeb2c8b533e/html5/thumbnails/26.jpg)
MOVEMENT,DELAY B/W EACH STEP OF STEPPER MOTORvoid MSDelay(unsigned int);void MSDelay(unsigned int itime){unsigned int i,j;for (i=0;i<itime;i++)for (j=0;j<1275;j++);}P2=0xCC;P2=P2<<1;