What can I do to increase torque & prevent my stepper motor from skipping steps?

I’ve built a set of three electric roman shade curtains that are powered by nema 17 stepper motors connected to three big easydrivers and a Arduino nano. Everything in the system is connected to a 5V power supply.

It almost works, but the issue I’m having is that the steppers occasionally skip steps when pulling the curtains up, and are not quite strong enough to fully lift the curtains up as much as I would like. Retracting the curtains downwards however works fine since gravity aids the motion in that direction.

So essentially my question is: What can I do to increase the torque of the stepper motors?

So far I have turned the potentiometers on all big easydrivers to deliver maximum current and disabled microstepping on the drivers.

To control the steppers (make N steps) I’m using this code:

void moveNsteps(unsigned long N, unsigned long MicrosecondsBetweenSteps, int stepPin){
  unsigned long ci = 0;
  unsigned long t0 = 0;
  while (ci < N){
    unsigned long t1 = micros();
    if (t1-t0 >= MicrosecondsBetweenSteps) {
      t0 = t1;
      // Move motor one microstep.
      digitalWrite(stepPin, HIGH);
      delayMicroseconds(1);
      digitalWrite(stepPin, LOW);
      delayMicroseconds(1);
      ci += 1;
    }
  }
};

I have experimented a bit with different step delay times (the MicrosecondsBetweenSteps variable) and found that the delay can greatly influence both the noise of the motor and the power. Currently I’m using 2112 microseconds. Values significantly greater (over ~4000) or lower (under ~1000) seems to cause more skipping. The 2112 value is found with trial-and-error.

Is there a way of knowing which delay time produces the highest torque without trying thousands of values?

Or is there a superior code implementation of moving the stepper that produces more torque than my moveNsteps function?

Thankful for any advice!

The available torque from a stepper motor falls off sharply as speed increases. The maximum torque is available when the motor is stationary. Using a higher motor power supply voltage will improve torque at higher speeds. The better motor manufacturers publish performance graphs and it may be useful to view some of them to get a sense of how torque varies with speed and voltage.

Accelerating the motor up to (and down from) the top speed can usually allow a higher speed to be reached without missing steps. Have a look at the AccelStepper library, or if you prefer to write your own code have a look at this Simple acceleration code.

Other options are to use reduction gearing or a more powerful motor.

If you want more advice please post a link to the datasheet for your motor, tell us what stepper motor driver you are using and give details of your motor power supply (volts and amps).

...R
Stepper Motor Basics
Simple Stepper Code

Robin2:
The available torque from a stepper motor falls off sharply as speed increases. The maximum torque is available when the motor is stationary. Using a higher motor power supply voltage will improve torque at higher speeds. The better motor manufacturers publish performance graphs and it may be useful to view some of them to get a sense of how torque varies with speed and voltage.

Accelerating the motor up to (and down from) the top speed can usually allow a higher speed to be reached without missing steps. Have a look at the AccelStepper library, or if you prefer to write your own code have a look at this Simple acceleration code.

Other options are to use reduction gearing or a more powerful motor.

If you want more advice please post a link to the datasheet for your motor, tell us what stepper motor driver you are using and give details of your motor power supply (volts and amps).

...R
Stepper Motor Basics
Simple Stepper Code

So in theory, decreasing the MicrosecondsBetweenSteps variable, i.e. pausing longer between steps, should always increase the torque? Because that is strangely enough not what I’ve experienced in my setup.

The motor is a Hanpose 17HS4401. The only datasheet I have been able to find is this one, but sadly it doesn’t include any graphs.

The driver is a sparkfun big easydriver (x3).

And the power supply is a 5V 8A AC/DC adapter.

If nothing can be done in the software to increase the torque would it help if I bought a 12V power supply instead of my current 5V supply? Or is that unnecessary at low speeds? I never need the motors to run at high speeds, just as silently and as powerfully as possible.

The BigEasydriver uses the A4988 stepper driver which is probably over-stretched by your 1.7 amp motor. A DRV8825 would be a better choice.

A 5v motor power supply is completely unsuitable. The Allegro A4988 datasheet says the minimum is 8v. I suggest that 12v is the practical minimum and 18v or 24v would be better. Make sure to adjust the current limit on the stepper driver to protect your motor.

Even if you cannot find the performance graphs for your motor I reckon it would be instructive to search out graphs for a somewhat similar motor from another manufacturer.

...R

Fundamental
Power supply voltage should be 5 times the motor nameplate voltage.

Write that down. Put it in bold letters.

Picking a voltage out the air is not engineering.

Related concept.
You are flying at 100 mph.
Into a 120 mph wind.

#2
Smoothness of the pulse stream is paramount to not missing steps.

Experiment
Run down hill as fast as you can
Every 10th step pause for a moment.

Steppers are not rocker surgery but if you don't have the fundamentals you will have problems

1 Like

Robin2:
The BigEasydriver uses the A4988 stepper driver which is probably over-stretched by your 1.7 amp motor. A DRV8825 would be a better choice.

A 5v motor power supply is completely unsuitable. The Allegro A4988 datasheet says the minimum is 8v. I suggest that 12v is the practical minimum and 18v or 24v would be better. Make sure to adjust the current limit on the stepper driver to protect your motor.

Even if you cannot find the performance graphs for your motor I reckon it would be instructive to search out graphs for a somewhat similar motor from another manufacturer.

...R

I found a 12V power supply and tried replacing the 5V supply with it. It made a world of difference! Now it seems to work fine. Thanks for the help!

petters:
So far I have turned the potentiometers on all big easydrivers to deliver maximum current and disabled microstepping on the drivers.