For a while now I'm working on a project where I want to control 48 stepper motors.

A pair of two [motors][1] is controlled by an Atmega8. All modules are connected as slaves on an I2C/TWI-bus with an Arduino acting as the master device.

A while ago I already posted a [question][2] about power supply issues and got many useful comments regarding ground loops, capacitors and PCB design. The main issue that the Atmega8s are not working properly anymore when I run more than 5 of the motor-control-modules simultaneously.

I've tried to implement most of the suggestions, but still have some questions for possible improvements:

 - Are the large capacitors at the VCC-input as well as next to the motors placed properly?
 - Is the layout of the "power-plane" designed properly?
 - Is the decoupling of the analogue ground any good?

One module with both steppers running takes up roughly 0.5A at the same time. My [power supply][3] should be capably of running all modules at the same time. I'm running a star-topography with thick wires between all modules.

Okay, so here is what the whole thing looks like (I2C-bus/resistors not displayed to keep it simple):
[![system overview][4]][4]


The circuit for each of the modules (0X10 etc.) is looking like this. Some notes about the different sections:

 - The two [motors][1] on the bottom right are connected to the ports PB and PD via [darlington arrays][5]
 - Connected to PC1/PC2 on the top right are two [optical sensors][6] for homing the stepper motors
 - PRG on the bottom is the programming port for the Atmega8

[duostepper_RevC_schematic][7]

The PCB design (40 x 60 mm) I plan to order looks like this. This is not implemented, yet!
[duostepper_RevC_topbottom][8]

[duostepper_RevC_top][9]

[duostepper_RevC_bottom][10]



**UPDATE 2017-04-15:**

I updated the power input section of the schematic with a beefier capacitor, additional 100nF-capacitors and a ferrite bead. I changed the motor-capacitors to 220µF as well.

[![RevD_new_power_input][11]][11]

In the layout, I implemented it like this:
[![duostepper_RevD_all][12]][12]
[![duostepper_RevD_top][13]][13]
[![duostepper_RevD_bottom][14]][14]


  [1]: https://arduino-info.wikispaces.com/SmallSteppers
  [2]: https://electronics.stackexchange.com/questions/250677
  [3]: http://www.meanwell.co.uk/rsp-150-5.html
  [4]: https://i.sstatic.net/Lk6gZ.png
  [5]: http://www.ti.com/product/ULN2003A
  [6]: http://www.vishay.com/optical-sensors/list/product-81147/
  [7]: https://i.sstatic.net/pFJlH.png
  [8]: https://i.sstatic.net/f0uyE.png
  [9]: https://i.sstatic.net/L2g7w.png
  [10]: https://i.sstatic.net/SBX8q.png
  [11]: https://i.sstatic.net/TbatE.png
  [12]: https://i.sstatic.net/sqzqF.png
  [13]: https://i.sstatic.net/oVsHk.png
  [14]: https://i.sstatic.net/tiweh.png