Maker Pro
Maker Pro

Resistor on LED necessary?

R

realexander

Jan 1, 1970
0
Hi,

Of course, everywhere I see a circuit with an LED, there's a current
limiting resistor. But I'm wondering if, in my case, it's necessary.

I have an eight digit multiplexed display, using 14 segment LEDs. A PIC
selects the digit and turns on its common anode through an NPN
transistor (and I also don't have a resistor between the PIC and the
transistor's base). The transistor's collector is at +5 with no current
limiting resistor. The PIC selects the individual segments within a
digit by having its I/O lines tied to the cathodes and setting the
output to 0 to turn on the segment. There's no resistor on the cathodes
or the anodes.

Everything seems to work great; the LEDs light at a reasonable
brightness (though there's some variation in the brightness - I learned
too late why I should've bought common cathode LEDs instead of common
anode). If I put in current limiting resistors of 220 ohms, the LEDs
are dimmer than I'd like (remember that the display is multiplexed, so
each digit is off 7/8 of the time, or more if I use PWM to dim the LEDs
in a dark room).

Is this a "safe" configuration? Can I get away with no resistors since
each LED is off most of the time? What about the PIC - the LEDs might
be off most of the time, but some of the PIC's I/O lines are
potentially sinking current all the time. Am I going to eventually fry
my LEDs, PIC, or both?

Thanks,
Bob Alexander
 
A

Alan the tech

Jan 1, 1970
0
Hi,

Of course, everywhere I see a circuit with an LED, there's a current
limiting resistor. But I'm wondering if, in my case, it's necessary.

I have an eight digit multiplexed display, using 14 segment LEDs. A PIC
selects the digit and turns on its common anode through an NPN
transistor (and I also don't have a resistor between the PIC and the
transistor's base). The transistor's collector is at +5 with no current
limiting resistor. The PIC selects the individual segments within a
digit by having its I/O lines tied to the cathodes and setting the
output to 0 to turn on the segment. There's no resistor on the cathodes
or the anodes.

Everything seems to work great; the LEDs light at a reasonable
brightness (though there's some variation in the brightness - I learned
too late why I should've bought common cathode LEDs instead of common
anode). If I put in current limiting resistors of 220 ohms, the LEDs
are dimmer than I'd like (remember that the display is multiplexed, so
each digit is off 7/8 of the time, or more if I use PWM to dim the LEDs
in a dark room).

Is this a "safe" configuration? Can I get away with no resistors since
each LED is off most of the time? What about the PIC - the LEDs might
be off most of the time, but some of the PIC's I/O lines are
potentially sinking current all the time. Am I going to eventually fry
my LEDs, PIC, or both?
I would say that is a yes. Most LED's have a max current of 0.020
amps and a forward voltage drop 1.8 volts for a green and 2.1 volts
for a red. You are putting at least twice the rated volts on the LED.
This will increase the current thru the LED and will eventually burn
it out. That's why the resistor is there, it doesn't just limit the
current, the resistor is there to be the voltage drop for the excess
voltage which is just as important as limiting the current.
Even though you are multiplexing the display, not having the resistors
there will shorten the working life of the display.
 
P

petrus bitbyter

Jan 1, 1970
0
realexander said:
Hi,

Of course, everywhere I see a circuit with an LED, there's a current
limiting resistor. But I'm wondering if, in my case, it's necessary.

I have an eight digit multiplexed display, using 14 segment LEDs. A PIC
selects the digit and turns on its common anode through an NPN
transistor (and I also don't have a resistor between the PIC and the
transistor's base). The transistor's collector is at +5 with no current
limiting resistor. The PIC selects the individual segments within a
digit by having its I/O lines tied to the cathodes and setting the
output to 0 to turn on the segment. There's no resistor on the cathodes
or the anodes.

Everything seems to work great; the LEDs light at a reasonable
brightness (though there's some variation in the brightness - I learned
too late why I should've bought common cathode LEDs instead of common
anode). If I put in current limiting resistors of 220 ohms, the LEDs
are dimmer than I'd like (remember that the display is multiplexed, so
each digit is off 7/8 of the time, or more if I use PWM to dim the LEDs
in a dark room).

Is this a "safe" configuration? Can I get away with no resistors since
each LED is off most of the time? What about the PIC - the LEDs might
be off most of the time, but some of the PIC's I/O lines are
potentially sinking current all the time. Am I going to eventually fry
my LEDs, PIC, or both?

Thanks,
Bob Alexander

You're speaking about something like Luhans superprobe?
http://members.cox.net/berniekm/super.html
I've one laying around here, continously on for months without problems.
Apparently the load does not exceed the 25mA max. as specified in the
datasheet.

petrus bitbyter
 
E

Eeyore

Jan 1, 1970
0
Yes ( or a current source ).

LEDs aren't voltage driven devices.

Graham
 
A

Ancient_Hacker

Jan 1, 1970
0
LED's tolerate overcurrent for short periods, but what if your PIC
somehow stalls and leaves one ON? You could burn out an LED rather
quickly that way.
 
S

Spehro Pefhany

Jan 1, 1970
0
Hi,

Of course, everywhere I see a circuit with an LED, there's a current
limiting resistor. But I'm wondering if, in my case, it's necessary.

I have an eight digit multiplexed display, using 14 segment LEDs. A PIC
selects the digit and turns on its common anode through an NPN
transistor (and I also don't have a resistor between the PIC and the
transistor's base). The transistor's collector is at +5 with no current
limiting resistor. The PIC selects the individual segments within a
digit by having its I/O lines tied to the cathodes and setting the
output to 0 to turn on the segment. There's no resistor on the cathodes
or the anodes.

Everything seems to work great; the LEDs light at a reasonable
brightness (though there's some variation in the brightness - I learned
too late why I should've bought common cathode LEDs instead of common
anode). If I put in current limiting resistors of 220 ohms, the LEDs
are dimmer than I'd like (remember that the display is multiplexed, so
each digit is off 7/8 of the time, or more if I use PWM to dim the LEDs
in a dark room).

Is this a "safe" configuration? Can I get away with no resistors since
each LED is off most of the time? What about the PIC - the LEDs might
be off most of the time, but some of the PIC's I/O lines are
potentially sinking current all the time. Am I going to eventually fry
my LEDs, PIC, or both?

Thanks,
Bob Alexander

It's usually considered poor engineering practice* to do this sort of
thing in a production design, as there is no guarantee that the LED
current will be limited to an acceptable value, especially from
unit-to-unit. We generally put drivers in there that are more capable
and then limit the current to a predictable range rather than
depending on "untested" characteristics of the parts and just hope it
doesn't vary out of the acceptable range for brightness or
reliability, and hope that the manufacturer doesn't replace the chip
with an 'A' version made on a different process with different (and
also variable) characteristics.

For a one-off, for use over a modest temperature range, and no
particular reliability requirement (eg. a hobbyist project), if the
display appears to be a similar brightness to what you see with a
conservative DC current passing through it (say 5 or 10mA DC through a
single segment), then you're going to be fine. The current will
typically halve/double over a wide temperature range, but fortunately
it's in the "right" direction (decreasing with increasing temperature)

You don't need resistors on the NPN transistor bases- you're using
them as emitter-followers.

*
http://www.vintagecalculators.com/assets/images/SinclairExecutive_1a.jpg


Best regards,
Spehro Pefhany
 
A

Arlet

Jan 1, 1970
0
realexander said:
I have an eight digit multiplexed display, using 14 segment LEDs. A PIC
selects the digit and turns on its common anode through an NPN
transistor (and I also don't have a resistor between the PIC and the
transistor's base). The transistor's collector is at +5 with no current
limiting resistor. The PIC selects the individual segments within a
digit by having its I/O lines tied to the cathodes and setting the
output to 0 to turn on the segment. There's no resistor on the cathodes
or the anodes.

Everything seems to work great; the LEDs light at a reasonable
brightness (though there's some variation in the brightness - I learned
too late why I should've bought common cathode LEDs instead of common
anode). If I put in current limiting resistors of 220 ohms, the LEDs
are dimmer than I'd like (remember that the display is multiplexed, so
each digit is off 7/8 of the time, or more if I use PWM to dim the LEDs
in a dark room).

Have you tried using a lower value current limiting resistor ? 220 ohms
seems a bit high for a multiplexed design. Does the LED datasheet
specify a peak current limit ? Typical LEDs allow a much higher current
for short peaks compared to their continuous current limit. Depending
on the type of LED and the pulse width, perhaps something like 22-47
ohms will work better. You can then also easily measure voltage across
resistor, and verify the current.
 
realexander said:
Of course, everywhere I see a circuit with an LED, there's a current
limiting resistor. But I'm wondering if, in my case, it's necessary.

Your design can work according to (your) plan, or can fail.
To the extent that it is planned, it's your responsibility to see to
any necessary design decisions.

In the general case, a LED has a characteristic curve (the I versus V
curve that you see on a curve tracer, or more accurately a family
of such curves for different temperatures and for diodes from the
same manufactured batch). And your drive provisions (power supply
and transistors and resistors and such) have a characteristic curve,
too, called
the load line. Where these two curves cross, is the operating point
for the LED. If that operating point is too high, it can waste power
or overheat the LED. If it is too low, the lamp will be too dim.

So, the problem is to get the operating point in the 'good enough'
region
under all conditions of temperature, power supply voltage, and
semiconductor
characteristics that are expected for your design. Some LED
flashlights
just connect the LED to a battery; they work, but only because the
battery
has significant internal resistance (do you know the load line for your
battery?).
Better LED flashlights, operating close to the high end of acceptable
LED
current, benefit from resistors or more complex current controls.

You have just come to a complex question of design tradeoffs, requiring
lots of the data sheets for your components and significant thought.
Welcome to engineering.
 
R

Richard Henry

Jan 1, 1970
0
realexander said:
Hi,

Of course, everywhere I see a circuit with an LED, there's a current
limiting resistor. But I'm wondering if, in my case, it's necessary.

I have an eight digit multiplexed display, using 14 segment LEDs. A PIC
selects the digit and turns on its common anode through an NPN
transistor (and I also don't have a resistor between the PIC and the
transistor's base). The transistor's collector is at +5 with no current
limiting resistor. The PIC selects the individual segments within a
digit by having its I/O lines tied to the cathodes and setting the
output to 0 to turn on the segment. There's no resistor on the cathodes
or the anodes.

Everything seems to work great; the LEDs light at a reasonable
brightness (though there's some variation in the brightness - I learned
too late why I should've bought common cathode LEDs instead of common
anode). If I put in current limiting resistors of 220 ohms, the LEDs
are dimmer than I'd like (remember that the display is multiplexed, so
each digit is off 7/8 of the time, or more if I use PWM to dim the LEDs
in a dark room).

Is this a "safe" configuration? Can I get away with no resistors since
each LED is off most of the time? What about the PIC - the LEDs might
be off most of the time, but some of the PIC's I/O lines are
potentially sinking current all the time. Am I going to eventually fry
my LEDs, PIC, or both?

That multiplexing method is commonly called "dimming".
 
P

Paul E. Schoen

Jan 1, 1970
0
realexander said:
Hi,

Of course, everywhere I see a circuit with an LED, there's a current
limiting resistor. But I'm wondering if, in my case, it's necessary.

I have an eight digit multiplexed display, using 14 segment LEDs. A PIC
selects the digit and turns on its common anode through an NPN
transistor (and I also don't have a resistor between the PIC and the
transistor's base). The transistor's collector is at +5 with no current
limiting resistor. The PIC selects the individual segments within a
digit by having its I/O lines tied to the cathodes and setting the
output to 0 to turn on the segment. There's no resistor on the cathodes
or the anodes.

Everything seems to work great; the LEDs light at a reasonable
brightness (though there's some variation in the brightness - I learned
too late why I should've bought common cathode LEDs instead of common
anode). If I put in current limiting resistors of 220 ohms, the LEDs
are dimmer than I'd like (remember that the display is multiplexed, so
each digit is off 7/8 of the time, or more if I use PWM to dim the LEDs
in a dark room).

Is this a "safe" configuration? Can I get away with no resistors since
each LED is off most of the time? What about the PIC - the LEDs might
be off most of the time, but some of the PIC's I/O lines are
potentially sinking current all the time. Am I going to eventually fry
my LEDs, PIC, or both?

Thanks,
Bob Alexander

PICs have some (most?) outputs designed to drive LED loads, and maximum
current is specified as 25 mA. The low output is typically about 0.5 V at
this current, and the high voltage is about 2.5 V, so if the LED segments
drop about 2 volts, you will not exceed the rating of the PIC or the LED.

You can drive the LED segments with up to about 100 mA in a multiplexed
display, so the average current is only 100/8 or 12 mA. Using resistors and
higher current driver transistors for the digit and segments will give you
a brighter and more consistent display. Without resistors the segment
current will vary depending on temperature of the PIC's MOSFET outputs as
well as the tempco of the LED itself, and also how many segments are on for
each digit. What you have is probably OK (safe) for a hobby application but
not for any product you want to produce.

Paul
 
Top