Im trying to run a 42BYGHM809 stepper motor off a Pololu A4988 driver board with a 12 volt power supply and I am having a few problems getting the speeds I want. I can alter the delays to speed it up but once I get the delays too small (around 400 microseconds) the stepper will struggle to start and will simply whine. I can give the shaft a quick spin manually and it will start but if it tries to change direction same thing happens.
I have wired the circuit up in the exact same way as seen on the Pololu website
Just wondering if there is any way to increase the speed without just reducing the delays.
Cheers
//simple A4988 connection
//jumper reset and sleep together
//connect VDD to Arduino 3.3v or 5v
//connect GND to Arduino GND (GND near VDD)
//connect 1A and 1B to stepper coil 1
//connect 2A and 2B to stepper coil 2
//connect VMOT to power source (9v battery + term)
//connect GRD to power source (9v battery - term)
int stp = 13; //connect pin 13 to step
int dir = 12; // connect pin 12 to dir
int a = 0; // gen counter
void setup()
{
pinMode(stp, OUTPUT);
pinMode(dir, OUTPUT);
}
void loop()
{
if (a < 200) //sweep 200 step in dir 1
{
a++;
digitalWrite(stp, HIGH);
delay(10);
digitalWrite(stp, LOW);
delay(10);
}
else
{
digitalWrite(dir, HIGH);
a++;
digitalWrite(stp, HIGH);
delay(10);
digitalWrite(stp, LOW);
delay(10);
if (a>400) //sweep 200 in dir 2
{
a = 0;
digitalWrite(dir, LOW);
}
}
}
and by putting all of the delay-between-steps in one place it can be easier to manage - especially if you want to get away from using the delay() function.
Also delay(40) is 40 millisecs. I presume you were using delayMicroseconds(400) for the limiting case.
If you have 2 delays of 400 usecs between steps - i.e. a total of 800usecs or 1250 steps per second - you are almost certainly limited by the voltage you are using. However I have no idea how much more speed you might get with a higher voltage.
I used to work for a company that manufactured industrial stepper drives, 5A, 65V. During the testing phase, we ran many motors from 2.2" to 4.2" with torque monitored by an Eddy Current Brake. The smaller physically the motor is, the faster it will go. This I suspect is because the winding inductance goes up as size increases. We could routinely run a 2.2" motor to 5,000 SPS but of course the torque was falling the whole time. A smaller motor or a motor with less inductance is preferred when you want speed.
Not many steppers will start above about 200 SPS without "stalling". So a stepper function that lets you set accel/deccel rates as well as target position is not just nice but pretty necessary.
The approximate width.
We called them 2.2" motors and they were NEMA 23
The next larger 3.4" would be NEMA 34, and the largest 4.2" were NEMA 42. Of course the stack length entered into the picture as well. They come in 1, 2, and 3x. We found the "single" stack length to be the fastest of the group (for reasons of lower inertia and lower inductance).
rmetzner49:
...... We called them 2.2" motors and they were NEMA 23 .....
Thanks. I was aware of the Nema notation, I just thought you had something else in mind. And I guess it hadn't ocurred to me that the Nema numbers were tenths of inches.
Thare are at least 2 different NEMA numbering schemes, and the distances are
usually axle to side-mounting flange distances, not appropriate to small motors
which are face-mounting, so the standard is rather freely interpreted. For instance
most NEMA17's have a 5mm shaft, NEMA23's a 8mm shaft (neither of which are
American units! - although encoder rear shafts are usually 1/4"). The face-plate
mounting hole positions in particular are not standard, note.