Go Down

Topic: Help with running a Stepper Motor with L293D IC (Read 2544 times) previous topic - next topic



I have been having a heck of a time getting this simple stepper motor script to run the motor. We have the bi-polar stepper motor ( http://www.sparkfun.com/datasheets/Robotics/SM-42BYG011-25.pdf ) connected to the L293D controller chip in this fashion: http://arduino.cc/en/Reference/StepperBipolarCircuit (4-pin setup) and when it all gets plugged in, the motor shakes pretty hard, and kinda does some random turning back and forth (very hard to describe)... it also seems to do a few steps in any direction I start to force it to go...

I have tried all the combos of the motor wired, thinking I had those connected in the wrong order...

Anyone have any suggestions?

I have tried the two following sketches with the same results:


#include <Stepper.h>
Stepper stepper = Stepper(85, 2,3,4,5);

void setup()
 // set the speed of the motor to 30 RPMs


 void loop(){


* MotorKnob
* A stepper motor follows the turns of a potentiometer
* (or other sensor) on analog input 0.
* http://www.arduino.cc/en/Reference/Stepper

#include <Stepper.h>

// change this to the number of steps on your motor
#define STEPS 100

// 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, 8, 9, 10, 11);

// the previous reading from the analog input
int previous = 0;

void setup()
 // set the speed of the motor to 30 RPMs

void loop()
 // get the sensor value
// int val = analogRead(0);

 // move a number of steps equal to the change in the
 // sensor reading

 // remember the previous value of the sensor
// previous = val;


well, I got it working... there were some bad connections to the motor and only one coil was energizing...

thanks anyways...

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131