Max weight NEMA17 stepper can lift via motor shaft

I have played a lot with ULN2003 stepper driver boards and 28BYJ48 stepper motors in last months.

Yesterday my first NEMA17 stepper motor and A4988 driver arrived.
The Usongshine NEMA17 I bought has 0.13Nm toque according Amazon:
https://www.amazon.com/Usongshine-Stepper-Bipolar-Extruder-17HS4023/dp/B07TY4BFF2
But Amazon states that it should be powered with 4.1V which does not work, but 12V does work.

I found an experiment showing that 28BYJ48 stepper motor has 0.03Nm torque:

I have some 0.54$ 3mm to 5mm couplers from Aliexpress.
Since the NEMA17 motor has 5mm motor shaft diameter as well, I added coupler, M3x25 screw and nut.
That way I have a linear actuator

I did use the circuit connection as described here, but without capacitor and without potentiometer:

Therefore I did not connect MS1/MS2/MS3. According to datasheet low/low/low should do full stepping, for my NEMA17 stepper motor with 200 steps per revolution:
https://pdf1.alldatasheet.com/datasheet-pdf/view/338780/ALLEGRO/A4988.html

What I see is different, exactly 800 steps per revolution. I verified that by bringing motor shaft into a defined position, then doing 32000 steps, and verifying that shaft did turn 40 full rotations, and motor shaft ends in same position where it started.

I used this code with Arduino Uno for testing.
After input of “steps,speed,repeat” the stepper speed is set, and then repeat times with delay 100ms stepper.step(steps) is executed:

#include <Stepper.h>
Stepper stepper(200, 2, 3);

void setup() {
  Serial.begin(9600);
}

void loop() {
    Serial.print("steps,speed,repeat? ");
    while (!Serial.available()) { delay(50); }

    int steps = Serial.parseInt();
    Serial.read();    
    int speed = Serial.parseInt();
    Serial.read();    
    int repeat = Serial.parseInt();
    if (Serial.read() == '\n') {
      Serial.print(steps);
      Serial.print(",");
      Serial.print(speed);
      Serial.print(",");
      Serial.println(repeat);
      for(int i=0; i<repeat; ++i) {
        stepper.setSpeed(speed);
        stepper.step(steps);
        delay(100);
      }
    }
}

I used a Nylonthread, and that can carry 2kg.
Because I planned for 5kg, I used three threads in parallel.
I opend coupler screw on motor shaft side, inserted the three threds and fixed the screw.
On the other end I did a knot around a 29g foldable shopping bag.

First I did compute which weight should be able to be lifted with 0.13Nm and 2.5mm lever.
I was impressed that the motor should be able to lift 5.3kg via its motor shaft:

$ echo "scale=3; 0.13/(0.0025*9.81)" | bc -ql
5.306
$

Yesterday I did test with 336g sample weight and that worked fine:

Today I tested with 1045g fizzy water bottle (inside 29g bag), and even that failed.

Next tried from low to high, and reached 798g water bottle.
Running “8000,1000,1” worked fine (upwards 10 full revolutions at speed 1000).
Even then “-16000,1000,1” worked fine, completely go down and up on other side again.
But “800,1000,1” then failed. What also failed from start position (bottom most) is “4000,300,1” with speed 300,

I went down and with 506g bottle “800,1000,10” and then “-800,1000,10” worked fine.
Even repeatedly, and the 100ms pause between repetitions is the hard part.
Adding 6g with lego pieces “800,1000,10” from lowest position failed.
Therefore 506g+29g=535g seems to be pretty maximal weight that works

That is a factor of 10 away from what I computed above.
What did I compute wrong?

I cannot believe that the stepper would have only 0.013NM, because even the cheap 28BYJ48 has 0.03NM as demonstrated in the youtube video pointed to above,

This are 10 frames from 30fps 640x480 smartphone video where stepper motor does stepper.step(1) repeatedly, played at 1fps. In the middle you can see motor shaft turning quickly into wrong direction for 1045g water bottle. The embossed frame indicates end of the frames, before animation repeats:

TLDR ... sorry, I'm lazy.

Although it does not say so the figure of 13 Ncm is probably the holding torque - that is the maximum that the motor can resist when it is powered but not moving. The torque when the motor is moving will always be lower and will decline significantly as speed increases. A higher supply voltage, up to the maximum acceptable to the driver, will give more torque at speed. Make sure to adjust the driver's current limit to match the motor or the higher voltages will cause the motor to overheat.

If you want to move a heavy load with a stepper motor it is normally necessary to accelerate it up to speed, just as with a DC motor. The standard Stepper library does not do acceleration.

...R
Stepper Motor Basics
Simple Stepper Code

also look up the AccelStepper library

Thanks -- I used AccelStepper lib before.

I forgot to mention the current seen on my constant voltage power supply.
I did set it to 12V with 1A max.
Default value is 251mA.
While doing "8000,1000,1" (10 full revolutions up) it increases to 317mA in between.
Doing "-8000,1000,1" the (10 full revolutions down, speed 1000) it decreases to 231mA.

I increased voltage to 18V now and tried with 1045g water bottle.
"6400,1000,1" works, as well as "-6400,1000,1" then.
"800,1000,8" fails (repeat 8 full revolutions up, with 100ms delay in between).
"800,300,8" fails as well.
Current keeps below 200mA all the time with 18V.

Is there a maximal voltage that should not be exceeded?

HermannSW:
I forgot to mention the current seen on my constant voltage power supply.
I did set it to 12V with 1A max.

I have never had one of those myself but I think you need to set the power supply for lots of amps and use the stepper driver to limit the current. Otherwise I think the driver and the power supply will both be trying to control the current and confusing each other.

Current keeps below 200mA all the time with 18V.

How are you measuring the current - I think you would need an oscilloscope as the stepper driver will be adjusting it during each step pulse.

Is there a maximal voltage that should not be exceeded?

Usually the driver is the limiting factor. IIRC the A4988 can work at 35 volts, but be sure to check the datasheet.

...R

To what value did you set the extremely important current limit on the A4988 driver?

but without capacitor

Bad idea. Voltage spikes may eventually destroy the A4988 driver.

Note that radial shaft loads will reduce the available torque and may cause excessive bearing wear.

Robin2:
How are you measuring the current - I think you would need an oscilloscope as the stepper driver will be adjusting it during each step pulse.

The constant voltage/current power supply displays both, voltage and current:

There is no switch to change between C.V and C.C modes, the mode is determined by limiting factor.
With 7.0V 1.0A setting, the 7V is limiting (constant current) and 0.466A is measured.

The stall assumption for 0.13Nm is not correct as well.
If I put three water bottles into the bag (>3kg), bag immediately drops.
If I put in two full bottles, and a third bottle weighing 352g, motor keeps (non-moving) bag high (2474g in total).

I did change voltage max down to 6.1V, and te bag keeps up.
Going to 6.0V, the A4988 stops working and bag falls to ground.
I changed voltage from 6.5 to 12.5 in 0.5V steps and measured the current.
Basically the power keeps constant:

jremington:
To what value did you set the extremely important current limit on the A4988 driver?

How do I set that?

Bad idea. Voltage spikes may eventually destroy the A4988 driver.

Agreed, but I got three A4988 for 3.65$ from amazon, if I break one I will use capacitor with the next.

Note that radial shaft loads will reduce the available torque and may cause excessive bearing wear.

OK, this is my first NEMA form factor stepper, so I tried to learn/understand torque value and implications. Radial shaft load is not the use case I am after, and I will stop doing when having enough insight.

Pololu explains how to set the current limit on their drivers here: Pololu - Video: Setting the Current Limit on Pololu Stepper Motor Driver Carriers. The details for your clone will probably be different.

For the details on ANY chip, including the A4988, consult the chip data sheet. It explains all about the current limit.

Until that is set correctly, your motor will not behave as expected.

HermannSW:
The constant voltage/current power supply displays both, voltage and current:

That is only going to show the average current while the motor is moving.

The minimum voltage for an A4988 is 8v according to the Allegro datasheet.

The Pololu A4988 webpages have good information about setting the current limit and other matters. See also this Thread about setting the current limit

...R

HermannSW:
I have played a lot with ULN2003 stepper driver boards and 28BYJ48 stepper motors in last months.

Yesterday my first NEMA17 stepper motor and A4988 driver arrived.
The Usongshine NEMA17 I bought has 0.13Nm toque according Amazon:
https://www.amazon.com/Usongshine-Stepper-Bipolar-Extruder-17HS4023/dp/B07TY4BFF2
But Amazon states that it should be powered with 4.1V which does not work, but 12V does work.

Stepper’s don’t have a voltage. They are current driven. The key electrical parameters are current, inductance and resistance. The inductance is the main deal, limiting the speed, and the higher the supply voltage and lower the inductance the faster the motor will turn. The resistance tells you how much heat is generated in the windings by I-squared-R.

Thanks, the pololu page and its video on current limiting are very informative.

Therefore I did not connect MS1/MS2/MS3. According to datasheet low/low/low should do full stepping, for my NEMA17 stepper motor with 200 steps per revolution:
A4988 pdf, A4988 description, A4988 datasheets, A4988 view ::: ALLDATASHEET :::

What I see is different, exactly 800 steps per revolution. I verified that by bringing motor shaft into a defined position, then doing 32000 steps, and verifying that shaft did turn 40 full rotations, and motor shaft ends in same position where it started.

Pololu page and A4988 datasheet describe:
"MS1 and MS3 have internal 100kΩ pull-down resistors and MS2 has an internal 50kΩ pull-down resistor, so leaving these three microstep selection pins disconnected results in full-step mode."

This is the mode I see in experiments withh 800 steps per full revolutiion;

MS1 MS2 MS3 Microstep Resolution
Low High Low Quarter step

Unfortunately the amazon page does not point to any datasheet. Perhaps the clone I have has MS2 pull-up and not pull-down -- I will test with explicitly connecting MS2 to GND, if that results in 200 steps per revolution this seems to be the case.

I found a page with the details (incl. current limiting) for an A4988 that visually looks like the ones I have:

Just to be sure I bought one additional original Pololu A4988 on ebay.de which will arrive on Friday, so that I can use the Pololu page directly:
Pololu - A4988 Stepper Motor Driver Carrier

For setting the current limit correctly, you MUST know the value of the current sense resistor used on the PCB. It varies from seller to seller, with 50 or 100 milliOhms being common.