Go Down

Topic: Jerky movement with stepping motor and L293D (Read 2 times) previous topic - next topic


you must have connected the wires the wrong way - I know because I did the same thing and it behaves exactly as you described

I have tried many values between 48 and 360, but it does not improve the movement, but I still would like to know
that wouldn't improve anything... that value just tells the programme how many steps are needed for each revolution (useful for some commands)


Update: Turns out one of the L293Ds in the motor shield had gone bad. In the circuit I built myself (without motor shield) I must have connected something wrong because I re-did the whole thing and now it works fine.


Even with an Adafruit motor shield I get the same (also uses a L293D). The L293D gets hot within seconds and the movement doesn't seem very reliable. To be clear, the jerky movement is within the longer stretch, so if I move 100 steps, it does that but seems to stop after each step causing the thing to rattle and vibrate. I have looked on Youtube but haven't seen any stepper move that way. Also, I actually have two of these from the same printer, but they both do this. It would be quite a coincidence if both are broken, so I really think something else must be wrong. 

Maybe hooked up incorrectly? I am using a 24V 500mA switching power supply http://www.sparkfun.com/products/8981. I have also tried lower power (0-9V 0-1A) but it either just vibrates or it does the same thing

Code (Adafruit library)

#include <AFMotor.h>

AF_Stepper motor(48, 2);

void setup() {
  Serial.begin(9600);           // set up Serial library at 9600 bps
  Serial.println("Stepper test!");
  motor.setSpeed(10);  // 10 rpm   

void loop() {
  motor.step(100, FORWARD, MICROSTEP);
  motor.step(100, BACKWARD, MICROSTEP);


Looking at the links you supplied I see the motor has both a unipolar and bipolar version and that the examples on Tom Igoe's pages give solutions for both. Do you know which it is? Could be that you are using the wrong driving method. It also could be that you are seeing the effect of the large steps as MarkT pointed out. To get around that you could use microstepping but that would require an appropriate driver.
If you can supply more info perhaps we can help figure it out.


Its a stepper motor, it moves in steps - I presume this is what you describe as 'jerky motion'?  The spec says its 7.5 degress per step, so it will be big steps.
[ I won't respond to messages, use the forum please ]

Go Up