High speed stepper

Can anyone suggest me an Arduino library that can run a servo at 2000 rpm ? I used "Accelstepper" library that's giving me nearly 350rpm.


Post a data sheet for the stepper.

Post a data sheet for the stepper driver.

Is microstepping enabled? What value?

What are the specifications of the motor power supply?

Did you properly set the stepper coil current on the stepper driver (if necessary)?

What Arduino board?

1 Like

Since I am a new user and I am not allowed to upload any new attachments here. I have used a AZD-KX driver to drive AZM69MOK . I am using Arduino Mega.

I have no experience with that driver and can find no data sheet, in English, for the motor.

Here is an excerpt from the AccelStepper reference on the maximum speed that the library can drive a stepper.


The fastest motor speed that can be reliably supported is about 4000 steps per second at a clock frequency of 16 MHz on Arduino such as Uno etc. Faster processors can support faster stepping speeds. However, any speed less than that down to very slow speeds (much less than one per second) are also supported, provided the run() function is called frequently enough to step the motor whenever required for the speed set. Calling setAcceleration() is expensive, since it requires a square root to be calculated.

Mega is a 16MHz board, like Uno.

So for a 200 step per rev motor, to get to 2000 RPM that is 6667 steps per second. Faster processors and processors with floating point math can be faster.

1 Like

For me to achieve 2000rpm, I have to give 33,333steps/sec because my motor has 0.36 degree/step. Does this mean an "Accelstepper" library with 4k steps/seconds can not fulfill my speed requirement?

I have seen people tell of faster speeds with AccelStepper library using faster processors, but do not recall the ultimate steps per second that they were able to achieve. Perhaps you can find that information with some searching.

Also to achieve high speed you will need a power supply capable of supporting the current requirement and have a voltage near the maximum allowed by the stepper driver.

Like I said, I am not at all familiar with the driver or the motor that you are using, therefore my ability to assist is limited.

1 Like

@groundFungus thank you so much for your help. Appreciated.

Often, you can use more simple code for driving steppers. All that is required is a signal on the step pin. For high speeds you will need to manage acceleration too, but even then, you don't necessarily require a sophisticated library.

Alternatively, you can just buy your way out of trouble by getting a faster chip for $20.

To add to what @wildbill posted, Robin2 has a couple of posts that you may find of interest.

Simple stepper code. Without acceleration but simple and non-blocking

Simple acceleration code for stepper.

Absolutely, if you use a Mega. If you use a board supporting hardware floating point (Teensy 4.x for instance), this limit of AccelStepper goes away.

To reach high speeds with a stepper you need high supply voltage (48V might be a good starting point) and a driver that's happy with that voltage. Even so the torque
will drop off a lot with speed, the hold-in torque figure doesn't remotely apply, you'll need to find the graphs in the datasheet for the torque v. speed for various supply voltages.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.