In electronics, a basic LED circuit is an electrical circuit used to power a light-emitting diode or LED. There are many ways to power a LED, which are not straightforward, as a LED, being a semiconductor, has peculiar characteristics.
The simplest such circuit consists of a DC voltage source and two components connected in series: a current-limiting resistor (sometimes called the ballast resistor), and an LED. Optionally, a switch may be introduced to open and close the circuit. Although simple, this circuit is not necessarily the most energy efficient circuit to drive an LED, since energy is lost in the resistor. More complicated circuits may be used to improve energy efficiency.
The LED used will have a voltage drop, specified at the intended operating current. Ohm's law and Kirchhoff's circuit laws are used to calculate the resistor that is used to attain the correct current. The resistor value is computed by subtracting the LED voltage drop from the supply voltage, and then dividing by the desired LED operating current. If the supply voltage is equal to the LED's voltage drop, no resistor is needed.
This basic circuit is used in a wide range of applications, including many consumer appliances such as mobile phone chargers. For low power circuits, it's simple, reliable and effective.
Power source considerations
The voltage versus current characteristics of an LED are much like any diode. Current is approximately an exponential function of voltage according to the Shockley diode equation, so a small voltage change may result in a large change in current. If the voltage is below the threshold or on-voltage no current will flow and the result is an unlit LED. If the voltage is too high the current will go above the maximum rating, heating and potentially destroying the LED.
It is therefore important that the power source gives the right current. LEDs should only be connected to constant-current sources. Series resistors are a simple way to passively stabilize the LED current. An active constant current regulator is commonly used for high power LEDs, stabilizing light output over a wide range of input voltages which could increase the useful life of batteries. Low drop-out (LDO) constant current regulators also allow the total LED voltage to be a higher fraction of the power supply voltage. Switched-mode power supplies are used in some LED flashlights.
Series resistors are a simple way to stabilize the LED current, but energy is wasted in the resistor.
Miniature indicator LEDs are normally driven from low voltage DC via a current limiting resistor. Currents of 2 mA, 10 mA and 20 mA are common. Sub-mA indicators may be made by driving ultrabright LEDs at very low current. Efficiency tends to reduce at low currents, but indicators running on 100 μA are still practical.
In coin cell powered keyring type LED lights, the resistance of the cell itself is usually the only current limiting device. The cell should not therefore be replaced with a lower resistance type.
LEDs can be purchased with built-in series resistors. These can save printed circuit board space and are especially useful when building prototypes or populating a PCB in a way other than its designers intended. However, the resistor value is set at the time of manufacture, removing one of the key methods of setting the LED's intensity.
Series resistor calculation
The formula to calculate the correct resistance to use is
where power supply voltage (Vs) is the voltage of the power supply, e.g. a 9 volt battery, LED voltage drop (Vf) is the forward voltage drop across the LED, and LED current (I) is the desired current of the LED. The above formula requires the current in amperes, although this value is usually given by the manufacturer in milliamperes, such as 20 mA.
Typically, a LED forward voltage is about 1.8–3.3 volts; it varies by the color of the LED. A red LED typically drops 1.8 volts, but voltage drop normally rises as the light frequency increases, so a blue LED may drop around 3.3 volts.
The formula can be explained considering the LED as a resistance, and applying Kirchhoff's voltage law (KVL) (R is the unknown quantity):
Strings of multiple LEDs are normally connected in series. In one configuration, the source voltage may be greater than or equal to the sum of the individual LED voltages; typically the LED voltages add up to around two-thirds of the supply voltage. A single current-limiting resistor may be used for each string.
The other configuration is to run the sum of the supply voltage at approximately 75 – 85% of the combined LED voltages. This uses the LEDs' combined inherent resistance as a serial resistor. While small voltage drops to each LED generally make no discernible loss of intensity or brightness, with sufficient LEDs in series a noticeable drop in brightness begins to show with enough LEDs in the circuit. In assuming that the supply voltage is 12 V, and each LED is 3 V, by using a string of either five or six LEDs whose combined voltage is 15 V or 18 V, they effectively may be under-driven, in favour of absence of power losses in terms of waste heat from resistors as well as simple circuitry.
Parallel operation is also possible but can be more problematic. Parallel LEDs must have closely matched forward voltages (Vf) in order to have similar branch currents and, therefore, similar light output. Variations in the manufacturing process can make it difficult to obtain satisfactory operation when connecting some types of LEDs in parallel.
LEDs are often arranged in ways such that each LED (or each string of LEDs) can be individually turned on and off.
Direct drive is the simplest-to-understand approach -- it uses many independent single-LED (or single-string) circuits. For example, a person could design a digital clock such that when the clock displays "12:34" on a seven-segment display, the clock would turn on the appropriate segments directly and leave them on until something else needs to be displayed.
However, multiplexed display techniques are more often used than direct drive, because they have lower net hardware costs. For example, most people who design digital clocks design them such that when the clock displays "12:34" on a seven-segment display, at any one instant the clock turns on the appropriate segments of one of the digits -- all the other digits are dark. The clock scans through the digits rapidly enough that it gives the illusion that it is "constantly" displaying "12:34" for an entire minute. However, each "on" segment is actually being rapidly pulsed on and off many times a second. Such multiplexed displays have net lower hardware costs, but the resulting pulsed operation makes the display inevitably dimmer than directly driving the same LEDs independently.
An extension of this technique is Charlieplexing where the ability of some microcontrollers to "tri-state" their output pins means larger numbers of LEDs can be driven, without using latches. For n pins, it is possible to drive n2-n LEDs
Unlike incandescent light bulbs, which illuminate regardless of the electrical polarity, LEDs will only light with correct electrical polarity. When the voltage across the p-n junction is in the correct direction, a significant current flows and the device is said to be forward-biased. If the voltage is of the wrong polarity, the device is said to be reverse biased, very little current flows, and no light is emitted. LEDs can be operated on an alternating current voltage, but they will only light with positive voltage, causing the LED to turn on and off at the frequency of the AC supply.
Most LEDs have low reverse breakdown voltage ratings, so they will also be damaged by an applied reverse voltage above this threshold. The cause of damage is overcurrent resulting from the diode breakdown, not the voltage itself. LEDs driven directly from an AC supply of more than the reverse breakdown voltage may be protected by placing a diode (or another LED) in inverse parallel.
The manufacturer will normally advise how to determine the polarity of the LED in the product datasheet. However, these methods may also be used:
|terminal:||anode (A)||cathode (K)|
(*)Less reliable methods of determining polarity
If these markings do not give a clear indication of polarity, the diode testing feature on a multimeter can be used. With the positive probe on the anode, and the negative on the cathode the LED will conduct a current and the multimeter will give a reading. With the positive probe on the cathode, and the negative on the anode, no current will be conducted and there will be no reading.
LEDs, by nature, require direct current (DC) with low voltage. Operation on square wave and modified sine wave (MSW) sources, such as many inverters, causes heavily increased resistor dissipation in CR droppers, and LED ballasts designed for sine wave use tend to burn on non-sine waveforms. The non-sine waveform also causes high peak LED currents, heavily shortening LED life. An inductor and rectifier make a more suitable ballast for such use, and other options are also possible. Dedicated integrated circuits are available that provide optimal drive for LEDs and maximum overall efficiency.
Pulsed LED operation
Many systems pulse LEDs on and off, by applying power periodically or intermittently. So long as the flicker rate is greater than the human flicker fusion threshold, and the LED is stationary relative to the eye, the LED will appear to be continuously lit. In some cases, this is believed to be more efficient than driving LEDs with continuous power. It is also done to allow digital intensity control without a more complex digital-to-analog converter. The Arduino microprocessor boards use this technique to control the on-board LED.
Most LED data sheets specify a maximum DC current that is safe for continuous operation. Often they specify some higher maximum pulsed current that is safe for brief pulses, as long as the LED controller keeps the pulse short enough and then turns off the power to the LED long enough for the LED to cool off.
LED as light sensor
In addition to emission, an LED can be used as a photodiode in light detection. This capability may be used in a variety of applications including ambient light detection and bidirectional communications.
As a photodiode, an LED is sensitive to wavelengths equal to or shorter than the predominant wavelength it emits. For example, a green LED is sensitive to blue light and to some green light, but not to yellow or red light.
This implementation of LEDs may be added to designs with only minor modifications in circuitry. An LED can be multiplexed in such a circuit, such that it can be used for both light emission and sensing at different times.
- Joule thief - minimal switch-mode power supply
- Switched-mode power supply applications (SMPS) applications
- "Electrical properties of GaN LEDs & Parallel connections" (PDF). Application Note. Nichia. Archived from the original on 2007-08-09. Retrieved 2007-08-13.
- "Plastic infrared light emitting diode". Fairchild Semiconductor. 2001-10-31. Retrieved 2009-05-15.
- Jim Lepkowski, Mike Hoogstra, and Christopher Young. Application note AND8067/D: "NL27WZ04 Dual Gate Inverter Oscillator Increases the Brightness of LEDs While Reducing Power Consumption"
- Dietz, Paul, William Yerazunis, Darren Leigh (2003). "Very Low-Cost Sensing and Communication Using Bidirectional LEDs". Mitsubishi electric research laboratories.
- Bent, Sarah, Aoife Moloney and Gerald Farrell (2006). "LEDs as both Optical Sources and Detectors in Bi-directional Plastic Optical Fibre Links". Irish Signals and Systems Conference, 2006. IET: 345.