Go Down

Topic: Using 36 VID28-05 stepper motors with Accelstepper library (Read 1 time) previous topic - next topic

chaterrony

Hi Accelstepper-pros

I want to move 36 VID28-05 steppers (72 bipolar stepper motors) using the Accelstepper library and the A4988 driver. The choice for the library is easy at it allows me to control easily the target position, speed and acceleration.
With microstepping each steppers need 4320 inputs per revolution (quite a lot), but without microstepping it is shaky and loud. Max speed per stepper is 0.5 revolution/s = 2160 inputs/s/stepper.

A prototype with 2 of them works well, so I want to expand. Unfortunately the library works only with direct output to a H-bridge (4 pins on arduino needed) or to a driver per stepper (2 pins per stepper). For my 72 steppers I would need 144 outputs only to controll the drivers. For other I/O I need another 10 pins. So this ends up with roughly 160 I/O pins needed... (and I know, this project is not for free, I assume the budget to be 300-500 EUR... this is OK for me, but not 2-3'000EUR  :smiley-cool: )

I have two solutions in mind, but both with their own issues:
A) work with shift registers, but they are probably to slow and the Accelstepper library don't support this output  :-[
B) connect 3 Arduino Mega via I2C. But here I need to write different codes for each Mega what is a nightmare to debug (I did this already on another project with 2 Arduino Micro... I still depressed with this experience  :smiley-sad-blue: )
C) Modify the Accelstepper library to work with shift registers... but I think it's useless to re-invent the wheel ;-)

Am I alone with this problem? Any other experiences or ideas how to approach this project?

Your experience and help is welcome  :D

PaulS

Quote
C) Modify the Accelstepper library to work with shift registers... but I think it's useless to re-invent the wheel ;-)
The library simply needs to bang a pin when it is time to step. Making it bang a pin on the other side of a shift register shouldn't be that big a deal.
The art of getting good answers lies in asking good questions.

chaterrony

Let's hope so that this is not a big deal  :smiley-confuse:
But I can't imagine that I am the only one with this issue? Does anybody else had this kind of problem (many steppers with Accelstepper library) and already found a solution? Otherwise I will need to modify the library. Thanks for sharing any experience you have  :)

MarkT

You can't expect to drive 72 steppers from one small 8-bit microcontroller, its just not fast enough to do the
processing.

What step rates are we talking about?  I suspect you are going to farm off the stepper control to satellite
boards (something small/cheap like Pro Minis?), and coordinate from the master microcontroller via a higher
level over serial or SPI or similar.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

chaterrony

Hi MarkT

Sorry for so long not replying, I had some business work last year which stopped my VID28-05 activities. I now just tried to work with several small boards and it works quite easily! Most important is to have a clear setup from beginning! :-)
So I have (for prototyping) a ProMicro(!) as master which sends the new positions to all slave MCU (Arduino Micro). In the slave I have the Accelstepper library and I drive up to 3 VID28-05 (6 motors). Works very fine! :-) Even with the very low capacity of every MCU!

So, now I finish my prototype with 9 VID28-05. If this work, then I will go for the big version (with all the improvements I seen in meantime...)

Thanks anyway for your toughs, and sorry for this very late reply.

Radicator

Dear chaterrony,

for curiosity could you please show me how do you setup the master-slave comunication?

Thanks

Go Up