## LED Calculations - The Lab Section

- Details
- Published: Tuesday, 19 April 2011
- Written by Jon Chandler
- Hits: 7699

In the first article on LED Calculations, we looked at ways of determining the required series resistor. Since an LED's forward voltage is not a linear function of current through the LED, there was some controversy about the simple "close enough" method of determining an undocumented LED's characteristics. This article takes a look at a real-world example in the lab.

We want to calculate the series resistor for an LED of unknown characteristics. Consider this to be a small LED of the type you might drive directly with a microcontroller, not one of the new monster LEDs for lighting up the night. Some of those are amazing but well outside of this scope of discussion. Furthermore, we'll evaluate the results based on using the nearest 5% resistor value from the standard resistor series.

The test victim subject will by a T1¾ (5 mm) RGB (red/green/blue) LED from ebay. To be honest, these LEDs are craptastic. The red section is much less intense than the green or blue sections.

RGB LEDs have three independent LED dyes in the same package; for this testing only one element was operated at a time.

### The "Close Enough" Approximation Method

A circuit like that shown in the original article was set up. The fixed resistor was replaced with a 10-turn pot so that the desired 5% resistor value could be dialed up without digging for an actual resistor. It should be noted that nearly the exact specified value was used for each test rather than a random value within the 5% window as would be the case with a real resistor.

The supply voltage and the voltage across the resistor were measured for each test. The following calculations were made using those two values:

If the current I wasn't close to the desired value, a new value for the series resistor was calculated:

The starting point for the following measurements is a desired current of 10 mA and an assumed V_{f} of 2.0 volts which is in the range for a red LED.

#### Red LED, Test 1

R = 300Ω (based on equation 3)

V_{s} = 4.98 volts

V_{R} = 3.21 volts (measured)

V_{f} = 1.77 volts (calculated from equation 1)

I = 10.7 mA (calculated by equation 2)

If 10.7 mA is considered too far from our goal of 10 mA, R may be recalculated using equation 3, which yielded a revised value for R of 330 Ω:

#### Red LED, Test 2

R = 330Ω (revised value)

V_{s} = 4.98 volts

V_{R} = 3.22 volts (measured)

V_{f} = 1.76 volts (calculated from equation 1)

I = 9.8 mA (calculated by equation 2)

This is the closest value to our target of 10 mA that can be achieved using 5% resistors. Assumed value, measurement, revised calculation, done.

#### Blue LED, Test 1

R = 300Ω (our initial assumption)

V_{s} = 4.98 volts

V_{R} = 2.11 volts (measured)

V_{f} = 2.87 volts (calculated from equation 1)

I = 7.0 mA (calculate by equation 2)

Current is a fair bit off of our target of 10 mA but this was based on an assumed V_{f} of 2 volts. A revised value of R was calculated using equation 3, which yielded 211Ω; the closest 5% value is 220Ω.

#### Blue LED, Test 2

R = 220Ω (revised value)

V_{s} = 4.98 volts

V_{R} = 2.05 volts (measured)

V_{f} = 2.93 volts (calculated from equation 1)

I = 9.3 mA (calculate by equation 2)

Not bad for our "close enough approach." If desired, the process could be repeated to get closer to the targetof 10 mA. Using equation 3, a revised value of 170 Ω was calculated for R. This is right in the middle of the closest standard values of 160Ω and 180Ω. I opted for 160 - which was the wrong option!

#### Blue LED, Test 3

R = 160Ω (revised value)

V_{s} = 4.98 volts

V_{R} = 1.98 volts (measured)

V_{f} = 3.0 volts (calculated from equation 1)

I = 12.4 mA (calculated by equation 2)

Should have selected 170Ω. Recalculating the value of R one last time yielded a value of 198Ω with the closest standard value being 200Ω.

#### Blue LED, Test 4

R = 201Ω (revised value)

V_{s} = 4.98 volts

V_{R} = 2.03 volts (measured)

V_{f} = 2.95 volts (calculated from equation 1)

I = 9.9 mA (calculated by equation 2)

So, not quite as quick to the results as for the red LED but the first calculated value was a reasonable approximation of our target value. This process probably would have been easier had we hedged out bet and started with a closer approximation of V_{f} from the color vs V_{f} table in the original article although none of the options quite fit this case..

And finally, let's try this one more time for the green LED, starting with our assumption of V_{f} = 2.0 volts and a resistor of 300Ω.

#### Green LED, Test 1

R = 300Ω (our initial assumption)

V_{s} = 4.98 volts

V_{R} = 2.06 volts (measured)

V_{f} = 2.92 volts (calculated from equation 1)

I = 6.9 mA (calculated by equation 2)

Current is a fair bit off of our target of 10 mA but this was based on an assumed V_{f} of 2 volts. A revised value of R was calculated using equation 3, which yielded 206Ω; the closest 5% value is 200Ω.

#### Green LED, Test 2

R = 200Ω (revised value)

V_{s} = 4.98 volts

V_{R} = 2.00 volts (measured)

V_{f} = 2.98 volts (calculated from equation 1)

I = 10.0 mA (calculated by equation 2)

It just doesn't get much better than that!

Why did this technique work so much better for the red and green LEDs than for the blue? Part of the reason it worked well for the red is that our initial assumption for V_{f} was pretty close to the actual value, In the case of the green and blue. our initial assumption for V_{f} wasn't too close and the final results are about the same. Why did the first calculation give grat results for the green but it took several iterations for th blue?

The V-I curve for this RGB LED is shown below. Notice that the shapes of the green and blue curves are slight different. In the area around 10 mA (our target range), the green LED has much less variation in V_{f} than the blue LED. Of course, if we had the curve when we started, we wouldn't have needed to go through this process.

#### Conclusions about the "Close Enough" Method

This is an iterative process that may take several measurements to zero in on the required resistor value but it's quick and easy to do. Usually, the first pass will be close enough for most applications.

### The Empirical Approach

The original article presented one empirical approach using a variable resistor to find the required resistor value. This method is quick and effective. In the comments section of the original article, I mentioned using a constant current source to determine an LED's characteristics. This is my preferred empirical method. A constant current source is easy to construct as shown in the circuit below.

The 7805 is configured as a adjustable constant current source, controlled by a 10-turn pot. It will vary the voltage to maintain the desired current. The 15Ω resistor limits the maximum output current to somewhat less than 500 mA. A voltmeter is used to measure the voltage across a 1Ω shunt resistor. By Ohms Law, V = IR, so the voltage in mV correspond to the current in mA. The V_{f} across the LED is measured with a second voltmeter. Note that it's safest to connect the LED with the power switched off and the current set to a minimum. With no load, the constant current supply will increase the output voltage to the maximum (in this case, 12 volts) in an effort to achieve the desired current flow. This voltage will drop nearly instantaneously when a load is connected but an LED may be destroyed by the high voltage (yes, voice of experience).

#### Determining V_{f} using Constant Current

The procedure couldn't be simpler.

- Remove power and reduce current setting to minimum
- Connect LED
- Apply power. Adjust 10-turn pot for desired current
- Read V
_{f}.

Using this method, the following values were obtained for the RGB LED:

Color |
V_{f} |

Red | 1.75 |

Green | 2.96 |

Blue | 2.93 |

With Vf known, the required resistor is quickly calculated:

### Why Is V_{f} Important?

First off, we need to know V_{f} to calculate the required series resistor to obtain the desired current though the LED. In general, the exact current isn't critical - the current just needs to be within the operating range of the LED and less than the maximum allowed current of the power source. LED brightness can be sacrificed to reduce current draw to increase battery life for battery-operated applications.

The need to closely control current comes when trying to match intensities where a variety of LEDs might be used. LED output is rated by various means so it's not always possible to compare specifications directly. In the case of a panel with several different LEDs, perhaps some 7-segment displays and even some LED bargraphs, all of different colors. the overall look and brightness level is very subjective. By adjusting the current to each LED by careful selection of the series resistors, a collection of LEDs will have a uniform appearance.

### The Constant Current Source

I built my constant current source in a salvaged network gear enclosure. The unit has a separate 5V/12V power supply which made it ideal for this application. The photo below shows the unit prior to any "beautification." The red and black binding posts are the connection for the LED and voltmeter. On the back, there are blue and yellow binding posts for connection of a second voltmeter to measure the output current. This meter measures the voltage across a 1Ω shunt resistor, so 1 mV on the meter is equal to 1 mA of current.

The binding posts are on 0.75" centers to permit standard double banana plugs to be connected.