Shop OBEX P1 Docs P2 Docs Learn Events
darlington driver — Parallax Forums

darlington driver

jlangjlang Posts: 5
edited 2010-02-25 04:21 in BASIC Stamp
I started this project·3 years ago while living overseas and gave up after getting stuck.· I since moved back and wanted to finish this project once and for all.· I have a BS2 that I am trying to use 6 digital outputs to drive 20 LED's each at 20mA per LED.· According to my calcs, this comes to ~80mA's per pin.· I decided to go with a Darlington Driver (ULN2803APG) to energize the 12VDC LED circuit but for the life of me cannot get this to work.· I tried first to source to the load then tried sinking the load with no luck.· I'm able to get the darlington to switch by reading the output with my voltmeter and I'm able to get the LED's to turn on by simply·putting a battery across the circuit, I'm just not able to get the darlington to enable the led's.· Below is a rouch overview of my pinout...

P11 > Pin 1 of Darlington
Dar Pin·9 > Vss
12VDC > LED Anode
LED Cathode > Dar Pin 10
Dar Pin 18 > 12VDC Common

If anybody has a better configuration idea, I'll be glad to listen as I've been struggling for a while on this one.·

Thanks,
Jeremy

Comments

  • ercoerco Posts: 20,256
    edited 2010-02-23 05:52
    I just bought some and haven't tried hooking them up yet, so I'm going out on a limb, but here's my take: the ULN2803 is an 8-channel, 5V unit, not 12V. Each channel can handle 500 mA (wow!). Its pin 9 is ground (Vss) , and pin 10 goes to +5V. You'll hook up six of your BS2's output pins to the ULN2803 inputs, say pins 1-6. Then you'll hook up the anodes of your six 5V LED arrays to corresponding ULN2803 output pins 18 -13.

    Not sure where you got 80 mA/pin, but basically you need to make LED strings that operate from 5V. MAYBE 3 red LEDS will fire from 5V, but a better bet is 2 LEDs in series with the right current-limiting resistor to make ~20 mA through those two LEDs. With that 500 mA limit, you could parallel up to 25 strings of 2 LEDs, or 50 LEDs per channel.

    Now, you probably can't have all 8 channels of the 2803 sourcing 500 mA simultaneously. That would be 4 amps total flowing through pin 10. So go easy on that poor chip.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2010-02-23 13:31
    A ULN2803 doesn't get "powered" at/by/with "pin 10" or anything else.· Its inputs are "5V".· Its outputs sink current, each provides a path to GND/RTN/0V -- they don't source a voltage.

    http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol1/col/nv6.pdf
  • ercoerco Posts: 20,256
    edited 2010-02-23 15:18
    PJ, thanks for that correction & link. I'll read that PDF before I go out on any more limbs!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • jlangjlang Posts: 5
    edited 2010-02-23 15:45
    Many thanks for the prompt response and suggestions. So I guess I'm back to the drawing board. What would you recommend I do to have each pin drive say, a 100mA load at 12VDC? I do have relays that have 5VDC/30mA coils and ample contact ratings so perhaps I can drive the relay with the Darlington then run the 12VDC across the contacts. I don't have the part numbers of the relay as I am at work. Any suggestions would be much appreciated as I'm not the strongest when it comes to circuitry as you can probably tell.
  • ercoerco Posts: 20,256
    edited 2010-02-23 17:42
    You can't rearrange your LEDs to run off of 5 volts?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2010-02-23 19:28
    I think you have the wrong connections (or typos). The sink output for that channel is pin 18:
    P11 > Pin 1 of Darlington
    Dar Pin 9 > Vss
    12VDC > LED Anode
    LED Cathode > Dar Pin 10 Dar Pin 18 Needs series resistor!
    Dar Pin 18 Dar pin 10 > 12VDC Common for the catch diodes.

    The individual Darlingtons are rated up to 50 V when off, 500 mA when on.

    How are you multiplexing this out to 20 channels? There are ICs such as the A6833 that have an SPI interface to 32 outputs. The predecessor UCN5833 came in a 40 pin DIP, obsolete now, but you can still find them around.

    attachment.php?attachmentid=68030

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
    388 x 578 - 33K
  • jlangjlang Posts: 5
    edited 2010-02-23 19:45
    Erco, Thanks for the suggestion but it's sort of a "pre-buit" circuit. It would be very difficult to reconfigure the hardware.
    Tracy, I had the wrong connections then. I did not try the series resistor on the cathode of the LED. Also, are you indicating that I can use a seperate power supply (12VDC) on the output of the Darlington than on the input (5VDC from BS2 board)?
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2010-02-23 21:57
    The resistor can be on either the cathode or on the anode end, but there has to be a resistor in series with the LED. You said, "to energize the 12VDC LED circuit", so maybe it is more than just one simple LED that is being energized? 12 Volts is enough to energize several LEDs in series.

    I'm not sure what you mean by the "separate power supply". If you have two different power supplies, the grounds have to be connected together. 5V from the Stamp output will turn on the Darlington. The Darlington is like a switch to ground. The power supply for the output collector side can be different, say 12 volts. Again, be sure to connect the grounds together.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • jlangjlang Posts: 5
    edited 2010-02-24 04:26
    ppop.aspx?upg=%7b4aeac618-a2a2-49e9-b831-0826d392c9df%7dThanks Tracy.· I am still not able to make this work.· Now the LED's do not·turn off.· Attached is a schematic of my current configuration.·
  • ercoerco Posts: 20,256
    edited 2010-02-24 04:50
    Looks like you have your whole 2803 shorted to ground. Shouldn't pin 10 only go to +12V?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2010-02-24 05:06
    Pin 10 of the ULN2803 needs to be connected to +12 volts, not to ground as you have it. Look at the schematic and you should appreciate why all your LEDs can't turn off. The diodes that are connected to pin 10 are providing a path to ground for each channel and that is short circuiting the collector-emitter path through the Darlington. The Darlington can't turn it off.
    attachment.php?attachmentid=68053

    The catch diodes that come out at pin 10 are there to protect each channel against kickback from inductive loads, such as relays or solenoids that might be found in an impact print head. (Light blue line on the diagram puts them across the load, to catch any reverse of voltage that can occur when an inductive load suddenly turns off). For your LEDs, there is no inductive load, so you could safely leave pin 10 open, not connected to anything.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
    378 x 290 - 8K
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2010-02-24 22:24
    2803_ex3.jpg
  • jlangjlang Posts: 5
    edited 2010-02-25 04:21
    That's it!· Many thanks to all that helped.· It just wasn't clicking but now it makes sense.· Once again I appreciate the prompt response and valuable information.· Attached is the schematic of the working product.
Sign In or Register to comment.