Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] 8051 interfacing with stepper motor using uln2003

Status
Not open for further replies.

pradeep23

Member level 5
Member level 5
Joined
Aug 20, 2012
Messages
86
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,288
Activity points
1,866
hi everyone i am doing one simple project like 8051 interfacing with stepper motor using the driver ic ULN2003 in this i have connected like 2 inputs (p2.1) (p2.3)and 4 outputs from(p2.13,14,15,16)..................i didnt get the output .........is der anything in that connections or in my program plz help me to do this...............
 

first is put your circuit diagram and then code on the forum such that one can able to anticipate what is problem ?

RD milind
 

hi everyone i am doing one simple project like 8051 interfacing with stepper motor using the driver ic ULN2003 in this i have connected like 2 inputs (p2.1) (p2.3)and 4 outputs from(p2.13,14,15,16)..................i didnt get the output .........is der anything in that connections or in my program plz help me to do this...............
this was my program for the below circuit...........











#include<reg51.h>
#include<stdio.h>

void delay(){
unsigned char i,j,k;
for(i=0;i<6;i++)
for(j=0;j<255;j++)
for(k=0;k<255;k++);
}
main()
{
while(1)
{
P2=0x0c;
delay();
P2=0x06;
delay();
P2=0x03;
delay();
P2=0x09;
delay();


}
}

- - - Updated - - -

please help want to change anything from that circuit or in programs..................
 

Attachments

  • untitled.JPG
    untitled.JPG
    45.9 KB · Views: 189

See this attachement

The data you are sending to P2 is

1100
0110
0011
1001

So P2^0 and P2^1 will be 00 for first signal
then it becomes 10
then it becomes 11
then it becomes 01

assuming p1 and p2 in the diagram is connected to P2^0 and P2^1

so your uln2003 i/p and hence o/p will be

for 00 it will be 0101
for 10 it will be 1001
for 11 it will be 1010
for 01 it will be 0110

so check if uln2003 o/p sequnce is right for stepper.

if P2^2 and P2^3 is connected to P1 and P2

your signal is

11
01
00
10

uln2003 i/p and o/p will be

1010
0110
0101
1001


-----------------------------------------------------------


if you have connected P2.1 and P2.3

then your mcu o/p is

10
01
01
10

so uln2003 i/p and o/p is

0110
1001
1001
0110

check if uln2003 o/p sequence is right for stepper or not.





uln2003 o/p should be

1100
0110
0011
1001

to drive unipolar properly in full step mode.

and you cannot generate 1100 because

Pin1 = 0 means uln2003 pin 1 = 0 and pin 2 = 1
pin2 = 1 means uln2003 pin 3 = 1 and pin 4 = 0

so you get 0110

http://www.robosense.in/index.php/...r-motor-using-atmel-avr-microcontroller.html
 

Attachments

  • stepper_v10.rar
    98.2 KB · Views: 149
  • stepper.jpg
    stepper.jpg
    256.2 KB · Views: 185
Last edited:
yes sir i done dat about circuit ..........but in that i am using only two inputs for uln2003 and 4 outputs............motor is not running .......what will be the problem...........
 
  • Like
Reactions: kewal

    kewal

    Points: 2
    Helpful Answer Positive Rating
y dont you use the 4 pins to drive the stepper motor........
 

but you saw the circuit sir i attached to that one we can use like that............sir
 

See this sequence

1100
0110
0011
1001

Can you generate the necessary 2 bits to get this o/p

read the above sequence form right to left. 0th byte comes from P2^1, and 3rd byte comes from P2^3.

if the code should be 1100 then how will you generate 2 bits for it.
 

why to use relays ...........

- - - Updated - - -

i attached my circuit in that

any problem in that circuit
 

Are you driving stepper motor or dc motor? you have used dc motor in simulation.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top