Introduction: Current Regulated LED Tester

Many people assume that all LEDs can be powered with a constant 3V power source. LEDs in fact have a non-linear current-voltage relationship. The current grows exponentially with the voltage supplied. There's also the misconception that all LEDs of a given color will have a specific forward voltage. The forward voltage of an LED does not depend on the color alone and is affected by other factors such as size of the LED and its manufacturer. The point is, the life expectancy of your LED may degrade when its not powered properly.

While there are calculators out there that tell you the amount of resistance to connect in series with your LED, you'd still have to guess the operating voltage and current. LEDs don't normally come with a datasheet and whatever specifications they come with may very well be inaccurate. This little circuit will allow you to determine the exact voltage and current to supply to your LED.

The LED tester isn't my original idea. I came across it here. I was pretty much testing my LEDs as he did before he made the tester; hooking up an LED, a potentiometer, a power supply, and a multimeter. Not the most elegant of methods and often very troublesome. A current regulator circuit wasn't new to me but it never came across my mind to use it as an LED tester. I do however, consider my board to be neater with the test pads/loops arranged in a more intuitive manner. And while its no rocket science to produce the PCB layout from the schematics, I am supplying my layout for your convenience.

If you check out the original author's website you'll notice that I have something extra in my tester. He used a double-sided board, hence he can afford to solder the components on one side and have the large flat pads on the other side. I ran out of double-sided boards at the time I made mine. At first, I thought of just having an extra small piece of board back to back with the main board and soldering the two together to get a partial double-sided board. Then I thought maybe I could make a socket so that the large test pads are removable and can be plugged into a breadboard for other uses. Imagining how it would look like, I realized it would have a rather high profile and was thinking of a solution to reduce the height. It then came to me that I could probably make use of the space underneath and add a magnet so the LEDs (both through-hole and SMD) will stick to the pads without me holding it there. I quickly test the idea out with a magnet and some components and it seemed to work.

It only occurred to me to write up an Instructable on the LED tester when I saw the Get The LED Out! contest. I was already using the LED tester for quite some time so this was documented after its completion and may lack photos of the project in progress. If there's anything that needs to be cleared up or explained please do not hesitate to post a comment.

I am assuming the reader will have at least basic electronics knowledge and sufficient skills in soldering and PCB fabricating.

This project has three sub-Instructables because I feel that each part deserves its own guide:
- Another Quick PCB Prototyping Method
- Magnetic Surface Mount Device (SMD) Adapter
- Trimpot Knob Turning Tool

Step 1: List of Components

Components for the main circuit:
1x 9V battery
1x 9v battery clip
1x 2-pin female header connector (pins & housing)
3x 1-pin SIL socket
1x 2-pin male header
1x 2-pin right angle male header
1x Shorting block
1x 100nF capacitor
1x 1N4148 diode
1x LM317LZ positive adjustable regulator
1x 39 ohm resistor
1x 500 ohm square horizontal trimpot
1x Female header
1x 8-pin IC socket (needed only if you're making the adapter)
1x 50mm X 27mm copper clad board

Materials for the magnetic SMD adapter (optional):
1x Magnet
2x 4-pin male header
1x 12mm X 27mm copper clad board

The capacitor and diode are not crucial to the operation of this circuit. I used them to make my board look more populated.

I reduced the value of the resistor to 39 ohms (can be harder to find) instead of 47 ohms so that my tester can output a maximum of about 32mA. David Cook's version can output up to about 25mA. I do use some high power LEDs and 25mA is not enough yet 32mA for short durations should be relatively harmless for weaker LEDs. You can use a 47 ohm resistor if you're happy with 25mA max.

You can determine the max and min output current by dividing value of the reference voltage on the LM317LZ (1.25V based on my datasheet) over the value of your sense resistor (trimpot + resistor to be correct).

Min output current (trimpot set to max of 500 ohms):
1.25V / (500 ohm + 39 ohm) = 0.0023A = 2.3mA

Max output current (trimpot set to min of 0 ohms):
1.25 / (0 ohm + 39 ohm) = 0.0321A = 32.1mA

Use the equations above to make an LED tester with a different current output range if you desire. Just remember that the LM317LZ is limited to a max output current of 100mA.

You will also need soldering equipment, some double-sided adhesive tape (for attaching the PCB to the battery), and PCB fabricating tools and materials (depends on the method used). You should already have all this available if you had ever done any home brew electronics.

Step 2: Circuit Schematic and Layout

Look at the images for the schematic and layout. You can refer to this Instructable for directions on fabricating the PCB. The Instructable uses this circuit as an example so you can directly follow it.

Remember to check the pinout of your regulator

I've also included a PDF of the layout that you can print. DO NOT scale when printing if you want to use the layout as a mask for photolithography or toner transfer.

Step 3: Description and Details

Crimp the female connector pins with the wires of the 9V battery clip. You can use polarized headers instead if you want to avoid connecting the power in the wrong way. I didn't used polarized headers because I didn't have any at hand and the diode is there for reverse voltage protection.

The test loops are a great idea that I shamelessly plugged from the Robot Room. These are simply a loop of copper wire between two nearby holes. Note that my test loops are a bit ugly because I forgot to pre-tin them before soldering them to the PCB. By the time I realized that I forgot, I had already tape the PCB to the battery and I didn't want to remove it, hence the ugly tinning. Remember to pre-tin yours!

The test loops are great for clipping on with alligator clips or hooked on with test hooks/clips.

I used a single-sided copper board, so there was no way to have test pads on the top side. Even if I were to use a double-sided copper board, I'd need a way to connect the bottom layer to the top layer. The problem is, I don't like vias made with soldering a wire between the two layers, it's ugly. My solution was to use SIL sockets. SIL stands for Single In-Line for those of you who don't know. These are similar to machine-tooled IC sockets, but instead of two rows, there's only one.

The sockets are like normal headers in that you can break or cut off a row with as many pins as you want. Simply break/cut off 3 1-pin sockets (one for each test pad). Then break/cut off the plastic holder to reveal conductive part. Note that the pin has four diameters. Cut away the narrowest end. The next most narrow end will be inserted into your PCB, so your hole and copper pad will need to enlarged.

The sockets provide a nice pit to poke the pointy tips of your multimeter probes into. It's not suppose to fit, but helps keep the probes from sliding around. You can also insert wires in and maybe hook it up to your microcontroller's ADC port.

The magnetic SMD adapter is connected to the tester via an IC socket. You'll have to use the normal version IC sockets for this as male headers will not fit into machine-tooled IC sockets. Just split an 8-pin IC socket and solder on to the PCB. You can go one step further like I did and file away all the little protrusions before soldering so that everything sits nice and flat. If you do this, you will inevitably be filing away a tiny portion of the conductive part which doesn't do much harm. The header pins on the adapter were intentionally shortened so that it completely fits into the socket. This makes the header lie flush against the socket with no gap in between, producing a nicer look and lower overall profile.

Check this Instructable for a guide on making the magnetic SMD adapter.

Step 4: How to Use the Tester

There are two ways to test an LED. First, you can plug it into the female header. Based on the 1st image, anode is the top hole and cathode is the bottom hole. Secondly, you can use the magnetic SMD adapter. Just place the LED terminals on the adapter and it will stick there. Similarly, anode is the top pad and cathode is the bottom pad. The magnetic SMD adapter, as the name suggest, is supposed to be used for testing SMD LEDs. I don't have any SMD LEDs at hand but the magnetic SMD adapter works as can be seen when I tested it with a regular diode. The pads are also great for quickly touching the leads of your LED onto to check for polarity, color, and brightness. You don't have to worry about shorting the pads as the current will be limited to a maximum of 32mA. No harm will be done to the circuit nor the battery.

This tester was designed for the convenience of measuring the voltage and current. You can either use the test pads or the test loops. The middle test pad/loop is common. The top test pad/loop (refer to 1st image) is for measuring voltage and the bottom test pad/loop is for measuring current. When measuring current, you will have to remove the shorting block. For intuitive purposes, the jumper was placed between the middle and bottom test pads/loops.

Assuming your LED doesn't come with any specifications, you'd want to know how much current and voltage to supply it to get the brightness you want. First, hook up you multimeter to measure the current and remove the shorting block. Place your LED on the tester and adjust the trimpot (you can make this simple tool to turn the knob) until you are satisfied with the brightness. If you are unsure of the maximum current that you can supply to your LED it is usually safe to assume an optimal working current of 20mA. Record down how much current is flowing through the LED (lets assume its 25mA). Next, replace the shorting block and measure the voltage. Record it down (lets assume its 1.8V). Now let's say you want to power this led from a 5V supply. You would then have to drop 3.2V from the 5V to reach the 1.8V needed to power your LED (5V - 1.8V = 3.2V). Since we know your LED consumes 25mA, we can therefore calculate the resistance needed to drop 3.2V from the equation V / I = R.

3.2V / 0.025A = 128 Ohms

You can now connect a 128 ohm resistor in series with your LED and power it with 5V to get the exact brightness that you want. Most of the time you will be unable to find a resistor with the exact value of resistance that you calculated. In that case, you may want to get the next highest resistance value just to be safe.

Happy testing!

Comments

author
cypherxax (author)2011-05-26

great work! im workin on the diff wii hacks, johnny lees innovations are brilliant! just finished my IR shades, 2 mini IRs in parallel + 100ohm R (83ohm worked best) on ~3v (two AAAs)

author
digikawa (author)2010-02-13

Hi. Isn't there a mistake on the schematic ? The (+) pin of the LED should be on the ADJ pin rather than on the Vout pin, am I right ? On your PCB layout your connections are ok though.

author
cinezaster (author)digikawa2010-03-27

Indeed, you have to switch Vout with ADJ.
The Anode of the led must be connected with the ADJ. Connected like this it doesn't work. You burn out your leds. (yes, I learned it the hard way). Your layout is ok.

led-tester_schematic.jpg
author
adnimo (author)digikawa2010-03-08

 theres a voltage divider comprised of two resistors, by varying the reference voltage the output voltage of the regulator is also changed.

author
adnimo (author)2010-03-08

You do realize almost any DMM in the diode mode will light up most low power LEDs and it's already current limited?.

author
Chris2048 (author)2009-12-10

 built this circuit, and found that turning the pot didn't do what I expected. After a few calculations, I figure the pot -to- current relationship isn't linear, right?

author
microman171 (author)2009-06-07
author
klee27x (author)microman1712009-06-07

That's nice, but I'm not sure that the LM317 is even necessary for a fixed voltage tester. LED's have no resistance, only a forward voltage drop. If you are using a 9V battery, the driving potential is going to be pretty close to static, no matter what LED you are connecting. So a simple resistor does a pretty good job.

Illustration: the extreme spread would be from an IR LED (1.4ishV) to white/blue (3.2ishV). 9V-3.2= 5.8V. 9V-1.4= 7.6V. If you used just a 330 ohm resistor, you'd get 20mA plus or minus 3mA.

And if you used a 12V security battery, the deviation would be even less. Here's my LED tester and tweezer probe. It's basically a 12V battery and 2k resistor that plugs into a multimeter. So it also shows the FVD. Wow, I'm such a nerd.

LED_tester 002.jpgLED_tester 001.jpg
author
Arduino Guy (author)klee27x2009-10-16

i like the tweesers can u show how to make them?

author
klee27x (author)Arduino Guy2009-10-18

They're regular tweezers with a header expoxied on the back end. Then I covered the inside of one of the tips with a very, very thin piece of FR4 copper clad "board." (It's more like paper, and it's just glued on!)

The header has the outer 2 pins soldered directly to the metal of the tweezers. The middle pin is connected to the copper clad with a thin jumper wire.

I think there could be a better way to do this, so that the entire tip of the tweezer is the probe, not just the inside of it. I think it would be very neat if you could separate the 2 halves of a tweezer, completely. Then rejoin them, somehow, but with a thin sheet of insulation between the halves. Or maybe just cut off the tips of a normal tweezer and then drill holes and screw them onto antistatic bamboo tweezers? Ah, well. If you were going to go that far, you might as well just buy a set of tweezer probes, lol. They sell them, you know.

author
digitalist (author)klee27x2009-06-07

Using the LM317 as a current source lets you test any kind of LED - from InfraRed to UltraViolet, It's not a misconception - the COLOR of the LED has a lot to do with its voltage. With current technology, you cannot make a white or blue LED light up with something lower than around 3v, similarly, you cannot make a silicon diode or transistor operate at 0-volts.

author
klee27x (author)digitalist2009-06-07

I'm not sure what your point is. It's obviously a reply to my post, and it's in the form of an argument/rebuttal. But I never said that the FVD of an LED is not correlated to its color. In fact, I clearly illustrated the correlation to make my own point. Yeah, you can't make a blue LED run at less than 3V... so it's either a happy coincidence that 9V>3V, or maybe they chose 9V for a reason. Yes, I forgot UV LEDs. They have a FVD higher than blue/white by only a half a volt or so. So adding them to the mix does not significantly change my basic argument. My point is: the extreme spread of FVD between any LED is from about 1.4V to 3.9V. With a fixed resistor and a 9V source, you can choose a value that provides a target current, plus or minus about 15% extreme deviation. The LED will drop xV, and the resistor will drop what's left. The current will be (9V-FVD)/ohms. Go ahead and crunch the numbers for a 330 ohm resisor. The result is a current range of about 17mA-23mA. Ok, that's not as precise as an LM317. But if your testing consists of polarity, color, and a general indication of how bright it is compared to other LEDs, you get exactly the same result. With a benefit: you can leave the power connected all the time with no quiescent drain. 20mA current was chosen arbitrarily as a number that would safely light up any common LED pretty well without chance of overdriving it. Since it was chosen arbitrarily, what's the difference between 20mA and 17mA? Or 20mA and 23mA? The benefit of active current control is apparent only when you are attempting to drive an LED to its maximum output. As the LED heats up, its FVD effectively decreases. To get it to operate at full capacity from the instant you turn it on, you need active current control to deal with the changes which occur as it heats up, else it burns up from thermal runaway. This isn't a concern when significantly underdriving LEDs with 20mA, or indeed even when testing laser diodes near their max for short enough periods that you do not allow heat to build up. A ~20mA LED tester will never realize this benefit. So using an LM317 is more costly, complicated, and potentially less energy efficient all for the sake of being a bit more pimpin'.

author
digitalist (author)klee27x2009-06-07

The 20mA point is NOT arbitrary - it is a design criteria to do with the thermal performance of the packaging. As you implied, heat is arguable the greatest enemy of the LED, and that is the reason such emphasis on operating limits. Don't misunderstand - I'm not necessarily condoning active regulation for a properly designed circuit running off a small range of voltage. But, as I understand it, this is presented as a TESTER for LEDs, and as such, should cope with any situation and LED that you might come across. That said, at 20c apiece, the LM318 not all that much of a expense. Rather, I would think its greatest drawback is the 3v drop it imparts on the circuit.

author
klee27x (author)digitalist2009-06-07

True, true, true... It's still a cheap and simple circuit. FYI, 3V is kinda optimistic. I've found 4.5V of overhead to be the magic number when using an LM317 as a constant current device. So a dual LED tester might result in a lower current output than expected. If you care to test your own LM317 circuit for minimum overhead and have different results, I'd be interested in hearing about it.

author
digitalist (author)klee27x2009-06-08

If you are getting a 4-volt drop across Vi and A, then you are probably overdriving the LM317. The datasheet guarantees a maximum drop no greater than 3v. It's easy to overwhelm these series regs - even the 317 T will start shutting down when there's 500mA going through unless you have extra heat sinking, and lots of it.

author
klee27x (author)digitalist2009-06-08

That was with a TO-220 package set to 35mA. The current output just started going down as Vin got within ~4.5V of the output. I didn't do a whole lot of testing at different voltages and outputs, but I certainly wasn't overdriving it. As a voltage regulator, I find I need less than 2V overhead, np.

author
DanZen (author)digitalist2009-06-07

Hi digitalist, Perhaps you have misunderstood what I was trying to justify. I'm well aware that a blue LED will generally have a greater voltage drop than a red LED. What I'm trying to say is that NOT ALL blue LEDs operate at 3.3V and NOT ALL red LEDs operate at 2.0V. While there might not be a lot of deviation from these general values, a difference is a difference right?

author
MrCruz (author)2009-08-09

Very nice instructable. I will be making this shortly :) However, there is something that is bothering me. When the jumper/switch is in the off position, isn't the battery-diode-capacitor loop always on?

author
DanZen (author)MrCruz2009-08-09

The jumper/switch is not for switching the tester on or off. I did not include a switch to disconnect the battery so the tester is always on, but drains minimal current when not powering/testing an LED. If I wanted to disconnect it I'd simply remove the battery connector. The jumper/switch that you mention is for opening the loop to the LED so that you can measure the current flowing into it. Once you remove/open the jumper/switch, your multimeter in current-measure-mode will act as a bridge/short thereby reestablishing the loop. Hope this helps.

author
Sagar Gondaliya (author)2009-06-07

its a graet 'ible but i think the only thing you should change is to somehow label the pads and connecters to save a couple o' seconds of trial-and-error. i did it and it helps a lot.

author
DanZen (author)Sagar Gondaliya2009-06-07

I agree 101%. But I was lazy at the time and I did design the layout so I'm familiar with where everything was. I know, that's not an excuse. It's always a good idea to label everything. Having said that, the test pads/loops for measuring voltage and current were arranged in an intuitive manner. You can't get it wrong there. The only place that really needs labeling is the contacts/header for the LEDs.

author
Sagar Gondaliya (author)DanZen2009-06-08

you're right. i wasnt insulting you, in case you took offense.

author
DanZen (author)Sagar Gondaliya2009-06-08

Insult? What insult? Seriously, no offense taken. You were just pointing out a good practice and I agree with you.

author
Sagar Gondaliya (author)DanZen2009-06-09

k thnx

author
DanZen (author)2009-06-07

Hi klee27x, I believe digitalist's comment was directed at me. I understand your methodology and argument. But I'd like to point out that one might not be happy with the brightness of his/her LED at 20mA (+-3mA). What then? Do you just guess the value of the resistor to use? What if one would like to test the relative brightness of different colored LEDs? A red LED would surely seem brighter than a blue LED when you test it with your method no? I do however, like your simple your way of testing LEDs with limited components. A current regulated tester is not that difficult to make. It's not like you need exotic parts or have to go though a tedious fabricating process. So why settle for less?

author
klee27x (author)DanZen2009-06-07

Yes. I understand and appreciate the circuit you have built there. I was initially responding to the fixed current, nonadjustable version that Microman had posted. And, yet, I could continue to play devil's advocate (or continue on my nerdraging warpath :)). Even on the adjustable version, to determine the absolute current your circuit is providing you need to attach an external ammeter, do you not? Then you would calculate the voltage and resistor you desired from there? So in practice, it would be pretty much the same process as using an ammeter with a 9V battery and a simple potentiometer? As for testing the relative brightness of different color LEDs, a red LED might appear brighter than a blue one... or it might not. True, the current would be 30 percent higher, but that's something that is way overshadowed by the possible range of efficiencies of the LEDs, themselves. For instance, of the assortment of LEDs that I currently have stockpiled for standard indicators, the red ones are much dimmer than any of the other colors I possess at practically any range of current. (The orange ones I happen to have are wicked brighter at 3mA than the red ones at 30mA in the same SMD package). So a current range of 30 percent is arguably more than sufficiently narrow for eyeball comparisons. You can pretty much tell which LEDs are "bright" and which ones are "dull" at a glance. On the other hand, I see the benefit if you're doing extended duration limit-failure testing on high flux LEDs and laser diodes. So I concede there's some unquestionable added utility for at least one specific application, if not more. Wow, I'm such a nerd. I promise to shut up now.

author
DanZen (author)klee27x2009-06-07

Alright, you made your point. I admit that red LEDs appearing brighter than blue is a really really really lame argument. I too find that my red LEDs never appear brighter than LEDs of other colors despite the current supplied.

author
digitalist (author)2009-06-07

With 9-volts, you can make a rig to test 2 LEDs simultaneously , with the same current through each - which is a really good way to compare LEDs.

author
DanZen (author)digitalist2009-06-07

I like your suggestion. I could probably make a different adapter with three pads; one pad will be connected to the +ve terminal, another to the -ve terminal, and the last pad left unconnected and separating the previous two pads. I could then place two LEDs in series so that both LEDs get the same current.

author
digitalist (author)DanZen2009-06-07

I'm not as handy - so this is my setup: LM317LZ with the Vo leg folded up and a 68R resistor from that to the A pin, which straddles a natural break in the supply rails of this breadboard. The yellow probe allows me to measure the Vf of the device.

LM317LZ-1.jpg

About This Instructable

29,947views

138favorites

License:

More by DanZen:Current Regulated LED Tester
Add instructable to: