PDA

View Full Version : darlington driver



jlang
02-23-2010, 11:55 AM
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

erco
02-23-2010, 12:52 PM
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."

PJ Allen
02-23-2010, 08:31 PM
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

erco
02-23-2010, 10:18 PM
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."

jlang
02-23-2010, 10:45 PM
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.

erco
02-24-2010, 12:42 AM
You can't rearrange your LEDs to run off of 5 volts?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."

Tracy Allen
02-24-2010, 02:28 AM
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.

http://forums.parallax.com/attachment.php?attachmentid=68030

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com (http://www.emesystems.com)

jlang
02-24-2010, 02:45 AM
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 Allen
02-24-2010, 04:57 AM
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 (http://www.emesystems.com)

jlang
02-24-2010, 11:26 AM
http://forums.parallax.com/forums/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.·

erco
02-24-2010, 11:50 AM
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 Allen
02-24-2010, 12:06 PM
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.
http://forums.parallax.com/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 (http://www.emesystems.com)

PJ Allen
02-25-2010, 05:24 AM
http://i270.photobucket.com/albums/jj118/new_clear_days/circuits/2803_ex3.jpg

jlang
02-25-2010, 11:21 AM
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.