Maximum rpm stepper motor

Hello everybody,

I’m currently using a NEMA17 stepper motor (https://www.igus.nl/contentData/wpck/pdf/global/MOT-AN-S-...EN.pdf) and it’s getting controlled by a Leadshine DM556 stepper motor driver. Running the motor with 300 RPM is no problem (delayMicroseconds(500)). But when I increase the RPM it fails. The motor can’t turn properly and it’s making weird noises.
I did some research on the Arduino forum and I found that port manipulation might solve the problem, but it didn’t…
Does one of you know the answer?

// Define stepper motor connections:
#define dirPin 3
#define stepPin 4
#define enaPin 5

int steps = 200;

void setup() {
  // Declare pins as output:
  pinMode(stepPin, OUTPUT);
  pinMode(dirPin, OUTPUT);
  pinMode(enaPin, OUTPUT);
  PORTD = 0;
}

void loop() {
  for (int i = 0; i < steps; i++)
  {
    PORTD = B00110000; //make the PUL driverinput HIGH
    delayMicroseconds(350);
    PORTD = B00100000; //make the PUL driverinput LOW
    delayMicroseconds(350);
  }
  PORTD = 0;
  steps = 0;
}

You need to ACCELERATE the motor by increasing the step rate over some period of time, not go all at once.

Paul

Paul_KD7HB: You need to ACCELERATE the motor by increasing the step rate over some period of time, not go all at once.

Paul

I tried this method, but it didn't work. Motor is still locking when it reaches 400 RPM

this might not have to do with your code at all.

stepper motor have a maximum speed that they can run at. This is dictated by voltage used and internal inductance.

Voltage: the higher, the faster you will go, as long as you don’t exceed you driver’s limit in terms of voltage. If your driver accept 36 ou even 48 v, go for it !!

Inductance: this is variable that you can’t do much about. Rule of thumb: cheap motor have higher inductance value than a good one. the smaller the unductance, the faster you can go.

unless you are freakin’ well equiped, you have to rely on the specs of the manufacturer to know that value, and hope that you have a genuine product, otherwise you’ll never know that value.

look online for a stepper motor speed calculator. they will ask a few question like inductance, voltage, step per Rev, etc… and “spit out” your theorical max RPM

I just calculated the max RPM (with data from the datasheet) and the motor can turn with a maximum of 1200 RPM (48V)