Powering arduino and steppers

Hi

For a camera gantry I need to connect stepper motors, drivers and limit switched to the controller. I need to minimize the numbers of connections from the gantry to the Arduino.

The drivers need 5v, the steppers 12v+. Can I power the gantry with 12v+ and use a step down converter to 5v for the drivers (combining the GND). Is connecting that (combined) GND to the Arduino GND enough to get a common ground? The Arduino will also get a connection to the same 12v+ power supply and another step down converter.

So in the end I would get 2x step, 2x dir, 2x limit switch, 1 GND = 7 connections from the gantry to the Arduino.

Also, some diagrams show a 4.7uf cap between the V + GND of the 12v input. Is this something I need to do on one driver, both drivers or not at all?

I have included a simple layout of the gantry connections.

Thanks

Here's my recommendation:

The connections to the gantry are the motor wires and the switch wires only...

The stepper drivers are put next to the Arduino so they get reliable step pulses (which are logic signals that will not take kindly to paralleling with the noisy 12V stuff at all, nor can they travel any distance without reflections and runt pulses making your life a misery (double clocking, fried driver inputs, etc). Run the step/dir/ground wires as a bundle or twisted set between Arduino and each driver, one bundle for each driver. Run the 12V supply to each driver as twisted pair and keep away from the Arduino.

If feasible use twisted pairs for each winding of each stepper, similarly for the switch wire pairs. Keep the 12V away from the Arduino. Add 100nF caps across the switch pairs at the Arduino end to kill noise spikes induced on them from the motor wiring. No part of the circuit should be connected to the gantry metal work at any point, other than if they both happen to connect to mains protective earth (the ground might be so wired depending on the power source).

The pullup resistors for the switches should be 1k or 2k2 sort of value (don't rely on the internal pullups which are weak and not highly noise resistant).

There is only one 5V supply needed, for the Arduino and driver logic supplies, this should be a clean 5V. Beware of trying to use the drivers with 5V present and 12V absent - this is not a good idea with many driver chips.

Thank you Mark!

I have made a new layout - would you please take a look at that?
I assumed that with ‘clean’ supply for the Arduino you mean something like a 9v battery and not the same power supply that I intend to use for the steppers?

And this worries me a bit:

Beware of trying to use the drivers with 5V present and 12V absent - this is not a good
idea with many driver chips.

This could happen while setting up or running out of battery etc. Is there a way (besides not running out of battery power) to prevent any problems?

And the pullup resistors, are they not good enough for the limit switches or any switch (because I have some more on the Arduino side).

Would it be a problem to put the steppers together in an 8 pin (mini) din cable and the 2 switched in a 4 pin din cable?, the way it is now I would need 12 connections from the controller side to the gantry.