My understanding of bipolar stepper motors is there are 2 coils that control the motor, and to move the motor the coil circuits must be closed. I am trying to make a system with 16 stepper motors that can be selected individually and run off of one motor controller. I only need one motor to run at a time. It seems to me that a plausible way to accomplish this task is to multiplex transistors that either close or open the coil circuits. A stepper motor driver outputs 4 wires (-A, +A, -B, +B). By choosing which coils are connected, I should be able to control each motor one at a time with only having one motor driver.
The transistors can be powered in pairs as to only activate the 2 coils (one motor) which means I would only need to multiplex 16 outputs. Does this seem like a reasonable solution?
You will have a lot of switching to do and that calls for components.
When You disconnect a stepper motor it will have zero holding torqe. They often makes a jump when they receive power again.
I suppose another solution could be having a driver for each motor. Then multiplexing the step output to each driver. This just seems like a lot more money and components to deal with, but if motors tend to "jump" when applying current then in my application it would be best to avoid that. I am just trying to come up with a simple way to only turn a single motor at a time that reduces cost and the amount of pins used.
Multiplexing the dir- and step- signals and each stepper is having its own driver sounds good.
But..... When You select a stepper Dir and Step must have the same states as when You deselected that stepper, or there will a "jump" of some step.
ddodge:
A stepper motor driver outputs 4 wires (-A, +A, -B, +B). By choosing which coils are connected, I should be able to control each motor one at a time with only having one motor driver.
It would be an awful lot easier to have a separate driver for each motor.
If you were to build a multiplexing circuit it would have to ensure that the states of the motors A,B,C,D are held when the system is updating the state of motor E.
Multiplexing signals is easy - multiplexing high current power lines is not, requires switching hardware that can switch the full current the motors take.
Just get a few more driver boards, much cheaper and easier.
If you're running out of pins: give the STEP signal a dedicated Arduino pin so you can control the pulses properly; the EN/DIR/... signals don't change that much and can be done through port extenders or shift registers.
Still not enough pins? Use shift registers for the STEP signal. Those are fast enough for such an operation. I2C based port extenders won't do.
Have you done any experiments with steppers?
If not then I would suggest you do some projects that simply control a stepper so you can get the experience and understanding needed to do your main project.
Can you tell us your electronics, programming, arduino, hardware experience?
Railroader: @wvmarle. Have You tried keeping Step stable and pulse Dir?
Never tried as it doesn't make sense to do so.
DIR is not a pulse - signal is high for one direction, low for the other. I don't expect any motion, as there should not be any motion, when DIR changes state while STEP is stable.