It provides a nearly constant current over a wide range of supply voltages. It is very convenient to test a lot of LEDs of different colours and voltage ranges with no danger to the LEDs.
Step 1: Identifying LEDs and Testing
If you play around with LEDs a lot, you might know the problem. When you have a hand full of ultrabright clear LEDs the principally all look the same.
You don't know which color it was or how much light it emits.
You might use a 3V button cell, but for some LEDs this is not possible, like the squaresized superflux LEDs with the short legs.
So this small device gives you the possibility to test out the LED right before using it in your design.
And it is also a check for polarity. I once bought a whole bunch of LEDs whose Anode was the short leg. Guess how long it took me to find that out!
Step 2: The Circuit
You need two transistors like the BC546 or the BC547, two resistors (4.7kOhm and around 39Ohm), a power-plug and some kind of a socket.
If you wire together all the parts like the diagram says, it should give you a current of around 20mA.
With the value of the second resistor (39Ohm) you mainly control the current. I used a 27Ohm resistor, because it was all I had, and it gives me a current of around 25mA.
Step 3: How It Works
How it works:
The trick of this circuit is that the base of T1 is connected to the emitter of T2 and the base of T2 is connected to the collector of T1. So these two transistors rival for the whole current that flows through the LED.
They build something that is called a negative feedback system. A rise in current through T2 would lift the potential at the base of T1, which would then rise the current through T1. With this happening, a part of the current formerly going to the base of T2 would the just directly flow through T1 and as the result the T2 would be closed a bit more and lower the current through it (and the LED).
It's not a perfect regulation because for a rising input-voltage the current also rises slowly, but not too excessive.
To show that it works I tested a few LEDs with it.
Have fun and keep building!