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.

how to program bipolar stepper motor using P18F4580

Status
Not open for further replies.

naser89

Newbie level 4
Joined
Mar 26, 2010
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
malaysia
Activity points
1,312
how to program bipolar stepper motor using P18F4580..

i have a stepper motor but i did't know a polarity of wire,green,red,blue and yellow.

and how to program it in P18F4580.. :roll:
 

can you give a programing code to run stepper motor.
 

Hi friend

First of all, To run stepper motor,

you need, Stepper motor driver circuit.
do you have any driver ckt.

i have a stepper motor but i did't know a polarity of wire,green,red,blue and yellow.

To detect Polarity of wire,
Take Multimeter and check continuity of any two wire.

if it display continuity, that two wire are pair.

Shyam
INDIA
 
Last edited:

Hi friend

First of all, To run stepper motor,

you need, Stepper motor driver circuit.
do you have any driver ckt.



To detect Polarity of wire,
Take Multimeter and check continuity of any two wire.

Shyam
INDIA

if it display continuity, that two wire are pair.

With multimeter you can find the pairs but not polarity of the pairs.

If you cant find the datasheet you have try different combinations swaping the wires
 

Dear friend

Here i post a program for rotate a stepper motor

oid main()
{
int i;
TRISB = 0x00;
PORTB = 0x00;

//routine to move in one direction
while(1)
{
for (i=0;i<50;i++)// increse i=50 no i=100 to cover double the distance
{
PORTB=0x08;
Delay_ms(200);
PORTB=0x04;
Delay_ms(200);
PORTB=0x02;
Delay_ms(200);
PORTB=0x01;
Delay_ms(200);
}
Delay_ms(400);
//routine to move in the other direction

for (i=0;i<50;i++) // increse i=50 no i=100 to cover double the distance
{
PORTB=0x01;
Delay_ms(200);
PORTB=0x02;
Delay_ms(200);
PORTB=0x04;
Delay_ms(200);
PORTB=0x08;
Delay_ms(200);
}
}
}
 

I put the four light sensors at 90degree,180degree,270degree and 360degree. I want to rotate the motor stepper to the sensor readings that high value of reading.
it is possible to do like that???
 

Dear friend,

Yes it is possible one.You just read the value from your light sensor.
 

I put the four light sensors at 90degree,180degree,270degree and 360degree. I want to rotate the motor stepper to the sensor readings that high value of reading.
it is possible to do like that???

Yes, but you need to know how many steps does your motor need to fully rotate, then you can program it in Pic.
And that's why data sheets was made for.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top