I have seen many post on this site for controlling stepper motor with arduino. And arduino is pretty good at it if provide with good shield/Driver. My query is How can is use to arduino control more than 2 stepper motors i.e(64 stepper motor). It seems to be a huge project for me. Each motor will move at same speed but won't have same steps. More like MIT inForm

For now we are just making a prototype. I have attached the internal structure of or device where we will be using full stepping mode and only 2 pins for controlling Stepper motor as rest of the 2 pins are just complement of first 2 pins

a  b  a' b'
1  0  0  1
1  1  0  0
0  1  1  0
0  0  1  1

our basic theory/logic is arduino will generate 2 pulse of each motor pass it to serial to parallel converter and this will further send the pulse to PIC that will generate rest of the 2 pulse and pass it to stepper motor. Each pin on arduino will generate pulse for 4 stepper motor i.e. 8 bit per pin. I will be using 28BYJ-48 stepper and ULN2003 having configuration of stepper motor as 64:1 ratio the thing is at what rate I need to send 128 bits(8 words) of data from arduino to shift register. so the motor should run at decent speed So any one can help us to achieve this and guide us with the project. All reviews are welcome.

  • \$\begingroup\$ That looks like a decent start. However, you also need to drive the output register clock, STCP, after you've updated the shift registers. You'll also need to take care that the driver board grounds are ALL tightly coupled to the Arduino. I also recommend you start out just trying to drive 1 board. \$\endgroup\$ Commented Dec 22, 2015 at 3:19
  • \$\begingroup\$ Yes that's for sure after updating shift registers I need to latch the output with STCP. I didn't drew that bcoz it diagram would get messy and difficult to understand.Only confusion I am facing is at what rate I need to send 128 bits of data from arduino to shift register. so the motor should run at decent speed.I have updated my description about which motor and driver i'll be using 28BYJ-48 stepper and ULN2003 \$\endgroup\$ Commented Dec 22, 2015 at 3:25
  • \$\begingroup\$ You are showing a data line to each 595. So you only need to output 16 bytes before you latch your 595s. Or, if you're doing it a word at a time, 8 words. \$\endgroup\$ Commented Dec 22, 2015 at 4:34
  • \$\begingroup\$ You'd be better off making an RS485 + sync module with an ATmega and drivers for 2-4 steppers motors, debugging it, and making a dozen or so of these boards identical in all but an address byte or jumper. Then you queue up operations in them and use the strobe line to keep everything synchronized (if you don't feel that you can adequately trigger off packets to a "broadcast" address.) If you really want to drive that many motors from one "controller" you should probably be looking at FPGAs, especially as you will be able to get finer grained timing than typically possible with a micro. \$\endgroup\$ Commented Dec 22, 2015 at 5:20
  • \$\begingroup\$ @ChrisStratton Can you please elaborate "RS485 + sync module with an ATmega" part or can provide a reference for the same.It seems to be efficient way for controlling. \$\endgroup\$ Commented Dec 22, 2015 at 8:02

1 Answer 1


I will preset a differnet approach that i would use if i where you:

1- Use a SPI or I2C based stepper motor driver like NCV70521 , L6470 , DRV8811 or similar ICs , this will save you from writing the commutation software for the stepper motor ( if micro-stepping is needed ) . These also work in full and half step mode.

2- Focus on the protocol of communication :

a- if SPI is choosen (easiest , but you will require 64 pins (chip select) , offcourse you could you decoders / demultiplexer and similar logic ICs to derease the number of needed pins from the microcontroller.

b- if I2C is choosen , then 2 pins of the microcontroller are enough to control all these motors ( SDA and SCL ) but you have to configure different address for each driver.

the advantage of this mode is that the speed or steps are send serially as commands. In your approach you might face some problems in speed , if want to toggle pins at high speed arduino digitalWrite might not be suffcient.

  • \$\begingroup\$ Indeed you provided a good approach but using I2C based controller are very expensive to use for this many amount of motors. I was think to connect pic12f629 pic's to arduino via i2c bus. But it seems that it doesn't have one. Is there any way to do it.It would be more or like similar approach as yours. \$\endgroup\$ Commented Dec 23, 2015 at 1:53
  • \$\begingroup\$ which one doesnot seem to have an i2c port ?? arduino offcourse have an i2c port on pins a4 and a5 , pic12f i donot know check the datasheet , but why pic 12f ?? if it is for the price , there is cheap pic16 and pic18 and for sure they have i2c port , or buy the atmega chip at328 it is cheap and burn it with the arduino bootloader so you can program it easily using arduino software , you might need to borrow or buy a ISP programmer to do this. \$\endgroup\$
    – ElectronS
    Commented Dec 23, 2015 at 8:28
  • \$\begingroup\$ Arduino have i2c port. Pic12f doesnt have one. I'll look for an alternate pic as u mentioned pic16 or pic18. And get back to you. Can you suggest pic either 16 or 18. \$\endgroup\$ Commented Dec 23, 2015 at 8:35

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.