dolphinlabs
...
Doplhin labs
News

Stepper Motor Interface


·         Program Statement: Interfacing of Stepper motor with 89C51 microcontroller

Connections: P0.0=A, P0.1=B, P0.2=C , P0.3=D of stepper motor

 

Hardware Connections for 8051 Board:-

1.      Give supply to 8051 board with the help of adapter

2.       Connect +5V pin of 8051 microcontroller to +5V supply and GND pin of 8051 microcontroller to GND pin of supply.

3.      Connect +5V pin of RS232 interface to +5V supply and GND pin of RS232 interface to GND pin of supply.

4.      Connect R2OUT pin of RS232 interface to RXD pin of 8051 and T2IN pin of RS232 interface to TXD pin of 8051.

5.      Connect +12 pin of stepper motor interface to +12V supply and GND pun of stepper motor interface to GND pin of supply.

6.      Connect IN1 IN2 IN3 IN4 pins of stepper motor interface block to P0.0 P0.1 P0.2 P0.3 respectively.

7.      Connect OUT1 OUT2 OUT3 OUT4 pins of stepper motor interface block to stepper motor pins.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Circuit Diagram:

 

 

 

 

 

 

 

 

 

 

 

 

 

Program Code:

//Anticlockwise stepper motor

#include<reg51.h>

void delay();

void main()

{

while(1)

{

P0=0x03;         // set A and B

delay();              //call delay

P0=0x06;           //set B and C

delay();                  //call delay           

P0=0x0c;          //set C and D

delay();             //call delay

P0=0x09;           //set D and A

delay();               //call delay

}

}

void delay()

{

int i,j;

for(i=0;i<20000;i++);

for(j=0;j<30000;j++);

}

 

 

 

 

 

 

 

 

 

 

 

 


Get SOCIAL







SAFE & SECURE SHOPPING

visa card master card maestro card
Maverick IT Industries Pvt. Ltd.