Pages: [1] 2   Go Down
Author Topic: LED current limiting resistor  (Read 1251 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Sr. Member
****
Karma: 3
Posts: 268
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was thinking of using one of these:

http://www.mouser.com/ds/1/311/RTB_GFTM_Pb_free-24628.pdf

in a project and I am a bit confused on the correct value resistor to use.  I am powering my project from a 3.7V LiPo battery and a 3.3V regulator.  Page 4 of the PDF linked above shows a forward voltage for the green LED of 3.2V and a forward current of 20mA.  I believe the formula to use would be (3.3 - 3.2)/.02A which would equal a resistor value of 5 Ohms.  This seems really small and I would like to verify that this is correct.  Any assistance would be great!  Thanks!
Logged

Arduino Uno;
Mega328

Indiana, US
Offline Offline
Full Member
***
Karma: 12
Posts: 204
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think your math is right. You are not trying to knock the voltage down very far.  I see, however, that the forward current for "RED" is 40mA.  Even still, you should be good with a small value resistor, and the wattage is still below the 1/8W range.  Anything should work.  I might even go without...

That said, you should probably go a little higher.  Try it with a 10 or 22 ohm resistor and see if it's bright enough.
« Last Edit: December 25, 2012, 05:26:37 pm by patduino » Logged

There are 10 types of people in the world, those that understand binary, and those that don't.

0
Offline Offline
Sr. Member
****
Karma: 3
Posts: 268
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think your math is right. You are not trying to knock the voltage down very far.  I see, however, that the forward current for "RED" is 40mA.  Even still, you should be good with a small value resistor, and the wattage is still below the 1/8W range.  Anything should work.  I might even go without...

That said, you should probably go a little higher.  Try it with a 10 or 22 ohm resistor and see if it's bright enough.

Thanks!  I will probably size each resistor specific to the forward voltage and current of each individual LED.  The footprint for it is a bit odd....non-standard pad shapes.  I may have follow up eagle questions to get the pad shape just right.
Logged

Arduino Uno;
Mega328

United Kingdom
Offline Offline
Tesla Member
***
Karma: 220
Posts: 6587
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The problem is that your proposed supply voltage (3.3V) is too close to the nominal LED forward voltage (3.2V), so a simple series resistor won't give you good current control. I suggest you either run the whole project from 3.7V instead of 3.3V, or use constant current regulators fed from the 3.7V supply to drive the LEDs. Unfortunately, the standard 2-transistor constant current circuit needs around 1V minimum headroom and you only have about 0.5V, so you will need a more complicated constant current circuit, e.g. an op amp driving a mosfet.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

0
Offline Offline
Sr. Member
****
Karma: 3
Posts: 268
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The problem is that your proposed supply voltage (3.3V) is too close to the nominal LED forward voltage (3.2V), so a simple series resistor won't give you good current control. I suggest you either run the whole project from 3.7V instead of 3.3V, or use constant current regulators fed from the 3.7V supply to drive the LEDs. Unfortunately, the standard 2-transistor constant current circuit needs around 1V minimum headroom and you only have about 0.5V, so you will need a more complicated constant current circuit, e.g. an op amp driving a mosfet.

That sounds like a lot of trouble.  I may just find a more suitable LED.  I want to run the project from 3.3V because all of the peripherals are only 3.3V tolerant.
Logged

Arduino Uno;
Mega328

Indiana, US
Offline Offline
Full Member
***
Karma: 12
Posts: 204
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What exactly are you trying to do?  You might not need much control.
Logged

There are 10 types of people in the world, those that understand binary, and those that don't.

United Kingdom
Offline Offline
Tesla Member
***
Karma: 220
Posts: 6587
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

A lower voltage LED would certainly give you more options. However, if your LEDs have a forward voltage of 3.2V, then you could quite safely connect the anode to 3.7V and the cathode to an mcu output pin through a resistor, even if the mcu is powered through a 3.3V regulator. When the mcu output pin is high (3.3V), the forward voltage of the LED will only be 0.7V, so there will be negligible current through it. The red LED has a lower forward voltage, but you could run that one from the 3.3V supply.

Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

0
Offline Offline
Sr. Member
****
Karma: 3
Posts: 268
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What exactly are you trying to do?  You might not need much control.

It's just to indicate the status of the device.  It is a GPS logger so when you turn it on the led will be yellow (for on), when it starts scanning for satellites it will blink purple (just sort of making up colors right now...it could end up being something totally different), when it locks on to enough satellites to begin getting valid position data it will light up green and then when the user pushes a button to start recording data it will light up a different color to signify that it is recording data.
Logged

Arduino Uno;
Mega328

0
Offline Offline
Sr. Member
****
Karma: 3
Posts: 268
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A lower voltage LED would certainly give you more options. However, if your LEDs have a forward voltage of 3.2V, then you could quite safely connect the anode to 3.7V and the cathode to an mcu output pin through a resistor, even if the mcu is powered through a 3.3V regulator. When the mcu output pin is high (3.3V), the forward voltage of the LED will only be 0.7V, so there will be negligible current through it. The red LED has a lower forward voltage, but you could run that one from the 3.3V supply.



That could work but I read that a fully charged LiPo battery is actually about 4.2 volts.  It seems like it would be hard to get it right.  I think I may just use something like this:

http://optoelectronics.liteon.com/en-us/api/DwonloadFileHandler.ashx?txtSpecNo=DS22-2001-038&txtPartNo=LTST-C155KGJRKT

After all, I don't need a million different colors and the solder footprint of this one is much easier to make.
Logged

Arduino Uno;
Mega328

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you look at the datasheet, If = 30-40ma at Vfwd=3.3v, and that's just a fraction brighter than at 20ma.

Your pin's output resistance far outweighs that: the voltage loss at 20ma is about 0.5v.

So you can safely connect the led to the pin / Vcc directly.

Logged

Cleveland, TN
Offline Offline
Full Member
***
Karma: 2
Posts: 207
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am pretty sure you are going to have a problem using a simple 3.3V regulator with a 3.7 lipo.

Dropout voltage on a typical 3.3V regulator is going to be a little bit over 4V. So if you fully charge a Lipo and pump it through a standard 3.3V regulator you are going to have a very short life cycle if at all. I don't remember the exact number but at 4.2V, your regulator might be supplying less than 3.3V right out of the gate and it will fall off rapidly from there.

Even a Low Dropout Voltage Regulator is going to struggle in this case since your operating voltage is so close to the maximum voltage of the battery.

What you need is a Boost Convertor that will regulate your 3.3V down to less than 1V.

Here is one from Sparkfun that would work perfectly for what you are trying to do:

https://www.sparkfun.com/products/10255

This one is even better since it has a a charge circuit built in as well and is only about $5 more.

https://www.sparkfun.com/products/11231

If you already know all of this then I apologize.


Logged

Luck,

Wade

0
Offline Offline
Shannon Member
****
Karma: 159
Posts: 10409
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think your math is right. You are not trying to knock the voltage down very far.  I see, however, that the forward current for "RED" is 40mA.  Even still, you should be good with a small value resistor, and the wattage is still below the 1/8W range.  Anything should work.  I might even go without...

That said, you should probably go a little higher.  Try it with a 10 or 22 ohm resistor and see if it's bright enough.

Don't go without the series resistor, as the LED heats up its forward voltage decreases, meaning
from a fixed supply it will see an exponentially increase in current with temperature - which increases
the temperature - result thermal-runaway and burn out.  (Especially with a LiPo battery, which have
extremely low internal resistance)
Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is what the people making those devices are trying to tell you.

1) the If vs. Vfwd curve comes the led datasheet.
2) The thick green curve comes from those nice folks at Atmel. They are the I-V curve of a mcu's pin.

The two curves together determines the output current on the led, without any resistors. It is about 15ma If and 3v Vfwd. That's due to the pin's internal resistance (0.3v / 15ma = ??? ohm).

If the pin had no output resistance, its I-V curve would be like that red line at 3.3v. The output current would then be at 30ma.

That is essentially the basis why some designs have no serial resistors.



* led vs. avr.PNG (28.55 KB, 388x472 - viewed 13 times.)
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What people don't understand about diodes (leds specifically) is that the typical diode equation (Vfwd vs. If in an exponential relationship) doesn't hold at the kind of current levels we talk about.

In fact, if you look at the curve I posted earlier, you will see that the curve becomes concave, suggesting a deviation towards more of a linear relationship between Vfwd and If. That's particularly true for power leds.

So this "little Vfwd changes will yield huge If changes" thing doesn't hold any more.
Logged

0
Offline Offline
Sr. Member
****
Karma: 3
Posts: 268
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am pretty sure you are going to have a problem using a simple 3.3V regulator with a 3.7 lipo.

Dropout voltage on a typical 3.3V regulator is going to be a little bit over 4V. So if you fully charge a Lipo and pump it through a standard 3.3V regulator you are going to have a very short life cycle if at all. I don't remember the exact number but at 4.2V, your regulator might be supplying less than 3.3V right out of the gate and it will fall off rapidly from there.

Even a Low Dropout Voltage Regulator is going to struggle in this case since your operating voltage is so close to the maximum voltage of the battery.

What you need is a Boost Convertor that will regulate your 3.3V down to less than 1V.

Here is one from Sparkfun that would work perfectly for what you are trying to do:

https://www.sparkfun.com/products/10255

This one is even better since it has a a charge circuit built in as well and is only about $5 more.

https://www.sparkfun.com/products/11231

If you already know all of this then I apologize.




I'm actually using one of these (although time will tell if I will be able to successfully solder it).

http://www.mouser.com/Search/ProductDetail.aspx?R=TPS62237DRYTvirtualkey59500000virtualkey595-TPS62237DRYT
Logged

Arduino Uno;
Mega328

Pages: [1] 2   Go Up
Jump to: