0

Stacking Multiple Motor Shields
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Stacking Multiple Motor Shields

by axsevdayan on Sat Feb 23, 2019 4:10 am

Hello, I have a 3d printer project that involves using 17 stepper motors that all need to be run independently, except for 4 of the motors which need to run together. I've been thinking of using motor shield(s) as opposed to individual A4988 Drivers, but I need to know if there are any motor shields that are stackable, compatible with Arduino Mega 2560, and can run motors independently (except for the 4 I mentioned that need to run together). Does such a shield exist or should I resort to using individual A4988 Drivers? Or do you have any other suggestions on how I can get this to work?
Thank you!

axsevdayan
 
Posts: 2
Joined: Sat Feb 23, 2019 4:05 am

Re: Stacking Multiple Motor Shields

by adafruit_support_bill on Sat Feb 23, 2019 8:03 am

Our V2 motor shield is stackable. In theory, you could stack up to 32 of them to control as many as 64 steppers. In practice, however, the i2c bus speed becomes the limiting factor for the aggregate step rate on all the motors. So such a configuration is only workable for applications where the motion is slow and/or only a few motors are moving at a time.

The A4988 drivers have other advantages over the TB6612 drivers used in the shield. The A4988 can handle up to 2A/phase (vs 1.2) and they have current limiting. That give you a much wider selection of compatible motors to choose from.

adafruit_support_bill
 
Posts: 73084
Joined: Sat Feb 07, 2009 10:11 am

Re: Stacking Multiple Motor Shields

by axsevdayan on Fri Apr 12, 2019 11:30 am

adafruit_support_bill wrote:Our V2 motor shield is stackable. In theory, you could stack up to 32 of them to control as many as 64 steppers. In practice, however, the i2c bus speed becomes the limiting factor for the aggregate step rate on all the motors. So such a configuration is only workable for applications where the motion is slow and/or only a few motors are moving at a time.

The A4988 drivers have other advantages over the TB6612 drivers used in the shield. The A4988 can handle up to 2A/phase (vs 1.2) and they have current limiting. That give you a much wider selection of compatible motors to choose from.


Thank you for your reply. I may actually need only 12 stepper motors now but the issue still stands. So ideally i could stack 6 V2 motor shields.
Is there a benefit to using motor shields over indiviual drivers on a breadboard other than convenience? Or does it help in any other way, like helping with voltage or current control?

axsevdayan
 
Posts: 2
Joined: Sat Feb 23, 2019 4:05 am

Re: Stacking Multiple Motor Shields

by adafruit_support_bill on Fri Apr 12, 2019 12:02 pm

The advantage of using the shield is that all communication is via i2c, so you only need 2 GPIO pins.
The disadvantage of using the shield is that all communication is via i2c, so your maximum aggregate step rate is limited by the i2c bus speed.

I did an experiment a while back, I stripped out the microstepping code from the library and increased the i2c clock rate to 400KHz (the default is 100KHz). And the maximum step rate I could achieve with an Arduino UNO was 1161 steps per second. If you have multiple motors moving simultaneously, those steps need to be shared among all the moving motors. If you had all 12 of your motors moving, that would be < 100 steps/second per motor - which translates to less than 30 RPM for a typical 1.8 degree (200 step) motor. That would make for a painfully slow 3D printer.
viewtopic.php?f=31&t=57041&p=292119

Going with individual drivers will allow much higher speeds. But it will require more GPIO pins. The A4988 has built-in microstepping and a step & direction interface. So you only need 2 digital pins per driver. There are a few boards out there with 24 or more GPIO pins. You might want to consider the Grand Central M4: https://www.adafruit.com/product/4064

adafruit_support_bill
 
Posts: 73084
Joined: Sat Feb 07, 2009 10:11 am

Please be positive and constructive with your questions and comments.