2646Views10Replies

# Selecting one or many LEDs for constant-current driver? Answered

I'd like to build a flashlight with several LEDs, perhaps different colors, perhaps different beam characteristics, and allow the user to select one or more of them to be active at once.

With primitive electronics, this is simple: Each LED gets its own current-limiting resistor in series with it, and then all the LEDs with individual switches go in parallel across the power bus.

But I'd like to use a constant-current driver (buckpuck or similar) for better efficiency and stability across varying input voltages. This means the LEDs should be in series. To take one out of the circuit, I'd simply short across it, bypassing it so the current still flows through the other(s). This is pretty simple with two LEDs, as I could use a center-off toggle switch to short A, neither, or B. But if I try for three LEDs in series, the logic of allowing any combination to be bypassed *except* all of them (because a dead short would damage the driver circuit) quickly gets complicated.

Is there something simple I'm overlooking? Or do people simply avoid doing it this way for this reason? (The obvious solution is to use a constant-current circuit for each LED and run them all in parallel, but that gets expensive in a hurry!)

## Discussions

Well, constant voltage is easy with a 7805 power regulator. as long as the batteries can deliver enough current to drive all the LED's together, eliminating one or two should not affect how much current is delivered to any particular LED. they will only draw as much as the LED and resistor combo will allow. I would not wire in series. I would wire in parallel with a separate resistor for every LED. Then have the switches add or remove LED/resistor combinations as needed. This will then only change the amperage required, not the voltage. Check the drawing below. sorry about the crudeness. it's time for lunch and I'm in a hurry.. ;)

Right, but efficiency is my goal here, and linear regulators are the exact opposite of what I'm going for. I could try a constant-voltage switching regulator with small resistors, I suppose. I was just attached to the idea of constant-current regulators because it means I wouldn't need current-limiting resistors (i.e. power-wasters) at all.

Gar.. OK. I see. now it gets complicated. :) and.. would three or four constant-current regulators be more efficient than the resistors? or would all the extra hardware just draw the same amount of overhead, not to mention cost. I guess I would have to check if a 7805 draws any current when there is no load on the output. If not, it might just be simpler in the long run to go with the resistors, or a single resistor before the selector switch.

Don't use multiple regs or LDO's/Bucks. Two solutions exist. A) Use a LED Segment driver. These have multiple 'channels' to driver seven segment or more LED's. Get the correct current rating for your LED's you can even vary R for Red to White for various Vf. B) with identical Vf, mA ratings of LED's use a BCD rotary switch or a optical encoder with Gray code or BCD. Even more complex is a PIC MPU with microcode for I/O drivers to enable multiple LED's in "combos" via one button. i.e push one for white, again for Red and thrid time you get both white/red, next click you get RGB etc... Another low power low tech solutions is a "revolving head like on a Mag Light that has 'contacts' inside for various positions for each LED. as you turn the head the contacts touch and each LED lights in turn from the Buck and via it's own resistor...all "mechanical"... see me for sketches...

Note that constant current regulators are no more efficient than constant voltage regulators with a current-limiting resistor UNLESS you're using switching regulators. I dont' think I've seen many flashlights that allow large numbers of combinations of which LEDs are on or off. Usually there are small numbers of fixed configurations...