Go Down

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

#### pito

#30
##### Aug 12, 2012, 07:26 pmLast Edit: Aug 12, 2012, 07:43 pm by pito Reason: 1
@gooby:
do not care about the resistance of an LED when forward biased (at specific current) as this is something we do not do (as lefty said a diode is CURRENT driven device, so we do not care on exact voltage drop at specific current). So the experts do not say "the red LED has 2000millicandela luminosity at 1.6Volt forward voltage", but they always say "the red LED has 2000millicandela luminosity at 10mA current"..
Instead you have to learn the "typical forward voltages" of red, yellow, green, blue, white, ultraviolet, infrared LEDs. So google that info and that is ALL what you need.
PS:
A diode is current driven device - that means we talking always about currents flowing through the diode, not the voltages on the diode. Why? Because theoreticaly a change of the voltage on a diode from 0.0 - 0.7V may cause a current change from 0.0A - 1000000Ampers (ideal diode, ideal voltage source). Therefore the current driven device must have a current limitation outside the device..

#### runaway_pancake

#31
##### Aug 12, 2012, 07:37 pm
gooby,
It looks like you have it.
Reds are typically about 2V, Greens and Yellow around 2.4V, Blues and whites are 3.5 to 4V.
So, eyeball those datasheets.
If you're not sure, just use a 1K and light them with the 5V and measure the voltage across the LED.  Once it's on right it will vary, by 10s of millivolts at the most, between 2mA and 20mA.

And the 20mA preoccupation - there's not a lot of difference in intensity between that at 10mA and at 20mA.  So, why wind it out like that?  Just something to consider.
"Who is like unto the beast? who is able to make war with him?"
When all else fails, check your wiring!

#### retrolefty

#32
##### Aug 12, 2012, 07:42 pm

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:

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

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

Yes that would work fine. The actual current will vary a small amount depending on the exact forward voltage drop of the specific led running at a specific temperature. It's not all that critical a value and most times I would just calculate it based on a desired 10ma of current flow (if not lower), brightness will hardly be effected and why waste more current then actually required to see the led?

Lefty

#### gooby

#33
##### Aug 12, 2012, 07:58 pm
If you're not sure, just use a 1K and light them with the 5V and measure the voltage across the LED.  Once it's on right it will vary, by 10s of millivolts at the most, between 2mA and 20mA.

Well, I haven't got a multimeter yet.

In any case, for the time being, I'm going to play things safe and overdo the resistance to some degree.

If I have problems, I'll ask around here for a further course of action.

#### pito

#34
##### Aug 12, 2012, 08:07 pmLast Edit: Aug 12, 2012, 09:06 pm by pito Reason: 1
@gooby:
If tomorrow somebody comes to you and asks you following:
"I need to connect this nice blue LED to this 1300V voltage source to indicate it is on", you will calculate it simply:

- this blue LED lits nice at 4mA current (you know that from your experience)
- typical forward voltage for blue LED is 3.5Volt (you google that)

R = ( 1300V - 3.5V ) / 0.004A = 324000ohm (you will use 330kohm)

Power at resistor = I*I*R = 0.004A * 0.004A * 330000ohm = 5.28 Watt (you will use 10Watt resistor to keep it cooler)

Power at LED = U * I = 3.5V * 0.004A = 14 mWatt

So you need a 330kiloohm 10Watt rated resistor to be happy (mind the high voltage is lethal !)

#### gooby

#35
##### Aug 12, 2012, 08:34 pm
Yeah I don't think Arduino can supply that kind of voltage / current lol.

Go Up