How to calculate what resistor a LED requires

1W LED with 3.3V Vf will draw 0.33A.
Gonna lose a lot of board space to 5 ohm, 1W rated current limit resistors if attempting that route.

Wawa:
I think that's not a real problem with enough overhead voltage for the current limiting resisor.
A 1watt LED I measured had a Vf difference of ~0.2volt between cold and very hot.
You always calculate the resistor for the "hot" condition.

And how do you compensate for the fact that this on voltage changes as the LED ages as well as temperature?
It also is different from device to device.

Bottom line a resistor is not good enough to control the current to a high power LED unless you vastly under run the LED. As a rule of thumb if the calculated resistance comes out below 40 ohms then use a constant current supply of one sort or another.

Well I will have a Nano driving the circuit, Im powering the nano thru a 5V rechargeable battery, so the voltage the LED would receive would be from the ....

Oh wait, I cant because if the high power LED pulls 350mA, thats not doable from an Arduino pin. So I need to power my LED separately. Ok, so let's say I power my LED from the 5V battery pack of its own. Then I would need to regulate its supply.

Why do you talk about "CURRENT-regulators"? Ok I just read through the whole post again. It seems at some point, DrAzzy recommended the AMC7135 which is a current regulator, and I went ahead and mixed in the idea of VOLTAGE-regulators because of the post I found. So in that tutorial I found they use a VOLTAGE-Regulator but that is just as inefficient as a resistor. That is why everyone is suggesting the CURRENT-regulators like the

AMC7135 or even the FAN5331 or PT4115 which are more sophisticated switching current regulators used specifically for driving LEDs? And in all three of these cases I would be regulating the current flow to my LED instead of the V supplied to the LED.

Can you recommend any videos or material where I could get a newbie-level intro to current regulation vs voltage regulation why and how they work? Im youtubing it of course, but sometimes I get confused by highly technical explanations. Im just wondering if you know of any good material specifically for those topics?

Current regulators are inefficient, like resistors - they dump the extra power as heat - though some of the good linear constant current regulators have insanely low dropout (like the AMC7135,7140). So you still waste the difference between your supply voltage and the LED voltage - but that difference can be a lot smaller than it would be with the voltage regulators wired as current regulators.

The switching regulators like the FAN5331 or PT4115 are harder to use - you need more external components, and the board layout matters (as with any DC-DC converter). The advantage is that because they're basically DC-DC converters, they don't waste the power like the other solutions to - if you have a 3v 350mA LED, and your supply voltage is 6v, an appropriate buck LED driver will use 175mA @ 6v (well, a little more - the efficiency isn't 100%), while a linear constant current regulator or voltage regulator used as current regulator, or resistor would need 350mA @ 6v, and waste half of it as heat. Depending on the power source and LEDs, you may be forced to use a switching regulator.

I have to disagree with Grumpy Mike on whether resistors are usable - they are. Of course, you need a little extra headroom to deal with the variation in forward voltage with temperature, and the input voltage has to be kept constant. The impact of aging on the forward voltage of LEDs is small as far as I know. It is by no means the ideal way to drive high power LEDs, but it does work well enough for a lot of projects

Ok I might need to create a new post because I need to clear up a few things.

After more reading I've discovered I'm confused because of the fixed voltage regulator like a lm7805, the variable voltage regulators like the lm317 (the switching voltage regs I have yet to get into) and the current regulators like the AMC7135.

Aylt least I know I'm talking about 3 different beasts. I understand the regulation of either happens due to the relations P=VI and V=IR.

The V regulators increase P (by increasing current) when the load resistance drops in order to keep V constant.

The I regulators increase P (by increasing voltage) when the load resistance increases to keep I constant.

Or something like that.

For my led I need a constant current source to make sure the current to the led is a solid 350mA which is why I ordered the AMC7135. And since I don't have one, I'm trying (with your help and from an online community who apparently do it quite often) to use a voltage regulator to act as a current regulator as drazzy or wawa mentioned earlier.

That's what confused me even more. So before getting into the switching regulators, I want to understand how these voltage regulators work. Both lm317 and lm7805 take a Vin and produce a Vout. But whenever I see wiring of a 7805, it's just Vin at 1, Vout at 3 and both end capaxitors. But the difference between the 7805 and 317 is that 317 has the added fixed and variable resistors on it. Well that is confusing to me because the difference doesn't seem to lie in the component itself but rather how it's wired.

So then what is going on inside these components? Because it would appear you could wire up an lm7805 to do the same variable bit as the lm317.

r something like that.

No nothing like that.
A constant voltage regulator takes feedback from the output voltage and alters the effective resistance of the transistor to maintain the output voltage in the face of changing current demands.

A constant current takes feedback from the output current and alters the effective resistance of the transistor to maintain that current by changing the voltage on the output in the face of a changing load.

As to the 7805 and the LM371:-
The two components are different, they have a different arrangement of transistor's inside them. You can not wire one like the other and get the same effect.

Ok, maybe I said it wrong, but basically I read the same thing from your lines GrumpyMike. They keep either V or I constant by varying the resistance (of the transistor - this was a missing key in my understanding of how these chips work) of the transistor inside when I or V changes due to circuit conditions altered by the load.

Ok, gotcha on the different wiring inside of the transistors.

About LM317
Its variable because depending on how you wire the resistors between ADJ and Vout, changing that resistance value, changes Vout.

I don't understand how in this calculator: (LM317 Resistor and Voltage Calculator) the voltage is calculated independent of the Vin. I'm obviously missing something because I thought Vout couldnt be greater than Vin?

The LM317 conducts ( in >> out) as long as the voltage difference between ADJUST and OUT is lower than 1.25volt.

The voltage divider is calculated so that with the desired voltage across R1+R2, 1.25volt falls across R1.

e.g. if R1 would be 100ohm, and R2 would be 300ohm, 1.25volt would be across R1 and 3.75volt would be across R2. So 5volt would be across R1+R2 (= out and ground).

If you want current to flow from IN to OUT, then the voltage on IN has to be higher.
The LM317 needs ~1.5 to 2volt more for that task. Other regulators like the 1117 are happy with >=1volt.
Leo..

. I'm obviously missing something because I thought Vout couldnt be greater than Vin?

That is correct. If you get a Vout which is greater than Vin for this sort of regulator then the calculations are wrong. You are probably missing some quantity has a minus sign and so is not valid.

However you can get Vout greater than Vin with a switching regulator.

This discussion has been really annoying - but I have been without my reference PC for a couple of weeks.

This is an old and frequently trodden topic. Using LM317s or 7805s for this purpose is total nonsense!

You use a two transistor current controller thus:

Use higher rated transistors as required. Vary the resistor value to suit. This also allows the Arduino to control the LEDs with PWM.

The "dropout" voltage is about 1 V - total - so it can easily fully control a 3.5 V LED from 5 V! (VBE of the lower transistor plus VCE of the upper.)


Yes, of course the LED illustrated means one or a series chain with a higher LED supply.

And yes, anything other than a switchmode regulator will dissipate heat to exactly the same total degree, whether it happen in resistors or transistors (with heatsinks).

But why isnt Vin be in the equation to calculate Vout?

Vout = 1.25V*(1+R2/R1)

Oh, because LM317 is just like LM7805 in that regard, that it will always ouput a fixed voltage no matter what gets fed into it. In the case of LM7805 if you put in 5000V (i know it can only take 35V according to fairchild datasheet), it will dissipate the heat equivalent of Vin-5V; ie 4995V. In the end it will always output 5V.

In the case of the LM317, it will output a range of voltages that will of course always be below Vin as well. In the case of the youtube video I saw which confused me was that the youtuber used a 12V battery and a 1k & 10k resistor to produce a value from 1.2V (the bare min) to 11.95V (its battery power source). Make a simple adjustable power supply LM317 - YouTube

Ok so now I understand what was confusing me about how the LM317 worked. The problem was that when I used this calculator mentioned above with values of 180Ohms and 10,000Ohms (which is what he had in his video description), I got a value of 70.69V.

The problem was that when I used this calculator mentioned above with values of 180Ohms and 10,000Ohms (which is what he had in his video description), I got a value of 70.69V.

Odiously a crap piece of software. Wouldn't be the first on the net.

User error?
If you enter 180 and 10000 in the right boxes, you get 1.27volt.
Leo..

Really?!! I get this:

image.gif

image.gif

But the guy in that video uses a 1k resistor and a 10k pot as variable resistor.
That would give a range from 1.25volt (pot = 0ohm) to 13.75volt (pot = 10000ohm).
The last part of the pot does not work with a 12volt battery on the regulator input.
You would need ~15volt-in for 13.75volt out.
The video shows almost 12volt out, but that is unloaded (just the DMM).
The moment you connect a load to the output, then the regulator can't give you more than 1.25 to ~10.5volt.
Leo..

Ok. So now that I understand voltage regulators a bit better, why are they so often used to drive high power LEDs instead of current regulators?

They are not.

They are wired up so as to act as a constant current regulator. It is a different wiring configuration, a trick if you like.

Price?
An LM317 plus resistor might be $0.40 on ebay. A DIY heatsink could be free.
Once you get serious about power LEDs, e.g. a big fishtank, you quickly discover that you need switching CC drivers.
Leo..

Marciokoko:
Ok. So now that I understand voltage regulators a bit better, why are they so often used to drive high power LEDs instead of current regulators?

Only in "instructables" or the like. Nowhere else.

The circuit I gave is much more useful.

GrumpyMike

So if this is the way to wire the lm317 as a current regulator then what is the way to wire it as a voltage regulator? Because I've seen it wired like this in every post that explains how the lm317 voltage regulator works:

image.png

Paul_B

Yes thanks I remember your circuit and I plan to explore it in order to understand it better as soon as I clear my doubts about voltage regulators. Thanks