0
\$\begingroup\$

At school I was told "Never use a LED without a resistor (before or after the LED)!".

Why is that?

If I have a 2V LED why can't I simply use a 2V power supply?

Why should I choose a 3V (for example) power supply and put a resistor in front?

And how to calculate the resistor value?

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Because in most cases you do not have the luxury of selecting your voltage.You have an existing voltage and have to adapt the LED voltage current to that. \$\endgroup\$ – Oldfart Nov 20 '19 at 11:59
  • \$\begingroup\$ consider this answer provided by myself (scroll down to find it): electronics.stackexchange.com/questions/467640/… \$\endgroup\$ – analogsystemsrf Nov 20 '19 at 15:14
  • \$\begingroup\$ This has been discussed 1M times in ESE \$\endgroup\$ – Mitu Raj Nov 21 '19 at 3:44
5
\$\begingroup\$

You don't have to have a resistor to go with your LED.

You have to have a way to limit the current to the LED.

The simplest way to limit the current is to put a resistor in series with the LED. At low current and low voltage differences it works well enough.

If you have a high current LED or a very large voltage difference, then the resistor has to waste a lot of power. That means you have to use a physically large resistor to handle the waste heat, and that your lighting circuit is very inefficient.

For low current LEDs that need to be precisely controlled for brightness, you would use a constant current source rather than a simple resistor.

Many constant current sources use a series transistor to control the current, which wastes power just a a resistor does.

Alternatively, you can use a switching power supply that regulates the current rather than the voltage. This kind of circuit is normally used for high current LEDs where you don't want to waste a lot of power. LED drivers for household lights are often constant current switching power supplies.


For a typical simple LED circuit, you can easily calculate the value of the needed series resistor.

You need the following things:

  1. \$V_f\$ - this is the forward voltage of the LED. You get it from the datasheet of the LED.
  2. \$V_{supply}\$ - this is the voltage of the power supply you are using.
  3. \$I_{LED}\$ - this is the current that you want to let flow through the LED. More current = brighter light - until you exceed the current rating for the LED, at which point it burns out. The LED datasheet will usually have a rated maximum current that you must stay below as well as a typical current rating which will deliver a usable brightness.

Once you have all the numbers together, you can calculate a value for a series resistor like this:

\$R_{series} = (V_{supply}-V_{f})/I_{LED}\$

Since you often don't know how bright the LED will be for a given current, you could calculate the resistor for the rated typical current. You try that out, and use a larger resistor if it is too bright. If it is not bright enough, then you need to use a different LED - don't use a lower value resistor than what you calculated as the higher current will cause the LED to burn out. Maybe not immediately, but certainly sooner than if you followed the manufacturer's guidelines.


You cannot simply use a 2V power supply for a hypothetical 2V LED because that 2V is not exactly 2V on every LED, and it also changes with temperature.

Also, the resistance of an LED changes drastically with the applied voltage. Below \$V_f\$, nearly no current flows. At \$V_f\$, a bit of current will flow. At a couple of tenths of a volt above \$V_f\$, the LED becomes the next best thing to a short circuit.

There is a very narrow voltage range in which an LED would work properly. The best thing to do is to limit the current, and the voltage will work itself out.

\$\endgroup\$
1
  • \$\begingroup\$ Minor nitpick: I feel like capacitive droppers are a much more common way of limiting current to LEDs in household lighting, simply because they're far, far cheaper than putting a switching converter in each LED retrofit bulb. \$\endgroup\$ – Hearth Nov 21 '19 at 2:45
2
\$\begingroup\$

This is best demonstrated via load line

(open source wikipedia image) enter image description here

The curved line is the diode line. It can be VERY steep (the steepness is understated in the image). A very small change in voltage can cause a very large change in current.

With the resistor in place, the upper left corner of the resistor line can move around with a change in voltage, but the equilibrium point (the place where both lines intersect) will not move around much at all.

\$\endgroup\$
2
\$\begingroup\$

Probably the simplest answer to your main question is this equation (I'm calling the supply voltage \$V_\text{CC}\$):

$$\%\,I_\text{LED}=-\frac{\%\,V_\text{LED}}{\frac{V_\text{CC}}{V_\text{LED}}-1}$$

(See Appendix below.)

This equation approximates how much the LED current will change for some tiny percent change in the LED voltage. It's an interesting equation to examine.

  1. What if \$V_\text{CC}=V_\text{LED}\$? This is the question you are asking, by the way, when you ask about supplying the exact voltage specified for the LED on a piece of paper (which isn't real, but only "typical.") In this case, the denominator becomes zero and the percent change in the LED's current tends towards very large numbers even for very tiny LED voltage changes. If nothing else tells you why, this alone should scare you.

    Why is this so? Well, LED voltages are never particularly exact. They will range over several tenths of a volt for any two of them you grab out of a bag. And unfortunately, LEDs "go exponential" when the voltage climbs just a little bit over their required voltage. For example, a \$100\:\text{mV}\$ increase might multiply the current in the LED by a factor of 5 or even 10!! So just small errors in how you guess at the LED voltage vs the supply voltage you use can lead to either destruction of the LED or almost no light coming out, at all.

    So the conclusion here is that you must use a supply voltage that is not only larger than the typical LED voltage value. But you must use a supply voltage that is more than all of them might even remotely be. And since you must use a supply rail that is larger than any of the LEDs can ever themselves require, and since the LEDs "go exponential" when given too much voltage, you must include a resistor (or a different method, perhaps an active one) to limit the current.

    The reasons a resistor is suggested (beyond the fact that it is cheap and easy) is that the voltage drop across a resistor is proportional to the current through it. Since LEDs try to "go exponential" when the voltage across them rises even by a tiny amount, while a resistor stays nice an linear about it, the LED can attempt to exponentially increase its current ... but this would then imply that the resistor would counter that attempt by increasing its own voltage drop equally exponentially in response. So the LED may try, but the resistor very quickly counters by dropping more voltage and so the LED finds that it cannot increase its current by much. So it kind of works.

  2. You can also see from the equation above that if \$V_\text{CC}\gg V_\text{LED}\$, then the regulation is pretty good. In fact, the greater the difference the better, as the denominator becomes big enough to really help limit things.

    For example, if \$V_\text{CC}\approx 2\, V_\text{LED}\$ then the percent variation in the LED current will be about the same as the percent voltage variation in the LEDs. If an LED requires \$3.2\:\text{V}\pm 200\:\text{mV}\$, the voltage variation of these LEDs would be \$\pm 6.25\,\%\$. So if we designed the circuit and resistor value in order to yield some specified LED current and used \$V_\text{CC}=6.4\:\text{V}\$, then we'd expect around \$\pm 6.25\,\%\$ variation in the LED currents as we plugged in different ones from a bag.

The resistor value is actually pretty easy to compute. But you do need to find a datasheet on the LED or else you need to do some testing or else make some educated guesses about the typical LED voltage and typical LED current. (If other things are important to you, then you may need to use a somewhat different process.) Once you have these estimated typical values and know the power supply rail you have available, you can just compute:

$$R=\frac{V_\text{CC}-V_\text{LED}}{I_\text{LED}}$$

Now, there are lots of other ways to go. But that's easy and should work for many useful cases. Just remember to be wary of cases where \$V_\text{CC}\$ is close to \$V_\text{LED}\$.

To emphasize that last comment I made, suppose \$V_\text{MARGIN}=V_\text{CC}-V_\text{LED}\$? Then:

$$\%\,I_\text{LED}=-\%\,V_\text{LED}\cdot\frac{V_\text{LED}}{V_\text{MARGIN}}$$

If you only reserve, say, \$V_\text{MARGIN}=1\:\text{V}\$ for an LED with \$V_\text{LED}=3.2\:\text{V}\$, then the percent change in LED current will be \$3.2\times\$ larger than the percent voltage variation for your LEDs. So in that case, a \$\pm 6.25\,\%\$ voltage variation for your LEDs might imply \$\pm 20\,\%\$ current regulation. That may be okay. But it may not be, too.

So you now have not one, but two (and maybe three) useful equations. One to compute the resistor value and the other to provide reasons why you need a resistor as well as how to estimate how closely you can control the currents by using that computed resistor value.


Appendix

Because of G36's comments/questions below this answer, of late, I'm editing this answer to include the development of the equation I provided at the outset. It's not complicated.

We start out with the simple KVL equation:

$$V_\text{CC}-I_\text{LED}\cdot R_\text{LIMIT}-V_\text{LED}=0\:\text{V}$$

And solve it for \$I_\text{LED}\$:

$$I_\text{LED}=\frac{V_\text{CC}-V_\text{LED}}{R_\text{LIMIT}}$$

Now, our goal is to compute sensitivity equations from the above. A sensitivity equation just quantifies the output uncertainties based upon the effects of input uncertainties. I didn't find a really easy paper on the topic, but I did find a reasonably readable one here: Sensitivity Analysis for Uncertainty. So, feel free to read that if you have any doubts about the rest of what I write, below.

We want to find the % variation of something with respect to the % variation of something else. In calculus form, % variation looks like \$\%\,x = \frac{\text{d}\,x}{x}\$. This is the exact % variation, which is much better than the finite approximation variation that is \$\%\,x \approx \frac{\Delta\,x}{x}\$. It turns out that the calculus mindset is actually not so hard to do.

First, we apply the implicit product rule (or multivariate chain rule):

$$\text{d}\,I_\text{LED}=\frac{\text{d}\, V_\text{CC}}{R_\text{LIMIT}}-\frac{\text{d}\, V_\text{LED}}{R_\text{LIMIT}}$$

The we divide both sides by \$I_\text{LED}\$:

$$\begin{align*}\%\, I_\text{LED}=\frac{\text{d}\,I_\text{LED}}{I_\text{LED}}&=\frac{\text{d}\, V_\text{CC}}{R_\text{LIMIT}\,I_\text{LED}}-\frac{\text{d}\, V_\text{LED}}{R_\text{LIMIT}\,I_\text{LED}}\\\\&=\frac{\text{d}\, V_\text{CC}}{V_\text{CC}-V_\text{LED}}-\frac{\text{d}\, V_\text{LED}}{V_\text{CC}-V_\text{LED}}\end{align*}$$

Now, we need to convert the infinitesimals on the right side into % variations. This is simple to do:

$$\begin{align*}\%\, I_\text{LED}&=\frac{\frac1{V_\text{CC}}}{\frac1{V_\text{CC}}}\cdot\frac{\text{d}\, V_\text{CC}}{V_\text{CC}-V_\text{LED}}-\frac{\frac1{V_\text{LED}}}{\frac1{V_\text{LED}}}\cdot\frac{\text{d}\, V_\text{LED}}{V_\text{CC}-V_\text{LED}}\\\\&=\frac{\frac{\text{d}\, V_\text{CC}}{V_\text{CC}}}{1-\frac{V_\text{LED}}{V_\text{CC}}}-\frac{\frac{\text{d}\, V_\text{LED}}{V_\text{LED}}}{\frac{V_\text{CC}}{V_\text{LED}}-1}\\\\&=\frac{\%\, V_\text{CC}}{1-\frac{V_\text{LED}}{V_\text{CC}}}-\frac{\%\, V_\text{LED}}{\frac{V_\text{CC}}{V_\text{LED}}-1}\end{align*}$$

This allows us to focus on \$\%\,V_\text{LED}\$, by taking the last term and its sign on the right side, or to focus on \$\%\,V_\text{CC}\$, by taking the first term and its sign on the left side. (Or, of course, to take both into account at the same time.)

\$\endgroup\$
11
  • \$\begingroup\$ How you calculate the change in diode current if for a constant R the Vcc will increases by 10%? \$\endgroup\$ – G36 Feb 19 '20 at 18:04
  • \$\begingroup\$ You use a different sensitivity equation than I did. (I didn't develop the one I applied here, in the answer above. Instead, that was developed on paper before writing. \$\endgroup\$ – jonk Feb 19 '20 at 19:38
  • \$\begingroup\$ I should have written: How would you calculate the change in diode current if for a constant R the Vcc will increase by 10%? \$\endgroup\$ – G36 Feb 19 '20 at 20:01
  • \$\begingroup\$ @G36 I'm still not getting it. %change is written as \$\frac{\text{d}\,x}{x}\$ for any variable \$x\$. You can't use an infinitesimal for % change in Vcc (it is an infinitesimal ratio) and apply it to a finite change in diode current. You can, however, calculate infinitesimal ratios: \$\frac{ \frac{ \text{d} \, I_D }{ I_D } }{ \frac{ \text{d} \, V_\text{CC} }{ V_\text{CC} }}\$. In this piece, though, I used a simplifying method to arrive at the equation. That process is not shown. It would be a different process and result for your question. For example, the sign would be positive. \$\endgroup\$ – jonk Feb 19 '20 at 21:11
  • \$\begingroup\$ @G36 But you are not asking about % change in the diode current but instead "change in the diode current." Those are not the same things. And I cannot provide an equation that solves "change in the diode current" for a % change in VCC. It's not proper calculus. But I can provide %change in diode current for %change in VCC. But like I said, that's a different equation. \$\endgroup\$ – jonk Feb 19 '20 at 21:13
1
\$\begingroup\$

Leds, while voltage driven (they are basically diodes) have a strongly exponential relationship between voltage and current (as all diodes do) so it does not take much change in voltage to go from so little current you cannot see the light to burning the thing out. The relevant voltages are also temperature dependent and vary somewhat from unit to unit.

Because of this drive with either a current source or a series resistor large enough to keep the current in a sane range for the range of variability of the LED is the normal approach.

Sure you could use voltage drive and very carefully adjust the voltage on a per led basis (And temperature compensate the thing), it would be the equivalent of designing a bipolar transistor amplifier that was sensitive to exact value of beta, possible, but always a stupid thing to do.

\$\endgroup\$
0
\$\begingroup\$

Sometimes you can buy a LED that will connect direct to a PSU, because it already has a built in resistor. For example:

The Kingbright LEDs 3mm are a superb, high quality range of components incorporating an inbuilt series resistor enabling the LED to be directly connected to 5V or 12V supply lines.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.