Maker Pro
Maker Pro

Driving a large number of LEDs with ULN2803A

P

Peter S. May

Jan 1, 1970
0
The original question about single outputs has been answered, so I'm
moving on to focus on this problem.

I've done at least some looking for transistor arrays that come in
eights and have common emitters, and so far the only real results that
have turned up are the CA3251, which is apparently way out of
production, and the ULN2803A Darlington array. Using an array with
common emitters would simplify things, as would having built-in base
resistors, and the ULN2803A is a go on both.

The objective is to map each of eight outputs on a 74HC chip or PIC to
the light of ten high-brightness LEDs, Vf of 3.2~3.6V, at 15~20mA. (In
the case of using ULN2803A I would use two of them, driving 5 LEDs at
each output.)

My original idea was to have the transistors sink the cathodes directly:

+5V <------+-+-+-+- ...
| | | |
V V V V LEDs
- - - -
| | | |
/ / / /
\ \ \ \
/ / / /
| | | |
74HC output |/---------+-+-+-+- ...
--->o------------| 1/8 ULN2803A (oversimplified)
|\>---|GND

Then I found out that I have no real information regarding what the
collector-emitter voltage would be at any given moment, but that the
data sheet suggests one possible value is 2V, which is too little margin
for me to work with.

The next idea was to run the Darlington as an inverter, inverting the
inputs accordingly (probably at the software level if applicable).

+5V <----+
|
\
/
\
|
+--/\/--->|--+-|GND
| |
+--/\/--->|--+
| |
+--/\/--->|--+
| |
. . .
| |
+--/\/--->|--+
|/
------->o---------------|
|\>---|GND

Is this alternative a reasonable design? Should I be looking at another
transistor array (-like device) instead?

Thanks
PSM
 
E

Eeyore

Jan 1, 1970
0
Peter S. May said:
Then I found out that I have no real information regarding what the
collector-emitter voltage would be at any given moment,

VCE(sat) Collector-emitter Saturation Voltage
IC = 100mA, IB = 250mA typ = 0.9V
IC = 200mA, IB = 350mA typ = 1.1V
IC = 350mA, IB = 500mA typ = 1.3V

www.st.com/stonline/books/pdf/docs/1536.pdf

Graham
 
P

Peter S. May

Jan 1, 1970
0
Eeyore said:
VCE(sat) Collector-emitter Saturation Voltage
IC = 100mA, IB = 250mA typ = 0.9V
IC = 200mA, IB = 350mA typ = 1.1V
IC = 350mA, IB = 500mA typ = 1.3V

I already had this information, but it seemed to lead to a circular
reference in my case: Ic depends on Vce...

Ic = (Vsupply - Vled - Vce) / R

...but then Vce is contingent upon Ic, apparently. I didn't know how to
reconcile this, and the (TI) sheet didn't come with a graph to help
clarify. I'll see if ST does any better, but it can't be a good idea to
assume one manufacturer's specs for another's product...

Thanks
PSM
 
J

John Devereux

Jan 1, 1970
0
Peter S. May said:
I already had this information, but it seemed to lead to a circular
reference in my case: Ic depends on Vce...

Ic = (Vsupply - Vled - Vce) / R

..but then Vce is contingent upon Ic, apparently. I didn't know how to
reconcile this, and the (TI) sheet didn't come with a graph to help
clarify. I'll see if ST does any better, but it can't be a good idea to
assume one manufacturer's specs for another's product...


Start off with how much current you need to light the leds (leds are
current driven devices). Then establish the Vce drop at this
(combined) current. Then subtract the forward drop of the leds, and
Vce, from 5V. Then choose resistor values to drop this voltage at the
chosen current (per led).
 
A

Anthony Fremont

Jan 1, 1970
0
Peter said:
The original question about single outputs has been answered, so I'm
moving on to focus on this problem.

I've done at least some looking for transistor arrays that come in
eights and have common emitters, and so far the only real results that
have turned up are the CA3251, which is apparently way out of
production, and the ULN2803A Darlington array. Using an array with
common emitters would simplify things, as would having built-in base
resistors, and the ULN2803A is a go on both.

The objective is to map each of eight outputs on a 74HC chip or PIC to
the light of ten high-brightness LEDs, Vf of 3.2~3.6V, at 15~20mA.
(In the case of using ULN2803A I would use two of them, driving 5
LEDs at each output.)

My original idea was to have the transistors sink the cathodes
directly:

+5V <------+-+-+-+- ...
| | | |
V V V V LEDs
- - - -
| | | |
/ / / /
\ \ \ \
/ / / /
| | | |
74HC output |/---------+-+-+-+- ...
--->o------------| 1/8 ULN2803A (oversimplified)
|\>---|GND

Ok, but if you have something higher than 5V available, it would make things
simpler since you'd be able to put the LEDs in series with less resistance.
Then I found out that I have no real information regarding what the
collector-emitter voltage would be at any given moment, but that the
data sheet suggests one possible value is 2V, which is too little
margin for me to work with.

Actually, Vcc should be less than about 1V. With your current requirements,
it's probably only going to be about .7V, maybe even less if you don't
parallel all the LEDs.
The next idea was to run the Darlington as an inverter, inverting the
inputs accordingly (probably at the software level if applicable).

+5V <----+
|
\
/
\
|
+--/\/--->|--+-|GND
| |
+--/\/--->|--+
| |
+--/\/--->|--+
| |
. . .
| |
+--/\/--->|--+
|/
------->o---------------|
|\>---|GND

Is this alternative a reasonable design? Should I be looking at
another transistor array (-like device) instead?

This would be quite wasteful of energy since turning the LEDs off would
still flow allot (relatively) of current. If you could manage a 12V or 24V
supply for the LEDs, life would be allot easier. ;-)

If you run 10 parallel LEDs @ 20mA off each output, you will be flowing
250mA thru each output driver. If you had enough voltage to put 10 LEDs in
series, you would only need to flow 20mA thru each output. This would
reduce the power dissipation of the package by a full order of magnitude.
Taking the worst case scenario of a 1.6V Vce (from the datasheet) multiplied
by 4A (all 8 channels on flowing 250mA each), youd be looking at over 6W of
power dissipation. Your ULN2803 will be roasting. See if you can't
scrounge up some more voltage for the LEDs so you can put your power supply
to work making light instead of heat.
 
A

Anthony Fremont

Jan 1, 1970
0
Anthony said:
If you run 10 parallel LEDs @ 20mA off each output, you will be
flowing 250mA thru each output driver. If you had enough voltage to
put 10 LEDs in series, you would only need to flow 20mA thru each
output. This would reduce the power dissipation of the package by a
full order of magnitude. Taking the worst case scenario of a 1.6V Vce
(from the datasheet) multiplied by 4A (all 8 channels on flowing
250mA each), youd be looking at over 6W of power dissipation. Your
ULN2803 will be roasting. See if you can't scrounge up some more
voltage for the LEDs so you can put your power supply to work making
light instead of heat.

Oops
1,$s/20mA/25mA/
 
P

Peter S. May

Jan 1, 1970
0
John said:
Start off with how much current you need to light the leds (leds are
current driven devices). Then establish the Vce drop at this
(combined) current. Then subtract the forward drop of the leds, and
Vce, from 5V. Then choose resistor values to drop this voltage at the
chosen current (per led).

All right, I'm going to walk through this and see if I stumble.

Let's call Ic 200mA, enough to run five LEDs. It just happens that a
200mA Ic is on the data sheet, listed as causing Vce to be 1.1V typ,
1.3V max. Given Vf 3.2~3.6 for the LEDs, we have something like

Ic = number of leds * ( ( Vsupply - Vled - Vce ) / R )
0.2A = 5 * ( (5V - 3.4V - 1.1V) / R )
0.2A = 2.5V / R
R = 2.5V / 0.2A
R = 12.5 ohms

Duh. Somehow I can no longer see why this was so hard to grasp.

Of course, assuming the max case for both Vled and Vce, R is more like
2.5 ohms. With Vled + Vce hovering so close to Vsupply, it kind of
seems like any random fluctuations would be highly magnified, possibly
to the point where this device isn't okay for the application. So, I
need to either increase the supply voltage or choose a new device...and
neither seems easy. :-/

Thanks, though...plowed right through that mental block!
PSM
 
P

Peter S. May

Jan 1, 1970
0
Anthony said:
Oops
1,$s/20mA/25mA/

First of all, I appreciate the vim-formatted correction. :)

Secondly, all right, at another location in this thread I found that
increasing the voltage would simplify things a tad. I don't have any
experience with DC-DC converters, but it's something I could learn. It
just happens that the power supply I'll be using has a 12V tap, but
that's still too little to be of much use.

So, what if I were to do something like this:

+15V <---+-->|-->|-->|---/\/\--+--< (collector)
| |
+-->|-->|-->|---/\/\--+
| |
+-->|-->|-->|---/\/\--+

If I'm running the LEDs at 20mA, would the above circuit only be pulling
60mA? That would certainly drop Vce to a more convenient level...

It even seems possible to do something like

+38V <-->|->|->|->|->|->|->|->|->|->|---/\/\--< (collector)

And only draw 20mA, period. The big question, then: Would a DC-DC
converter overcomplicate the thing? So, I guess that's what I figure
out next.

Thanks
PSM
 
S

Spehro Pefhany

Jan 1, 1970
0
I already had this information, but it seemed to lead to a circular
reference in my case: Ic depends on Vce...

Ic = (Vsupply - Vled - Vce) / R

..but then Vce is contingent upon Ic, apparently.

You, the designer, are going to choose Ic, no?
I didn't know how to
reconcile this, and the (TI) sheet didn't come with a graph to help
clarify. I'll see if ST does any better, but it can't be a good idea to
assume one manufacturer's specs for another's product...

Thanks
PSM


Best regards,
Spehro Pefhany
 
A

Anthony Fremont

Jan 1, 1970
0
Peter said:
First of all, I appreciate the vim-formatted correction. :)

I would have used FRED syntax but, hard as it may be to believe, there is
likely noone here that has ever even heard of the "FRiendly EDitor" or GCOS
for the matter.
Secondly, all right, at another location in this thread I found that
increasing the voltage would simplify things a tad. I don't have any
experience with DC-DC converters, but it's something I could learn.
It just happens that the power supply I'll be using has a 12V tap, but
that's still too little to be of much use.

Might be of more use than you suspect.
So, what if I were to do something like this:

+15V <---+-->|-->|-->|---/\/\--+--< (collector)
| |
+-->|-->|-->|---/\/\--+
| |
+-->|-->|-->|---/\/\--+

If I'm running the LEDs at 20mA, would the above circuit only be
pulling 60mA? That would certainly drop Vce to a more convenient
level...

Yep. :)
It even seems possible to do something like

+38V <-->|->|->|->|->|->|->|->|->|->|---/\/\--< (collector)

And only draw 20mA, period.

Exactly. The total power disspated by the LEDs themselves will still be the
same, but the power wasted in dropping resistors would be less.
The big question, then: Would a DC-DC
converter overcomplicate the thing? So, I guess that's what I figure
out next.

That's up to you to decide. You can certainly build your own voltage
booster with very few components. You can use a regulated switcher IC, or
use the TV design approach and tweak the whole system so that it just
happens to supply the right amount of voltage/current for the LED string,
and pray that nothing changes (like an LED going short circuit). You could
even use the the PIC to PWM an inductor (using a MOSFET of course) and use
the built in ADC to track the generated voltage. You could use a simple
resistive divider to reduce the 38V being generated to something in the
range of 0 to 5V. Or you could use the ADC in the PIC to measure the
voltage accross your series resistor and adjust your duty cycle accordingly.
Or you could skip the PIC and use a comparator to turn the PWM on and off.
Or you could........... ;-)
 
E

Eeyore

Jan 1, 1970
0
Peter S. May said:
I already had this information, but it seemed to lead to a circular
reference in my case: Ic depends on Vce...

Ic = (Vsupply - Vled - Vce) / R

..but then Vce is contingent upon Ic, apparently. I didn't know how to
reconcile this, and the (TI) sheet didn't come with a graph to help
clarify. I'll see if ST does any better, but it can't be a good idea to
assume one manufacturer's specs for another's product...

No, you're exaggerating. Vce(sat) doesn't change very much over that 2:1 range.
I'm sure it'll be quite consistent from one manufacturer to another too.

Graham
 
E

Eeyore

Jan 1, 1970
0
Peter S. May said:
All right, I'm going to walk through this and see if I stumble.

Let's call Ic 200mA, enough to run five LEDs. It just happens that a
200mA Ic is on the data sheet, listed as causing Vce to be 1.1V typ,
1.3V max. Given Vf 3.2~3.6 for the LEDs, we have something like

Ic = number of leds * ( ( Vsupply - Vled - Vce ) / R )
0.2A = 5 * ( (5V - 3.4V - 1.1V) / R )
0.2A = 2.5V / R
R = 2.5V / 0.2A
R = 12.5 ohms

Duh. Somehow I can no longer see why this was so hard to grasp.
Good.


Of course, assuming the max case for both Vled and Vce, R is more like
2.5 ohms. With Vled + Vce hovering so close to Vsupply, it kind of
seems like any random fluctuations would be highly magnified, possibly
to the point where this device isn't okay for the application. So, I
need to either increase the supply voltage or choose a new device...and
neither seems easy. :-/

Yes, a higher supply voltage (say 6V) would make it easier.

Also, as was suggested, you could use a discrete transistor with a low Vce(sat).

Graham
 
E

Eeyore

Jan 1, 1970
0
Peter S. May said:
It just happens that the power supply I'll be using has a 12V tap, but
that's still too little to be of much use.

No, that's ideal. Run the LEDs in parallel strings with 2 diodes in each string.

Graham
 
R

Rich Grise

Jan 1, 1970
0
The original question about single outputs has been answered, so I'm
moving on to focus on this problem.

I've done at least some looking for transistor arrays that come in eights
and have common emitters, and so far the only real results that have
turned up are the CA3251, which is apparently way out of production, and
the ULN2803A Darlington array. Using an array with common emitters would
simplify things, as would having built-in base resistors, and the ULN2803A
is a go on both. ....
Then I found out that I have no real information regarding what the
collector-emitter voltage would be at any given moment, but that the data
sheet suggests one possible value is 2V, which is too little margin for me
to work with.

According to the data sheet I found,
http://rocky.digikey.com/scripts/ProductInfo.dll?Site=US&V=264&M=ULN2803APG(5,M)

VCEsat max is 1.1v. at 100 mA, and you're only asking for 15 to 20 mA from
each section, so I'd say don't worry about it. You could run up to 5 of
these 20 mA LEDs (and their resistors) for 100 mA from one output, and
have a Vcesat of 1.1V.

Good Luck!
Rich
 
P

Phil Allison

Jan 1, 1970
0
"Peter S. May"
Eeyore said:
I already had this information, but it seemed to lead to a circular
reference in my case: Ic depends on Vce...


** You are talking absolute DRIVEL !!


Ic = (Vsupply - Vled - Vce) / R
..but then Vce is contingent upon Ic, apparently. I didn't know how to
reconcile this,


** Maybe you need to see a psychiatrist.

Or just stop wanking in public.




....... Phil
 
P

Phil Allison

Jan 1, 1970
0
"Eeysore"
VCE(sat) Collector-emitter Saturation Voltage
IC = 100mA, IB = 250mA typ = 0.9V
IC = 200mA, IB = 350mA typ = 1.1V
IC = 350mA, IB = 500mA typ = 1.3V



** Ib is in uA - not mA.

For Ic = 200 mA , Vce typ = 1 volt.


FOOL.


........ Phil
 
P

Phil Allison

Jan 1, 1970
0
"Rich Grise= Wanking Cretin "

VCEsat max is 1.1v. at 100 mA, and you're only asking for 15 to 20 mA from
each section,


** Read the first post in this thread - IDIOT.

The idiot OP now wants to run 5 LEDS off each output.

He originally wanted to run 10.

Be anyone's guess what the manic moron decides next.





........ Phil
 
A

Anthony Fremont

Jan 1, 1970
0
Phil said:
"Rich Grise= Wanking Cretin "




** Read the first post in this thread - IDIOT.

The idiot OP now wants to run 5 LEDS off each output.

He originally wanted to run 10.

The OP wants to light 8 "channels" of 10 LEDs each and that hasn't changed.
Please try to keep up.
Be anyone's guess what the manic moron decides next.

I'm guessing that the "manic moron" will change the subject line to
something offensive, and then start repeating himself as usual. <G>
 
P

Phil Allison

Jan 1, 1970
0
"Anthony Fremont "

= Kiddie Fucking, ASD FUCKED, CRIMINAL CUNTHEAD "

= Scum of the Planet MORON and 100% PUBLIC MENACE

= Typical Yank Waste of Space



The OP wants to light 8 "channels" of 10 LEDs each and that hasn't
changed. Please try to keep up.


** EXACTLY what I claimed !!!


YOU VILE SLIMY FUCKING CRIMINAL ASININE


PILE OF APE EXCREMENT !!!!!!!!!!!!!






.......... Phil
 
Top