I have 4 motors connected to a CNC Shield3v each with its own DRV8825 driver ,2 of the motors are being used for the “Y” Axis ,one connection “A” the other on “Y” how do I get them to move simultaneously without leading or lagging on that “Y” axis ? The Arduino Uno board is a R3.
Try connecting the two control inputs of the two motor drivers to the same two Arduino pins.
Make sure the motors turn in the right direction before doing so. Change motor wirring if they don't.
Leo..
Maybe use protothreads to make the Arduino "think" it has multiple threads?
If you are using GRBL then you would have a problem using Zeepblok's approach.
I would be following Wawa's idea and using a simple dupont splitter.
Just be aware that you would be running more current through the driver so may have to take suitable measurements and precautions.
Bob.
ballscrewbob:
I would be following Wawa's idea and using a simple dupont splitter.
Just be aware that you would be running more current through the driver so may have to take suitable measurements and precautions.
I believe @Wawa was suggesting that the splitter would feed the same signal into two separate drivers. If so there won't be a current problem.
I also believe that if you connect two motors to the same driver they should be connected in series which also solves the current problem.
...R
PS ... if I was using two motors to double the torque I would like them firmly connected to the same shaft so it was physically impossible for them to get out of step.