Not long ago in IRC, Norm was looking for new ways to drive LEDs with various circuits...
Here's a typical example of what I've used here in the van for just that. Its a simple modification to a cheap run of the mill 12V car cell phone charger that's good for up to a couple of watts or so, a little more if careful attention is given to how the LEDs are arranged and a suitable heatsink is employed to help keep the converter chip cool.
For this unit, I reconfigured the LEDs from 30 in parallel to two strings of 15 in parallel, with the strings then wired in series. This accomplishes a couple of things. First, it lowers the output current from the buck converter, reducing switching losses (and therefore heat) at a given power level, and second, brings the output voltage for the converter closer to the input voltage, which also helps increase efficiency.
To modify the charger to drive the LEDs, the original voltage divider (a set of 2 precision resistors) that sets the output voltage at 5V is removed and replaced with a 10k ohm, 15 turn precision potentiometer. This allows precise control over the output voltage from about 1.2V to 10V or so (with a 12V input) using the chip that is in the chargers I'm using (MC34063). This easily allows for 1 or 2 LED strings, 3 if your input voltage is high enough. Typically, the output is a maximum of 2V lower than the input with this chip. So for example, if your input were 13.8V, the maximum you can set the output for is about 11.8V
For smaller numbers of LEDs or single die LEDs of about 1W or so, no heatsink is required on the chip to drive the LEDs at full brightness. Above about 1W total, I highly recommend the use of one.
It doesn't need to be fancy, the sink pictured is an anodized TO220 heatsink from Radio Hack, epoxied to the chip. Note that there are no official provisions for a heatsink on a chip of this type, so it is not optimized internally to take advantage of one. It will however bring the temperature down to a more comfortable level while allowing a bit more power flow.
When first connecting the power, leave the LED(s) disconnected and place a volt meter on the output. Adjust the trimmer for just less than 3V for a single die or multiple LED array that is wired all in parallel, or around 6V for the two-LED string version. If you are using 3 in a string (and your input voltage will stay high enough during use), set it to 9V. Note the direction for increasing the voltage with the trimmer pot, and then connect the LED(s). Note that these voltages assume you are using white LEDs, which typically have a forward voltage drop (Vf) of about 3.2V. When first connected, the LEDs will barely glow, if at all, until the trimmer is adjusted to increase the voltage. If for whatever reason you're using a different color LED, make note of the rated Vf and set the trimmer accordingly before connecting them to avoid damage to the LEDs and/or converter chip.
Tip: The trimmer is marked "CW" on one end. The pin on this end of the pot should go toward the ground connection on the board. This ensures that clockwise rotation increases the voltage and vice versa.
Don't exceed the current handling abilities of your LEDs or the driver chip. Make small adjustments while monitoring heat in both the chip and LEDs. The chip can (and will) run much warmer than the LEDs. If the LEDs are of the garden variety "20mA" type (as I'm using here), there should be almost no heat coming from the back side of the LED board. Anything more than "can tell they're on" is too hot, and will drastically shorten their lifespan.
The MC34063 is a fairly robust chip, but not indestructible. By changing the output voltage, the current limiter has been knocked out of calibration and is less helpful in protecting the chip from overload. Sensible temperature checking while operating it over the course of about a half hour will ensure it stays in limits. If you can't hold your finger on the label side of the chip, it needs a heatsink. If you then can't hold your finger on the heatsink after it has a chance to warm up, the power level needs to be reduced until you can. Note that it can take time for the heatsink to "react" to the change... Make small adjustments and give it time, rinse, repeat. This is particularly important when increasing power, as the chip can go into runaway before the temp of the heatsink rises to an uncomfortable level.
The astute eye would have caught "current limiter" mentioned above. Its nothing more than a single low value resistor (typically a couple of ohms) that's got a little more meat to it than the others. While this resistor can be changed to accommodate the new application, I've found that with careful adjustment of the trim pot, this is entirely unnecessary.
The rig pictured draws about 200mA or so with a 12V nominal input.
Enjoy!
Steve