Doing some testing using a Pololu stepper controller:
and SparkFun stepper motor:
Connected to a 12V, 12 amp power supply.
I calibrated the amps going into the motor. (basically 70% of the motors rated amps)
There is no weight load on the motor.
But when I feed it this code about every 20 seconds:
int j;
digitalWrite(3, HIGH); //direction
for(j=0; j<=200; j++) {
digitalWrite(stepPin, LOW);
delayMicroseconds(500);
digitalWrite(stepPin, HIGH);
delayMicroseconds(500);
}
After a very few rotations the stop point is always shifting farther and farther. Like it's adding steps each rotation.
200 steps should end in the same place every time I call this code. But it never does.
Am I doing something wrong?
Thanks for any help : )
Side questions. Is there any documentation on how the combination of delay times between the HIGH/LOWs affect the speed/torque/motion?
Are there example sketches for using this controller board? Or do I have to substitute? For example dir/step code for the EasyDriver should work on the Pololu?