stepper motor interfacing with 8051

Thread Starter

bobparihar

Joined Jul 31, 2014
93
iam using 89S52 wit ULN2803A to drive a stepper motor
iam confused about the connection the stepper motor iam using is shown in the attached picture here

my code


#include<reg51.h>


void delay(unsigned int count)
{
int i,j;
for(i=0;i<count;i++)
for(j=0;j<1275;j++); // delay about a milli sec
}

void main()
{
while(1)
{
P2=0x01; // uln2803a connected to port 2
delay(10);
P2=0x03;
delay(10);
P2=0x02;
delay(10);
P2=0x06;
delay(10);
P2=0x04;
delay(10);
P2=0x0C;
delay(10);
P2=0x08;
delay(10);
P2=0x09;
delay(10);
}
}

here is the circuit iam following in the attached pics

problem here is stepper motor do not revolve but when i simulate it in the proteus software with ULN2003A instead of ULN2803A it works fine

when doing it on hardware when i forcefully try to revolve the stepper motor it resist (vibrate)..
any one please make me correct
 

Attachments

Thread Starter

bobparihar

Joined Jul 31, 2014
93
hould i also have to use seprate ground for the stepper motor driving ic(ULN or L293D) and the microcontroller??

last time when i did make the ground common for both ULN and Microcontroller the axle rotate a single step forward then a single step backward and so on.. back and forth
but it does not rotates fully clockwise or anticlockwise
 
Top