Projects‎ > ‎Electronics‎ > ‎

### Simple LED Current Source

It's no secret that I do a lot of projects with LEDs (ex. CycleLux, Tabletop Tree Lights). They are cheap, simple, and efficient. The tricky thing is designing a circuit to control and drive them. This project details the design of a simple current source for driving LEDs. Efficiencies of around 90% can easily be achieved.

## The Easy Way Out

If you just need to turn on an LED, then not much of a circuit is needed. If you have the LED datasheet you should be able to find out what the forward current and voltage drop will be, but if you're like me and have a large pile of LEDs and no known part numbers, then a little guestimation is in order. Depending upon how "high brightness" your LEDs claim to be, the voltage drop will be somewhere between 2 and 4 volts for a typical through hole LED. This voltage is really dependent on how much current is flowing through the LED. For any application involving a low current indication LED, I typically assume that 2 volts will be spent on a single LED - 3volts for my brighter whites. The actual brightness is then set by how much current you generate with a series resistor. This schematic shows the simplest way to power an LED. There is some voltage source Vcc and a series resistor R. The exact current through this LED can be found as such:

ILED = VR / 1kΩ;  VR = VCC - VLED

But guessing a 2V drop on the LED, it can be estimated as:

ILED = (VCC - 2) / 1kΩ

## A Better Current Source

The simple LED driver shown above is suitable for most of my applications, but when high brightness and power consumption are a concern, a better design should be used. There are many ways to create a current source, most of which use some form of transistor based current mirror. These were the industry standard for a long time, but people are finally learning how much more efficient MOSFETs (a voltage controlled device) are over the more common BJT (a current controlled device). Not only that, but I think FETs are easier to use.

In the following circuit, a logic level MOSFET is used in combination with a standard NPN BJT. The "logic level" description of the FET means that a smaller voltage is required to fully "turn it on" at the gate. Some FETs will require a large voltage at the gate and a type of charge pump is required to do so from lower voltage sources such as a microcontroller. The resistor R1 is used to "pull up" the FET gate to the supply voltage. When this happens, the FET drain and source are effectively shorted allowing current to flow through the LEDs and R2. This is where the BJT transistor Q1 comes into play. The base of the transistor won't want to go higher than some set voltage: Vbe. This value can vary among transistors, but I have found it to be 0.6V for a standard 2N3904 NPN BJT. At this voltage, Q1 will also "turn on" and allow current to flow through Q1, stealing voltage from the gate of Q2. With less voltage at the gate of Q2, it begins to "turn off." These two transistors will battle back and forth to be in the on state, effectively creating a constant current source through the LEDs.

I have included my results from using this circuit with a 12V supply and three high brightness white LEDs in series. The obtained values using different resistors are shown. The limitations of this circuit are the supply voltage Vcc and characteristics of Q2, namely current Id. In addition, if the voltage supply Vcc cannot be greater than the rate gate voltage of Q2. If so, a resistive voltage divider or zener diode should be used to limit the voltage seen at the gate. Another thing to consider is the power being dissipated in R2. With the currents listed not a lot of power is drawn; however, if a few LED strings were used in parallel, the current draw and power dissipation would increase. The given calculation for I LED is based on the equations obtained from plotting the data points of R2 vs I LED. A simple estimate is:

ILED = 0.6V / R2 which is Q1VBE / R2

The power dissipated in R2 can also be estimated as:

0.36 / R2 which is Q1VBE2  / R2  ... (P = V2 / R)

As the current increases, so will the voltage drop across the LEDs. At some point, this will cause the voltage drop across R2 to decrease which will alter the given equations. This is not to say that more current cannot be sourced, but actual measurements should be taken to avoid a gross over or under estimation. 