A night of struggling to fit 16 current limiting resistors into a small breadboard for a uni project made me wonder why LEDs don't have any kind of internal resistance? I can't think of any downsides. I've never connected an LED without a resistor in series so it makes a lot of sense to me.
What value resistor would you include? For what voltage? For what brightness? How would you make the resistor when it uses a different process than the LED does? How would you dissipate the heat?
Having said all that, they do exist.
Figure 1. 6.5 V Red LED 3mm Through Hole, Kingbright L-934SRD-5V contains an internal resistor.
The resistor LED lamps, from Kingbright, are available in 3mm and 5mm package options. The LEDs have an integral current limiting resistor. The resistor LEDs do not require an external current limiter with 12 volt supply. This allows the resistor LEDs to be a cost effective solution, saving valuable space and eliminating the additional cost for a resistor. There are a variety of colour options available in the resistor range, with a wide viewing angle of 60°.
Figure 2. Vf for the L-934SRD-5V. Image source: datasheet.
These are €0.186 each for 100+ while the 2 V Red LED 3mm Through Hole, Kingbright L-7104ID is €0.115 each for 100+. (Prices from RS.)
A night of struggling to fit 16 current limiting resistors into a small breadboard ...
Figure 3. An SIL (single-in-line) resistor array contains a network of resistors. These can be arranged with one common pin for all the resistors or as individual resistors with separate pins. Image source: Left - Bournes. Right - uncredited.
LEDs with built-in resistors have been available for ages. They are pretty much a market failure (in terms of percentage market penetration), and there is more reason for them to be so now with many circuits using lower voltages than 5V, but they are relatively easy to make and some are available even today. Here is a datasheet from Chinese supplier Yunsun which Sparkfun distributes:
As you can see it's a green LED that typically draws 20mA at 5V and is quite bright.
Therein lies the rub- the LED will be far too bright (or be deemed to consume far too much current) for many applications at 5V and there is no information on how bright it might be at 3.3V or 3V- it will be much, much dimmer but possibly too bright or dim for a given application.
Adding an SMT resistor to a board costs almost nothing and allows a full range of very inexpensive and widely available LEDs to be used, so as a designer that's exactly what I am going to use every time.
And when virtually everyone designing volume products makes that decision the product range becomes limited (can you get a water-clear narrow angle 3mm diameter LED of pink color with a resistor for 3.3V off the shelf?) and it's a relegated to being a niche product.
As well as use in logic circuits where 5V and 3.3V are common, we also have backlight LEDs that are often connected in series or series-parallel and indicators for 12V and other higher voltages, where series connections and/or higher value resistors are called for.
Some LEDs do have built-in resistors. Some even have built-in current regulators, and flashing circuitry.
One downside is that you no longer have any control over what current flows, and consequently the brightness of your LED.
Another is that you can no longer connect multiple LEDs in series without also including the burden of the multiple integrated resistances, and you can't use constant current regulators to illuminate them without needlessly burning away energy as heat in the resistors.
The vast majority of LEDs are used without resistors, which serve to waste electrical power as heat. Resistors are typically used with low power LEDs in applications where efficiency is irrelevant such as for indicator lights. For these applications you can buy LEDs with integrated resistors, but for most of the general lighting market the goal is actually to have the lowest possible resistance as this will maximize efficiency.
An inbuilt resistor wouldn't be that good an idea, as the LED might be used at (say) 12V, 5V or 14V and the brightness would vary wildly.
A built in current source might be better, but this would then deprive the designer of the ability to set the brightness of the LED, and also would make operating a number of LED's in series problematic.
So all in all - it's not that hard a problem, and easy to see why manufacturers have mostly opted to leave well alone.
With more and more projects using some form of microcontroller, intelligent LEDs are becoming increasingly common. For example the WS2812 RGB LED has its own PWM brightness control built in and requires only power, ground and a control input. No resistor is required, the brightness (and indeed colour) is fully software controllable and you can daisy chain multiple LEDs on a single wire and independently control each one. These LEDs are also available in an incredibly tiny SMT package as well.
Add to that: Resistors are a power-inefficient way to drive LEDs. While this might not yet be considered a big concern for indicator LEDs, illumination LEDs are often driven by switchmode current sources, which could also become more popular for indicators in products where long battery life or energy efficiency is desirable.
Aside from other answers, which include the usual current/voltage/brightness fitting for your project, I'd also point to other motives:
- You may want to put many LEDs in series and control with a single resistor, thus reducing BOM.
- Resistors are pretty cheap for very small SMD packages in very large volumes. The same happens with plain LED, but may not happen with "specialty" LEDs like integrated-resistor ones. This may make the resistor+LED cheaper overall, if doing assembly also in large volumes. Many-resistor packages also come into play here.
- Tolerance. Both LEDs and resistors have tolerances, but usually cheap resistors have larger tolerances than LEDs. This is specially important in today's low-voltage designs which have lower drops in the resistor. The designer may want to use a variable transistor to adjust brightness, if needed, or other control circuits, which takes us to the next point.
- An LED's brightness is usually current controlled. Also, the voltage drop in the LED itself will most likely vary with time. Due to this, it is common in some applications to use active current control to keep the current constant even with this varying drop. In fact, it's also possible to increase the current during the LED's lifetime, if the brightness/drop is well defined for a specific LED.
An LED (light emitting diode) is basically a diode that when its forward bias voltage is reached it begin to conduct. A spike of current will ensue if you continue to increase the voltage at its anode, the current will continue to increase until the LED (diode) breaks.
This means without a resistance the LED will break if you do not connect it to a voltage equal its forward voltage.
Look at the above picture it shows that the LED has a forward voltage of 2.1V, and as you can see I am supplying only 1.5V at the anode. This means that my voltage is below the forward voltage. As a result, the current is sitting at 97uA, no illumination available.
At 1.8V the LED has started to conduct as the voltage is getting closer to its forward voltage. We can see some illumination.
Note that most LEDs like these ones below are rated at about 20 to 25mA, this means you must ensure that the current must not go over 25mA to prevent damage.
This is where the resistor comes in - to limit the current in case your input voltage is higher than the forward voltage.
Now check the above image my input voltage has now gone just 0.1V above the forward voltage and the LED current is at 4.5A, this means your LED would have long been destroyed.
To prevent that you put a resistor to drop some voltage so that the LED forward voltage could be kept at a safe value.
Now I have add a 39 ohm resistor and my current has now been reduced to 10.2mA - a safe current for the LED.
Here we burning 396.79mW of power through the resistor and about 18mW though the LED, so to answer your question if we include the resistor inside the LED we will be burning a total of 4.04mW of power and this will remain true if the input voltage remained at 2.2V.
Even in the case of high powered LEDs like the one above the same logic would apply.
So, to conclude if we must include resistors in LEDs, we would have to manufacture LEDs with different maximum input voltages and place a disclaimer to never exceed that voltage. This is not practical at all.
Now see how increasing my input voltage has resulted in more current, which means more heat dissipation. All I need to do to protect my LED is to change the resistor, otherwise I would need to get a new LED which works with 5V if we must go with what you asking.
New resistor value, we are back in a safe zone.