Control 32 stepper motors with pca9685

Hi

how are ayou?, i have not so much experience on arduino, but i would like to control 32 stepper motors ( 28byj-48 with its driver (ULN2003)), and i would like that each motor have independient movement, i´m thinking on use several pca9685, with 1 arduino mega is that possible?, or do you suggest another option?

i have been reading that is possible to use pca9685 and control many servos, but i dont know if it is possible with stepper motor, could you please help me?

well thanks a lot, i really appreciate any help

best regards

You can not use PWM to control stepper motors. Also the old ULN200x are not good driver chips for stepper motors, because such motors consume much current all the time.

Search for "stepper motor driver" and study the options, available with every module. Do you need microstepping? Current limit?

Pay attention to the type of stepper that the modules suggested by DrDiettrich are compatible with. The 28byj-48 is a 5 wire unipolar stepper. The centers of both coils are common so can't be used (unmodified) with the popular DRV8825 or A4988 bipolar stepper modules.

Driving 28BYJ-48 step motor with Pololu A4988/DRV8825 drivers

I never tried it myself, but in theory the voltage at the center tap is always the same (Vcc/2) in bipolar mode, regardless of the applied polarity. This suggests to me that the common center tap can be ignored, at least if no microstepping is used.

Even with "Step and Direction" stepper drivers you are going to need 64 pins to drive 32 steppers. That is more than you would have on an Arduino MEGA. If you don't need high speeds you can use a chain of serial-in/parallel-out shift registers.

Mega has 54+16 pins = 70 IO.
2 for Serial to PC, 64 to steppers, leaves 4 pins for other stuff. Seems like enough, no? I don't know what other control the stepper driver cards need.

I think the MEGA by itself is enuff, control-wise, if you don't need to control more than one motor at a time.
a single pin can be used to set direction (external boost perhaps required due to having 32 external diver chip loads present) and one of 32 others can be used to issue the step signal to any particular motor.
total required: 33 pins
if you use 8 pins in parallel to control direction, with fan-out, then the load on each pin is only 4 motors worth and that might work with no 'external boost' required. 40 pins total for this config