25 stepper motors on 1 Arduino MEGA?

Hello everyone,
I am very new to Arduinos and this forum. I have done some searching on how to control stepper motors using specialized stepper motor driver boards and have a few questions. I am very very very new to electronics and have almost zero background in circuits and electricity so please forgive my lack of knowledge. If anything is unclear, I can try to elaborate on anything if you ask. Thank you in advance!

I am creating a project for school in which we need to control 25 motors individually to pull a string with a buoy up and down in precise increments. Our current thoughts were to use stepper motors due to their precision, paired with A4988 stepper drivers on a breadboard, and a single Arduino MEGA. From what I have seen, using an A4988 allows you to control each stepper with two input ports, for step and direction, on the Arduino.

My Questions are:

  1. Will 25 motors + A4988 fit into the Arduino MEGA? I know the mega has 54 I/O's but I am unsure of how the power and ground scenario will work.

  2. Is there anywhere to see how to wire this system using a breadboard? I have seen how to wire one or two but was unsure if it gets more and more complex as more motors are added.Also how big of a breadboard is necessary to fit this?

  3. We will be using an external power source for motors. Is there any the you would recommend for this scenario?

  4. If there is any reference material to connecting a large amount of motors to a single Arduino board, could you please share it with me?

Link to Stepper motors to be used:
https://www.ebay.com/itm/LOT-Nema-17-Stepper-Motor-Bipolar-83-6oz-in-40Ncm-CNC-3D-Printer-Reprap-Robot-/262867898135?var=&hash=item3d3425cf17%3Am%3AmF2MGnnmDdS1SkemVNGWv4w&_trkparms=pageci%253A4c1bb33d-b5d3-11e7-8c98-74dbd1808871%257Cparentrq%253A3b6c5a9915f0ab1c8af3fd9fffff8aa7%257Ciid%253A1

jjzerega:

  1. Will 25 motors + A4988 fit into the Arduino MEGA? I know the mega has 54 I/O's but I am unsure of how the power and ground scenario will work.

You have to power all of them separately, connecting all grounds together (including the Arduino ground). The same power supply may also be used to power the Arduino of course, but you may have to add some filtering due to the electrical noise those steppers are bound to produce.

  1. Is there anywhere to see how to wire this system using a breadboard? I have seen how to wire one or two but was unsure if it gets more and more complex as more motors are added.Also how big of a breadboard is necessary to fit this?

If you know how to wire one, you know how to wire 25 of them. It's just more of the same. A bit of a chore to wire that many, though. Do label your wires and write down which stepper is connected to which pins.

  1. We will be using an external power source for motors. Is there any the you would recommend for this scenario?

One that provides the correct voltage and at least the total amount of current they may draw. As many cheap power supplies are rather overrated, get one that is rated to do 1.5-2 times your total current. So in your case, the motors you linked to take 0.9A x 25 = 22.5A, so you'd need a 30A power supply. Not problem there. But the kicker: these specific motors want 3.96V - never seen that number before, it's a totally non-standard voltage. For that reason I'd suggest you to look for one that can work on a more standard 12V. You'll need the appropriate hardware to drive them, though.

jjzerega:
25 motors individually to pull a string with a buoy up and down in precise increments. Our current thoughts were to use stepper motors due to their 74dbd1808871%257Cparentrq%253A3b6c5a9915f0ab1c8af3fd9fffff8aa7%257Ciid%253A1

Can you describe your project more.

Over water ?

Is this in a tank on land with a mains supply ?

Arduino and control boards will need little current.
Motor supplies may need a lot as you seem to see a need for powerful motors.

Batteries may be an option.

jjzerega:
2. Is there anywhere to see how to wire this system using a breadboard? I have seen how to wire one or two but

breadboard may handle the signals but possibly not the motor current.

Is there anywhere to see how to wire this system using a breadboard?

No, a bread board is totally unsuitable for a project of this scale. Use strip board and solder it. Wire the power in a star configuration, that is power and ground on separate wires, do not chain them.

Why is it that beginners often pick ridiculously large projects to do? It is almost as if you want to fail. Scaling up a project is another skill set you have to learn on top of the "just doing it", which at your level of expertise is hard enough.

The power supply you need is likely to need to supply in excess of 24 Amps. That is a big unforgiving beast.

One thing that you need to think about is the total number of step pulses per second you will need when all the motors are working. It could be that a single Mega is not able to do calculations fast enough.

You need to describe what you want all the motors to do.

...R
Stepper Motor Basics
Simple Stepper Code

This project is taking an equation and graphing it in 3d space. It is not in a tank of water. The fishing buoy is just a cheap way to use a spherical shape on a string. The x and y coordinates are set as the array, 5x5. The code that has been written takes equations and solves for the z coordinates. This z coordinate is then sent to the motors in the form of how far to pull the string up or down.

Robin2:
One thing that you need to think about is the total number of step pulses per second you will need when all the motors are working. It could be that a single Mega is not able to do calculations fast enough.

Thank you Robin2. That is something that I will look into.

Grumpy_Mike:
No, a bread board is totally unsuitable for a project of this scale. Use strip board and solder it. Wire the power in a star configuration, that is power and ground on separate wires, do not chain them.

Why is it that beginners often pick ridiculously large projects to do? It is almost as if you want to fail. Scaling up a project is another skill set you have to learn on top of the "just doing it", which at your level of expertise is hard enough.

The power supply you need is likely to need to supply in excess of 24 Amps. That is a big unforgiving beast.

Grumpy Mike,
Thank you for your input. Unfortunately this is a project for school and wasn't something I intended to just jump in to. I know that this is a complex system and not something simple for a novice like me to accomplish. I am, however, excited to learn more on how all of this works and look forward to doing my own less complicated projects in the future. I will look more into strip boards, power supplies, and star configurations.

Boardburner2:
Can you describe your project more.

Over water ?

Is this in a tank on land with a mains supply ?

Arduino and control boards will need little current.
Motor supplies may need a lot as you seem to see a need for powerful motors.

Batteries may be an option.
breadboard may handle the signals but possibly not the motor current.

BoardBurner2,
Thanks for the input. Please read my first paragraph here and hopefully that will clear things up.

wvmarle:
You have to power all of them separately, connecting all grounds together (including the Arduino ground). The same power supply may also be used to power the Arduino of course, but you may have to add some filtering due to the electrical noise those steppers are bound to produce.
If you know how to wire one, you know how to wire 25 of them. It's just more of the same. A bit of a chore to wire that many, though. Do label your wires and write down which stepper is connected to which pins.
One that provides the correct voltage and at least the total amount of current they may draw. As many cheap power supplies are rather overrated, get one that is rated to do 1.5-2 times your total current. So in your case, the motors you linked to take 0.9A x 25 = 22.5A, so you'd need a 30A power supply. Not problem there. But the kicker: these specific motors want 3.96V - never seen that number before, it's a totally non-standard voltage. For that reason I'd suggest you to look for one that can work on a more standard 12V. You'll need the appropriate hardware to drive them, though.

wvmarle,
Thank you for youre quick response in answering my questions. I will take all of your answers into consideration and also look for a more standard motor. Thanks for catching that!

Thanks to everyone who has taken the time to look this over and answer! I look forward to hearing more from the community and increasing my tiny amount of knowledge on this topic.

3.96V is probably pretty close to the actual output voltage of a typical stepper driver operating from 5V or more.
Also, many stepper drivers need at least 9V.
On the third hand, fancy stepper motor drivers can current-limit the motors even when using a higher-than-rated voltage drive - it standard practice for max step speed...