Go Down

Topic: LED current limiting resistor (Read 3586 times)previous topic - next topic

jerseyguy1996

Dec 25, 2012, 11:06 pm
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!
Arduino Uno;
Mega328

patduino

#1
Dec 25, 2012, 11:19 pmLast Edit: Dec 25, 2012, 11:26 pm by patduino Reason: 1
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.
There are 10 types of people in the world, those who understand binary, and those that don't.

jerseyguy1996

#2
Dec 25, 2012, 11:28 pm

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.
Arduino Uno;
Mega328

dc42

#3
Dec 26, 2012, 12:07 am
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.
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.

jerseyguy1996

#4
Dec 26, 2012, 12:23 am

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.
Arduino Uno;
Mega328

patduino

#5
Dec 26, 2012, 12:29 am
What exactly are you trying to do?  You might not need much control.
There are 10 types of people in the world, those who understand binary, and those that don't.

dc42

#6
Dec 26, 2012, 12:32 am
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.

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.

jerseyguy1996

#7
Dec 26, 2012, 12:38 am

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.
Arduino Uno;
Mega328

jerseyguy1996

#8
Dec 26, 2012, 12:43 am

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.
Arduino Uno;
Mega328

dhenry

#9
Dec 26, 2012, 02:43 am
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.

Sacman

#10
Dec 27, 2012, 11:19 am
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.

Luck,

MarkT

#11
Dec 27, 2012, 02:38 pm

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)
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

dhenry

#12
Dec 27, 2012, 09:02 pm
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.

dhenry

#13
Dec 27, 2012, 10:40 pm
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.

jerseyguy1996

#14
Dec 27, 2012, 11:22 pm

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
Arduino Uno;
Mega328

Go Up

Please enter a valid email to subscribe