Introduction
The Celtic Engineer is a weekly newsletter produced by Celtic Engineering Solutions. We hope you enjoy it. If you have any suggestions for topics, would like to give feedback or want your email added to the distribution list please send an email to TCE@celticengineeringsolutions.com.

The horse is dead Jim
I sometimes feel like I am beating the proverbial dead horse, again. I want to talk a bit about LED’s and I have already written a few newsletters about them. I don’t want to just rehash the same thing. So why talk about them at all? The thing is, there is always a thing, we use them a lot. As a developer of quite a few prototypes, I can’t even imagine making a prototype without a smattering of these, now, little devices. When you start thinking about an actual product having an LED, it is a very simple, and very cheap way of conveying information to your end user.

D is for Diode
As more and more “home hackers” get involved in electronics (don’t get me wrong, I love that they do. It is how I started) there are more and more people using LED’s. This is all great, until you realize they all think an LED (occasionally they don’t know what the acronym stands for) is a light bulb. You can tell because they want to know what voltage it runs at. And yes, I know I am being snarky here.

A voltage device is easy for most people to understand. The toaster is 110VAC, my phone is 5VDC, the air-conditioner is 220VAC, etc. But tell someone that voltage is not really important, what you really need to do is to think about the current and you might as well be speaking fluent gibberish.

The I-V curve
Like all diodes, an LED has a curve. When you plot the current verses the voltage you do not get a line. It is not a linear device. The current through an LED goes up much faster than the voltage and the shape is roughly parabolic (for positive voltages).

You might wonder why misunderstandings happen. I think it happens because the way we are all taught to set up a resistor and LED is, well, wrong. For convenience I will go through an example here. The forward voltage on a datasheet (I picked one at random from Digi-Key) 1.93V (typical) and 2.6 Max. So, we all put our blinders on and say Vf is 1.93V. I want to hook it to a 5VDC line. So, 5 – 1.93 = 3.07. Great. Here is where things start to get dicey. Often the datasheet will quote the max current (50mA), a test current (10mA) but no datasheet tells you a recommended current. Mostly because that depends on the application. So, we choose 10 or 20mA (something sure to burn out your retina). Then R = 3.07 / .020 = 154.5 ohms. There is a 154-ohm 1% resistor. Done!

Where do I start?
First, you don’t need to have enough light to read at night by coming off your prototype. I typically use about 2K when I’m running 3.3V, about seven tenths of a mA. I just need to know its on. And even at that current it is still plenty bright.
Second, how much current is going through my LED? I just said 0.7mA: (3.3 -1.93)/2000 = 0.685mA. If you go and measure it, not only will it not be that current, but the voltage drop across the LED will not be 1.93V. What’s going on here? Where we wandered off the path was when we looked at the datasheet thinking Vf was 1.93V. It is that voltage, but only at the test current, in this case it was 10mA. It would be very interesting to take a few dozen LED’s and run the rated current through them and see what the forward voltage drop comes out to be. At the very least it will be a histogram, not just a value.

What’s a good engineer to do?
So, the point I have been driving for is that there are these devices for sale that are called LED drivers. And they have a very important place to play in engineering. If you are using an LED as an indicator, either for a prototype or for your customer, it probably does not matter. That is, the cheap and dirty way of powering an LED is just fine. However, if you are going to drive a string of LED’s, maybe for a graphics panel or for illumination, then you can’t do it the easy way.
The chips I am talking about (there are 9128 of them on Digi-Key) range from $0.18 to $11.85 depending on the features you need. These features can be the way the chip operates or interfaces with other devices, but more often it is how much power it can handle. Some will do a single string of LED’s. Other will handle 5 or 6 individual strings. These devices are essentially variable switching current regulators. They measure the current (a parameter that the user can set) and adjust the voltage to that string in order to maintain that current.

You might decide, through testing, that 12.5mA of a certain LED is perfect. You want to string 10 of them together. You hook them up to the Vout of your LED driver, set he current using a resistor and power it up. The driver senses the current going through the string of LED’s and adjusts the voltage up or down until the desired 12.5mA is met. In this way if the individual Vf’s are not all the same, it does not matter. We are driving 12.5mA through all of them and the overall voltage for the string is met. Interestingly the relationship between relative luminous intensity and current is actually pretty linear.

I hope the rest of your week leads linearly to a wonderful weekend.

Final thoughts
This newsletter is sponsored by Celtic Engineering Solutions LLC, a design engineering firm based out of West Jordan, Utah, which can be found on the web at: www.celticengineeringsolutions.com. You can find the newsletter on the company blog, LinkedIn or in your inbox by subscribing. Send your emails to The Celtic Engineer at: TCE@celticengineeringsolutions.com, with the subject line SUBSCRIBE.