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);
}