CD Rom Stepper only jogging...not running???

Am having two stepper motors from two different(yet similar) CD Drives. Both motors are bipolar( 4 wires). I’ve connected a setup using L293DNE and Arduino, to connect a bipolar motor, having 5V power supply from USB(on Arduino itself). I’ve already figured out the wire configuration. My code is:

#include <Stepper.h>

#define motorSteps 12

#define motorPin1 3
#define motorPin2 4
#define motorPin3 5
#define motorPin4 6

Stepper myStepper(motorSteps, motorPin1,motorPin2,motorPin3,motorPin4);

void setup()
{
Serial.begin(9600);

}
void loop()
{
myStepper.setSpeed(60);
Serial.println(“Foward”);
myStepper.step(100);
delay(1000);
}

Now, the problem is, the motor only jogs, but no run. It only jogs as a forward-backward step. I couldn’t able to have even a complete revolution. I’ve checked the code on other motor but the result is still same.
What is the culprit here?? what I’m doing wrong??

Some another day I’ve connected a 6 wire unipolar stepper using ULN2004AN and Arduino, with the same code…it worked!!
Please find me some solution to this.

Have you tried swapping the leads on one of the windings?

yes, approximately 30 times…I’ve swapped the wires!!
Also, according to this onhttp://www.stepperworld.com/Tutorials/pgBipolarTutorial.htm:

Shortcut for finding the proper wiring sequence

Connect the 4 coil wires to the controller in any pattern. If it doesn’t work at first, you only need try these 2 swaps…

1 2 4 8 - (arbitrary first wiring order)
1 2 8 4 - switch end pair
1 8 2 4 - switch middle pair

You’re finished when the motor turns smoothly in either direction. If the motor turns in the opposite direction from desired, reverse the wires so that ABCD would become DCBA.

I’ve made necessary changes many times…but still it is jogging forward backward, but no visible move…!
I’ve also tried another code from Arduino cookbook i.e. :

/*

  • Stepper sketch
  • stepper is controlled from the serial port.
  • a numeric value followed by ‘+’ or ‘-’ steps the motor
  • http://www.arduino.cc/en/Reference/Stepper
    */
    #include <Stepper.h>
    // change this to the number of steps on your motor
    #define STEPS 12
    // create an instance of the stepper class, specifying
    // the number of steps of the motor and the pins it’s
    // attached to
    Stepper stepper(STEPS, 3, 4, 5, 6);
    int steps = 0;
    void setup()
    {
    stepper.setSpeed(60); // set the speed of the motor to 30 RPMs
    Serial.begin(9600);
    }
    void loop()
    {
    if ( Serial.available()) {
    char ch = Serial.read();
    if(ch >= ‘0’ && ch <= ‘9’){ // is ch a number?
    steps = steps * 10 + ch - ‘0’; // yes, accumulate the value
    }
    else if(ch == ‘+’){
    stepper.step(steps);
    steps = 0;
    }
    else if(ch == ‘-’){
    stepper.step(steps * -1);
    steps = 0;
    }
    else if(ch == ‘s’){
    stepper.setSpeed(steps);
    Serial.print("Setting speed to ");
    Serial.println(steps);
    steps = 0;
    }
    }
    }

But whatsoever the positive or negative value i send from serial monitor, it only jogs though in a manner that if the value is large, larger the jogging time and vice versa.
please somebody help me out.

Don't think running a motor off the USB supply is sensible - you could just be being hit by the current limiting. Also its a recipe for frying your Arduino AND your computer...

Don't think running a motor off the USB supply is sensible

Well thank for your concerning, but i supposed that 5V supply from arduino is sufficient. Ok fine, i'll provide external supply and give a check.

Also its a recipe for frying your Arduino AND your computer...

DO u mean by the code??? or the connections???

Sir i got the same problem... whichever program that i will used, the motor is only jogging... i have tried many circuits for the L293D, but the same output. is the 5v of the arduino cannot supply the motor supply?

Motors can generate nasty voltage spikes - this could destroy any semiconductor device on the same supply if it isn't carefully protected. Generally you don't want to take that risk. Do you know what current your motor windings take? Do you know how much current your USB host will provide unnegotiated?

Do you know what current your motor windings take?

Seriously, am not sure.

Do you know how much current your USB host will provide unnegotiated?

nope...how to find this out??

Now, I have provided external power supply, tried different voltages(3V to 9V), with necessary capacitors(0.1uF) to protect circuit devices. Also tried with different H-bridge(ULN2003A), but still the outcome is same. It's really frustrating me...but I'm not done yet. It is still jogging!!! Now what changes are needed??? please help me out...plz

Also tried with different H-bridge(ULN2003A),

The ULN2003A is not a H-bridge.

tried different voltages(3V to 9V),

The L293 requires a motor voltage of at least as big as the logic voltage, so don't go lower than 5V.

Stepping motors do this if the wires are wrong or you are trying to go too fast

stepper.setSpeed(60); // set the speed of the motor to 30 RPMs

Is probably too fast try dropping that down to 1 to test it.

Do you know the capacity of your external supply? It could be that it is not enough for your motor.

Try an post a picture of your setup to see if we can get more clues.

The ULN2003A is not a H-bridge.

Ok, for ULN2003A, I've used it to successfully run a six wire unipolar stepper, though u are right it is not called a H-Bridge.

The L293 requires a motor voltage of at least as big as the logic voltage, so don't go lower than 5V.

I mean to say that I've checked for all values, but I'll remember your advice, thanks.

Is probably too fast try dropping that down to 1 to test it.

Already tried that, it minimizes the jerk, but it is still a jerk, no revolution.

Do you know the capacity of your external supply?

Yes, it is rated: Panasonic Input-220V Ac Output Current- 500mA, variable voltages(3, 4.5, 6, 7.5, 9 and 12)

I'll be posting a picture soon.

Output Current- 500mA

That is no better than the arduino's USB power. So try measuring the voltage of the supply when the motor is connected and see if it is sagging. What is your motor rated at, it could be that 5V is not sufficient to turn it or 500mA is not enough.

I've used it to successfully run a six wire unipolar stepper

Yes you can't run a bipolar one with them.

sir i haven't found a solution too... i got the same problem. :( sir is it possible that the wiring of the motor was discharge? how to check them sir if which is the coil 1 and coil 2?

is it possible that the wiring of the motor was discharge

Sorry but discharge is the wrong word, can you try again.

if which is the coil 1 and coil 2?

You have to experiment there is no fixed way of telling.

i've already tried this circuit sir http://www.arduino.cc/en/Reference/StepperBipolarCircuit. for the first time i'd tried it, the motor works fine. but when i tried to rebuild the circuit, the motor is only jogging. I dont know exactly the problem :( im looking for a solution for almost 1 week, but i havent found it yet :( sir is it possible that the transistor i've used is the problem?im using (2N3904).

What is your motor rated at

That is the major problem, because the motor is from a DVD Drive, hence nothing mentioned over it.

NOw I've tried it with 1Ampere current, still the result is same...!

Daniyal: I'll be posting a picture soon.

Make sure you can see the wiring.