Hi. What would be the best way to control multiple stepper motors ? Only one motor will run in the same time and it will run on button press.
The reason why am struggling with this is because i dont have much chip pinouts left so i was thinking that there is maybe some adapter board which could do the job.
I have 8 pins left and that's just for two motors. My goal is to run 30 motors. If i hook them in parallel, how do i know which is the right one etc.
Is there any way to do this or do i have to go with bigger pin out count ?
How many wires for one stepper? You could use (2/3/4?) for the motor drive and then use the others to multiplex the output. (0,0,1) connects to motor one, (0,1,0) to motor 2, (0,1,1) to 3 etc... That's going to take a bunch of multiplexing chips... (analog switches)
You could also code it in time (some number of pulses)... but that's even more complicated.
While I can't help with your actual problem, please remember that driving multiple stepper motors or multiple relay coils in parallel will require a *huge* peak current from the power supply, which will in practice require staggering the current peaks to various loads and hence multiple output pins.
I am aware of the peak current problem, but thank you for suggestion.
How many wires for one stepper? You could use (2/3/4?) for the motor drive and then use the others to multiplex the output. (0,0,1) connects to motor one, (0,1,0) to motor 2, (0,1,1) to 3 etc... That's going to take a bunch of multiplexing chips... (analog switches)
If you use unipolar motor drivers (and 5 or 6 wire motors), and don't require the non-moving motors to resist any torque tending to turn them, then you could probably use one stepper driver and four diodes connecting it to the windings of each motor. You would need a switch per motor to connect the centre tap of the windings of just that motor to the positive supply. You would need 5 pins and a decoder to drive those
30 switches.
This would be a low-performance solution but might be the cheapest, depending on the relative prices of different kinds of motors and the price of stepper driver chips.
Well then there would be 4 left over for multiplexing. (that gives you 16) If you could make one or two of those four wires common to all motors, then you could do more.
There are not enough pins to directly multiplex that many motors if you need four wires for step driving.
How much time do you have available for control?
You could use one of those driver chips, for each motor, that require just a direction signal and a pulse. You will need the gated enabled type of driver like the UCN5804B or similar per motor and enough logic to operate the /OE pin on each chip from the remaining 6 lines. So it would be doable.
Your software will need to track the individual motor states to minimise unwanted motions.
--
********************************************************************
Paul E. Bennett IEng MIET.....
Forth based HIDECS Consultancy.............
Mob: +44 (0)7811-639972
Tel: +44 (0)1235-510979
Going Forth Safely ..... EBA. www.electric-boat-association.org.uk..
********************************************************************
You haven't said what it is that has insufficient pins, but I assume it's a microprocessor.
One solution would be to put one small microprocessor in charge of each stepper, and network them all together with something simple (RS-485 and a protocol that involves a network address for each node comes to mind). Then not only do you not have the "insufficient pins" problem, you have the opportunity to easily expand the number of steppers up to 255 (assuming that the master gets to have its own address).
--
Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
A stepper usually has 4 states, which takes 2 bits. That leaves 6 bits, enough to select 64 motors. So an adapter board could work. For a unipolar 4-coil motor, you could decode 2 bits into 1-of-4 pulldown, and 5 bits into 1-of-30 pullup, and some diodes.
But the board maybe can't be such simple static logic and drivers. If you de-energize a 200 step motor, it tends to fall back into a 50-step detent position, which may or may not be a problem for you. That will be a problem for any scheme that energizes one motor at a time.
--
John Larkin Highland Technology Inc
www.highlandtechnology.com jlarkin at highlandtechnology dot com
Precision electronic instrumentation
Den torsdag den 26. juni 2014 14.54.26 UTC+2 skrev en2:
get 30 of these:
formatting link
2 of these:
formatting link
one shared pin to all drivers for direction one shared pin to step on driver 1-14 via mux one shared pin to step on driver 15-30 via mux four pins to select mux output
You have a choice of using SPI/I2C IO expander chips but I think that would get messy.
I think the better choice would be to make a small PC board that contains the driver FETS for the motor and a small uC that you can talk to via a SPI line. Some pins can be used to have a dip switch selection to set ID for example and the remainder can then be used to drive the motor FETS etc.. I like this because you can then put some hybrid functions in the chip to lets say, tell it to step 10 places forward or reverse or run at some constant speed or just inc/dec a position. SO with this option, you make a small PC art work and send that off to the PCB fab house and get a pile of those and populate them with the needed components to operate a stepper motor via a serial line.
On your main CPU, you may need to have a buffer driver to drive up to 30 of these but you can talk to these by ID number and send a command to each motor board.
This is basically a drop bus method of talking to all these devices with minimum resources. The only problem with this is, it could be a little slow on response time, you may need to max out the COM speed if you are trying to synchronize things on a faster level.
If they're unipolar motors fit diodes in series with the poles and swith the common of the motor you want to run live to select which you to run, parallell the dioded pole leads across all the motors to 4 common pole drivers
seven pins is enough,
4 to drive the poles, three to drive a long Johnson counter to select which motor you want, (see the CD4017 datasheet for how to count higher than 10, - 4 CD4017s should get you a maximum count of
these thngs were cheaper last time I looked, they're about a buck each now, (although half that in moderate quantity) a bigger microcontroller would make more sense if it adds enough pins and anly costs a few dollars more.
if you only ever wish to operate a single motor at one time you probably want to go with unipolar motors as it's simpler to share drive components (reducing the number of wires by by about 3/4 and the overall complexity by even more )
that chip looks tiny, I don't know what size of stepper motors it can handle, and the board seems unsuited for unipolar drive, which means you'll need one board per motor.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.