Pages: [1] 2   Go Down
 Author Topic: LED current limiting resistor  (Read 562 times) 0 Members and 1 Guest are viewing this topic.
0
Offline
Full Member
Karma: 2
Posts: 237
Arduino rocks
 « on: December 25, 2012, 05:06:46 pm » Bigger Smaller 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
Full Member
Karma: 12
Posts: 161
 « Reply #1 on: December 25, 2012, 05:19:57 pm » Bigger Smaller 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
Full Member
Karma: 2
Posts: 237
Arduino rocks
 « Reply #2 on: December 25, 2012, 05:28:27 pm » Bigger Smaller 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
Karma: 131
Posts: 4674
 « Reply #3 on: December 25, 2012, 06:07:33 pm » Bigger Smaller 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. http://www.eschertech.com

0
Offline
Full Member
Karma: 2
Posts: 237
Arduino rocks
 « Reply #4 on: December 25, 2012, 06:23:54 pm » Bigger Smaller 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
Full Member
Karma: 12
Posts: 161
 « Reply #5 on: December 25, 2012, 06:29:28 pm » Bigger Smaller 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
Karma: 131
Posts: 4674
 « Reply #6 on: December 25, 2012, 06:32:18 pm » Bigger Smaller 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. http://www.eschertech.com

0
Offline
Full Member
Karma: 2
Posts: 237
Arduino rocks
 « Reply #7 on: December 25, 2012, 06:38:57 pm » Bigger Smaller 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
Full Member
Karma: 2
Posts: 237
Arduino rocks
 « Reply #8 on: December 25, 2012, 06:43:03 pm » Bigger Smaller 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:

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
Edison Member
Karma: 114
Posts: 2205
 « Reply #9 on: December 25, 2012, 08:43:58 pm » Bigger Smaller 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
Full Member
Karma: 2
Posts: 207
 « Reply #10 on: December 27, 2012, 05:19:01 am » Bigger Smaller 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,

0
Offline
Tesla Member
Karma: 71
Posts: 6624
Arduino rocks
 « Reply #11 on: December 27, 2012, 08:38:04 am » Bigger Smaller 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

Offline
Edison Member
Karma: 114
Posts: 2205
 « Reply #12 on: December 27, 2012, 03:02:25 pm » Bigger Smaller 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.

 Logged

Offline
Edison Member
Karma: 114
Posts: 2205
 « Reply #13 on: December 27, 2012, 04:40:58 pm » Bigger Smaller 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
Full Member
Karma: 2
Posts: 237
Arduino rocks
 « Reply #14 on: December 27, 2012, 05:22:04 pm » Bigger Smaller 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