Actively Stabilizing the Current
In part 2 of this tutorial we found that there are situations, when a simple resistor is not good enough to keep the current through an LED stable. There are countless ways to stabilise the electrical current actively. Some are simple, some are complicated. I will show a few here.
Note: The LED in the following schematics generates red light and has a forward voltage of 2 volts.
This is trivial. If your only problem is a variable power supply (e.g. a battery), you could consider a normal linear voltage regulator. They are relatively cheap and available in many variants. But they need a drop-out voltage (this is the difference between input and output) of anything from 1.5 V. The 7805 shown in the schematic below needs at least 2.5 Volts. Low drop-out variants are available, but will still need around 0.5 V. Additionally, there will be a voltage drop over the series resistor. So the supply voltage has to be several Volts over the LED's forward voltage.
- Simple, cheap
- Can use the stabilised voltage to supply all of your electronics
- Not very energy efficient
- Not very stable (only a resistor to limit the current)
Here is the current through the LED over supply voltage (simulated with www.circuitlab.com).
An LM317 as current source
This is an interesting application example from the LM317's data sheet. The LM317 is actually an adjustable linear voltage regulator. But it works by maintaining a constant voltage difference of 1,25 V between its adjust and output pin. So if you connect a resistor between those two pins, the current on the output is I = 1.25 V / R. Or put in a different way, the resistor has to be set to R = 1.25 V / I for the current that you want. You have to take into account the 1.25 V voltage drop plus another 2 V over the regulator when selecting your supply voltage.
- Two components only
- True current source
- Not very efficient
The LM334 current source
This is a very low drop-out current source, but it needs a few more parts. The LM334 is a current source, but it can only deliver currents up to 10 mA. So for a standard LED, which is rated at 20 mA, an additional transistor is needed to drive the current.
- Extremely little voltage drop
- Four components
If e.g. the voltage over R1 was too small, the LM334 would increase the current into V+. This would mean a higher current through the base of the transistor (and consequently through its collector). In turn, the current through R1 would increase until the voltage over R1 was back to 64 mV. So the current through the LED can be selected by setting R1.
The formula to calculate R1 for a given Id is: R1 = 64 mV / Id.
The result is a circuit which needs a supply voltage that is only 100 - 200 mV higher than the forward voltage of the LED. See the following graph (supply voltage over current):
This circuit is perfect to run a red LED from two alkaline cells (3 V down to 2 V when discharged).
One of the classic circuits for stabilising current uses a transistor and a zener diode. You can find an explanation for that circuit in the next post.