Shop OBEX P1 Docs P2 Docs Learn Events
Driving a unipolar stepper motor with only two outputs — Parallax Forums

Driving a unipolar stepper motor with only two outputs

erk1313erk1313 Posts: 12
edited 2004-10-24 18:08 in Robotics
Hello,

I need to drive a unipolar stepper motor with only two outputs.· I found a simple circuit that uses a ULN2003.· It says that since coil 1 and coil 2 are always the inverse of each other (i.e. if coil 1 is high, coil 2 is low),·and like wise with coil 3 and coil 4, you really only need two inputs.·

Can anyone walk me through this circuit? (See figure 1)
http://www.eettaiwan.com/ARTICLES/2002MAR/PDF/2002MAR08_AMD_MPC_AN81.PDF

What is the 5V for? Could I just use a flip flop to provide the inverse voltage?

Thank you so so much!!!
-Eric

Comments

  • Dave PatonDave Paton Posts: 285
    edited 2004-10-24 16:37
    The circuit looks to me to be very simple. You have 2 inputs to the ULN2003 that are driven by the stamp. You only need to set the pins to the proper states as required to make the motor turn.

    If you want to go independent of the stamp, you'll need a clocked state machine to do the dirty work. From my quick notes, it looks like a 3 bit counter might do the job, but you'll want to do a proper state machine design to be sure. Google would be your friend here.

    The +5V and the 1k resistors turn outputs 6 and 7 into inverters feeding inputs 2 and 4. No need to provide the inverse voltages, as they are provided for you by some trickery and the ULN2003 itself. The ULN2003 is an inverter as well as a driver, and those outputs, being 'spares', are put to good use making the 4 output system drivable with only 2 inputs.

    What is your goal with the circuit? Are you trying to run it without a stamp?

    smile.gif

    -dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    This is not a sig. This is a duck. Quack.
  • erk1313erk1313 Posts: 12
    edited 2004-10-24 17:42
    Thanks Dave!!

    I am trying to run 2 stepper motors, two contact sensors, and 1 solenoid with a Basic STAMP. That's 4+2+1 = 7 i/o pins.·

    It's for a robot that navigates a cooper tape bullseye and drops off a payload.

    confused.gifQUESTION:

    I'm running a 9v motor instead of a 12v motor as pictured in the diagram.· I assume I can just keep the 5V--it corresponds to the stamp's output voltage.· Can I get the 5 volts from the stamp's onboard regulator?· I assume it doesn't draw much current?

    Thanks Again!!!

    Eric

    p.s. I like your slogan... I program with solder!
  • Dave PatonDave Paton Posts: 285
    edited 2004-10-24 18:08
    If you run out of I/O, you can always try a 74HC595 for more outputs. 2 or 3 lines of input gives 8 out. There's a Parallax technote on it.

    A +9 motor, yes, switch +12 for +9. I'm not sure about usign the onboard regulator for the +5 tho. It really depends on how much current will be delivered to other drvices. The onboard Vreg on the BS2 is only good for about 100mA total as I recall, so be careful where you decide to have the stamp push current.

    Personally, I always use an outboard Vreg for +5, since I usually have more than just the stamp using that voltage, and I often use local ultra-low LDOs with a switching supply (for efficiency).

    As for my slogan...I'm a EE. I code for fun, but I solder for food. wink.gif

    -dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    This is not a sig. This is a duck. Quack.
Sign In or Register to comment.