I am posting here as I have an interest in cnc and cnc uses stepper motors though quite a bit more powerful than I have. I have a stepper motor question and I am very new to stepper motors. I bought two small stepper motors to experiment with Pololu - Stepper Motor: Bipolar, 200 Steps/Rev, 28x32mm, 3.8V, 670mA and a easy driver stepper controller from SparkFun that are hooked up to an Arduino with an external supply set to 24v. I modified a program I found, but I am disappointed in the results I am getting. The stepper works, but it is jerky and very slow, sometimes slower than others. Is this normal for stepper motors or do I have something wrong.
Stepper Test - Test a single Stepper Motor
// for duemilanove atmega328 arduino board + easydriver stepper controller
// email@example.com 2010-06-15
#define DIR1_PIN (11)
#define STEP1_PIN (11)
//#define DELAY (1600/10)
#define BAUD (9600)
digitalWrite(DIR1_PIN, LOW); // Set the direction.
for (i = 0; i<=3400; i++) // Iterate for 4000 microsteps.
digitalWrite(STEP1_PIN, LOW); // This LOW to HIGH change is what creates the
digitalWrite(STEP1_PIN, HIGH); // "Rising Edge" so the easydriver knows to when to step.
delayMicroseconds(700); // This delay time is close to top speed for this
} // particular motor. Any faster the motor stalls.