Go Down

Topic: Before I break anything (Read 2006 times) previous topic - next topic

retrolefty

#15
Aug 12, 2012, 06:05 pm Last Edit: Aug 12, 2012, 06:07 pm by retrolefty Reason: 1

Hmm.. I am familiar with transistors(I use opamps to increase the amps though). But, isnt current load dependent? If Led is the load, mcu will only supply the the current which led requires.. Rite?


No, that is the point. Once a led 'sees' enough voltage equal to or higher then it's forward voltage drop specification, it turns on fully and has no control or means to limit the current that will try and flow through it to it's recommended ratings. An led is not like a lamp bulb where if you just supply it with it's rated voltage the proper current amount will flow. An led is a diode, a much different animal, once it is turned on it acts like a short circuit to current flow and something external to the led must limit the current to a specific value. A diode is a form of a solid state switch with only two modes, fully off or fully on, the circuit must provide proper driving current as the led cannot.

Does that help?

Lefty

-SaRaH-

Oh ok.. I get it.. If i got this rite, the LED doesnt really exist if 5v is supplied, which makes it a closed loop providing 40mA to the arduino pins.. Correct?

But, I have another doubt now. If this is the case, y doesnt it work when it is reversed? I mean the LED

retrolefty

#17
Aug 12, 2012, 06:11 pm Last Edit: Aug 12, 2012, 06:30 pm by retrolefty Reason: 1

Oh ok.. I get it.. If i got this rite, the LED doesnt really exist if 5v is supplied, which makes it a closed loop providing 40mA to the arduino pins.. Correct?

That statement makes no sense, maybe you can reword it?

But, I have another doubt now. If this is the case, y doesnt it work when it is reversed? I mean the LED

A led is a diode, if wired with proper polarity and at a voltage equal to or in excess of it's forward voltage rating it will turn on and conduct current. If a diode has a voltage applied at less then that or if the voltage is of reverse polarity, then the led will turn off and not conduct any current. Again a diode is a switch, a led is a diode that happens to emit light.


You also have a misunderstanding about the arduino 40 ma rating. It's like a maximum temperature rating, you must take steps to keep the temperature of the chip less then it's maximum rated operating temperature, the chip has such a rating but can't do anything to keep you from subjecting it to temperatures higher then it's limit. So also for a arduino output pin it has a similar safety ratings, but cannot prevent you from actually exceeding that safety rating, that's up to you with what ever circuit load you wire up to the output pin.

-SaRaH-

Led is a mere wire at 5v. All we are doing is short circuiting arduino pins.. rite?


At reverse breakdown voltage of LED, it becomes short circuit rite?
Does it still damage the pins when it is reverse biased and voltage exceeds the Breakdown voltage???

pito

..if you may want to learn more practical electronics, just do experiment (within a safe area). You are asking why to use 560ohm resistor - you may use any resistor bigger than the recommended minimal value. The max LED current is typicaly 20mA, but the today's LED will lit fine with 0.3mA as well.

Just take few resistors - for example 10k, 6k8, 4k7, 3k3, 2k2, 1k, 560 ohm, and do try how the LED will lit. It has been discussed many times - the people use "20mA rule" for LED's resistor calculation because it was so in seventhies/eighties. Today's modern LEDs lit nice with 10k resistor at 3V3 (they have much bigger efficiency and most of them include internal optical reflector, etc). Most people learned electronics through experimentation (ie Tesla, Marconi, and others..) :)

retrolefty


Led is a mere wire at 5v. All we are doing is short circuiting arduino pins.. rite?

Yes, if the led has a forward voltage rating of less then or equal to 5vdc, it will turn on and act like a short circuit, just as if you wired an output pin to ground and turned the pin to HIGH. Such a 'short circuit' has no way to limit the output pin current to 40 ma or less and pin damage will soon follow.

At reverse breakdown voltage of LED, it becomes short circuit rite?
Does it still damage the pins when it is reverse biased and voltage exceeds the Breakdown voltage???

If the applied reverse voltage is less then it's max reverse voltage limit value then the led will just be turned off and no current will flow and no damage will happen. If the applied reverse voltage exceeds the leds maximum reverse voltage rating then the diode can be damaged and possibly high current can flow.

-SaRaH-

ok.. This was an eye opener... Thanks everyone.. :)

gooby

Alright, this blew up quickly. How does this sound?

I now know that the pins give 5V; upon closer inspection, I was able to find specifications for the 10mm LEDs (like this: http://www.adafruit.com/products/301) and as far as I can tell, I want to stay at or below 20 mA and, let's say, 3.6 V (middle of the range given on Adafruit).

So then by Ohm's law, I want a resistor of at least 250 ?. My impression is that the resistance an LED puts up under forward current is negligible compared to that of the resistor, so this is not really not something I need to worry about in terms of voltage division.

Is that right?

winner10920

The only way you can bypass the resistor would be to provide it the exact voltage it needs so say 2.7 volt supply, the problem is the exact forward voltage varies with temperture, that's were constant current supplies come in, they automatically change the voltage to the exact value needed to stay at a select current

gooby


The only way you can bypass the resistor would be to provide it the exact voltage it needs so say 2.7 volt supply, the problem is the exact forward voltage varies with temperture, that's were constant current supplies come in, they automatically change the voltage to the exact value needed to stay at a select current



Who is this addressed to?

pito

#25
Aug 12, 2012, 06:59 pm Last Edit: Aug 12, 2012, 07:19 pm by pito Reason: 1
at gooby:
the MINIMAL usable resistor for a typical LED connected to the Arduino (5V) is calculated as follows:
- supply Voltage 5V (from the PIN when log 1, or to the pin when log0)
- maximal LED current 20mA (must be less than the mcu's pin max sink/source current)
- typical forward voltage with RED diode @20mA is 1.6Volt
So:
R = (5V-1.6V)/0.02A = 170ohm.
That is a MINIMAL (the smallest value) resistor I would ever use with ANY LED (an LED of ANY colour) connected to Arduino. Any smaller value may damage your arduino. But I will always use much bigger resistor, of course..

HOWEVER (!!!), the LED may lit beautifuly with 4700ohm resistor as well (as you have NO idea about the current vs. LED brightness dependency, though).

retrolefty

#26
Aug 12, 2012, 07:00 pm Last Edit: Aug 12, 2012, 07:02 pm by retrolefty Reason: 1

Alright, this blew up quickly. How does this sound?

I now know that the pins give 5V; upon closer inspection, I was able to find specifications for the 10mm LEDs (like this: http://www.adafruit.com/products/301) and as far as I can tell, I want to stay at or below 20 mA and, let's say, 3.6 V (middle of the range given on Adafruit).

So then by Ohm's law, I want a resistor of at least 250 ?. My impression is that the resistance an LED puts up under forward current is negligible compared to that of the resistor, so this is not really not something I need to worry about in terms of voltage division.

Is that right?


No. You have a device that you want to operate at 20 ma and driven by a constant voltage source of +5vdc. So your resistor must drop 1.4vdc (5v - 3.6v) while 20 ma of current is flowing. So ohms law for calculating the resistor size would be 1.4V / .02A = 70 oms.

Lefty

winner10920

Didn't see your last post, just wanted to tell you about another option
and yes, if you wanted to put an actual resistance to the led it would be like an open circuit if the voltage is below its forward voltage, and a near short circuit(so less than a few ohms) after it has passed its forward voltage
and yes that would work
5v-3.6=1.4/.02=70ohms minimum resistor(same as above just said)
anything higher will work just fine so long as you have a few ma still flowing, and like someone said leds these days do great wit even less than 1ma
personally I usually use a 1k resistor, it is plenty for a wide range of voltages and at 5v its still quite bright for drawing so little

retrolefty


Didn't see your last post, just wanted to tell you about another option
and yes, if you wanted to put an actual resistance to the led it would be like an open circuit if the voltage is below its forward voltage, and a near short circuit(so less than a few ohms) after it has passed its forward voltage
and yes that would work
5v-3.6=1.4/.02=70ohms minimum resistor(same as above just said)
anything higher will work just fine so long as you have a few ma still flowing, and like someone said leds these days do great wit even less than 1ma
personally I usually use a 1k resistor, it is plenty for a wide range of voltages and at 5v its still quite bright for drawing so little


Yes, I believe arduino uses 1,000 ohm resistors for it's pin 13 and power leds, so current is only a few milliamps. The brightness of a led will vary with forward current value but it's not linear and I've found 3ma to be fine for most modern leds I've used, unless one needs maximum rated brightness for some reason.

Lefty

gooby


at gooby:
the MINIMAL recommended resistor for a typical LED connected to the Arduino (5V) is calculated as follows:
- supply Voltage 5V (from the PIN when log 1, or to the pin when log0)
- maximal LED current 20mA (must be less than the mcu's pin max sink/source current)
- typical forward voltage with RED diode @20mA is 1.6Volt
So:
R = (5V-1.6V)/0.02A = 170ohm.
That is a MINIMAL (the smallest value) resistor I would ever use with ANY LED (an LED of ANY colour) connected to Arduino.


I only have to consider the voltage dropped across the resistor in that calculation, not the total. Right. Duh. And the voltage drop across the LED is non-negligible. Well I erred on the side of caution I guess.

However, I should note that the product as described on its page gives a different estimate of forward voltage:

http://www.adafruit.com/products/301

"3.2-3.8V Forward Voltage, at 20mA current".

So it should be more along the lines of (5 - 3.2) / (20 / 1000) = ~90 ??

Go Up