Hey!
During the last days I’ve been working on driving multiple stepper motors (28BYJ-48 – 5V) with SparkCore and Stepper.h arduino library. I’m trying to drive some stepper motors, but without having to move them at the same time. I mean, stepper1 moves 100 steps, once finished, stepper2 moves 30 steps, and so on.
In the explanation I’ll use two steppers.
The point is that I have some doubts of how to do it using the less ICs and easier as possible.
Option 1 (it works)
The first try was using a CD54/74HC137 (3-to-8 Line Decoder Demultiplexer with address Latches) and a CD4508B ( CMOS Dual 4-Bit Latch).
Workflow:
Stepper.h library is configured to work with D0-D3 pins.
- D0 to D3 pins are connected in series to both CD4508B input pins (dual latch).
- The decoder enables or disables the input pins of CD4508B, in order to choose the stepper that I want to move.
- In Stepper.cpp library, each time that sends an step, I enable the two strobes of the CD4508B.
- The outputs of CD4508B are connected to ULN2003A IC (darlington transistor array) that will drive the stepper.
So, every CD4508B can drive 2 stepper motors. All CD4508B input ports recieve the same inputs and the same strobe (they are in series) and using the demultiplexer I enable/disable one or the other input port and I move one or the other stepper.
I’ve tried it and works perfect, but I think that it could be easier and could be done without CD4508B. So here is my second option.
Option 2
I’m thinking in connecting directly D0-D3 to both ULN2003A (or similiars) input in series and using the CD74HC237 demultiplexer enable/disable the ULN2003A.
The point is that ULN2003A has not enable/disable pin so I’m afraid it won’t be so easy. I’ve found a darlington transistor array IC with a latch that could do it well: TLC59213
I’ve phoned some electronic shops and do not have it. They said it’s a strange IC.
So, what to do you think is the best choice? I think that option2 could do the job, but the TLC59213 is not easy to find, perhaps another IC that could do it as well. Any suggestions will help.
Thanks.