controlling stepper motor using serial communication with computer

26

Upload: noumanahmed90

Post on 21-May-2015

1.168 views

Category:

Business


3 download

TRANSCRIPT

Page 1: Controlling stepper motor using serial communication with computer
Page 2: Controlling stepper motor using serial communication with computer

Project Title:

TO CONTROL STEPPER MOTOR WITH COMPUTER

USING SERIAL PORT COMMUNICATION OF MICROCONTROLLER

Page 3: Controlling stepper motor using serial communication with computer
Page 4: Controlling stepper motor using serial communication with computer

STEPPER MOTORSTEPPER MOTOR

Page 5: Controlling stepper motor using serial communication with computer

Difference b/w Rotor & Stator of Stepper & other Motors

Page 6: Controlling stepper motor using serial communication with computer

Understanding Stepper Motor

Page 7: Controlling stepper motor using serial communication with computer

Understanding Stepper Motor

Page 8: Controlling stepper motor using serial communication with computer

Understanding Stepper Motor

Page 9: Controlling stepper motor using serial communication with computer

CONNECTIONS AND STEP SEQUENCES

Page 10: Controlling stepper motor using serial communication with computer

SERIAL SERIAL COMMUNICATIONCOMMUNICATION

Page 11: Controlling stepper motor using serial communication with computer

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

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

Asynchronous

Page 14: Controlling stepper motor using serial communication with computer
Page 15: Controlling stepper motor using serial communication with computer

• RS323

• STANDARD

• TTL

• STANDARD

Page 16: Controlling stepper motor using serial communication with computer
Page 17: Controlling stepper motor using serial communication with computer
Page 18: Controlling stepper motor using serial communication with computer
Page 19: Controlling stepper motor using serial communication with computer
Page 20: Controlling stepper motor using serial communication with computer
Page 21: Controlling stepper motor using serial communication with computer
Page 22: Controlling stepper motor using serial communication with computer

Timers of 8051

• TMOD Register

Page 23: Controlling stepper motor using serial communication with computer

• 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
Page 25: Controlling stepper motor using serial communication with computer

SCON=0x50;

Page 26: Controlling stepper motor using serial communication with computer

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;