DRV8825 doesn't work with arduino uno and NEMA11

Hello,
I am trying to do a project with Arduino Uno, DRV8825, and NEMA11, but after the wiring it doesn't work. There is some humming, but the motor doesn't move. The wiring
I am using 24 volts DC power supply and the Vref is set to 0.3 volts.
the code:

/*Example sketch to control a stepper motor with A4988/DRV8825 stepper motor driver and Arduino without a library. More info: https://www.makerguides.com */

// Define stepper motor connections and steps per revolution:
#define dirPin 2
#define stepPin 3
#define stepsPerRevolution 200

void setup() {
  // Declare pins as output:
  pinMode(stepPin, OUTPUT);
  pinMode(dirPin, OUTPUT);
}

void loop() {
  // Set the spinning direction clockwise:
  digitalWrite(dirPin, HIGH);

  // Spin the stepper motor 1 revolution slowly:
  for (int i = 0; i < stepsPerRevolution; i++) {
    // These four lines result in 1 step:
    digitalWrite(stepPin, HIGH);
    delayMicroseconds(2000);
    digitalWrite(stepPin, LOW);
    delayMicroseconds(2000);
  }

  delay(1000);
}

NEMA 11 tells us only the size of the motor mounting plate.

Please post the rest of the motor details, a wiring diagram with pins and connections clearly labeled, and explain how you chose and set the current limit on the motor driver.

As for the code, start with slow stepping motion. I suggest to change this

    digitalWrite(stepPin, HIGH);
    delayMicroseconds(2000);
    digitalWrite(stepPin, LOW);
    delayMicroseconds(2000);
  }

to this:

    digitalWrite(stepPin, HIGH);
    delayMicroseconds(10);
    digitalWrite(stepPin, LOW);
    delay(200);  //5 steps/second
  }

I think this is the motor:

Since the current rating is 0.67A, I referred to this guide:

Which says that Vref should be (Current Limit)/2, so I set it to 0.33V. I checked it by connecting multimeter to the logical ground pin of the driver and potentiometer.
I hope this wiring diagram works. Part of this project was done by someone else, so I have to connect it through d-sub.

The diagram appears to be OK, if you have followed it faithfully. Test the setup with just one motor, wired directly to the motor driver. The mess on the right hand side of the wiring diagram is uninterpretable.

Is the stepper power supply capable of delivering at least one Ampere?

Note that breadboards are designed for temporary experiments with low power logic circuits. The tracks cannot support motor currents and tend to burn, which in turn, leads to loose connections that can instantly destroy the motor driver.

That also means that you MUST NOT switch connections to the motor while powered up, which further calls into question the intention of the multiple connections on the right side of the wiring diagram.

1 Like

Did you buy the DRV8825 from Pololu? If not, the Vref numbers may be different.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.