Stepper motor control, speed limitation

Hello to all!

I am trying to control a stepper motor but there are some problems regarding the maximum speed.

The motor I have is the "Stepper Motor 2.8kg.cm (200 steps/rev) 42BYGHW208"

and the driver is the MKS DRV8825, while I am using the Arduino nano 33 iot.

According to the following tutorial

(https://www.makerguides.com/drv8825-stepper-motor-driver-arduino-tutorial/)

I set the current limit in 0.56A (0.40A limit of the motor, 40% increased because it is in full step mode).

An indicative example of the same tutorial is based on the following code:

//Spin the stepper motor 5 revolutions fast:
for (int i = 0; i < 5 * stepsPerRevolution; i++) {
// These four lines result in 1 step:
digitalWrite(stepPin, HIGH);
delayMicroseconds(500);
digitalWrite(stepPin, LOW);
delayMicroseconds(500);
}

However, in case I put in delayMicroseconds( ) less than "700" the motor either do not turn at all, or with a minimum of load it stop turns. Thus the maximum speed is achieved in "700" and it is about 2-3 turns in one second. Ideally, I would like almost to double the max speed...

I would like to ask you, whether this is an inherent limitation of the hardware I am using (arduino, motor, driver) or if there is a way to increase the motor speed (disable some functions of arduino in order to be more fast, change the code)

Thanks in advance for your consideration,
Lefteris.

If the max current for the motor is 0.40 Amp, don't set driver to 0.56 Amp. That over heats the stepper.
How many steps per rev in the stepper?

1 Like

Information about the 42BYGHW208 stepper motor with datasheet: https://www.openimpulse.com/blog/products-page/product-category/42byghw208-stepper-motor-0-4-2-6-kg%E2%8B%85cm/

There are a few versions of the MKS DRV8825 module, but I think they are more or less similar:

A stepper motor can not start at full speed. You have to gently increase the speed. If you start with full step mode, that makes it worse.
I like that tutorial at makerguides. They use the AccelStepper which can gently increase the speed.

Maybe your stepper motor is low quality, maybe your power supply or wiring is not optimal. The problem that you found is normal for stepper motors.

1 Like

In the documentation, they refer:

" Bonus info: When using the driver in full-step mode, the current through each coil is limited to approximately 70% of the set current limit. This means that you would need to set the current limit 40% higher or 1.4 A in full-step mode. When using microstepping, the formula above applies."

thats why I increased the current limit to 0.56A.

I set it up in full step mode, that means 200 steps per revolution.

1 Like

Another Vote for adding acceleration - you can do it yourself or try a library.

1 Like

so your advice is to work in half step mode?

That should improve it.
A stepper motor can not deal with a load, and starting a stepper motor is the most critical part. Welcome in the world of stepper motors :wink:

There often is some mechanical weight connected to a stepper motor. That smoothes the vibrations and keeps the rotation going. So when it has some speed, then there is no problem.

By the way: Don't download files from just any website. Most libraries are in the Library Manger in the Arduino IDE. The official website for the AccelStepper is this: https://www.airspayce.com/mikem/arduino/AccelStepper/.

1 Like

Thanks Koepel!
Lefteris

Motor top speed depends on the supply voltage to the stepper driver - increasing this will increase dynamic max speed and torque. Speed-ramping is essential for achieving maximum speed unless the motor is absolutely tiny.

And on the specs of the stepper motor.
OP seems to be using a high-impedance 12volt stepper motor, which is not designed for speed.
Leo..

1 Like

A high impedance stepper will perform more poorly, although you could go to much high voltages to counter-act this if you have a stepper-driver that handles the voltage - 80V or more is not unknown in the CNC world for stepper drivers (although those are typically used with low-impedance motors to allow 1000's of RPM for rapids).

1 Like