Current Regulated LED Tester




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!



    • Metalworking Contest

      Metalworking Contest
    • Tiny Home Contest

      Tiny Home Contest
    • Water Contest

      Water Contest

    30 Discussions

    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)

    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.

    2 replies

    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.


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

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

     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?

    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

    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.

    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.

    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'.

    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.

    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.

    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.

    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.

    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?

    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?

    1 reply

    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.

    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.