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