# Controlling many stepper motors? beginner!

**URL:** <https://forum.arduino.cc/t/controlling-many-stepper-motors-beginner/1228155>\
**Category:** Motors, Mechanics, Power and CNC\
**Created:** [February 25, 2024, 3:25am UTC](https://forum.arduino.cc/t/controlling-many-stepper-motors-beginner/1228155 "2024-02-25T03:25:52Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![tristar500](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/tristar500/32/1047179_2.png) [@tristar500](https://forum.arduino.cc/u/tristar500)\
**Post date:** [February 25, 2024, 3:25am UTC](https://forum.arduino.cc/t/controlling-many-stepper-motors-beginner/1228155/1 "2024-02-25T03:25:52Z")

</div>

My goal is to use a dozen or so stepper motors to move a kinetic sculpture from pro-programmed routines.  
I'm not new to steppers or drives and have built several CNC machines over the past few years.

I'm looking for a suggestion on what Arduino to buy to get familiar with the basics, learn the programming language, and integrate with step/dir signals to stepper drives.

Any suggestions for a complete newbie to Arduino?

Thanks in advance everybody and looking forward to participating in the forums!

---

<div class="post-metadata">

**Author:** ![DaveX](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/davex/32/751443_2.png) [@DaveX](https://forum.arduino.cc/u/DaveX)\
**Post date:** [February 25, 2024, 3:34am UTC](https://forum.arduino.cc/t/controlling-many-stepper-motors-beginner/1228155/2 "2024-02-25T03:34:15Z")

</div>

Here's a a simulation of several coordinated steppers on a mega:

> **[GcodeCNCDemo6AxisRAMPSMega.ino Copy - Wokwi ESP32, STM32, Arduino Simulator](https://wokwi.com/projects/390478474763185153)**
>
> Run IoT and embedded projects in your browser: ESP32, STM32, Arduino, Pi Pico, and more. No installation required!

For a dozen or so steppers you might want two dozen or so pins.

---

<div class="post-metadata">

**Author:** ![bobcousins](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/bobcousins/32/221530_2.png) [@bobcousins](https://forum.arduino.cc/u/bobcousins)\
**Post date:** [February 25, 2024, 9:29am UTC](https://forum.arduino.cc/t/controlling-many-stepper-motors-beginner/1228155/3 "2024-02-25T09:29:40Z")

</div>

> [@tristar500](#):
>
> I'm looking for a suggestion on what Arduino to buy to get familiar with the basics, learn the programming language, and integrate with step/dir signals to stepper drives.
> 
> Any suggestions for a complete newbie to Arduino?

A Mega with RAMPS shield will give quick access to 6 steppers, but adding more steppers is really a matter of wiring. In theory a Mega could handle 30 steppers, but depending on processing requirements it might start to run out of steam.

At one time I designed some modular stepper "shields" which could drive many steppers mainly for 3D printers, but for most 3D printers they don't need that many steppers. Kinetic sculptures are perhaps a niche application which require lots of motors.

For practical purposes, if you have a lot of motors it is better to have multiple modules that each handle a few motors. Then the modules are connected in a comms network.

---

<div class="post-metadata">

**Author:** ![jim-p](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jim-p/32/922840_2.png) [@jim-p](https://forum.arduino.cc/u/jim-p)\
**Post date:** [February 25, 2024, 9:47am UTC](https://forum.arduino.cc/t/controlling-many-stepper-motors-beginner/1228155/4 "2024-02-25T09:47:38Z")

</div>

Buy something cheap like an UNO clone.

---

<div class="post-metadata">

**Author:** ![DaveX](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/davex/32/751443_2.png) [@DaveX](https://forum.arduino.cc/u/DaveX)\
**Post date:** [February 25, 2024, 3:44pm UTC](https://forum.arduino.cc/t/controlling-many-stepper-motors-beginner/1228155/5 "2024-02-25T15:44:20Z")

</div>

> [@tristar500](#):
>
> a dozen or so stepper motors to move a kinetic sculpture from pro-programmed routines.

One good calculation would be to figure out how many steps per second your whole set of motors will require, and to size your uC based on that.

If you need to do 48 steppers at 100RPM and 1/32 microstepping, you would need to manage 512000 steps/sec, which won't fit into a Uno with AccelStepper.

---

<div class="post-metadata">

**Author:** ![tristar500](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/tristar500/32/1047179_2.png) [@tristar500](https://forum.arduino.cc/u/tristar500)\
**Post date:** [February 25, 2024, 3:56pm UTC](https://forum.arduino.cc/t/controlling-many-stepper-motors-beginner/1228155/6 "2024-02-25T15:56:59Z")

</div>

I'll only be controlling 10 or twelve at most for this project.

---

<div class="post-metadata">

**Author:** ![cedarlakeinstruments](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/cedarlakeinstruments/32/1128931_2.png) [@cedarlakeinstruments](https://forum.arduino.cc/u/cedarlakeinstruments)\
**Post date:** [February 25, 2024, 4:41pm UTC](https://forum.arduino.cc/t/controlling-many-stepper-motors-beginner/1228155/7 "2024-02-25T16:41:34Z")

</div>

I'm going to be a bit of a contrarian here and go in the opposite direction 🙂  
Since wiring will likely be a serious consideration, and hardware is **cheap** , maybe it would be simpler to use a dozen separate stepper controllers.

An ESP8266 running AccelStepper library and a a basic stepper driver (e.g., TB6600) is all you need to control one motor and the communication/coordination between motors can then be wireless over Wi-Fi. This means that you now only need to supply power to each node.

---

<div class="post-metadata">

**Author:** ![tristar500](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/tristar500/32/1047179_2.png) [@tristar500](https://forum.arduino.cc/u/tristar500)\
**Post date:** [February 25, 2024, 5:00pm UTC](https://forum.arduino.cc/t/controlling-many-stepper-motors-beginner/1228155/8 "2024-02-25T17:00:23Z")

</div>

Yes, motors and especially drives have gotten cheap. space is no problem as this is a large stationary sculpture with plenty of room for the smarts.

I've built over a dozen CNC machines of various types, Mill, Router, laser, etc so very familiar with the hardware and wiring.  
Where I'm weak (nearly non-existent ) is how to get a program on a microcomputer and familiarize myself with writing code that is specific to the machine controller.

Usually, it's a matter of drawing a part in CAD, then generating G-code with a CAM program then loading to Mach 3 (machine control software) and running the file.

---

<div class="post-metadata">

**Author:** ![tristar500](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/tristar500/32/1047179_2.png) [@tristar500](https://forum.arduino.cc/u/tristar500)\
**Post date:** [February 25, 2024, 5:01pm UTC](https://forum.arduino.cc/t/controlling-many-stepper-motors-beginner/1228155/9 "2024-02-25T17:01:32Z")

</div>

I went ahead and ordered this off of Amazon. $35.99 and here tomorrow. I should be able to learn the basics with it?

[https://www.amazon.com/gp/product/B01D8KOZF4/ref=ppx\_od\_dt\_b\_asin\_image\_s00?ie=UTF8&psc=1](https://www.amazon.com/gp/product/B01D8KOZF4/ref=ppx_od_dt_b_asin_image_s00?ie=UTF8&psc=1)

---

<div class="post-metadata">

**Author:** ![cedarlakeinstruments](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/cedarlakeinstruments/32/1128931_2.png) [@cedarlakeinstruments](https://forum.arduino.cc/u/cedarlakeinstruments)\
**Post date:** [February 25, 2024, 5:04pm UTC](https://forum.arduino.cc/t/controlling-many-stepper-motors-beginner/1228155/10 "2024-02-25T17:04:33Z")

</div>

Here's an example of an ESP32 processor with a 1.2A stepper driver module. ESP32 supports Wi-Fi and BLE (bluetooth): [[EOL] ATOM Stepper Motor Driver Development Kit (DRV8825) | m5stack-store](https://shop.m5stack.com/products/atom-stepmotor-kit?variant=35581062709412)

If this could all be done with G-code, then I'd suggest getting an arduino (just about any kind will do I think) and loading grbl onto it, then using a G-code editor to send commands, but the problem with this is how to coordinate 10 such drives. I assume they need to move in a coordinated fashion?

---

<div class="post-metadata">

**Author:** ![cedarlakeinstruments](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/cedarlakeinstruments/32/1128931_2.png) [@cedarlakeinstruments](https://forum.arduino.cc/u/cedarlakeinstruments)\
**Post date:** [February 25, 2024, 5:16pm UTC](https://forum.arduino.cc/t/controlling-many-stepper-motors-beginner/1228155/11 "2024-02-25T17:16:33Z")

</div>

Yes. It has a very basic stepper driver (UNL2003) but you will be able to run motors with it. Just don't expect high performance (super smooth stepping at high speeds, etc.).

However, you can use it to learn how to control stepper motors, and if you decide that you can do what you need with g-code, it will also run grbl.

---

<div class="post-metadata">

**Author:** ![tristar500](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/tristar500/32/1047179_2.png) [@tristar500](https://forum.arduino.cc/u/tristar500)\
**Post date:** [February 25, 2024, 6:35pm UTC](https://forum.arduino.cc/t/controlling-many-stepper-motors-beginner/1228155/12 "2024-02-25T18:35:54Z")

</div>

Yes, most definitely a coordinated movement. I could create a point cloud in CAD and generate G-code from that.  
I want to be able to have all the motors running in unison so I can get wave-like motion effects.

---

<div class="post-metadata">

**Author:** ![Wawa](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/wawa/32/1211303_2.png) [@Wawa](https://forum.arduino.cc/u/Wawa)\
**Post date:** [February 25, 2024, 7:03pm UTC](https://forum.arduino.cc/t/controlling-many-stepper-motors-beginner/1228155/14 "2024-02-25T19:03:05Z")

</div>

The 28BYJ-48 is a good/cheap motor for starting kinetic sculptures, if you're happy with it's low speed (\<12RPM). I posted code on this site to drive in theory about 150 of these at full speed with a single classic Nano (Uno R3) and a bunch of TPIC power shift registers (two motors per TPIC). Also on this site is a practical application with 48 of these motors. Use the search field on top of this page. Don't start this before you have gained some experience with Arduino and coding.  
Leo..

---

<div class="post-metadata">

**Author:** ![tristar500](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/tristar500/32/1047179_2.png) [@tristar500](https://forum.arduino.cc/u/tristar500)\
**Post date:** [February 25, 2024, 7:09pm UTC](https://forum.arduino.cc/t/controlling-many-stepper-motors-beginner/1228155/15 "2024-02-25T19:09:52Z")

</div>

Typically a stepper moves 1.8 degrees per step.(pulse) direction is determined by a high or low signal to step driver.

LAWRENCE FEIR SCULPTOR  
[www.lawrencefeir.com](http://www.lawrencefeir.com)  
336 274-4846

---

<div class="post-metadata">

**Author:** ![cedarlakeinstruments](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/cedarlakeinstruments/32/1128931_2.png) [@cedarlakeinstruments](https://forum.arduino.cc/u/cedarlakeinstruments)\
**Post date:** [February 25, 2024, 7:33pm UTC](https://forum.arduino.cc/t/controlling-many-stepper-motors-beginner/1228155/16 "2024-02-25T19:33:16Z")

</div>

> [@DaveX](#):
>
> 10 or 12 axis gcode would be something new

Not if each axis has its own controller like I'm proposing. Then you're just dripping g-code to the X-axis but sending it to 10 different controllers.

I like the idea so much I may prototype it myself!

---

<div class="post-metadata">

**Author:** ![DaveX](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/davex/32/751443_2.png) [@DaveX](https://forum.arduino.cc/u/DaveX)\
**Post date:** [February 25, 2024, 7:45pm UTC](https://forum.arduino.cc/t/controlling-many-stepper-motors-beginner/1228155/17 "2024-02-25T19:45:00Z")

</div>

I meant that I wondered if the steppers had to turn their shafts back and forth within 180° (100 steps), as on a wall installation pivoting panels, or maybe, looking at that link, joints on a figure through an arc. (360°=200 steps? or 360° geared to be 10000 steps? etc... )

I think the mathematics and synchronization for "wave like motion effects" could possibly be done with a FastLED animation, but with an extra routine after the FastLED.show() step. A routine something like a to-be-written "stepperShow()" could 1:1 translate the 24-bit/16 million color pixel color information from a coordinated `leds[NUM_LEDS];` matrix into 0-255/0-65535/0-16777216 stepper positions, or into changes towards those positions.

> **[ColorPalette - Wokwi Arduino simulator](https://rp2040-pre-optimize.preview.wokwi.com/arduino/libraries/FastLED/ColorPalette)**
>
> Run Arduino library code examples in your browser, using advanced simulation technology.

---

<div class="post-metadata">

**Author:** ![DaveX](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/davex/32/751443_2.png) [@DaveX](https://forum.arduino.cc/u/DaveX)\
**Post date:** [February 25, 2024, 7:47pm UTC](https://forum.arduino.cc/t/controlling-many-stepper-motors-beginner/1228155/18 "2024-02-25T19:47:43Z")

</div>

> [@cedarlakeinstruments](#):
>
> Then you're just dripping g-code to the X-axis but sending it to 10 different controllers.

Then I'd think the 10-axis coordinated movement would have to happen before it gets translated and distributed into the separate controllers' X-axis Gcode receivers.

---

<div class="post-metadata">

**Author:** ![cedarlakeinstruments](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/cedarlakeinstruments/32/1128931_2.png) [@cedarlakeinstruments](https://forum.arduino.cc/u/cedarlakeinstruments)\
**Post date:** [February 25, 2024, 7:54pm UTC](https://forum.arduino.cc/t/controlling-many-stepper-motors-beginner/1228155/19 "2024-02-25T19:54:11Z")

</div>

Yes, the motion would be preplanned and sent out at an appropriate interval. Doing it over wi-fi should be more than fast enough to keep everyone synchronized (guessing here).

---

<div class="post-metadata">

**Author:** ![tristar500](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/tristar500/32/1047179_2.png) [@tristar500](https://forum.arduino.cc/u/tristar500)\
**Post date:** [February 25, 2024, 8:16pm UTC](https://forum.arduino.cc/t/controlling-many-stepper-motors-beginner/1228155/20 "2024-02-25T20:16:03Z")

</div>

currently, the plan is to use geared steppers to run a series of small winches that will reel and unreel on command thus raising and lowering components of the mechanism.

---

<div class="post-metadata">

**Author:** ![tristar500](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/tristar500/32/1047179_2.png) [@tristar500](https://forum.arduino.cc/u/tristar500)\
**Post date:** [February 25, 2024, 8:22pm UTC](https://forum.arduino.cc/t/controlling-many-stepper-motors-beginner/1228155/21 "2024-02-25T20:22:12Z")

</div>

AsI mentioned before I'm well versed on the mechanical side of things and have a shop full of CNC machines I've built over the years.

All of the code I've written in the past 30 years has been for a CNC machine controller (Mach3, 4 )  
I'm assuming there is some program run on a PC to write a program and then upload to the Arduino?  
A truck bearing a smile will be here with my Uno3 tomorrow. I'm bracing for the learning curve.

[Next page](https://forum.arduino.cc/t/controlling-many-stepper-motors-beginner/1228155.md?page=2)
