Constant current source for 3x3V CREE LEDs - Page 1
Forum section: electronics / projects

author: microbug
author_rank: Frequent Contributor
timestamp: October 04, 2014, 05:08:47 pm
content: I'm making a custom lighting system for my bike. It will be made up of red and white (legally required colours in the UK) LED strips, which take 12V, and a front light likethisone. When bought in a 'bundle' the front light comes with a battery pack and charger which are, quite apart from being crap, dangerous to use (multiple users have posted reviews saying they left their battery on charge and came back to find it smoking), so I bought the light without any accessories. Instead of the battery pack I would get if I bought the bundle, I'm going to order 6 very nice Samsung 3200mAh or Panasonic 3400mAh lithium-ion 18650 cells (haven't decided which yet), and make my own battery pack. The battery pack will be in a 3P2S (three cells in parallel, in series with another three in parallel), giving it a 5.6V-8.4V range before the UVLO will kick in.I'm already going to make a small driver board for the LED strips in one of those tiny extruded aluminium enclosures from China, so it wouldn't be a stretch to add a constant-current driver for the front light. There are multiple problems with the standard front light LED driver: it doesn't make use of the full potential of the LEDs, switches the intensity incorrectly (it should either PWM or change the current for the LEDs; instead it just switches between one/two/three LEDs) and has been known to burn out when set to 'high'. Instead, I want to make my own driver. I'll rewire the LEDs in series, and remove the old driver from the light. There will be three wires running to the light: two thick ones for the LEDs and one for the button on the light.Specifications so far:Takes 5.6V to 8.4V inputControlled by an MCU which take a single-button input (the button on the front light)Adjustable constant-current output which cycles through 600mA>1400mA>2200mA>(hold button to activate)3000mAHigh efficiency since the system is battery powered: <90%When the battery is below 10%, the circuit switches to 600mABattery protection is handled by a dedicated board (you can get these from China), which has under/over voltage protection as well as over current protection.TI's WEBENCH suggested the LM5122 as a solution for a 12V 3A power supply and stated a <95% efficiency. Would it work to use the LM5122 and drive the feedback pin with an error amplifier, sensing a shunt resistor (example schematichere)? I would use a PGA of some sort to select the output current.

author: Marco
author_rank: Super Contributor
timestamp: October 04, 2014, 06:26:42 pm
content: That's a ridiculously overengineered part for it ... at 12V a schottky diode drop is just 2.5% loss so you can do without a synchronous switcher, no need for multiphase either (it requires more external parts). Also it's easier to just get a LED driver, they are specifically designed for constant current control.I'd just go to digikey, search for boost, select LED drivers, select for both/no for internal drivers (3A is quite high, especially for boost), set amount to 1, sort by price and look for ICs within the right voltage range (digikey's selection for voltage ranges is nearly unusable). Spoiled for choice.First two applicable ones were these :http://www.richtek.com/download_ds.jsp?p=RT9288Ahttp://www.diodes.com/datasheets/AP3021.pdfPS. they'll definitely get <100% efficiency :p (< when used in such a way is usually taken as less than)

author: Unknown
author_rank: Unknown
timestamp: October 04, 2014, 06:52:17 pm
content: Li-ion battery have a nominal voltage of 3.7 V, so when you build a 3p2s pack you have a nominal voltage of 7.4 V and is not good for the battery to go under 3V so you should change the UVLO . The forward voltage of the leds is 3V so you can't put them in series and use a 7.4V supply .You can use three of this :http://www.allegromicro.com/en/Products/Regulators-And-Lighting/LED-Drivers-For-Lighting/A6211.aspx.

author: Marco
author_rank: Super Contributor
timestamp: October 04, 2014, 06:56:25 pm
content: Oops, I missed that at max battery voltage and minimum current you actually need to drop the voltage a bit ... a synchronous controller doesn't really help there because the body diode will still conduct even if the FET is off.You'll either need buck-boost, or bodge something with a P-MOSFET to drop the voltage a bit when necessary (and as a switch to cut off the leakage current from the LEDs).

author: microbug
author_rank: Frequent Contributor
timestamp: October 04, 2014, 10:30:37 pm
content: @Marco I did think of that. That's why the minimum current is 600mA: the drop across the diodes will be around 8.6V when the max battery voltage is 8.4V. Coupled with the high load on the batteries (there will also be about 20W worth of LED strips) which means that the battery voltage will drop a little, I doubt it will be a problem. I can always raise the minimum current in software! Presumably SEPIC/buck-boost is less efficient, so as I am on the edge of the boost converter specs already, I might as well try to stay within them.EDIT: The other thing I could do is sense the battery voltage in software and raise the minimum current so that the dropout voltage isn't an issue.Thanks for pointing me to the parametric search. There are some good-looking ones here...I ought to know by now that the crocodile eats the big number!@exapod, if you look at the characteristic curve for an 18650 battery, you lose a fairly large amount of capacity by not terminating the discharge at 2.5V. I'm compromising by terminating at 2.8V. The batteries would survive, although their lifetimes would be shortened, if I regularly discharged them to 2.5V, but realistically I'll charge them regularly and they are unlikely even to get to 2.8V.I did look at that IC (A6211) before, but it's only available from Digikey, and with a minimum £50 order for free shipping or a £12 shipping charge, I'd rather go with Farnell which is local.

author: Marco
author_rank: Super Contributor
timestamp: October 04, 2014, 10:55:00 pm
content: Unless you have a separate power switch you will still need a P-MOSFET or a relay to take the voltage off the LEDs when it's "off".

author: microbug
author_rank: Frequent Contributor
timestamp: October 04, 2014, 11:16:22 pm
content: You mean when the front light's off?

author: Marco
author_rank: Super Contributor
timestamp: October 04, 2014, 11:27:58 pm
content: Quote from: microbug on October 04, 2014, 11:16:22 pmYeah ... the micro can just go into some deep sleep mode to be brought up by an interrupt from the button, but the LEDs leak a bit too much. Especially at the higher end of the battery voltage.PS. buck-boost != SEPIC. An inverting buck boost converter is very similar to a boost converter (but you either need high side current sensing or high side switching).PPS. oh and there isthe floating buck boost.

author: rs20
author_rank: Super Contributor
timestamp: October 04, 2014, 11:40:49 pm
content: Partially OT: Please make sure that light is pointing at the ground. There's nothing more counterproductive, and more annoying, than having one of these searchlights blinding people coming in the opposite direction. And I say this as a cyclist myself. There's a certain degree of brightness beyond which you're not significantly raising the chances of being noticed, but you are still raising the chances of blinding, disorienting or irritating other people. </grumpy curmudgeon>

author: microbug
author_rank: Frequent Contributor
timestamp: October 04, 2014, 11:46:03 pm
content: @rs20, don't worry! My dad (I'm 15) goes on (... and on) about this all the time, so there's no way I couldn't. I have had the experience multiple times myself and it's not pleasant. Someone on a bike forum (I forget the username) made a 'cap' out of a plastic water bottle that stops too much light from going away from the ground; I'll probably do that too. I won't have it on high most of the time; I could make sure there's no-one else around before making it too bright (akin to car headlights).I saw an article in a tabloid from about a year ago while researching which light to get that said that many bike lights are 'brighter' than car headlights (which have to be dipped for legal reasons) and that there are no regulations surrounding this.

author: IanB
author_rank: Super Contributor
timestamp: October 04, 2014, 11:57:58 pm
content: Bike lights have two functions: firstly to be seen, and secondly to see the way ahead when the street lighting is lacking.Here in the USA the most effective way for cyclists to be seen is to use flashing clusters or strips of LED lights. I know it technically may not be legal according to UK road regulations (may not be legal in California either), but it sure is effective. As a car driver I can't fail to see cyclists with bright flashing lights on their bike.For seeing the way ahead you would want a properly constructed light with reflector and beam shaping lens just like car and motorcycle head lights. You could use that light only on dark roads and turn it off in areas with street lighting.

author: microbug
author_rank: Frequent Contributor
timestamp: October 05, 2014, 09:29:07 am
content: Yes, that's the point of having the two light sources. I do cycle on some dark roads without lighting, so I need a light to be able to see where I'm going.I'm currently looking for a driver. It's a little cumbersome because I would prefer to get stuff from Farnell (or as a free sample), but Digikey's parametric search is better.

author: microbug
author_rank: Frequent Contributor
timestamp: October 05, 2014, 09:48:14 am
content: OK, I think I have found a suitable IC: LED6001 (datasheet). It's available from Farnell, has a usable input voltage range and it supports analog dimming (current limiting). Analog dimming should be better than PWM (also supported) because it wastes less power.

author: Marco
author_rank: Super Contributor
timestamp: October 05, 2014, 08:14:16 pm
content: PWM dimming is generally used to keep the colour temperature constant.

author: microbug
author_rank: Frequent Contributor
timestamp: October 05, 2014, 08:40:42 pm
content: I don't really care much for colour temperature, so that's fine.