I am building a gimball for a project which needs to acurately change position in yaw,pitch and roll. For this i am using 4-phase stepper motors. This one: 28BYJ-48 Stepper Motor with ULN2003 Driver.

The company already has multiple arduino mega's and uno's laying around, and want me to use them. So is it possible to connect the 18 motors(4 wires which need pins) to the arduino Mega with a shield or another accessory? or is it maybe possible to use multiple arduino's on one serial port and code? I need to be able to use each motor seperately, and each motor gives back feedback after changing positions or when it starts moving. The motors move by input from the user via the serial port and also return the messages via the serial port.

Other options are also welcome

  • 2
    Not to be a bummer here, but I would probably go for some standard Nema steppers and common driver boards, like A4988. The 28BYJ-48 motors are not accurate or fast or strong. And with a driver like A4988 you only need 2 pins for controlling it (direction and step), while the ULN2003 requires you to use 4 pins and set the phases manually.
    – chrisl
    Apr 2 at 12:36
  • 2
    With 2 pins per motor a mega would have enough pins, though it depends on further requirements, if it will be fast enough to handle all of them simultaneously. Though maybe you could also distribute the steppers between multiple microcontrollers, if you hit a limit there. Currently your question is rather broad. Maybe at this early stage the Arduino Forum would be a better place to ask, instead of this Q&A site.
    – chrisl
    Apr 2 at 12:40
  • okay thanks for the advice! Apr 3 at 13:40

1 Answer 1


Yes, it's possible to work with 18 steppers just with one Arduino board. But it requires some basic knowledge of electrical circuits and integrated chips.

You can use some very cheap CD4000 integrated chips, like buffers and shift registers. The shift register makes you able to increase the number of pins on your Arduino board. The buffer will keep logic levels on steppers that you are not currently working with.

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.