Controlling LEDs is really quite simple. As you know, they need to be current limited which is as easy as applying Ohm’s law to your given set of values. To make things even more even there’s a slew of constant current LED driver chips out there that can be had for a song. But do you have any idea how those constant current circuits work? If not, then [Giorgos Lazaridis’] guide on LED driving and controlling methods will bring you up to speed in no time.
He starts out with the most basic concept, how to light an LED using proper current limiting resistors. But from there he moves on to the juicy bits. He builds a transistor-based constant current driver, then adds voltage regulation for the circuit as seen in the schematic on the left. He moves on to the more robust and efficient method on the right which pairs a MOSFET with that transistor circuit. This is the technique found on each pin of many of those constant current drivers and functions well regardless of the voltage input level.
He’s been producing videos to go along with these articles. After the break you can watch the episode that accompanies the schematic on the left.[youtube=http://www.youtube.com/watch?v=fMc99rM6u4k&w=470]