PDA

View Full Version : Stepper motor driving confusion



gates2231
12-20-2008, 11:26 PM
Hello Friends
By fate i bought a pair of stepper motors from robo kits
They are of unipolar type
They have a coil resistance of 12 ohms
and resistance between the coils is 5 ohms
6V 500mA, 12V 1Amp in bipolar mode.
I identified the coils also
pink and yellow- coil one
blue and orange- coil two
It has six wires other two are common black and white
It was mentioned in the website that to drive in
sequence the order of pulses is
Pink Blue Yellow Green

I connected the common to grounds and gave pulses frm a normal battery it worked fine

Now i want to run it in bipolar mode
So i took a L293D IC and connected the four wires to the four output ports and connected the IC to the controller and used the following code
#include<avr/io.h>
#include<avr/delay.h>
int main (void)
{
DDRC = 0xFF;
while(1)
{
PORTC=1;
_delay_loop_2(800);
PORTC=4;
_delay_loop_2(800);
PORTC=2;
_delay_loop_2(800);
PORTC=8;

}
return 1;
}

to generate the following sequence
P Y B O
1 0 0 0
0 0 1 0
0 1 0 0
0 0 0 1

In the starting they rotated fine but later they stopped working properly

I think i burned the L293D due to high current as i am using a high current battery Li Ion 12V 2A

So plz kindly suggest wat to do to run this unipolar motor in bipolar mode
Use the L297+L298N combi shown in the datasheet?
Is it suitable fr unipolar ones?
What to do with the common's left out
give to ground or Vcc

I am so confused
Plz Plz Kindly help me out what to do
I am working towards micromouse in jan
plz help asap

bhishmar
03-26-2009, 01:05 AM
They have a coil resistance of 12 ohms
and resistance between the coils is 5 ohms
Resistance between coils = 5 ohm !!!
Either it must be open or short (0 ohm).
i.e. if u have connected the two commons togethor, it will be zero ohm, else it will show infinite (open).

How can it be 5 ohm. Does it mean there is short between two coils?
Is the motor type "16PU-M301-G1" from MINEBEA co, Taiwan?
I am curious?
regards

suhasm
04-30-2009, 10:46 AM
while(1)
{
PORTC=1;
_delay_loop_2(800);
PORTC=4;
_delay_loop_2(800);
PORTC=2;
_delay_loop_2(800);
PORTC=8;

}


In your code , you should have added a delay after the line PORTC = 8;
That is why it is not working...

And on more thing , instead of writing 4 statements , you can just write a simple loop and finish the whole thing in just 3-4 lines of code...