I have a project that I want to use a stepper for. I am currently trying to run it with a NMB-MAT D6NE stepper. Thats 48 steps per revolution.
I am using a pololu A4988 controller using 1/16th step. I have attached the schematic of design. (I have ordered 10 PCBs for use in other projects).
My project needs to have the motor rotate at two speeds selected by a pot, low speed is 6 rpm, high speed is 60 rpm. Here is the code I am currently using:
void setup() {
// Sets the pins as Outputs
pinMode(stepPin,OUTPUT);
pinMode(dirPin,OUTPUT);
pinMode(enablePin, OUTPUT);
digitalWrite(enablePin,LOW); //Start with the motor stopped. Use button to start/stop
digitalWrite(dirPin,HIGH); // Enables the motor to move in a particular direction
}
void loop() {
digitalWrite(stepPin,HIGH);
delayMicroseconds(10);
digitalWrite(stepPin,LOW);
delay(10000);
}
This is just test code to check out the low speed characteristics of the motor. Eventually I will be doing motor reverse, and maybe even timing the rotations to rotate CW for a while, then CCW for a while.
Everything is fine at the higher speeds (smaller delays). But at the low end of the speed spectrum it begins to run "jerky". By that I mean step then stop then step again. Its due to the delay that I am using and the method I have programed. I am pretty sure I need a different way of controlling the delay at the lower speeds, but have not found anything on the net or in the forum that addresses this issue.
I need the slow speed because I am using this to turn fly rods that have had the threads on the guides coated with self leveling epoxy. The rod needs to turn for about 24 hours to let the epoxy dry, and the turning assures the epoxy is consistent on the rod. The jerkyness might create problems with the epoxy.
I need the high speed to actually do the application of the epoxy. Turning the rod at higher speeds will let me apply the epoxy faster so I don't have to worry too much about pot life.
If I can't get steppers to work, I may be forced into using DC gear motors. I have a project already working with a gear motor now that seems to be doing the trick, but steppers give me a lot more flexibility and I have several of them available.
Many thanks for any ideas.
dryerMotor.pdf (48 KB)