Problem getting more than 0.3 amps out of A4988 or TB6600 drivers.

So I have a Nema 17 rated at 44Ncm, and a Nema 23 which is rated for ~160Ncm, and then I have a L298N driver, a A4988 driver, and a TB6600 driver. The problem I am having is that when I using the A4988 or the TB6600, I can't get it to pull more than about 0.26 amps; the torque is really bad.

With the L298N driver I get good torque, and I can see on my power supply that it's supplying 2 amps (what I've currently limited it to), when it runs (or even just holding). The L298N has 4 wires going from the the controller to the arduino, and I run it using the Stepper library:

#include <Stepper.h>

const int stepsPerRevolution = 200;
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);

void setup() {
  myStepper.setSpeed(200); //revolutions per minute
}

void loop() {
   if (Serial.available() > 0) {
      int steps = Serial.readString().toInt();
      myStepper.step(steps);
      Serial.print("Stepped: ");
      Serial.println(steps); 
    }
}

This is great, but the L298N is only rated for about 2 amps, so I don't want to push it past that. I can run the Nema 23 on this same setup, but I don't get any extra torque, because I'm limiting to 2 amps at the power supply.

When I switch to the A4988 or the TB6600 I get the same results (whether I am driving the Nema 17 or the 23). Whether I set the power supply to 12 or 24v, the power supply says it's only pushing about 0.26 amps, and the torque isn't there.

Based on all the youtube videos I've watched, it seems you only control the driver via 2 signals, pulse, and direction. I've tried the examples from the accelstepper library, and I've also tried going library-less with similar results:

const int stepPin = 3;
const int dirPin = 4;

void setup() {
  pinMode(stepPin, OUTPUT);
  pinMode(dirPin, OUTPUT);
  digitalWrite(dirPin, HIGH);
}

void loop() {
  for (int x = 0; x < 2000; x++) {
    digitalWrite(stepPin, HIGH);
    delayMicroseconds(500);
    digitalWrite(stepPin, LOW);
    delayMicroseconds(500);
  }
  delay(1000);
}

I'm running both drivers in full step mode. I've tried playing with the speeds, and making sure I'm not going to fast, but even when just holding, I would expect to have something close to 2 amps with all of these drivers when driving the Nema 17. I've tried playing with the potentiometer on the board, and that doesn't seem to make any difference. If I play with the current limiting switches on the TB6600, I can make the board pull less current, but not more. It seems that 0.26 amps is about the max.

Is there some fundamental I am misunderstanding? Or any ideas of the next steps to troubleshoot this? I've ordered a couple DM542 drivers, but I'm not really holding my breathe.

Thanks!

What is your power supply voltage? What is the motor's winding resistance? NEMAxx only specifies the dimensions of the motor's mounting face, nothing about it's electrical characteristics, not even that it's a stepper motor.

Coil resistance is ~2.7 ohms on the Nema 17, and on the Nema 23 it's ~0.9 ohms. I'm running it at 12 volts, but I've also tried the Nema23 with 24 volts, with the same result.

Be VERY CAREFUL never to connect or disconnect the wires between the motor and the stepper driver while the driver is powered up. The driver will be instantly destroyed.

How have you adjusted the current limit on the stepper motor drivers?

It sounds like you are using an adjustable power supply. Have you set a current limit on it? I think the current limiting on a power supply and on the stepper drivers can fight with each other. Try setting the power supply current limit to its maximum - and I think it would need to have a maximum that is 2 or 3 times the max set on the drivers.

...R

Thanks for the tip! The motors still work if I swap tot he L298N driver, so I don't think I've destroyed them (yet).
I do have a current limit set on the power supply to 2 amps. I'll try increasing it to 8 amps or something to see if that does the trick (and try to dig up a wall supply as well).

the power supply says it's only pushing about 0.26 amps

That reading is very misleading.

The motor and drivers together act like a switching buck regulator, so the average motor current can be much higher than the average power supply output current.

crobertsbmw:
Thanks for the tip! The motors still work if I swap tot he L298N driver, so I don't think I've destroyed them (yet).

I was warning against destroying the drivers, not the motors.

...R

crobertsbmw:
Coil resistance is ~2.7 ohms on the Nema 17, and on the Nema 23 it's ~0.9 ohms. I'm running it at 12 volts, but I've also tried the Nema23 with 24 volts, with the same result.

What are the current ratings for the motors? That's all you need to know to configure
the stepper drivers (A4988, TB6600). My guess from the motor sizes is 1.3A and 3.5A
respectively.

These low impedance motors are not suitable for voltage drive at all, give up on the L298
driver as you'll only cook it or the motors trying to get it to work, and top speed will be
very low.

12V and 0.26A is 3W, which is a bit low for most NEMA17's, and much too low for a NEMA23,
suggesting you haven't set the current correctly on the stepper drivers, or that you've
fried them (as mentioned this will happen if you don't studiously avoid playing with the
motor wires when the motor driver is powered up - this will fry it immediately, as will
any dodgy lash up where the wiring to the motor isn't rock-solid.)

I'd expect a NEMA17 to pull about 4 to 5W, and these stepper drivers are perhaps 70%
efficient so I'd expect about 7W pulled from the supply. NEMA23's are more like 10W

For instance there are NEMA17 steppers rated at 1.7A, 1.7ohms, so power is I^2 R = 5W.

Stepper drivers are power converters, so power out = power in x efficiency. The output current
is not the same as the input current (typically much larger).

BTW many breadboard hookup wires you can buy will not be reliable at these currents,
and breadboards aren't designed for it either...

Interesting. So I'm testing the Nema 23 right now, and I have the power supply at 24 volts, and the power supply shows it's doing .432 amps, which is 10.36 watts, which is right on your estimate. So maybe everything is working as expected. I guess I'd have to do something a little more scientific to test that the torque is where it should be. I just assumed that I wouldn't be able to turn this thing with my hands when it's powered on. I have one of those small couplers on it which puts me about half an inch. Holding torque of 10 lb/inches, so that's like 20 lbs of force. I don't really go to the gym, so...

So the diameter of the coupling is 1 inch and radius 1/2 inch? Hold the motor with shaft horizontal, wrap 5 or 6 turns of string around the coupler, energize the motor without stepping and see if you can lift 20 lbs with the string without pulling the motor out of step.

So I 3d printed a one inch arm for the nema 23, and have it hooked up to the TB6600. I attached a bucket with some cord, and I then started weighing down the bucket. After the motor couldn't hold, I weighed everything and it came to about 85 ounces, which is half of what I was expecting. The datasheet says this thing has 1.2Nm holding torque (10.63 lb-in).

I noticed that I have the current limit set to 2.8 because the datasheet has it listed as 2.8 amps per phase. Should that number actually be doubled because there are two coils? Do I need a larger driver that can do 5.6 amps to get the maximum amount of torque out of this motor?

Do not double the current. If the coil current spec is 2.8A, set the driver to 2.8A (or less).

The holding torque should be roughly right, but don't expect precision. It is suspicious
that the torque is half the rating, but this might be chinese exagerated specifications (very
common I'm afraid).

My calculation is mass = 2.5kg, force = 24N, lever arm = 0.0254, torque = 0.6Nm

I'm tempted to wonder that one of the windings isn't connected properly??

I can see alligator clips in those pics - I'd not risk such a lash-up with a stepper driver,
dodgy connections can destroy the driver instantly. Screw terminals or soldered - no risk
of intermittency...

this might be chinese exagerated specifications (very common I'm afraid).

The driver is a cheap chinese one, but the stepper is the StepperMotorOnline one, which looks to be pretty reputable.
Today, I'm going to run the same tests with the Nema17 and see if I get similar results. I'll also try swapping the power supply.

Thanks again for all the help everyone. I appreciate the support.

So I had a theory that maybe it just needed more voltage. The variable power supply shows 12W at 32 volts (the max my power supply can do) and 9.6W at 24 volts. I ran the same test at 32 volts on the power supply, and I was able to get about 105 ounces. But now I think that that that's just margin of error of my tests.

I swapped over to the Nema 17 thinking that this driver should be able to easily supply all the power it needs. I set up the same experiment, and I measured about 35 ounces at one inch whether I had the power supply set to 12v or 24 volts. 12volts shows 9.3watts and 23 volts shows 10watts. My guess is that the extra wattage is just heat dissipation from the driver being less efficient.

But one thing I did notice is that it causes the motor to hiss quite loudly when it's at 12 volts rather than 24 volts. At 24 volts it's pretty quiet.

I'm starting to lean toward the idea of this driver just isn't that great, and hoping that DM542 is going to show up soon.

The hiss is noise from the current chopper, which will be higher frequency with higher supply
voltages (ie beyond the range of hearing). This noise comes from imperfections in the sensing
of current internal to the driver affecting the current feedback loop and ends up as jitter in the
switching waveform - its normal in any motor driver control loop, and it is a reason ultrasonic
switching frequencies are generally preferred.