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:
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:
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: