Powering LEDs for motorcycle

I'm going to make a custom LED brake light for my friends motorcycle. I just got a bunch of red-orange superflux 70mA LEDs and tomorrow we will be working on a layout for them. I was wondering how to most efficiently power the LEDs which will be controlled by either an attiny85 or atmega328 depending on what we end up trying to do with them. I'm thinking it will likely have 20 to 30 LEDs but possibly more or less.

Powering them from my 5v regulator seems like a bad idea if it's a linear regulator, lots of wasted energy. But what about a switchmode regulator? Maybe that would be a better idea but although I have parts to make a few different regulators I havn't actually tried it yet.

A better idea seems to me to power them from the 12V and put every 2 or 3 in series. Again, I don't know what the layout will be but I think that would be fine. But it doesn't seem like a good idea to power the LEDs directly off the 12v line because of flicker. But then again the lights on a motorcycle don't seem to flicker so maybe it would be fine? Maybe I could use a regulator that doesn't drop the voltage so much?

Any advice on the matter would be nice.

Thanks.

I would use the 12V supply to power them - you place several in series and add a current limiting resistor - for more LEDs you add more strings of LEDs (plus resistor) in parallel to the first string. It can be quite efficient since most of the battery voltage (and hence power) will go into the LEDs.

However a quick word of caution - you need to make sure they actually light up when the battery is low (brake lights are important!), so you should assume the battery voltage is only 11V or so in your calculations (and then recalculate for 13.8V - battery being fast-charged).

So step 1 is to lookup the forward voltage of your LEDs on the datasheet, preferably the graph of forward voltage against temperature. Vehicles are exposed to a wide range of temperatures and the forward voltage will vary quite a bit. It is wise to actually measure the forward voltage at 70mA too - the datasheet might be "optimistic".

So given the maximum forward voltage and the minimum battery voltage you can work out the number of LEDs in one string. For example I'll assume a forward voltage of 1.9V and min. battery voltage of 11V - suggests a string length of 5 LEDs (taking a max of 9.5V).

Then you need the max current for the LEDs, lets say this is the 70mA you quote. Also assume the battery voltage can go up to 13.8V and the LED forward voltage minimum is 1.7V (off the top of my head, don't trust these values!), then the string will take 8.5V and the difference from battery to string is 5.3V. So series resistor is 5.3V/0.07A = 75 ohm. It will dissipate about 0.4W.

With 30 LEDs thats 6 strings of 5, ie total current of 6 x 0.07A = 0.42A

One MOSFET will happily switch this, so long as its a logic level one - source to ground, gate via 220ohm resistor to Arduino pin (or whatever), drain to the cathode end of the strings. Anode end of strings to +12V (don't forget a 75 ohm resistor in each string.

Finally we can calculate the min current (assume Vbatt = 11V, Vforward=1.9V, then that leaves 1.5V across resistors and 20mA for each string instead of 70mA

An alternative scheme is to use a constant current LED driver chip - this will prevent the variation of current with temperature and battery voltage.

[If you used a 5V regulator you'd be limited to 2 LEDs per string, so 15 strings = 1.05A. The regulator would need to dissipate upto 10W]

So you don't think an additional power regulator will be neccesary for using the 12v line from the motorcycle?

which will be controlled by either an attiny85 or atmega328

You shouldn't need a "brain chip" for this... Unless you want the lights to come-on/off in a sequence or something like that... And "simple logic" like combining turn-signal/braking functions or dimming can be done without a CPU or software.

If you were going to "manufacture" this, a switching constant-current supply would be the way to go. With that number of LEDs, you'd need a high(er) voltage switching-supply with all of the LEDs in series, or a separate switching supply for each group of series LEDs.

I agree that a 5V regulator doesn't make sense. But, you probably do need a regulator. LEDs are more "sensitive" to voltage/current changes than regular (incandescent) lights because of their "constant voltage" nature. Here's the deal... If you put a few LEDs in series and you calculate for a 6V drop across a series resistor. If the "battery" voltage goes-up by 2V, the voltage across the LEDs remains constant and you've now got 8V across the resistor for a 30% increase in current/brightness. If you put more LEDs in series for a 2V drop across the resistor, now a 2V increase in battery voltage doubles the current/brightness. More voltage across the resistor (i.e. one resistor per LED) means more-constant brightness, but it also means more wasted power.

The lights will be combination tail, brake, blinker lights. In addition the brake lights need to blink a few times when they first go on. I know this could all be done without programming but it would be easier to do for me, and easier to modify. I'm not concerned about a few dollars for the chip.

So anyway the LEDs are "typically" 2.6v. So with four in each series that's 10.4v at 70mA. There may be upwards to 40 LEDs so that's possibly about .7 amps. Is there a regulator that can use down to 11v and have a small enough drop to keep me high enough to get 10.4v with a resistor.

Maybe I should try three in each series and use a 9v regulator? Would I be dissipating too much heat?

Ok so I'm thinking it's gonna be 33 LEDs in series of 3. That's 7.8v at 770mA.

Here is the LED datasheet. HPWT-DH00.... Page 5: www.philipslumileds.com/uploads/3/DS05-pdf

Here is the Linear Regulator I am looking at, .5v drop out, 1A: http://www.newark.com/national-semiconductor/lm2940ct-9-0-nopb/voltage-regulator-ic/dp/41K4578

That's 2.31 watts of dissipated energy on the regulator and about 1 watt over the 11 resistors.

Is that too much dissipated power? I don't really have any idea what to base it off of.

I'd like to use 4 in each series and only have about a tenth of a watt of dissipated energy but I don't see how to get a constant 12v from a 11-14 range. I can't find any switching regulators that preform such magic.

Any more help would be very appreciated