DIR pin on DRV8825

Hi,

I added a code into my arduino hoping it would change the rotation of my stepper motor.

My DRV8825’s DIR pin is directly connected to Arduino digital pin number 5

pinMode(5, OUTPUT);
digitalWrite(5, LOW); // digitalWrite(5, HIGH);

I tried both code but the direction still didn’t change.

Any help would be greatly appreciated.

Thanks,
Neil

Hello, Neil.

I am sorry you are having trouble controlling that pin on your stepper motor driver. Can you try running the example sketch used in this blog post? That code uses pin 3 for toggling the DIR pin, so you could either temporarily use pin 3 for that, or modify our example to use pin 5.

If that code does not work for you, can you tell me more about your system? Which Arduino are you using? How are you supplying power? What have you set your current limit to? What stepper motor are you using? Also, can you post pictures that clearly show your connections and soldering joints?

-Jon