Why is my stepper motor stuttering and experiencing low torque?

Hello, everyone! I'm facing an issue with my stepper motor. I'm currently working on a conveyor belt project using a Nema 17 stepper motor and an A4988 motor driver. However, the torque of my stepper motor is low, and it occasionally starts to stutter. For info, I set the Vref on the current limit of the A4988 to 0.94V and I am using a 12V 2A power supply for the motor driver. I am aware that the stepper motor can only draw a 1A(each) due to the motor driver and that's fine with me. I've conducted research and watched YouTube videos about conveyor belt mechanisms using the Nema17, and it seems like their projects are working fine, while mine is not. What could be the problem and how to fix this?
Here's the specs of my stepper motor:
Standard: NEMA17
Model: KS42STH48-1684A
Dimensions:42mm x 42mm x 48mm (LxWxH)
Step Angle: 1.8°

Rated Current: 1.68A
Resistance:1.65Ω
Holding Torque: ≥0.5Nm
Maximum Temperature: 80°
Ambient Temperature Range: -20 ~ +50°C
Insulation Resistance: 100M - Min. 500V DC
Dielectric Strength: 500V AC for 1 minute
Weight: 349g

The spec says :”
NEMA 17 is a hybrid stepping motor with a 1.8° step angle (200 steps/revolution). Each phase draws 1.2 A at 4 V, allowing for a holding torque of 3.2 kg-cm. NEMA 17 Stepper motor is generally used in Printers, CNC machines and Laser Cutters.“

So it may from time to time power 2phases and needs 4v , so you may have a power supply issue and check the load is not too great for it

It might worth seeing what your software is doing too

That indicates too low current. Check the rated current and driver current limit for each or both coils together.

1 Like

What value is the sense resistor on the driver board? For that value of Vref what coil current do you expect? Note that the max current when both coils are operating will be 42% higher than the max current in either coil. Also because this is a chopper driver the supply current to the 4988 board will be less than the coil current because the driver operates as a buck converter. Try stepping much slower, low torque and stuttering can be symptoms of stepping too fast. These current drivers like the 4988 and drv series operate better at higher voltage, I think 24v should be fine for the 4988.

1 Like

That capacitor on your picture of your setup is shown connected the wrong way round.
Please tell me that is not how you have connected it.

And the real negative end is not connected to ground like it should be.

In fact where did you get that diagram from?

2 Likes

Is capacitor polarity a thing with electrolytic caps only?

Yes.

1 Like

Hi, @Newbie1.1.1

Is this when you have the stepper driving the belt, of just running free?

Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.

Your diagram lacks vital information that a hand schematic can relay.

Can you also post some pictures of your project?
So we can see your component layout.

Thanks.. Tom.. :grinning: :+1: :coffee: :australia:

That is only part of the story. You need to set the A4988 to 1 Ampere or less, steady state, and the correct value of Vref depends on the value of the current sense resistors chosen by the manufacturer.

Post a close up, focused picture of your board, and forum members can tell you what that value is.

If you exceed 1A/winding, the A4988 will overheat and shut down.

Hello, I just based my connection on the Pololu website and my connection is the same with the picture that I provided earlier.
Here's the diagram from Pololu

Did you cleanly solder connections, as recommended, or use a breadboard? If the latter, keep in mind that breadboards are for temporary experiments with low power logic circuits and can't support motor currents. The tracks burn.

Then you must increase the motor voltage up to the maximum for the controller board, which you show as 35 volts.

Here's my code for my stepper motor. Disregard the push button, but for your info, The push button is the start and stop button of the stepper motor. Also, this code is connected to my python program.

#include <AccelStepper.h>

// Define the pins for your A4988 driver
#define STEP_PIN 9
#define DIR_PIN 8

#define STEPS_PER_REVOLUTION 1000

constexpr int maxSpeed = 2000;   
constexpr int runAtSpeed = 200;

// Create an instance of AccelStepper
AccelStepper mystepper(AccelStepper::DRIVER, STEP_PIN, DIR_PIN);

const int startButtonPin = 13;

boolean stepperOn = false;

void setup() {
  // Set the maximum speed in steps per second (200 RPM)
  stepper.setMaxSpeed(maxSpeed); 
  Serial.begin(9600);
}

void handleStepper(){
  if (stepperOn){
    mystepper.runSpeed();
  }
}

void reactOnButton(){
  if (buttonReleased()) {
    if (stepperOn) {
      Serial.println("Button stops");
      stopStepper();
    } else {
      Serial.println("Button starts");
      startStepper();
    }
  }
}

void startStepper() {
  Serial.println("Start received");
  mystepper.setSpeed(runAtSpeed);
  stepperOn = true;
}

void stopStepper() {
  Serial.println("Stop received");
  mystepper.stop();
  stepperOn = false;
}

boolean buttonReleased() {
  static unsigned long lastTime = 0;
  static int lastState = HIGH;
  static int state = HIGH;
  boolean returnState = false;
  int actState = digitalRead(startButtonPin);
  if (actState != lastState) {
    lastTime = millis();
    lastState = actState;
  }
  if (millis() - lastTime > 30 && state != lastState) {
    state = lastState;
    if (state) {
      returnState = true;
    }
  }
  return returnState;
}


void reactOnSerial() {
  // Check for incoming commands from Python
  if (Serial.available() > 0) {
    String command = Serial.readStringUntil('\n');

    // Parse command and move servo motors or stepper motor
    if (command.startsWith("s")) {
      // Move stepper motor
      startStepper();

    } 
    
    if (command.startsWith("p")) {
      stopStepper();
    } 
  }
  // Step the motor continuously
  stepper.runSpeed();
}

void loop() {
  reactOnButton();
  reactOnSerial();
  handleStepper();
  //resetCount();
}


The rated current of my stepper motor is 1.68A. See the specification below:
Standard: NEMA17
Model: KS42STH48-1684A
Dimensions:42mm x 42mm x 48mm (LxWxH)
Step Angle: 1.8°
Rated Current: 1.68A
Resistance:1.65Ω
Holding Torque: ≥0.5Nm
Maximum Temperature: 80°
Ambient Temperature Range: -20 ~ +50°C
Insulation Resistance: 100M - Min. 500V DC
Dielectric Strength: 500V AC for 1 minute
Weight: 349g

The sense resistor of my driver is 100. See the photo below

Should I use a 24V power supply with 2A?? Will it be okay? Or will it damage my driver and stepper motor?

What should the connection look like?

It is driving the belt.

This picture is exactly the same as my circuit. Actually,in my actual circuit connection, it includes other components like push buttons, a servo motor, and LEDs, but I have removed them because my primary concern is my stepper motor. As for the power supply I am using for my motor driver, it's a 12V 2A power adapter. The pin connections to the ESP32 are also the same as those in my actual circuit.

Im sorry, my circuit connection is already soldered in my universal circuit board, and connections are f*cked up, i don't think you can understand that hehe. But the photo that i provided is exactly the same.

It is R100, which corresponds to 0.1 Ohm. For Itrip = 1A/winding, Vref should be set to

Vref = Itrip*8*(0.1) = 0.8V

Hello. I already posted a picture of my driver. It has a 100-sense resistor.

I already soldered it on my circuit board