Pages: [1]   Go Down
Author Topic: Jerky movement with stepping motor and L293D  (Read 2049 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I got this stepper from a printer http://www.mitsumi.co.jp/latest/Catalog/compo/motor/m42sp5_e.html. I hooked it up according to the H-bridge example on Tom Igoe's site with an L293D http://www.tigoe.net/pcomp/code/circuits/motors/stepper-motors. The motor moves, but in a jerky fashion, so something must be wrong. How do I debug this, where do I start?

I also have a question about the steps per revolution which I need to state in the code. Specs say the motor has 7.5deg per step, which would mean only 48 steps per revolution (360deg), which seems low. Am I reading this wrong? I think it is unrelated to the jerky movement because I have tried many values between 48 and 360, but it does not improve the movement, but I still would like to know.  

Thanks in advance for help.



« Last Edit: April 24, 2011, 05:29:04 am by Zoofy » Logged

0
Offline Offline
Shannon Member
****
Karma: 215
Posts: 12516
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

[ I won't respond to messages, use the forum please ]

St. Louis, Missouri
Offline Offline
Sr. Member
****
Karma: 1
Posts: 279
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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);
  delay(1000);
  motor.step(100, BACKWARD, MICROSTEP);
  delay(1000);
}
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Full Member
***
Karma: 6
Posts: 229
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Quote
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)
Logged

Pages: [1]   Go Up
Jump to: