LED - resistor & current relations

cmd1024:
dx.... I am talking about the information is not matching the experiments. Look what is written about LEDs:

"So it’s vital to stay within the limits of the LED. If you would attach an LED to a 5 Volt power supply directly, you would burn it instantly. The high current would destroy the pn-gate. That’s the point where the current limiting resistor comes in."

This is not true or not complete. LEDs are ok with 5V without any resistor.

I'll state that your statement is not correct. Could you give examples or sources showing where a standard led (lets say a red one) can be wired directly to a 5vdc voltage source and not suffer damage either immediatlly or after a given amount of time?

An led, once biased above it's forward voltage drop rating, effectively becomes a short circuit and therefore there is no means to keep the forward current below it's maximum rated value, damage is sure to follow. But please to be sure to explain the technical reason you don't think this is true.

Lefty

ok - let me try to explain this a bit more clearly...

There are 2 kinds of limits you'll deal with -

  1. the current limit beyond which the LED eventually goes Kaput - for most LED's going beyond 50mA 100 mA will eventually burn them out
  2. the amount of current which Arduino's pins are able to support - 40 to 50mA is about the safe limit.

So what's probably happening in your case is, you're running Arduino's pins at or beyond it's current limit - and the gate in Arduino is probably acting as the current limiter - your LED's life will be reduced... but more importantly, it's possible that your Arduino will get damaged.

pluggy:

Depends where the 5V is coming from, if its from a digital pin on the arduino, the gate on the processor is acting as the current limiter.

What 'gate' on what 'processor' are you talking about? Arduino output pins comprise of simple N and P channel transistors wired to ground and +5vdc, Their junction becomes the output pin. there is no current limit to how much current a load can try and draw from the pin, just a limit on how much current will flow for how long before one or the other transistor burns open.

You're too tight to buy resistors ?

Agreed, one must use series current limiting resistors to drive leds at their designed current level.
Lefty

I think it is because Arduino supplies voltage and current with PWM, which switches on and off the LED for very small durations. That might protect to LED to burn out. Since it is not a continuous current.

And i think the best explanation is mine :stuck_out_tongue_winking_eye:

and the gate in Arduino is probably acting as the current limiter -

Again what gate are you speaking of, there is no such 'gate' involved. Arduino output pins are fully saturated on or off when in their output mode.

Lefty

A regular led should not be powered more than 30ma or you willl get a shorter life,
An arduino pin can only provide 40ma max so the internal pin resistance is actually acting as a series limiting resistor, except the heat will destroy the internals of your arduino instead of being dissapated in a normal resistor
if you leave 10 leds like that, most likely they will all be out in a week
some leds actually do have internal resistors and are rated for 5v, most do not
I've tried the same to se how far I can push a 1w lled before it burns out
I got it to 1.81 amps(normally rated for 350ma) without it burning out, I had a cpu heatsink and fan on it to dissapate heat, and I thought wow it survived untouched and gave off the light of a 10w led
however when I attempted to use it at the rated power again you can tell it was damaged from the high current because it was half as bright as a fresh led
im sure a regular led can't withstand 1.8 amps but say you drive 80ma thru it, you will permanently damage it even tho you see it working
spec sheets are there with max operating values for a reason

winner10920:
A regular led should not be powered more than 30ma or you willl get a shorter life,
An arduino pin can only provide 40ma max

Not correct, an arduino output pin cannot limit it's output current to 40ma if the load resistance is such that more then that will flow. The 40ma specification is just a warning that pin damage is certain to follow if you attempt to cause the output current to exceed that amount by having a load resistance that is too small.

so the internal pin resistance is actually acting as a series limiting resistor, except the heat will destroy the internals of your arduino instead of being dissapated in a normal resistor
if you leave 10 leds like that, most likely they will all be out in a week
some leds actually do have internal resistors and are rated for 5v, most do not
I've tried the same to se how far I can push a 1w lled before it burns out
I got it to 1.81 amps(normally rated for 350ma) without it burning out, I had a cpu heatsink and fan on it to dissapate heat, and I thought wow it survived untouched and gave off the light of a 10w led
however when I attempted to use it at the rated power again you can tell it was damaged from the high current because it was half as bright as a fresh led
im sure a regular led can't withstand 1.8 amps but say you drive 80ma thru it, you will permanently damage it even tho you see it working
spec sheets are there with max operating values for a reason

I think it is because Arduino supplies voltage and current with PWM, which switches on and off the LED for very small durations. That might protect to LED to burn out. Since it is not a continuous current.

@cmd1024
Total and utter rubbish. You are fooling yourself and damaging your arduino.
I wrote a page for deluded folk like you:-
http://www.thebox.myzen.co.uk/Tutorial/LEDs.html

I read any information about them, it is written almost everywhere that series resistor is a must to use, otherwise LED will burn out instantly.

Please show us where you read this.

Here’s a commercial design that powers not a single LED, but up to 8+ LED’s from a single ATMega328P pin without any current limiting resistors whatsoever:

Buyers/prospects seem to be concerned with lack of standoffs/mounting holes and one guy is “shocked” with regards to the SPI SW interface implementation. Not a single comment about the basic electrical design or lack of current limiting resistors.

Assuming the SparkFun designer is ignorant to the popular opinion of this forum, how would you qualify this design in terms of ee? (Facts rather than name-calling and opinions would be refreshing).

BenF:
Here’s a commercial design that powers not a single LED, but up to 8+ LED’s from a single ATMega328P pin without any current limiting resistors whatsoever:

http://www.sparkfun.com/datasheets/Components/LED/7-Segment/SPI_to_4x7SD-v22.pdf

Buyers/prospects seem to be concerned with lack of standoffs/mounting holes and one guy is “shocked” with regards to the SPI SW interface implementation. Not a single comment about the basic electrical design or lack of current limiting resistors.

Assuming the SparkFun designer is ignorant to the popular opinion of this forum, how would you qualify this design in terms of ee? (Facts rather than name-calling and opinions would be refreshing).

Could you provide the actual sparkfun product link or number please?

Lefty

Can you imagine how tiny an AVR output driver is, and how quickly it heats up with the passage of excess current?
Can you guess what thermal shock does on such a tiny scale?

Yes, of course stuff works, and it may work in one particular device for quite a long time, but don't do it for large production runs, or even suspect that it will work even once in small runs.

Product link is here:

Hi Retrolefty,

Referring you to the ATMEGA48A/PA/88A/PA/168A/PA/328/P Manual -
Pg 77 - "Each output buffer has symmetrical drive characteristics with both high sink and sourcecapability. The pin driver is strong enough to drive LED displays directly.... All I/O pins have protection diodes to both VCC and Ground..."
Pg 318 - "If IIOH exceeds the test condition, VOH may exceed the related specification. Pins are not guaranteed to source current
greater than the listed test condition"

My interpretation therefore is - the LED did not burn out within a few seconds as it would if connected to a ordinary 6V battery because the "Pin Driver" (as Amtel calls it) is not able to source current more than a certain maximum beyond its rated limit as indicated in the manual.

Of course - doing this is pushing the ATMega chip into extremely unsafe territory :slight_smile:

Not a single comment about the basic electrical design or lack of current limiting resistors.

Well that just shows you the knowledge level of those commenting.

Have you read that page I wrote?
Have you seen the results of the experiments I did?
You can get 250mA peak current out of an arduino pin, where the level where damage starts to be done is 40mA.
Or are you one of those people who don't believe that the data sheets should be taken seriously?

My interpretation therefore is - the LED did not burn out within a few seconds as it would if connected to a ordinary 6V battery because the "Pin Driver" (as Amtel calls it) is not able to source current more than a certain maximum beyond its rated limit as indicated in the manual.

It might be your interpretation of the words but you would be very wrong.

Pins are not guaranteed to source current greater than the listed test condition"

The listed test conditions is 20mA.
The Pg 77 line has nothing to do with the point in question.

Not a single comment about the basic electrical design or lack of current limiting resistors.

They have now. ]:smiley: check again.

Grumpy_Mike:
They have now. ]:smiley: check again.

That may be my opinion exactly, but that is not very useful for those who come here to learn, is it?

If you look at the VI curves (driver strength section) in the AtMega datasheet, the output stage drops about 0.6V when sourcing 20mA and slightly less when sinking. This suggests that for some combination of Vcc and LED forward voltage, the inherent current sink/source capability may be all that is needed to stay within safe operating limits. A discussion along what these operating conditions are would be much more informative than the typical opinionated posts on this topic.

BenF:

Grumpy_Mike:
They have now. ]:smiley: check again.

That may be my opinion exactly, but that is not very useful for those who come here to learn, is it?

If you look at the VI curves (driver strength section) in the AtMega datasheet, the output stage drops about 0.6V when sourcing 20mA and slightly less when sinking. This suggests that for some combination of Vcc and LED forward voltage, the inherent current sink/source capability may be all that is needed to stay within safe operating limits. A discussion along what these operating conditions are would be much more informative than the typical opinionated posts on this topic.

What many of us try to do on this site when helping beginners is to give good fundamentally sound information. That tends to best help them with not only their specific problem or question at the time but is also fundamentally helpful for their learning growth. We use ohm's law to try and explain or demonstrate basic principles. So rather then trying to rely on some questionable practice, we try and give solutions that mimic good engineering practices. A good lesson is one that applies to many or any circuit example, rather then just relying on a one-off trick.

Driving LEDs from voltage sources without an specific means of controlling the current to a predictable value is just not following sound practices, rather it's relying on dynamic duty cycle or built in impedance to control current in a hard to predict manner. There are many circuits published on the web and even in printed manner that are just plain wrong or hinge on poor practices. I have no qualms with someone who wishes to abandon good practices for the sake of economy or just to prove they can get away with some short-cut, as long as they don't pass it on to others as example of proper design. They should expect to get some push-back from those that have equal or more knowledge and experience, even if they won't except such advice.

Given the choice to show a beginner how to do something cleaver Vs something fundamentally sound, I'll stick with the latter. So without measurement, how would you calculate the specific current that will flow through the LED segments? If the segments end up being too dim or too bright, what then? If you can't calculate it and therefore control it, you have failed to engineer the design, but rather just allowed circuit dynamics beyond your control to somehow manage to not burn out, at least initially. That is not engineering, that is just playing with stuff and finding out what smokes or not.

Lefty

This suggests that for some combination of Vcc and LED forward voltage, the inherent current sink/source capability may be all that is needed to stay within safe operating limits

It might suggest this to you but you would be very wrong to come to this conclusion.
If you look at the experiments I did on this page:-
http://www.thebox.myzen.co.uk/Tutorial/LEDs.html
You can see that I got currents out of an arduino pin in excess of 250mA. The maximum before damage is done to a pin is 40mA. So the pins do not operate within safe limits they are over 600% over the safe limit. That is not a good way to design a circuit. It might not lead to instant smoke and destruction of the but it will severely shorten the life and reliability of the product. The LED is not as vulnerable because of two things.

  1. The can often stand much higher currents if they are pulsed.
  2. The way an LED responds to excess current that is not strong enough to melt it is to reduce it's brightness. Abused LEDs do not shine as bright. Again it's lifetime is reduced. In fact the lifetime of an LED is defined as a half life, that is the time taken for the brightness to drop by half.

Abused components that are not abused enough to instantly kill them suffer internal damage that will shorten their life. However nothing can be learned about this from one or two isolated tests. You need to run many hundreds of such circuits to be able to quantify what the reduced life time is.
In one job I had as a designer of digital set to boxes, one team (not my team) had a design that involved a lot of LEDs and at the customers instance had made the LEDs as bright as possible but still keeping to the limits in the data sheet. There were about 17 LEDs in the product. The result was a 10% failure rate in boxes in the first year. Which when you are making one million boxes is 100,000 faulty units. So while you think you might get away with it, and indeed you might not notice it on one unit, on average the design is not repeatable especially if you put it on the net for other poor saps to copy.

Anyway what is so bad about using a resistor, they are very cheap to the point of almost insignificance. If you are afraid of them then maybe you should pick another hobby. If you still think they are unnecessary then you defiantly should pick another hobby.

Completely buy your point Mike... NOT suggesting using such an incredibly faulty circuit design for LEDs without current limiting resistors - just trying to figure out what happened -> ie. Why didn't something (Chip, LED, some interconnection...) burn out within a few seconds due to an uncontrolled current surge into the Amperes range - which would have happened if say the LED had instead been connected across terminals of a 6V battery with internal resistance typically couple of hundred milliohms.

Thanks for sharing your really interesting current stress-test results on Arduino pins - i'd have never dared trying out anything more than 30-40 milliAmps - so nice to know info :slight_smile: