A4988 driver causing motor to lurch on startup or stop of motors

I am using 8 a4988 driver carriers to power stepper motors, two of which are nema 17s and the rest of which are nema 8s. As I am using a 24V 3A power supply, I only want to power one motor at a time to limit the current draw, which I am trying to do by setting the enable pin high for all drivers except the one I am using. However, when I set the enable pin low and before sending any step instructions, whichever motor I am using will jolt a bit in one direction, misaligning my system. The same thing also happens when I set the enable pin back to high. Any guesses on what could cause this?

I am using the driver in 1/16th step mode, and I have double checked the current limits on all drivers, and I am controlling the system from a arduino 2560 MEGA with the AccelStepper library.

Hello.

Can you post some pictures of your setup as well as some close-up pictures showing both sides of your boards? Can you also share a video that shows the behavior you are describing? The forum does not allow users to post very large videos, but it does work well with videos linked from other sites (like YouTube or Vimeo).

- Patrick

Here are some admittedly bad pictures of the setup:
20220520_103506
20220520_103533
gWpWDWoDf2bSFrKFSHgzdnl6s.jpeg)
20220520_103556
(Note the enable pin is not currently soldered, as the previous architecture was turning on and off the logic power instead which was causing a similar issue)
The MS1-3 pins are soldered together and set to logic high. Sleep and rst are also soldered and left hanging.

Here is a video of the issue, note at the 4 second timestamp the enable pin is pulled low, there is a 3 second delay, and the step instructions are sent. The “lurch” is happening when the enable pin is pulled low, before any step instructions come through.

https://youtu.be/-va-5KhhXjU

This thread seems to be covering a similar problem:
https://forum.arduino.cc/t/controlling-two-a4988-stepper-drivers-missing-steps-when-using-en-pin/588258

Is it true that disabling any driver will cause the initial position to change when re-enabled? If so, is there a solution to keeping the motors in position without drawing current to all 8 at once? Also, if this is that case wouldn’t it cause movement every time my system is powered on? It would seem very tedious to realign the system every time it was used.

There is generally some motion whenever a stepper motor energizes regardless of the particular driver used, though some drivers do have different methods of being enable that might impact that. There is some discussion about that type of behavior in this thread:

Just going off of the video you posted I am not sure if that accounts for all of the behavior that you are seeing, and I think the answers to your questions mostly depend on the particular motor, driver, and other details of the setup. Unfortunately though, your stepper motor driver was not manufactured by us. (We make our A4988 carriers on green and black PCBs, but not red ones.) That makes it difficult to say for sure what type of behavior you should expect from it, and we cannot help you troubleshoot it since it is likely different than ours.

If you want to try a genuine Pololu A4988, then you can find them on our website, or you can get them from our authorized distributors.

I do have one general recommendation though. It seems like you might not be soldering all of your connections, and some of the soldering on your prototyping board does not look great. Unsoldered connections and poorly soldered connections can cause all sorts of unpredictable behavior, so fixing that might be a good place to start. If you have trouble, the Adafruit Guide to Excellent Soldering is a great resource.

- Patrick