I've designed a PCB to run two stepper motors from an Atmega8. With my current implementation, I can however only run two of these PCBs at the same time.

In this picture you can see the overall structure of the project. One PSU (5V, 10A) is supposed to run all modules. The Arduino talks to each Atmega via I2C and has it's own power supply over USB. (I left out the SDA/SCL lines to reduce the clutter)

Each of the "duostepper"-modules mainly consists of an Atmega8 and two 28YBJ-48 stepper motors. There's also two ULN2003s and ports for two optical sensors, an AVR-programming port and the I2C/TWI-connection on there. To make it more compact, I designed a PCB to have all ports together.

The schematic: PCB schematic

This is the board layout. I'm using the I2C/TWI-port at the top to feed 5V/GND and then connect each PCB with the next one. There is no power jack on there. From my power supply I'm currently just using a breadboard to get 5V/GND to the first module and GND to the Arduino. PCB layout

One module runs very smooth. Even two run okay. Now I started to build up 6 modules and suddenly only one of the modules runs smoothly. All others are either are having trouble with their steppers.

To me it looks as if the modules are not running in parallel but in series. However, I don't know what changes are required to fix this. Did I miss something crucial on the PCB?

edit3: I've updated the schematic and the board. new schematic new board

  • 4
    \$\begingroup\$ With six running, what is your PSU voltage? At each node? And put a current meter in circuit to see how much you are drawing. \$\endgroup\$
    – Tyler
    Aug 4, 2016 at 15:27
  • 1
    \$\begingroup\$ @Tyler 6 modules connected, all 12 stepper motors are trying to move, but none actually does. I'll copy the voltages into the main post due to formatting. \$\endgroup\$
    – dhst
    Aug 4, 2016 at 15:37
  • 4
    \$\begingroup\$ If you really connected the boards like in the first drawing (daisy-chaining the supply lines) you might have a problem with supply voltage drop if the supply wires are not thick enough. 10 A is a lot of current, you need a reasonably thick wire to minimize voltage drop in the supply lines (both ground and Vcc). Also it is better to use a star type power distribution (all wires come together at one point with a thick connection to the supply). \$\endgroup\$ Aug 4, 2016 at 15:40
  • 5
    \$\begingroup\$ You would need an oscilloscope to measure the VCC line in a meaningful way. Multimeter is waaaay too slow here. \$\endgroup\$
    – Turbo J
    Aug 4, 2016 at 15:50
  • 2
    \$\begingroup\$ Tut beat me to it. Thick power cables directly from the supply to each stepper board (go for a star topography not daisy chain). And if you make a new version of those stepper boards make the following changes: Add a power input port. Far thicker power and ground traces between the power port and anything to do with the motors. WAY more capacitors, one by each sensor port, one by each motor driver, one on the input and some big ones next to the motor connectors. \$\endgroup\$
    – Andrew
    Aug 4, 2016 at 15:54

1 Answer 1


I am surprised that this would work at all. There are open GND and (A)VCC pins that are required to be connected for the MCU to work correctly.

Atmel has an appnote how to wire the power lines on their chips, you need 100nF for each VCC/GND pair close to the pins. AREF should be wired to an 100nF capacitor with its other pin connected to GND.

  • 5
    \$\begingroup\$ "Well it works fine when it's not doing anything" is not a justification for a lack of bypassing capacitors. \$\endgroup\$
    – Andrew
    Aug 4, 2016 at 15:57
  • 4
    \$\begingroup\$ How about 100uF between all of the power and ground pins at every board? \$\endgroup\$
    – Daniel
    Aug 4, 2016 at 16:47
  • 1
    \$\begingroup\$ You need both! Think about the giant gulps of power the motors take when the bridges switch, and the tiny but much faster gulps of power the micro takes when it does....stuff. Loading your power supply with 600uF probably isn't ideal at startup, but if it has a decent soft-start circuit, that should probably be fine. \$\endgroup\$
    – Daniel
    Aug 4, 2016 at 18:32
  • 1
    \$\begingroup\$ Also, with this daisy-chain setup, I suspect your ground is getting trashed by the time the I2C gets to the far side. I2C is not a very good board-to-board protocol, IMO \$\endgroup\$
    – Daniel
    Aug 4, 2016 at 18:33
  • 1
    \$\begingroup\$ @dhst When it comes reservoir caps, go big or go home. You won't hurt anything by having a big reservoir cap, but you can still experience flakey operation with too small of one. \$\endgroup\$
    – CHendrix
    Aug 4, 2016 at 19:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.