Reputation: 1
I am building a refreshable braille display using a Pi 3 B+ and a Stepper Motor System.
The system works by rotating an octagonal disc each on 2 different stepper motor to display the appropriate braille lettering (each side on the octagonal disc has a different letter). I want to have multiple sets (at least 2) of this display system (the display system itself requires 2 stepper motors).** Is there any way to control 4+ (or at least 2+) stepper motors to work simulatenously but also independently using the Pi. **
I've done some research and I am wanting to use a unipolar stepper motor (something like this: https://www.amazon.ca/SazkJere-ULN2003-Stepper-28BYJ-48-Compatible/dp/B0BVVMF8DS/ref=sr_1_12?keywords=stepper+motor&qid=1704415148&sr=8-12). But, I don't know how one could wire the ULN2003 control board for the motor with the Pi, and even if I could, it looks like there aren't enough GPiO pins on the Pi to support more than 2 motors.
If anyone has any ideas, please let me know!
Upvotes: 0
Views: 766
Reputation: 2004
I went through a lot of trouble to have RPi (with Python) to drive more than one motor without killing the pace/frequency/PPS. ended up with a library, currently with implementations for DRV8825 or equivalent hardware, a specific motor I'm working with and GenericMotor that you can pass maxPPS at build time. ideally it could run up to 13 steppers, with 2 pins per stepper (either in full step mode or wiring stepping mode pins from drivers to some other hardware driven signal, else you need 5 pins per driver).
I was adding final touches to the README so if you find something hard to follow I'm happy to hear about it.
Hope it helps, I tested with two motors and love the results. (have to use the multiprocess factory class to work with multiple motors so a dedicated python process handles is without your app stealing CPU ticks).
https://github.com/juanmf/StepperMotors/
Upvotes: 0