Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

DRV8825 & Stepper Motor

I’m trying to run the stepper motor #1478 with the DRV8825 and not getting any response. I have the devices wired as shown on the DRV8825 and am using a 3.3V Sparkfun ProMicro to control it. I have the sleep and reset pins of the 8825 connected to the RAW pin on the PRO Micro that s showing 4.9 volts.The ProMicro is powered via USB from my PC. Code is copied below. I have the current limit set to 1.5A (0.75Vref). When I apply power the motor makes noise and vibrates and sounds like it is attempting to move but I do not get any motion. If I disconnect one of the motor phases I do get some motion in the correct direction (clockwise, then counterclockwise) but it is very erratic and not consistent. Any help would be appreciated. Solder joints are clean and proper. I have everything connected thru two breadboards. Images below.

I did initially try to run the system without the 100uF cap in place but have since added it. Would this have caused any damage?

// 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(3000);
digitalWrite(stepPin, LOW);
delayMicroseconds(3000);
}

delay(1000);

// Set the spinning direction counterclockwise:
digitalWrite(dirPin, LOW);

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

Hello.

I am sorry you are having problems with your DRV8825 carrier. If you are getting some movement, it is unlikely to be damaged, but it could still be possible. It is probably fine to tie SLEEP and RESET to RAW, but I recommend using a regulated voltage (such as VCC) instead.

Can you post some pictures of your complete setup showing all connections (including the motor)? Also what are you using as a power source?

-Derrill