Shop OBEX P1 Docs P2 Docs Learn Events
ULN2003 and Stepper — Parallax Forums

ULN2003 and Stepper

C.MoherC.Moher Posts: 35
edited 2006-01-04 00:42 in BASIC Stamp
Howdy Folks. Brand new to this group and making my first post. I have a Stamp 2, a ULN2003 driver and a five lead stepper motor. Could any of you please tell me how to hook them up ? I take it the Stamp outputs go straight into the driver, but, how does the motor connect to the driver. Since I can see no power connection·on the driver datasheet, I take it one or more of the coils gets hooked up to some value of DC and the driver, in fact, sinks the current to operate the motor ???? I should be OK on my own with the code. Ideally, if you know of a schematic out there, that would be great !! Thanks !!

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-12-13 05:30
    Hello,

    ·· You can find an example of connecting a 5 wire (4-phase unipolar) stepper motor in the StampWorks manual, of which a PDF can be found here.· Page 150.· The connections for the ULN2003 shouldn't be too hard, although this example uses the L293D.

    http://www.parallax.com/dl/docs/books/sw/Web-sw-v2.0.pdf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • C.MoherC.Moher Posts: 35
    edited 2005-12-13 17:26
    Thanks for the reply. Unfortunately, I'm still not getting it. The data sheet for the ULN2003 shows pin 8 as being "E" and pin 9 as being "Com". Obviously that means pin 9 is grounded to my negative supply. Would that mean Pin 8 is hooked up to a + 12 V, provided my motor is 12 V·???? I am using Al Williams Microcontroller Projects Using the Basic Stamp. He makes several mentions of the ULN2003 but doesn't offer a wiring diagram. The TI data sheet is not very clear to me either. Thanks in advance for your help.
  • NewzedNewzed Posts: 2,503
    edited 2005-12-13 17:34
    Pin 8 goes to ground.· Pin 9 - com - goes to the positive side of whatever voltage you are using for the outputs, 5V, 9V, 12V, anything up to 40V.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    Do you have a Stamp Tester yet?
    http://hometown.aol.com/newzed/index.html

    ·
  • C.MoherC.Moher Posts: 35
    edited 2005-12-14 00:15
    Ok I guess I'm almost set. I scrounged a stepper out of a printer. Any idea as to the voltage I should be feeding it ? The only rating on it's badge is 77 ohms. I would rather not smoke it and be left wondering why it doesn't work. Thanks.
  • C.MoherC.Moher Posts: 35
    edited 2005-12-14 01:27
    If anyone needs a schematic for a soldering gun or stove, I've got one. Hook up a ULN2003 with 5V on pin 8, ground on pin 9. Common wire of stepper motor on 9 and coils 1 through 4 on pins 10 to 13. Blowed up real good...burnt my thumb on the on/off switch to my power supply...probably toasted my stamp too !!
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-12-14 01:39
    C.Moher -

    Perhaps you'd like to compare the way you wired it, to the way that was suggested, so that doesn't happen again:

    From newzed's post:

    Pin 8 goes to ground. Pin 9 - com - goes to the positive side of whatever voltage you are using for the outputs, 5V, 9V, 12V, anything up to 40V.

    Regards,

    Bruce Bates
  • C.MoherC.Moher Posts: 35
    edited 2005-12-14 05:01
    well that will do it....I guess I confused common with ground...hmm..hopefully I just damaged my power supply..I'll replace the regulator and wire it the right way this time...thanks.
  • C.MoherC.Moher Posts: 35
    edited 2005-12-14 05:13
    I must have got the military version of the 7805...I corrected the wiring and it works great !!! Can't believe there was no damage though I did change the ULN2003 to be safe...Thanks.
  • HiTekGizmosHiTekGizmos Posts: 14
    edited 2006-01-03 18:19
    There is a neat trick found in a book by Dennis Clark for protecting microcontrollers when experimenting with interfacing to external devices... Insert a 330 ohm resistor in series with each lead to/from the controller (except power and ground of course), that way if the external circuit ends up being grounded or connected to modest voltage levels the resistor will limit the current to a safe value for the microcontroller helping keep the smoke inside... This may not work in ALL applications but it will work in many... 16 pin DIP resistor packs with 8 330 ohm resistors are available...
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-04 00:42
    Many of our boards have 220-ohm resistors inline with I/O pins -- this is cheap insurance.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
Sign In or Register to comment.