DRV8825 NEMA17 Motor

I’m relatively new to stepper motor use. I’m using the Pololu DRV8825 driver with an Adafruit NEMA17 stepper motor. The example code and circuits using minimum connections and hard-wiring of the mode pins work fine on both an Arduino Nano and a Raspberry Pi 4. The stepper motor is being used to move a small camera for photography of mineral specimens. Typically, it moves and there may be several minutes delay while I take photos during which the stepper motor isn’t being used but obviously heats up quite a bit. My question is: What is the best way to turn off the power to the motor while it’s not needed, I.e., connecting /using the EN pin, SLEEP pin, or both or something else? (Exact Position holding during the power off is not critical to me as I control the camera focus thru a cable to the camera itself.)
Any suggestions will be greatly appreciated.

Hello.

The DRV8825 driver essentially has 3 options for de-energizing the motor: nRESET, nENBL, and nSLEEP. You can find a description of the differences in the driver’s datasheet, which is linked to under the “Resources” tab of the DRV8825 carrier’s product page.

For the application you descibred, you could probably just use the nEN pin, which disables the output to the stepper motor and ignores inputs on the STEP pin. nSLP would probably work too, as it also disables the output, but it also puts the rest of the board in a low-power sleep state. In either case, the stepper motor will not be holding its position, but it might twitch or move to a slightly different step position when you energize it again; in our tests, using the nEN pin had smaller jumps, but that could depend on your particular motor and other driver settings. There is more discussion about that here.

You mentioned that the stepper motor does not need to hold its exact position in your application, but if you do end up needing that, another option might be switching to the MP6500 carrier with digital current control, which would allow you to reduce the current limit when the stepper motor isn’t moving instead of de-energizing it completely.

Brandon

Thanks for the info and responding so quickly.
I’ll connect the EN pin and test that approach tonight.

Wayne D Mercer, PhD

Use of the Enable pin worked fine with no detectable chatter on start or restart. I did include a 0.1 second delay in the line of code after bringing the enable pin high based on comments I read on someone using an Arduino with a stepper who was experiencing problems with restart after using its STBY function. I’m assuming that’s functionally equivalent to what I did with the Enable pin on the DRV8825. One thing I did notice is when used some different speed intervals that I got a lot of chatter and, in one case using 0.005 (due a typo) chatter and no movement.
In any event, thank you again for the technical advice!

I am glad that worked for you; thank you for letting us know.

By the way, you might have been hitting a resonance point for your stepper motor at the speed you mentioned getting a lot of chatter at. If that is the case, and you need to use that speed, you might be able to get it to run smooth by changing the operating voltage or slightly adjusting the current limit.

Good luck!

Brandon