Multiplexing Stepper motors

Hi everyone,
In an effort to free up some pins on my Uno, I’ve come up with a multiplexing schematic for the three stepper motors. This hopefully allows me to free up 5 pins, drive all three motors from one ULN2004a, and drop one of the control IC’s. The idea is to drive all three motors with the same ULN2004a outputs, but control via NPN transistors which of the motors motor actually have 5v provided in order to actually obey those outputs. I understand that the trade off is that I’d be only able to control one motor at a time, which if acceptable for this project.

I’d like some input if what I’ve built drawn out is practical before I start pulling apart my breadboard and re-writing code.

Two drawings attached - before and after the multiplexing.


Very cool! You could probably drive 4-5 tiny 28BYJ motors with only 4+n pins and 1 IC. As long as they were going slow. These motors don't need any power between steps because of the 64:1 gear drive. They could all move at the same time! Independently controlled.

The resistors R5 to R7 at 1K are going to severely limit the current you can get through your motor to 5mA at the maximum. Driving an NPN transistor like this is not a good idea. Make it a PNP transistor, with the emitter to +5V and collector to the motor and don't have a resistor, apart from putting one in line with the base and arduino output.

The only problem I can see is if you switch onto a motor and the energisation of the coil were not the same as when it was last on. This could give it a small kick that would upset the position of the motor you thought you had.

Might be simpler to get several ATtiny2313's and program them to do the step sequence - they then drive the transistors and you would need 2 Arduino pins per motor.

Here is some of the explanation of what I did and how I went about it.,84809.0.html

It can be done with Arduino, or if you want faster speeds you could use Assembly - If you are interested I can get you the .hex files.