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
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.
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.
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.
Attachments
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.
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!
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!