Introduction: USB LED Tester and Breakout

If you're anything like me, you've probably got various LEDs knocking around left over from previous projects or salvaged from equipment. Some of them you might have had for years, and others might be clear ones and you've long since lost track of what colour they are, what is their forward voltage, and whether they even still work.

True, it's easy to knock up an improvised LED tester with a battery and a resistor, and preferably a breadboard or a few clip leads, but first you've got to find those bits. Much nicer, then, to have a ready made tester which cost you next to nothing to build and can take power from a computer's USB port, a USB charger or a USB power bank.

You can also use it to conveniently supply 5V power to a breadboard project from a USB port.

I built such a tester a while back and found it useful. But recently I needed a USB breakout board. (I'd rescued a talking book from a local library clear-out which had lost its box. Taking it apart, I found a set of solder pads that looked like they were intended for a USB socket. So just for fun I soldered some flying leads to them, but I needed a USB breakout board in order to plug it into my computer to try it out.)

So I decided to rebuild my LED tester as a combined LED tester and USB breakout.

If you're quite sure you'll never need the USB breakout function you can leave that part out. But who knows what might excite you at some time in the future?

Step 1: What You Need

You will need the following parts, some or all of which you may already have in your box of bits and pieces:

  • A piece of stripboard 20x17mm, i.e. 6 strips wide by 7 holes long. If you have any stripboard off-cuts from a previous project you should able to find this, otherwise you'll have to cut it from the smallest piece you can buy.
  • A spare or scrap USB data or sync lead with a USB type A plug on one end (that's the large flat rectangular sort).
  • A 330 ohm resistor.
  • A pin header strip at least 8 pins long. (It often comes in strips 40 pins long.)
  • A pin header socket trip at least 8 pins long. (This too often comes in strips 40 long.)
  • A sachet of Sugru (see sugru.com) or a hot-melt glue gun.
  • A stripboard track cutter (optional) or a craft knife.
  • Wire cutters, soldering iron, solder.

Step 2: Construction - 1

First of all, cut the stripboard to size, that is 6 strips wide by 6 holes long.

With a stripboard track cutter or craft knife, cut the 3rd track from the bottom at the middle hole (as shown by the red blob in the first diagram).

Next, solder the 330 ohm resistor in the position shown in the 2nd diagram and trim its leads.

Use one of the trimmed leads to make a wire link between the two bottom tracks, soldered as shown in the same column as the 330 ohm resistor.

Using a craft knife or wire cutters, cut a 5-pin length of pin header strip and solder it in the position shown.

Cut 3 more single pin lengths and solder them in position. You can use a pin header socket strip to hold them straight while you solder.

Using a craft knife or wire cutters, cut a 5-pin length from the pin header socket strip.You will have to cut through the 6th socket, and you can trim the cut end with the craft knife or a file. Solder it in position.

In the same way, cut a 2 pin length of pin header socket strip and solder in position.

If you don't want the USB breakout function you can leave out the 5-pin header and header socket strips.

Step 3: Construction - 2

You may well have various spare USB leads, and any with a USB type A plug on one end (the large flat rectangular type) will do. A charger cable may only have 2 conductors. This is fine if you only want to use it as a LED tester, but you will need a data or sync cable for the USB breakout function.

Cut off the other end of the lead, leaving a convenient length of 20 - 30cm or as you prefer.

Strip back the outer insulating sheath by around 10 - 15mm and remove the exposed shielding. This should leave you with 4 wires - normally red, black, white and green.

Strip a couple of mm of insulation from each of the 5 wires and tin them with the soldering iron.

You can now solder them to the board as shown above, and diagrammatically in the previous step.

Step 4: Construction - 3

The 4 wires from the USB cable need protection if they are not soon to break where they're soldered to the stripboard.

Sugru is the ideal solution. It comes in 5gm foil sachets but once opened it goes off within a few hours even if you do your best to reseal the sachet. You will only need about half a sachet, so before opening, browse sugru.com where you will find literally hundreds of cool ideas for how to use the remainder while it remains workable.

Fresh out of the sachet it has a putty-like consistency. Mould it around the USB lead and the connections to the stripboard, and if you like, around the whole of the board. Within an hour or so exposed to the air it starts to go off, and within 24 hours it becomes just like rubber.

An alternative is to use a hot-melt glue gun. Apply the glue to the USB wires to obtain a similar effect.

Step 5: How to Use It

You may like to attach a sticky label to the side of the 2-pin pin header socket, marking it + and -. Insert the LED to be tested into this socket, with the anode in the hole nearest the 330 ohm resistor (which you can mark +) and the cathode in the other (mark it -). The cathode is usually the shorter lead (unless it's been trimmed), or the lead next to the flat on the side of the LED.

If you want to measure the voltage drop of the LED, connect a multimeter on a 20V range to the LED+ and Gnd pins.

If you just want a 5V supply for a breadboard project, connect two patch leads to the 5V and Gnd pins.

For the USB breakout function, both male and female headers are provided allowing you to use either male or female patch leads. You will notice that one pin is not used. This will allow you, if you like, to add a mini or micro USB lead which has an extra wire (used for On-The-Go identification).