DRV8825 Disable Home Position Skipping/Workaround?

I have the DRV8825 connected to an Arduino. The Reset pin is attached to one digital pin and the Sleep pin is attached to another digital pin. When I enable them HIGH, the driver starts getting hot even if I’m not running anything.

When I disable and re-enable either of the pins inbetween stepper actions, I get a skip (from the driver skipping to the first home position). My question is how do I stop this? I’m trying not to add more code to the Arduino because my memory is pretty much maxed out.

I’m looking to disable the home skipping and prevent the device from heating up when RESET/SLEEP are high (and the stepper is inactive).

Also, it’s weird, sometimes when I re-enable the RESET/SLEEP I get a skip and other times I don’t get a skip - whenever it skips the steps are off too.

Thanks!

Still trying to figure this out. I hooked up ENABLE too and I’m driving the RESET / SLEEP logic HIGH and then using ENABLE to turn/disable the driver but I’m still encountering the same problem.

Is there some trick where you have to RESET before doing ENABLE or…??

Hello.

I am sorry you are having problems with your DRV8825 stepper motor driver. There should not be any tricks that need to be done before enabling the driver, and toggling the ENABLE pin should not cause the driver to step the motor. Could you please tell me more about your setup? Could you please post your code? What did you set the current limit to? Could you post diagram that shows how everything is connected?

By the way, you should leave RESET and SLEEP pulled HIGH, unless you want to use those functions.

- Jeremy

Hi, I’m using BreakoutJS and controlling the stepper from a web application.

I only want to use one microstep option. Right now, I’m using 32 with MS1 and MS2 driven HIGH with an Arduino logic pin. Another pin drives RESET. And another pin drives SLEEP. The SLEEP and RESET are driven HIGH always (currently). Finally, another pin is connected to ENABLE. The enable pin is activated before the stepper starts and snaps the stepper back into the HOME position and then the stepping proceeds. If I step in a multiple of 4 steps, then I have no problems.

My setup consists of a prototype shield stacked ontop of the Arduino Motor Shield R3 (all jumpers cut, running 2 solenoids).

Here’s my code:

			arduino.setDigitalPinMode(7, Pin.DOUT); // SLEEP
			StepperToggle = arduino.getDigitalPin(7);
			StepperToggle.value = Pin.HIGH;
			arduino.setDigitalPinMode(10, Pin.DOUT); // MS1 and MS2, MS0 FLOATING
			ThirtyTwoStepToggle = arduino.getDigitalPin(10);
			ThirtyTwoStepToggle.value = Pin.HIGH;
			arduino.setDigitalPinMode(4, Pin.DOUT); // RESET
			StepperRESET = arduino.getDigitalPin(4);
			StepperRESET.value = Pin.HIGH;
			arduino.setDigitalPinMode(6, Pin.DOUT); // ENABLE
			StepperEnable = arduino.getDigitalPin(6);
			StepperEnable.value = Pin.HIGH;
			arduino.setDigitalPinMode(11, Pin.PWM);
			arduino.setDigitalPinMode(3, Pin.PWM);
			bPWMPin = arduino.getDigitalPin(11);
			aPWMPin = arduino.getDigitalPin(3);
			aPWMPin.value = 0;
			bPWMPin.value = 0;
			arduino.enableAnalogPin(2);
			StrainSensorA = arduino.getAnalogPin(2);
			//arduino.enableAnalogPin(0);
			//CurrentA = arduino.getAnalogPin(0);
			//CurrentA.addEventListener(PinEvent.CHANGE, CurrentAonChange);
			//arduino.enableAnalogPin(1);
			//CurrentB = arduino.getAnalogPin(1);
			//CurrentB.addEventListener(PinEvent.CHANGE, CurrentBonChange);
			StrainSensorA.addEventListener(PinEvent.CHANGE, FFonChange);
			stepper = new Stepper(arduino, 
                Stepper.DRIVER, 
                1600, 
                arduino.getDigitalPin(8), 
                arduino.getDigitalPin(9));
			stepper.addEventListener(Event.COMPLETE, onStepperComplete);

I just remembered something too… I put this chip in backwards before and didn’t notice any problems with it. Maybe that somehow destroyed the stepper position table?

Also, my current setting is at 1.04V for a 2A / phase stepper.

ALSO: I have a TDS3052C Oscilloscope that I can diagnose the problem with… I’m just not exactly sure how to do it…

In general, connecting a board backwards is a quick way to permanently destroy it. However, the driver still generally seems to be working, so I suspect it is okay. I think what you are seeing is being caused by detent (or cogging) torque. If the coils on the motor are de-energized during microstepping, the detent torque can cause the rotor to realign with magnetic fields from the permanent magnets in the motor (if you rotate the unpowered stepper motor by hand, you should be able to feel it trying to snap into alignment at discrete intervals). Microstepping generally involves using partially energized coils to hold a position between these cogging alignments. If you switch to full-step mode, does the problem go away? I suspect that you might need a solution like what BobS suggested if you want to be able to reduce your coil current while paused on intermediate microsteps.

You mentioned that your current limit is set to 2A; please note, that is beyond what the driver can handle without additional cooling. Also, when posting code, please use the code tags to display your code nicely in your post. I have edited your post to include them.

- Jeremy