Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LM317 and LED

Status
Not open for further replies.

RogerTango

New Member
I am starting to work on several LED projects, but the more I get ready to start, the more confused I feel.

I am trying to use LM317 regulators. I read they are both variable voltage, and variable current regulators, depending on the wiring, I feel pretty good on those concepts.

I also read that LEDs are not "light bulbs", and current is applied at required rate, rather than varying voltage. That "seams" to make sense with me.

Now the question is, and this is for the sake of discussion, lets say I have an LED that is rated at 4w forward voltage, and 350ma of current.

Is it reasonable to believe that too much voltage will be bad even if the current is right?

Say I use a 317 to regulate the CURRENT in an automotive situation where the source is 12vdc, then 12v will be delivered to the LED?

What about using two 317s, the first to regulate the current, passed to the second to regulate the voltage??? Or maybe vice-versa?

Or am I not seeing the forest for the trees??

I have been reading up, but Ive not really seen a "Powering LEDs for the super stupid n00b" quite yet. :(

Thanks for the help in advance!
Andrew
 
Last edited:
I am starting to work on several LED projects, but the more I get ready to start, the more confused I feel.

I am trying to use LM317 regulators. I read they are both variable voltage, and variable current regulators, depending on the wiring, I feel pretty good on those concepts.

I also read that LEDs are not "light bulbs", and current is applied at required rate, rather than varying voltage. That "seams" to make sense with me.

Now the question is, and this is for the sake of discussion, lets say I have an LED that is rated at 4w forward voltage, and 350ma of current.

Is it reasonable to believe that too much voltage will be bad even if the current is right?

Say I use a 317 to regulate the CURRENT in an automotive situation where the source is 12vdc, then 12v will be delivered to the LED?

What about using two 317s, the first to regulate the current, passed to the second to regulate the voltage??? Or maybe vice-versa?

Or am I not seeing the forest for the trees??

I have been reading up, but Ive not really seen a "Powering LEDs for the super stupid n00b" quite yet. :(

Thanks for the help in advance!
Andrew

"Say I use a 317 to regulate the CURRENT in an automotive situation where the source is 12vdc, then 12v will be delivered to the LED?"

No, a 317 wired up as a current regulator will adjust it's output voltage automatically to keep the current constant.
 
No, a 317 wired up as a current regulator will adjust it's output voltage automatically to keep the current constant.
Thank you, that was a very informative response, I will wire my 317 to current mode and give that a try!

Thanks very much!!
Andrew
 
I am starting to work on several LED projects, but the more I get ready to start, the more confused I feel.

I am trying to use LM317 regulators. I read they are both variable voltage, and variable current regulators, depending on the wiring, I feel pretty good on those concepts.

I also read that LEDs are not "light bulbs", and current is applied at required rate, rather than varying voltage. That "seams" to make sense with me.

Now the question is, and this is for the sake of discussion, lets say I have an LED that is rated at 4w forward voltage, and 350ma of current.

Is it reasonable to believe that too much voltage will be bad even if the current is right?

Say I use a 317 to regulate the CURRENT in an automotive situation where the source is 12vdc, then 12v will be delivered to the LED?

What about using two 317s, the first to regulate the current, passed to the second to regulate the voltage??? Or maybe vice-versa?

Or am I not seeing the forest for the trees??

I have been reading up, but Ive not really seen a "Powering LEDs for the super stupid n00b" quite yet. :(

Thanks for the help in advance!
Andrew
Below is a graph of current vs voltage (v-i or i-v curve) in a typical red LED. You LED scale factors may be different, but the shape of the curve is the same for all LEDs. Notice below that if you set the current at 10mA, the voltage across the LED will be about 1.85V. If you make the current 20mA, the voltage will be 2.0V. They are inextricably tied together by the v-i curve. Change one, you change the other. If you look at the curve, you can see that, because the curve is so steep, application of a voltage would result in a large current change for relatively small changes in voltage. This is why we bias LEDs with current instead of voltage. The problem is made worse by the fact that individual LEDs of the same type will have slightly different curves, so you would get different currents in different LEDs for the same applied voltage. In addition, LED light output is specified as a function of current, not voltage.

I hope this makes sense.:)
 

Attachments

  • int-led-vi.png
    int-led-vi.png
    6.8 KB · Views: 573
Ron,
Thank you so much, very good information.

I googled "lm317 led" and found a page with a resistor calculator, I got 330ohm for the result of a particular setup I could wire, 12v as the source and 25ma for the current.

The LED is pretty bright, but it IS a 60k mcd LED. :)

I tried using a 1k pot across output and adj of the 317 but could not appear to vary the current. I was using a DVOM and the '10a' connection with the meter in series to determine the amp output, but I had no success. I think my idea was good, but not right. HA HA!

So, I am with a good and new understanding of feeding CURRENT to LEDs, and I am off to google how to calculate resistors for LM317 at specific currents, and for direct feed of LEDs from p-source.

I have some high power LEDs on the way, one is supposed to be 10w with 350 and 750ma specs, Im trying to figure that one out. From what I can see with 12v source, 350ma is about 1.2 ohms.

I am still unsure if any of my numbers are going to work out right. $20 is a lot for a lesson by smoke! (10w LED) HA HA!

Thanks to all-
Andrew
 
Hi.

In the past I have found the following site to be of use. The first address is a calculator for single LED's the second address is for LED series parallel arrays.

http://led.linear1.org/1led.wiz

http://led.linear1.org/led.wiz

I know that you found a site but I thought I would add this reply for interest.


All The Best.

Rick.
 
Last edited:
RMN,
Thank you for the links, I will look at them. I just came back here to post this one:
LM317 Current Calculator - Electric Circuit

There is some very good information on this subject, I just needed to finally find it!

I hope this helps someone.
Andrew
 
Sorry for being a n00b, but one quick question:

Say I setup a 317 for the rating of an LED I want to use, lets use 25ma for example.

Lets say I want to run oh, 4 LEDs (of the same rating, 25ma) off it.

Do I just wire them (the LEDs) in parallel?

The reason I ask I have some automotive projects that Ill want to work on, and I want to use ONE LM317 to regulate the current to more than one LED.


Thanks,
Andrew
 
Hi,


Well, you can run more than one LED off of one LM317, but ONLY
if the LEDs are put in series, and then only a certain number will
be allowed like this.
For example, say your LED characteristic voltage is around 3.5v.
Two in series addes up to 7v, three up to 10.5v, and if the lowest
voltage in the car is 12v, that only leaves 1.5v headroom, which
wont be enough, so only two would be allowed in series.
This would total to 7v total LED drop, which leaves 5v headroom.
The LM317 would thus regulate the current through two LEDs
at the same time.
If more LEDs are to be added however, they would have to be
wired the same or have one LM317 per LED.


One other interesting fact about the way the current/voltage in
an LED works is like this...
In the graph posted by Roff, if we let the voltage change from
2.0v to 2.1v the current changes from 0.020a to 0.030a.
That's a 50 percent change in current for only a 5 percent
change in voltage! So another view of the LED is like that
of a zener diode, and it should be biased in a similar way.

Also, 5 percent is to 50 percent as a 10x increase
(we change the voltage by 5 percent and get a
50 percent change in current), or
10x sensitivity to a change in voltage. Looking at it
from the standpoint of the current, it's 50 percent to
5 percent (we change the current by 50 percent we only
get a 5 percent change in voltage), which is only a
0.1x sensitivity. Thus, it's better to regulate current
because for a given regulation point error E percent
in the primary regulation parameter the LED will experience
an S*E change in secondary parameter (S is sensitivity)
and this works out to a more accurate circuit when
regulating current. If this isnt clear i can illustrate.
 
Last edited:
MrAl, thank you kindly, you were very helpful.

Cheers,
Andrew
 
I was just thinking, humor me if you would.

Why not run them in parallel? If I had three LEDs that were 20ma each, wouldn't I set the 317 for 60ma?

Just thinking out loud mostly.

Andrew
 
LEDs are not exactly the same. One might be 2.0V, another might be 2.1V and another might be 2.2V. If they are connected in parallel then the 2.0V would hog most of the 60mA current and will quickly burn out. Then the 2.1V LED would hog most of the 60mA current and will quickly burn out. Then guess what will happen to the remaining LED when it uses all of the 60mA current?
 
Point well made Guru!

So, you deliver the 20ma for all of them wired in series, not to exceed the source voltage? That point is still kind of confusing me.

Here soon, Ill be able to help someone else with LEDs! HA HA!

There not super complex, but... there not as simple as you think on initial evaluation.

Cheers,
Andrew
 
Each LED sets its own voltage.
If the current-limiter can tolerate high voltages then it can feed 20mA to an ordinary little LED from a supply of 1000V or more. The LED will still have its own low voltage.

Usually just a resistor is used to limit the current for low power LEDs.
If you have a high power LED or a few in series and use an LM317 current-regulator then the source voltage must be the total voltage of the LEDs plus the 1.25V across the current-setting resistor plus the 2.5V dropout voltage of the LM317.
 
Thanks again Guru, more fine information! Very helpful!

Andrew
 
Hi RogerTango,

connecting low current LEDs (≤ 100mA) to an LM317 you might choose an LM317L (T092 package). The LEDs really don't care for voltage if their nominal operating current is applied. The forward voltage drop will adapt automatically to the current.

Depending on the supply voltage you can connect LEDs in series. For a rough calculation you might use this formula:

+UB=(nL+1)*(Uf)+Uref, where +UB is the supply voltage, nL=number of LEDs, Uf=LED forward voltage, Uref=IC reference voltage, e.g. connecting 5 red LEDs (Uf=1.8V) in series using a supply voltage of 13.8V their total Uf is 10.8V(6*1.8V). Subtracting 1.25V reference voltage from the remainder of 3V your safety margin is still 1.75V (~Uref*2, including Uref). If the forward voltages of individual LEDs vary there is still enough to "play" with.

The feedback resistor (adjust) is calculated: Rfb(Ω)=Uref(V)/If(A). So for 20mA forward current the resistor should have a value of 62.5Ω. (Rbf=1.25/0.02)

Refer to the attachment to see it does work that way. (two series resistors are fitted to see the difference. The output voltage and reference voltage input always differ by Uref(~1.25V))

Regards

Boncuk
 

Attachments

  • CONST-CURR1.jpg
    CONST-CURR1.jpg
    25 KB · Views: 392
  • CONST-CURR2.jpg
    CONST-CURR2.jpg
    25 KB · Views: 338
Last edited:
Hi,

Just a quick note...

Many of these regulators have a 5ma minimum load which means
the LED has to draw at least 5ma for regulation to work.
Luckily most LEDs can be driven at 10ma or higher.

Just thought i would mention that in case someone wanted to
regulate at 5ma or under.
 
I googled this simple 40 mA LEd driver
Simple 40 mA LED Lamp Driver.jpg
The OP states :
“This is a minimal parts lamp made with four white LEDs. It features regulated light output from 10V to around 20V.
The LM317L and resistor act as a current regulator set to 40ma. Current flows from the battery through one pair of LEDs, through the regulator, through the other pair of LEDs, and back to the battery. The capacitor filters out noise on the power supply lines. The LED pairs must be matched so that the current through them is roughly equivalent (normally, a batch of LEDs from the same manufacturer will be matched close enough for this application.
Small resistors could be placed in series with each of the four LEDs to improve the balance.

Now for the questions :

1) Is this electronically correct ?
2) Theoretically, what Voltage should I expect at point A & B, If I decide to put the resistors (one for each LED)
3) I guess when regulators are used for current, they adjust the voltage automatically. Will the project work If I replace each pair with a single Led (Rated 3.4 V, 40 mA) and supply 6 V.

Thanks
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top