# Which is better: using a resistor with an LED, or “precisely” matching the Vs to the given LED's Vf rating?

Here's an example:

Suppose I have an LED with a Vf rating of 3.6 V ....Here are two things I could try:

1) use a single 3.6 V 18650 Li-Ion cell with no resistor [$V_s = V_f$]

or

2) use three 1.5 V alkaline cells in series [4.5 V] in combination with a resistor... And yes, I would use the "optimal" current rating for the LED to calculate the desired ohms for the resistor:

$R = (V_s - V_f) / I$

My guess is that the first configuration will be more efficient, but the second configuration (with the resistor) will result in greater "brightness consistency" over time [the voltage decreases in both configurations as the batteries discharge.]

What do you all think?

-
It's worth noting that the current rating of an LED isn't an "optimal" value, but rather a maximum current where the LED can operate continuously without failing, usually from heat buildup. If the LED is operating in short pulses the current can be higher up to a usually separately specified maximum pulse current, dependent on pulse width. –  Phil Frost Jan 11 '13 at 2:19
You have to limit the current somehow, so the choice is really between a resistor and a constant-current source of one kind or another. –  EJP Jan 29 '13 at 15:50

The reason we can't just hook a voltage source (like a battery) up to an LED is that a very small change in voltage across leads to a very large change in current. This relationship is also dependent on temperature, so it's very difficult to make a stable circuit.

Putting a resistor in series with the LED makes the current-voltage relationship less like an LED and more like a resistor. We know this relationship well from Ohm's law: $E = IR$, voltage is the product of current and resistance. Thus, current still increases with voltage, but there is a much wider range of voltages over which the LED current will be within specifications.

The problem with the resistor is that it wastes energy as heat. Power is the product of voltage and current: $P=IE$. So if we have an LED that is running at $20mA$ and $1.5V$, and we are powering it with a $12V$ battery and a resistor, the voltage over the resistor must be $12V-1.5V=10.5V$ and the current is the same as in the LED, $20mA$. Thus, power wasted in the resistor is $20mA \cdot 10.5V=210mW$. The power in the LED is $20mA \cdot 1.5V=30mW$. You can see most of our energy is going towards making the resistor warm, and not powering the LED.

Some batteries (coin cells in particular) have a high internal resistance. They have effectively a big resistor in series with them as a consequence of their chemistry and construction. These batteries can not supply much current, because if they do, the voltage will drop over the internal resistance (by Ohm's law). With these batteries, you effectively have the current-limiting resistor intrinsic to the battery, and you can connect the LED directly to it.

But what if you aren't using a coin cell, and you don't want to waste energy in a resistor, or you need better current (brightness) regulation than a simple resistor can provide? What you need is a current source. Most of our energy sources (batteries, wall warts) are voltage sources: they try to provide a constant voltage, and the current will be whatever is necessary to achieve that goal. A current source tries to provide a constant current, and the voltage will be whatever is necessary.

One way to convert a voltage source into a current source efficiently is with a switched-mode DC-DC converter, like this:

There are some details of this circuit that are a bit different because I drew it for a different question, but it still applies. D1 need not be an IR LED; any LED will work. Although the 555 datasheet says it requires a minimum of 4.4V, it does work on 3V. You can use anything up to the 555's maximum of 18V and the circuit will still work. This isn't a sophisticated or ideal solution, but it does demonstrate the idea simply with components you probably have on hand.

A more sophisticated implementation will use a better timer than the 555, like a microcontroller, or one of the many ICs designed for precisely this application. It will probably operate at a higher frequency to allow for a smaller inductor and higher efficiency. It will also have some feedback path to adjust the duty cycle to maintain the desired current. It may do this with a hall-effect sensor, or by replacing T1 with a MOSFET and measuring the voltage drop over that, or by putting a low-value resistor in the path and measuring that voltage. With such a feedback mechanism in place, your LED will maintain precisely the same brightness over a wide range of input voltages.

Design of these things is a topic in itself, but here's a brief explanation of how it works. The 555 generates a square wave somewhere around 20 kHz. Adjusting R1 will change the duty cycle of this square wave, and thus the brightness of the LED.

When the output of the 555 is low, T1 is turned on, and L1 sees almost the full battery voltage. This causes a current to flow in L1, slowly at first, then more quickly.

When the 555 goes high, T1 turns off. Now the top side of L1 is not connected to the battery. The current must continue to flow at the rate it was just flowing (this is what inductors do), so that top leg of L1 will become whatever negative voltage is required to light D1 at whatever the current in L1 was when T1 switched off.

As T1 remains off, the energy stored in L1 will be converted into light and heat by D1, and the current in L1 and D1 will decrease.

At some point, T1 gets turned on again, and this repeats.

-
I thought, generally, a higher frequency implied a lower efficiency, am I incorrect? The lowest efficiency is as the MOSFET is switching on, but I could believe I am not thinking of another impact on the circuit. –  Kortuk Jan 11 '13 at 1:32
Different parts of the circuit are more or less efficient at different frequencies. The goal is to find the frequency which maximizes the net overall efficiency. Higher frequencies are generally better up to the point where transistor switching losses become a problem. –  supercat Jan 11 '13 at 1:45

Two major points:

• A li-Ion battery will vary from 4.2V to 3V over the useful discharge curve.
• LEDs have different Vf across age / temperature / process variations.

Current will vary greatly depending on the matching between these two voltages, so I wouldn't recommend doing that.

Little hand-held keyring LED flashlights get away with it, because the coin cell can't supply very much current (high internal impedance), and they're typically under-driving the LED.

EDIT: to add to the Vf variation issue, consider this page. Notice how much of a difference a tiny change in Vf makes?

-

The best way to drive a LED is with a current source rather than a voltage source. A resistor is a poor substitute for a real current source (particularly if the voltage headroom is low), but at least it's cheap and generally reliable.

However, there are now many switchmode chips out there that are designed to power one or more LEDs with a constant current, and they don't suffer from the inefficiency of the resistor.

You can also design your own discrete circuit to do the same thing.

-

This has been addressed in other questions, but you should definitely use a current limiting resistor, even with a "perfect" voltage source. The reason? Because no voltage source is "perfect" and neither is the LED.

Basically as voltage fluctuates, or the LED changes over time and temperature, the current curve will change dramatically.

-

Using a resistor is a practical way to drive an LED as designs typically include many LED's all requiring individual control. The multi-channel nature of the control problem coupled with size, energy, and cost concerns often makes the use of proper current sources impractical.

In your scenario, using a resistor, rather than matching the LED to the fixed voltage source would potentially let you control the brightness of the output by controlling (designing) the current. If you pick a current less than the current resulting from the voltage-matching approach, the useful lifespan of the LED will be improved.

When driving an LED, increasing the current from 5ma to 10ma would definitely appear significantly brighter but after a certain intensity, increasing current doesn't increase the apparent brightness much (since human perception of intensity is logarithmic) yet continues to play an increasingly significant role shortening the LED's useful life.

It is also easier than matching the drive voltage to the Vf of the LED to the source.

-
@DrFriedParts You are right, they don't let us choose brightness. Brightness is just a by-product of current consumed. Also you are correct about the human perception. Point is, if your eye doesn't see any brightness increase with increased current, why increase the current? –  Chetan Bhargava Jan 11 '13 at 4:22
@DrFriedParts Thanks for the edit, I accepted it. –  Chetan Bhargava Jan 11 '13 at 4:59