I bought a new LED, yay.
The specs are
Color: Orange (clear)
Current: 20mA
Forward voltage 2V
4000mcd
I want to see the maximum brightness of it to see if it fits into one of my projects.
I am running it off a GPIO pin of my Arduino Pro Mini (3.3V)
I have verified that I get 3.3V from the GPIO pin I use, and the Arduino Pro Mini can deliver up to 40mA from those pins.
I checked the LED with a tester and it also reported 2V forward voltage.
So I was a bit lazy and I went here: LED Resistor Calculator
I put the numbers in and I got that I needed a 65 ohm resistor.
I didn't have a 65 ohm so I took a 47 ohm one instead. I plugged it in and almost nothing happened. The faintest of red glow appeared in the LED but the power draw according was so low it was not measurable.
So I understand that the forward voltage is something that needs to be exceeded in order for the LED to shine, and I assume that I don't reach that.
If I measure voltage between the two legs of the LED while using the 47 ohm resistor I get 1.6V. Obviously this is not enough for the LED to shine.
Just to test I put in a 10 ohm resistor instead. Now the LED glows bright and my multimeter says it uses 27mA. More than the LED wants so I only let it happen for a second.
So the two questions are:
What is wrong with the calculation from LED Resistor Calculator? Or am I doing something wrong?
And what is the accurate resistance the LED needs in order to use 20mA?
I put the numbers in and I got that I needed a 65 ohm resistor.
I get the same thing...
I checked the LED with a tester and it also reported 2V forward voltage.
Did it light-up with the tester?
Check the actual Arduino output voltage with the LED & resistor connected. I wouldn't expect the full 3.3V and it's probably quite a bit less.
You can also try the LED & resistor directly to the 3.3V power supply, but with 47 Ohm's you'll be exceeding the "recommended" 20mA.
...If 47 Ohms is too high and 10 Ohm's is too low, you might just have to experiment. Things are a LOT easier and more predictable if you have 5V to work with.
DVDdoug:
I get the same thing...
Did it light-up with the tester?
Check the actual Arduino output voltage with the LED & resistor connected. I wouldn't expect the full 3.3V and it's probably quite a bit less.
You can also try the LED & resistor directly to the 3.3V power supply, but with 47 Ohm's you'll be exceeding the "recommended" 20mA.
...If 47 Ohms is too high and 10 Ohm's is too low, you might just have to experiment. Things are a LOT easier and more predictable if you have 5V to work with.
Yeah it lit up with the tester
Yeah when I wrote "I have verified that I get 3.3V from the GPIO pin I use" I meant that I had verified it by measuring : )
I don't see any need to connect it to VCC as the voltage output of the GPIO seems to be correct. What I don't fully understand is why I can't calculate the correct resistor. I must be doing something wrong somewhere.
Why would 5V be better? Or just that its bigger so small diffs don't matter as much?
The calculator assumes that you want the full brightness of the LED. I never want my LEDs so bright that they would light the room. I typically use 1K for my LEDs.
SteveMann:
The calculator assumes that you want the full brightness of the LED. I never want my LEDs so bright that they would light the room. I typically use 1K for my LEDs.
But the result of the calculator is a too high resistor, not too low. I would assume that if the calculator wanted the full brightness it would hover near the max instead of the min.
Something isn't "adding up". 27mA through a 10 Ohm resistor is 0.27V, leaving 3.03V across the LED.
Why would 5V be better?
Because the whole calculation relies on the voltage drop across the resistor. With more voltage across the resistor the LED voltage matters less. i.e. With 12V you could "assume" all of the voltage is dropped across the resistor and get a "close enough" current calculation without even considering the ~2V drop across the LED. Or, the "12V" can vary by one volt and the LED brightness will hardly vary at all.
With your 47-ohm resistor in place, and the LED turned on, what is the voltage at the GPIO pin, and at the connection point between the resistor and the LED?
If the LED was bright with a 10 Ohm resistor, it would be only a little less bright with 47 Ohms.
Something was clearly incorrect - perhaps a 47k resistor.
Well that would be true, but only if neither of the resistor caused the voltage to go under the forward voltage for the LED. When dropped below this the LED stops shining altogether. This is what happened to me when using the 47 ohm resistor.
johnerrington: See my page here that shows how to choose a resistor value for different LEDs on an Arduino
Thanks will read!
ShermanP:
With your 47-ohm resistor in place, and the LED turned on, what is the voltage at the GPIO pin, and at the connection point between the resistor and the LED?
Don't have it wired up right now, but between the two legs of the LED it was 1,6V
Wawa:
Did you set the pin in setup to OUTPUT, with pinMode?
Leo..
Yeah, how else would it work with the lower resistor? : )
How are you calculating the value? Bear in mind that you are only interested in the residual Voltage, so with a 2v LED at 20mA, you are looking for a loss of 1.3V if the rail is 3.3V. 1.3V at 20mA is 65R so I would be using 68R. If it doesn't light fully at that, then your rail Voltage is dipping on load.
jontaa:
Well that would be true, but only if neither of the resistor caused the voltage to go under the forward voltage for the LED.
Well, I am sorry, but that is complete nonsense!
Mind you, it was actually true for a batch of really cheap, known faulty LEDs I bought some years ago, a couple of which still illuminate my doorbell push. They had a leakage resistance so when you put a resistor in series you would form a voltage divider and the resulting voltage could fall below the illumination voltage.
But that is not the case with a properly working LED which draws no (meaningful - beyond nanoamps/ picoamps; it is specified) current below the threshold voltage, so any resistor you put in series will cause it to draw some current and light as long as the applied voltage is higher than the threshold. Of course if the resulting current is too low, the actual light output may not be detectable, but for proper LEDs over the last couple of decades, "too low" is in the single or double digit microamp range.
I continue to wonder what the GPIO voltage is when the LED is on using the 47R resistor. If it's near 3.3V, and there's almost no light from the LED, then the resistor is actually some other value. You might measure the resistor with your meter.