Maker Pro
Maker Pro

common ground for many LEDs

O

Oliver Dain

Jan 1, 1970
0
I'm building a project with a microcontroller where any of 8 pins could go
high and light an LED=2E The LEDs are rated at 0=2E7V and 50mA so I can't just
run the pin through the LED to ground=2E I could run each pin through an LED
and then through a resistor to ground to make sure I meet the current=2Fvoltage
rating of the LEDs=2C but this seems inefficient because I'm wasting power in
the resistors and I'll need many components=2E From the parts standpoint it
seems like it'd be nice to get rid of all the resistors=2E One thing I thought
of was using a single Zener rated at 4=2E3V=2E All the LEDs could then go to then
share the Zener which would go to ground like this=3A

+5----------------------------
| | |
LED1 LED2 LED3
| | |
|---------|----------|
|
zener
|
gnd

This seems like it might work=2C but its difficult to figure out what the
current through each LED would be and it seems like the current per LED might
change as more or less LEDs were turned on=2E Is there a better way to do this=3F

Thanks=2C
Oliver
 
O

Oliver Dain

Jan 1, 1970
0
On Wed=2C 02 Jul 2003 17=3A45=3A41 GMT Tom Woodrow =3Ctomwoodrow=40comcast=2Enet=3E wrote=3A

=3E Never seen a 0=2E7V LED=2C more likely a 1=2E7V drop =28or more=29=2E
=3E
=3E Use a resistor for each led unless only ONE led will be on at a time
=3E then you can use a single resistor=2E
=3E
=3E With a single resistor=2C if more than one LED comes on they will attempt
=3E to share the available current=2E But since the individual LEDs don't have
=3E exactly the save voltage drop=2C one will most likely be brighter=2E
=3E

Thanks for the response=2E I think my question wasn't very clear=3A I know I
can't share a resistor because of the current sharing -- that's why I was
proposing to share and active device like a zener or transistor which=2C
conceivably=2C wouldn't suffer from this problem=2E I can't figure out how to do
that however -- is there a way to share an active device that would allow me
to have any number of LEDs on at a time and still pull a relatively constant
current through each LED =28e=2Eg=2E I want the amount of current per LED to be
roughly constant regardless of how many LEDs are lit so that the brightness of
each device is constant=29=3F A transistor doesn't seem like the right thing
becuase it wants to act like a current source so I'd be dividing current
through the LEDs and the more were lit the less current they'd each get=2E A
zener seems closer because it would provide a roughly constant voltage
reference=2C but I'm not sure this will work=2E

Part of the reason I want to do this is there are actually 128 LEDs which are
controlled via latches=2C etc=2E =28I said 8 because it simplified the question=29
but buying and soldering 128 resistors is a bummer if I can use one device per
group of 8 LEDs =28or for all 128=2E=2E=2E=29 Any thoughts=3F

=3E Tom Woodrow
=3E www=2Edacworks=2Ecom
=3E
=3E Oliver Dain wrote=3A
=3E=3E I'm building a project with a microcontroller where any of 8 pins could go
=3E=3E high and light an LED=2E The LEDs are rated at 0=2E7V and 50mA so I can't just
=3E=3E run the pin through the LED to ground=2E I could run each pin through an LED
=3E=3E and then through a resistor to ground to make sure I meet the
current=2Fvoltage
=3E=3E rating of the LEDs=2C but this seems inefficient because I'm wasting power in
=3E=3E the resistors and I'll need many components=2E From the parts standpoint it
=3E=3E seems like it'd be nice to get rid of all the resistors=2E One thing I
thought
=3E=3E of was using a single Zener rated at 4=2E3V=2E All the LEDs could then go to
then
=3E=3E share the Zener which would go to ground like this=3A
=3E=3E
=3E=3E +5----------------------------
=3E=3E | | |
=3E=3E LED1 LED2 LED3
=3E=3E | | |
=3E=3E |---------|----------|
=3E=3E |
=3E=3E zener
=3E=3E |
=3E=3E gnd
=3E=3E
=3E=3E This seems like it might work=2C but its difficult to figure out what the
=3E=3E current through each LED would be and it seems like the current per LED
might
=3E=3E change as more or less LEDs were turned on=2E Is there a better way to do
this=3F
=3E=3E
=3E=3E Thanks=2C
=3E=3E Oliver
=3E
=3E
 
I

Ishaan Dalal

Jan 1, 1970
0
Since you are using a microcontroller, why not pulse width modulate each
output, so that you get an average current that is lower than the max If of
the LEDs spec?

Cheers,
Ishaan

I'm building a project with a microcontroller where any of 8 pins could go
high and light an LED. The LEDs are rated at 0.7V and 50mA so I can't just
run the pin through the LED to ground. I could run each pin through an LED
and then through a resistor to ground to make sure I meet the
current/voltage
rating of the LEDs, but this seems inefficient because I'm wasting power in
the resistors and I'll need many components. From the parts standpoint it
seems like it'd be nice to get rid of all the resistors. One thing I
thought
of was using a single Zener rated at 4.3V. All the LEDs could then go to
then
share the Zener which would go to ground like this:

+5----------------------------
| | |
LED1 LED2 LED3
| | |
|---------|----------|
|
zener
|
gnd

This seems like it might work, but its difficult to figure out what the
current through each LED would be and it seems like the current per LED
might
change as more or less LEDs were turned on. Is there a better way to do
this?

Thanks,
Oliver
 
O

Oliver Dain

Jan 1, 1970
0
On Wed=2C 2 Jul 2003 15=3A54=3A27 -0400 =22Ishaan Dalal=22
=3CnewsREMOVEME=40mercury=2EREMOVE=2Exizx=2Enet=3E wrote=3A

=3E Since you are using a microcontroller=2C why not pulse width modulate each
=3E output=2C so that you get an average current that is lower than the max If of
=3E the LEDs spec=3F

That would work=2C but I'm actually controlling 128 LEDs using a set of D-flops
and a demux=2E I put out an 8 bit value=2C latch it into one of the dflops=2C then
do the same for the next 8 LEDs=2C etc=2E so the flops are really driving the
LEDs=2C not the uC=2E Granted I could move through all 128 LEDs and pulse them
periodically but that's a pain and I've got other processing I need to do=2E
Thanks for the thought though=2E

=3E Cheers=2C
=3E Ishaan
=3E
=3E =22Oliver Dain=22 =3Codain=40nospam=2Ell=2Emit=2Eedu=3E wrote in message
=3E news=3ACFN37804561443287=40llnews=2Ell=2Emit=2Eedu=2E=2E=2E
=3E I'm building a project with a microcontroller where any of 8 pins could go
=3E high and light an LED=2E The LEDs are rated at 0=2E7V and 50mA so I can't just
=3E run the pin through the LED to ground=2E I could run each pin through an LED
=3E and then through a resistor to ground to make sure I meet the
=3E current=2Fvoltage
=3E rating of the LEDs=2C but this seems inefficient because I'm wasting power in
=3E the resistors and I'll need many components=2E From the parts standpoint it
=3E seems like it'd be nice to get rid of all the resistors=2E One thing I
=3E thought
=3E of was using a single Zener rated at 4=2E3V=2E All the LEDs could then go to
=3E then
=3E share the Zener which would go to ground like this=3A
=3E
=3E +5----------------------------
=3E | | |
=3E LED1 LED2 LED3
=3E | | |
=3E |---------|----------|
=3E |
=3E zener
=3E |
=3E gnd
=3E
=3E This seems like it might work=2C but its difficult to figure out what the
=3E current through each LED would be and it seems like the current per LED
=3E might
=3E change as more or less LEDs were turned on=2E Is there a better way to do
=3E this=3F
=3E
=3E Thanks=2C
=3E Oliver
=3E
=3E
=3E
 
G

Gareth

Jan 1, 1970
0
Oliver said:
Thanks for the response. I think my question wasn't very clear: I know I
can't share a resistor because of the current sharing -- that's why I was
proposing to share and active device like a zener or transistor which,
conceivably, wouldn't suffer from this problem. I can't figure out how to do
that however -- is there a way to share an active device that would allow me
to have any number of LEDs on at a time and still pull a relatively constant
current through each LED (e.g. I want the amount of current per LED to be
roughly constant regardless of how many LEDs are lit so that the brightness of
each device is constant)? A transistor doesn't seem like the right thing
becuase it wants to act like a current source so I'd be dividing current
through the LEDs and the more were lit the less current they'd each get. A
zener seems closer because it would provide a roughly constant voltage
reference, but I'm not sure this will work.

This is not really a good idea because, although the LEDs will have the
same voltage across them, they may not share the current equally. This
is why you should have a series resistor with each LED.


Part of the reason I want to do this is there are actually 128 LEDs which are
controlled via latches, etc. (I said 8 because it simplified the question)
but buying and soldering 128 resistors is a bummer if I can use one device per
group of 8 LEDs (or for all 128...) Any thoughts?

128 may sound like a lot, and I agree that it is tedious, but if you can
solder 2 resistors a minute it will only take just over an hour. I
expect you could easily do it quicker than that.

Another option may be to use resistor arrays, that is just a load of
resistors in the same package, e.g. you may be able to get 8 resistors
in a 16 pin package. Of course you still have 16 pins to solder but
only one package to place.

I have seen LEDs available with current limiting built in, if you really
don't want to solder in the series resistors you could find some of these.

Gareth.
 
R

Rich Grise

Jan 1, 1970
0
Oliver Dain said:
Thanks for the response. I think my question wasn't very clear: I know I
can't share a resistor because of the current sharing -- that's why I was
proposing to share and active device like a zener or transistor which,
conceivably, wouldn't suffer from this problem.

Nope, it's the same problem, but worse. Then there's NOTHING to limit
the current - the zener is zener conducting, the LED is conducting,
and they're both in their almost-zero resistance range. A definite
recipie for smoke.
I can't figure out how to do
that however -- is there a way to share an active device that would allow me
to have any number of LEDs on at a time and still pull a relatively constant
current through each LED (e.g. I want the amount of current per LED to be
roughly constant regardless of how many LEDs are lit so that the brightness of
each device is constant)?

Nope, bottom line is each LED gets its own resistor (except when you wire
LEDs in series, but that's a different question.)
....
Part of the reason I want to do this is there are actually 128 LEDs which are
controlled via latches, etc. (I said 8 because it simplified the question)
but buying and soldering 128 resistors is a bummer if I can use one device per
group of 8 LEDs (or for all 128...) Any thoughts?

If only 8 given LEDs are on at a time, like, if you're MUXing them,
then you can get away with 8 resistors, but you'll need a set of
high-side drivers AND low-side drivers (albeit only 8 of one and
7 of the other.)

Have Fun!
Rich
 
A

Allodoxaphobia

Jan 1, 1970
0
On Wed=2C 2 Jul 2003 15=3A54=3A27 -0400 =22Ishaan Dalal=22
=3CnewsREMOVEME=40mercury=2EREMOVE=2Exizx=2Enet=3E wrote=3A

=3E Since you are using a microcontroller=2C why not pulse width modulate each
=3E output=2C so that you get an average current that is lower than the max If of
=3E the LEDs spec=3F

That would work=2C but I'm actually controlling 128 LEDs using a set of D-flops
and a demux=2E I put out an 8 bit value=2C latch it into one of the dflops=2C then
do the same for the next 8 LEDs=2C etc=2E so the flops are really driving the
LEDs=2C not the uC=2E Granted I could move through all 128 LEDs and pulse them
periodically but that's a pain and I've got other processing I need to do=2E
Thanks for the thought though=2E

=3E Cheers=2C
=3E Ishaan
=3E
=3E =22Oliver Dain=22 =3Codain=40nospam=2Ell=2Emit=2Eedu=3E wrote in message
=3E news=3ACFN37804561443287=40llnews=2Ell=2Emit=2Eedu=2E=2E=2E
=3E I'm building a project with a microcontroller where any of 8 pins could go
=3E high and light an LED=2E The LEDs are rated at 0=2E7V and 50mA so I can't just
=3E run the pin through the LED to ground=2E I could run each pin through an LED
=3E and then through a resistor to ground to make sure I meet the
=3E current=2Fvoltage
=3E rating of the LEDs=2C but this seems inefficient because I'm wasting power in
=3E the resistors and I'll need many components=2E From the parts standpoint it
=3E seems like it'd be nice to get rid of all the resistors=2E One thing I
=3E thought
=3E of was using a single Zener rated at 4=2E3V=2E All the LEDs could then go to
=3E then
=3E share the Zener which would go to ground like this=3A
=3E
=3E +5----------------------------
=3E | | |
=3E LED1 LED2 LED3
=3E | | |
=3E |---------|----------|
=3E |
=3E zener
=3E |
=3E gnd
=3E
=3E This seems like it might work=2C but its difficult to figure out what the
=3E current through each LED would be and it seems like the current per LED
=3E might
=3E change as more or less LEDs were turned on=2E Is there a better way to do
=3E this=3F
=3E
=3E Thanks=2C
=3E Oliver
=3E
=3E
=3E

I do not know what
User-Agent: Codeforge Sophax 1.0
But, it sure make for a Real Crappy post to read.

Jonesy
 
H

Howard Henry Schlunder

Jan 1, 1970
0
in message
I do not know what
User-Agent: Codeforge Sophax 1.0
But, it sure make for a Real Crappy post to read.

The reason the readability of Oliver's post has been diminished (from your
perspective), is because he posted using the Quoted-Printable
Content-Transfer-Encoding. It displays flawlessly on any newsreader which
supports this Internet standard. The main benefit of quoted-printable over
plain text is that it preserves the location of carriage return/linefeeds
thus making it possible to post large ASCII diagrams, source code, and long
URLs without having it destroyed by unintented line wraps.

You would be doing the Linux community a great service if you went to [
http://slrn.sourceforge.net/ ] and added support for quoted-printable to
your slrn newsreader. The technical details required to implement
quoted-printable are covered in RFC1521, section 5.1 (which is dated Sept.
1993). Or, by a direct link: [
http://www.freesoft.org/CIE/RFC/1521/6.htm ]. The code required to
implement quoted-printable support should be very small (I estimate a few
tens of lines).

Howard Henry Schlunder
 
B

Bill Bowden

Jan 1, 1970
0
Oliver Dain said:
Thanks much for the reply. Isn't that a current source, not a
voltage source. Since I don't know in advance how many LEDs will be
lit I don't know how much current I need. Since a transistor makes a
pretty good current source (doesn't it?) the amount of current per
LED will change quite a bit as more or less LEDs are turned on,
right?

Not a current source, it's a voltage source. The 2 resistors set up
a voltage on the transistor base and the emitter voltage will be
about 0.7 volts higher. It's called an "emitter follower" since the
emitter voltage follows the base. But you need low value resistors
so that changes in base current don't effect the base voltage much.
Substitute a zener for R1 and the regulation will be much better.

-Bill
 
K

Keith R. Williams

Jan 1, 1970
0
Not a current source, it's a voltage source. The 2 resistors set up
a voltage on the transistor base and the emitter voltage will be
about 0.7 volts higher. It's called an "emitter follower" since the
emitter voltage follows the base.

No, it would be an "emitter follower" if the output was the
emitter, rather than the collector. The diagram can be redrawn
as:


In this case, and assuming V*R2/(R1||R2) > .7V, the base current
is (V-.7)/R1||R2 and the collector *current* would be Beta*Ib.
It is a current source, though a lousy one (dependant on Beta).
But you need low value resistors
so that changes in base current don't effect the base voltage much.
Substitute a zener for R1 and the regulation will be much better.

A zener for R1 would be very strange indeed! Perhaps you mean
R2? In any case a zener won't work here. It is *not* an emitter
follower, as drawn. An emitter follower (or any voltage source)
with no current limit would make a lousy LED driver.
 
K

Keith R. Williams

Jan 1, 1970
0
No, it would be an "emitter follower" if the output was the
emitter, rather than the collector. The diagram can be redrawn
as:

Damn! FOrget what I wrote. I didn't notice it was a PNP! I saw
it (plain as my nose) just as I pushed the "send" button. ...and
I can't cancel my stupid post.
 
Top