Driving Multiple Stepper Motors

Discussion in 'The Projects Forum' started by edcs, Nov 12, 2009.

  1. edcs

    Thread Starter New Member

    Dec 16, 2008
    4
    0
    I'm currently building a piece of equipment for use in a laboratory to test hypodermic needles. This machine uses a stepper motor to driver a lead screw which in turn operates a linier slide. I would like to add two more stepper motors to this so that the machine can operate a two axis linier slide on order to move samples of tissue allowing it to carry out my experiments autonomously.

    I am currently using a stepper motor driver board which I bought from Ebay;

    [​IMG]

    This board allows me to control my existing motor from some software I have created in NI Labview via a NI DAQ using it's digital outputs.

    However, this board only controls one motor, and I would now like to be able to control three! For my purposes, only one motor will need to move at a time so I would like to try to create a board that I can attach to the current stepper board, but will split the current three ways. However, I would like to be able to be able to select which motor the current is being sent to using some kind of digital control.

    The board I envisage would have four input channels to allow me to connect the current stepper board to it and twelve output channels for each of the motors. There would then be three digital channels to allow me to select the appropriate motor.

    I was thinking that I could achieve this using MOSFETs, however it doesn't seem right to me to be using twelve of them. Is there a more efficient way to achieve this? I have seen four channel 'power switches' but I can't quite figure out how they work :rolleyes:

    Many thanks,

    Ed

    (The motors I'm using are 2.8v and use 1.68a, they are 4 wire bipolar)
     
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    One problem with your idea is that when the power is turned off to a particular stepper motor, it will no longer have any "holding" torque, and the motor will, likely as not, rotate slightly by itself. A microstepping controller board makes it far more likely that the stepper will have moved.

    The next time the stepper is selected, it may not be in the same position as it was; you would have to seek back to the zero reference point to positively locate the position of the linear slide table.

    However, if you already have some type of positive feedback (such as a linear potentiometer or rotational encoder) for absolute position location, this concern may be a moot point.
     
  3. edcs

    Thread Starter New Member

    Dec 16, 2008
    4
    0
    The vertical movement that is produced by the existing motor is controlled using a linier potentiometer so I can measure depth as it's important I produce consistent results.

    I'm trying to think if accuracy is massively important for the linier slide, the way it would be actuated if I don't use the motors would be by hand and eye; as the motors are being added to save me some time. If I have enough spare channels I could even add some feedback to it easily enough, possibly using a rotational encoder as you mention.
     
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    After thinking about it for awhile, you won't be able to use MOSFETs to switch the controller between the stepper motors. This is because practically all power MOSFETs have body diodes; current flow one way would be blocked, but would flow freely the other way.

    You could, however, use DPST (double pole single throw) N.O. relays; one per motor. Since there are just two windings, you only have to make/break the current path for each winding in one location. You could use logic-level MOSFETS to sink current from the relay coils, like perhaps IRLD014s or 2N7000s; these require 5v on their gates. The relays will need reverse-EMF protection diodes across their coils. The relay contacts should be rated for 5A or more for long life.

    [eta]
    Here's a relay that's worth considering; it's a DPDT with a 5v coil, contacts rated 5A @ 250V for $2.55:
    http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=255-1116-ND
    For the reverse-EMF protection diode, you could just use a standard 1N4004 rectifier; they are cheap and available everywhere.
    IRLD014 MOSFETs: http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=IRLD014PBF-ND
    2N7000 MOSFETs: http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=2N7000_D26ZCT-ND

    You should use 10k Ohm resistors between the MOSFET gate and source terminals to keep them from "floating".
    You should also use a resistor between the gate and the logic control input to keep it from oscillating; some low value, perhaps 100 Ohms.

    Seems like Digikey really jacked up their prices on the 1N400x series diodes. These are about their lowest priced:
    http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=1N4003FSCT-ND
    $0.09/ea, these are rated 200 PIV, which is more than enough for your application.

    [eta]
    Oops - I forgot that you are in the UK. You will need to search places like Farnell and Maplin to find some kind of equivalent components. Farnell stocks the IRLD014, I believe - just make certain you don't order them to be shipped from the States, or you'll have a £15.95 shipping charge added to your order.
     
    Last edited: Nov 12, 2009
  5. edcs

    Thread Starter New Member

    Dec 16, 2008
    4
    0
    Thanks for your help! I'll have a look for the components on RS's website as that's where we tend to get things from.
     
  6. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
  7. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Have a look at the attached schematic.

    M1, M2, M3 are the logic inputs; they'll need to have a 0v to 5v range.
    To select a stepper, raise it's input to 5v, set the other two low.

    A1 and A2 are one coil's inputs, B1 and B2 are the other coil's inputs.

    Note that only the common and NO connections are used on the relays.

    Note that you should stop a stepper motor for about 100mS before de-selecting it to ensure that it's stopped.

    Then de-select it, and wait another 50mS or so for the relay to toggle states.

    Then select the new relay, and wait 100mS for the contacts to settle before issuing new step commands.

    The rest is pretty much self-explanatory.
     
  8. KL7AJ

    AAC Fanatic!

    Nov 4, 2008
    2,039
    287
    Though you could probably drive all three motors in parallel from a single driver (assuming the max power is sufficient) it will probably work. However, like Sarge says, you might end up with indexing issues after a power cycle. If this is in a large production system, better be safe and opt for some redundancy. You can certainly "daisy chain" the input signals to any modern stepper driver.

    eric
     
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    I don't believe that this was our original poster's intent.

    I think that they want to have individual control of x-, y- and z-axis steppers using the same controller board, but are willing to control just one at a time.

    The relays I've suggested have about 3x the current rating that the motors require; this would be good enough to ensure a decent working life from them - particularly if they observed the cautions about stopping the motors before de-selecting or selecting a motor.

    The use of the 2N7000 may be somewhat iffy; although they can work at logic level, they are not specifically rated for such use. IRLD014's would be preferable.

    If anyone has a better suggestion, or sees any mistakes I might've made, please speak up.
     
Loading...