Critique request: LED bike light driver (OK, more like design help now) - Page 1
Forum section: electronics / projects

author: microbug
author_rank: Frequent Contributor
timestamp: September 26, 2015, 07:32:39 pm
content: I've had this project on the backburners for a while now, and today I finally got around to doing the schematic (attached). What you need to know:There are 12V LED strips on the front and back of the bike. I haven't yet decided on the length but I've only got 2m so the max possible current is ~2A (in reality it will be less than that; I definitely won't use all 2m).There is a bike light with 3 Cree XM-L LEDs in it. These can go up to 3A (~3.3V each), although that won't often be the case as it would dazzle oncoming traffic.The whole thing is powered by 4 18650 batteries (NCR18650Bs, so 6600mAh total) in a 2S2P configuration. They are in a waterproof holder which includes inbuilt protection with a max current of 9A.There is a button on the front light. Currently this is connected to a driver which drives the LEDs in it, but I will wire the LEDs directly to the (external) driver and put a small micro controller in the light itself. This will communicate with the driver with a 1 wire protocol, sending button presses and receiving the RGB values for the colour LED which will tell me the battery level / mode.The front light, LED strips and battery are connected to the driver with IP67-rated connectorsThe front light won't always be used as there are times when it's light enough to see but I still legally need to have lights on my bike for being seen.The driver needs to be pretty small to fit in the enclosure. While the MCU says SO20 on the schematic, it will probably be the QFN version. The board will be four layers.I chose to use TI's WEBENCH to give me some nice, high efficiency boost converter designs. From the selection, I picked the TPS61088 for both the LED strips and the front light. I have added some extra input and output capacitance and slightly upped (1uF?2.2uF) the decoupling on the VCC pins, but other than that the values were computed by WEBENCH.Rather than messing around designing a constant current supply, I have put in a PWM MOSFET to control the level of the front light. While this isn't going to give me precise control over current, it'll do for 3 or 4 LED power levels. Would it be significantly more efficient to use a digital potentiometer on the boost controller's feedback pin?I'm happy with soldering the QFN-type packages that the boost converters come in; it will be my first time but I have a hot air gun and solder paste is incoming.Not yet implemented:Front light controller schematicConnectorsOn/off switch (might use relay / MOSFET with MCU permanently on, in low power mode when not being used)5V supply for microI want to make sure I'm heading down the right track, this is the most complex project I have attempted yet. Schematic attached. Any thoughts?

author: technix
author_rank: Super Contributor
timestamp: September 26, 2015, 07:58:57 pm
content: My personal idea, if it is possible you can try put the enable lines onto PWM pins of the MCU or include digipots to adjust the current so you can dim it should you need to. Also about the controls, just throw in a Bluetooth Low Energy module into this so it can be controlled with your smartphone,

author: microbug
author_rank: Frequent Contributor
timestamp: September 26, 2015, 08:37:01 pm
content: I'll have a look at PWM on the enable pins when I get back to my computer. I don't want BTLE; apart from the strict space constraints I have, it's unnecessarily complicated, all I need is a power switch and one button.

author: georges80
author_rank: Frequent Contributor
timestamp: September 26, 2015, 10:53:07 pm
content: So, you're going to the trouble of designing a voltage regulated boost driver for the 3 XML's, adding in a FET for PWM?Why not just go to a current regulated LED driver to start with. LT has some nice parts with PWM inputs and voltage controlled inputs. At least you'll then have a known drive current to your LEDs versus something unknown and variable.XML's are closer to 3V at 3A. Their Vf will be lower at higher temperature. Constant voltage is not a good choice...cheers,george.

author: microbug
author_rank: Frequent Contributor
timestamp: September 27, 2015, 07:42:08 am
content: Thanks for that george. I had totally overlooked temperature derating! LT has given methisselection of LED drivers from my inputs. I'm looking though them individually, there are several that look promising.As for why I designed a constant-voltage driver and added a FET, I was after efficiency. I had the idea that it would be significantly more efficient to PWM a constant-voltage signal than to just produce a constant-current one, but looking through the datasheets for these controllers I see that is not true.Thanks!EDIT: Narrowed down the selection to theLT3755,LT3761andLT3795. Thoughts on which one would be appreciated; they all seem quite similar.EDIT 2: Decided on the LM3755 since it's the only one with analogue dimming. Schematic to follow.

author: Siwastaja
author_rank: Super Contributor
timestamp: September 27, 2015, 08:09:19 am
content: Regarding the DC/DC converter, CC and CV are totally the same, only the control side differs.But LEDs cannot be driven with voltage control, so you'll need some stabilizing resistance in series (wasting at least 10-20% of the power), which is why it's a lot more inefficient than current-mode converter.

author: georges80
author_rank: Frequent Contributor
timestamp: September 27, 2015, 03:55:13 pm
content: Quote from: microbug on September 27, 2015, 07:42:08 amYes, LT3755 is a good choice. It can be used in buck or boost configuration. With a decent external FET and a good inductor it will run very nicely. I've used it in several of my own LED drivers and it's a good performer. LT provides free samples too...cheers,george.

author: microbug
author_rank: Frequent Contributor
timestamp: September 27, 2015, 03:58:12 pm
content: Ooh, I didn't realise they did free samples. My custom email domain often comes in handy for those, they don't seem to like the commercial gmail / hotmail ones.I'm happy to pay for a good FET / inductor. It would be a shame to go to all the effort to design a project only for it to be inefficient or overheat due to cutting costs.

author: microbug
author_rank: Frequent Contributor
timestamp: September 27, 2015, 07:31:21 pm
content: Right, I'm almost there, but I'm having trouble selecting an inductor. Using values Vled=9.3V, Fosc=100kHz, Vin=6V and Rsense=33m?, I get 41µH. With Vin=8.4V (a full charge), it's 58µH. I decided on a 47µH inductor, but I don't really know much about the selection criteria after that: how high should IRMSbe? ILED=3.3A at the most.

author: georges80
author_rank: Frequent Contributor
timestamp: September 27, 2015, 08:13:24 pm
content: Move up to a higher frequency, the lt3755 and decent/modern fets can support it well. I'd look at something closer to 400kHz. That will get you inductor value lower so smaller size for a specific saturation/rms current. Coilcraft/coiltronics have a good selection of inductors. Coilcraft (at least in the US) has free samples toocheers,george.

author: microbug
author_rank: Frequent Contributor
timestamp: September 27, 2015, 09:06:31 pm
content: When I'm using the equation from the datasheet, which specifies to use Vinbut not whether it's the lowest or highest value, I get fairly different inductances. Should I just pick the higher one, and is there any disadvantage to rounding up to the nearest E24 value?

author: georges80
author_rank: Frequent Contributor
timestamp: September 27, 2015, 09:19:42 pm
content: Round up to the nearest value that the vendor of choice has in the size inductor you need to use (based on inductance, saturation current and rms current).Pick the worst case inductance you need (the highest value) for the worst case voltage in/out combination. Create an excel (or spreadsheet of choice) sheet with the equation and you can then play with numbers to tradeoff worst case in/out and also you can play with the frequency to get an inductor that fits in all your criteria (above) and also in the space you have available.cheers,george.

author: Siwastaja
author_rank: Super Contributor
timestamp: September 28, 2015, 07:18:58 am
content: Extra inductance doesn't matter per se; it's only good and decreases ripple current. However, when you want to maintain the saturation current, rms current and dc resistance specs of the inductor, an inductor with larger inductance will be physically bigger and more expensive. If you have a fixed inductor core, adding turns will increase inductance but decrease saturation and rms current specs.So you want the smallest inductance that will work in all operating conditions, i.e., you calculate with the maximum voltage, and add a bit safety margin. Having too little inductance (or too much voltage - the same thing!) means your current rises more quickly than you have expected.Increasing frequency allows you to use lower inductance; this allows you to either use a part with better current specs, or a physically smaller part. Upper limit for frequency comes from hysteresis losses in inductor core material, FET switching speed and FET driver capability to utilize it.Higher frequency allows downsizing both inductors and capacitors, but at some point, the efficiency starts dropping, and designing the thing starts getting more difficult. Go for 200 to 500 kHz if you use integrated, modern, small components.

author: mark03
author_rank: Frequent Contributor
timestamp: September 28, 2015, 05:57:28 pm
content: I'm a neophyte when it comes to SMPS design, so I cheated somewhat and used a fairly standard LM21212-2 buck configuration with low-side current sense resistor. The usual problem is that this burns a lot of power in the sense resistor, but on some parts like the 21212 you can drive the feedback reference lower using the "soft start" pin. It worked really well, and I'm still using the same light several years later:http://www.hau.nz/posts/bikelight.htmlA PWM DAC varies the soft-start voltage for brightness control. To actually turn it off (flashing) you still need to toggle the enable pin.Beware when running high-current PWM through these power LEDs as the relationships are not linear as you might expect. There's a lot to be said for DC in the LED, efficiency-wise.

author: microbug
author_rank: Frequent Contributor
timestamp: September 28, 2015, 06:58:23 pm
content: I'm new to SMPS design too, although having watched some of Dave's videos I'm familiar with some of the PCB design rules. The schematic design is simple enough if you follow the instructions in the datasheet, though I imagine it would be shorter to take the route you described. I'll have to look into it.For what it's worth, I'm limiting current in the LT3755 with the CTRL pin, i.e., analog dimming. It is driven with PWM but there's a cap there as a low pass filter.I like your emitter. I ordered just one ofthese, but without the poor quality battery & cables. The light itself is pretty good, although I may need to dip it or make some sort of cap to go over it, in order to not dazzle people.EDIT: I don't think I could put the driver in the emitter for mine though. While there is room and I will re-do the circuit that's currently in it, the power requirements would be too high. I'm already driving 15-20W of LEDs, so adding a driver to generate even more heat wouldn't exactly help. I like my idea of using my bike's built in frame nuts and adding some heat sink compound between the enclosure and the nuts so that heat is transferred to the frame in the driver. I won't be using the front light on full power for long (similar to car headlights, I'll only use them on unlit bike paths when there aren't other people around), so with the air flowing around them as I cycle they should be fine.

author: mark03
author_rank: Frequent Contributor
timestamp: September 28, 2015, 08:50:16 pm
content: The LT3755 looks like a nice part. I had a hard constraint to use only a single cell battery (or multiple cells in parallel) because I didn't want to deal with the complexities of balance charging. I suppose just buying a good off-the-shelf hobby charger may be a better plan, although hobby LiPos still scare me. They are optimized to self-destruct rather than cease power delivery

author: microbug
author_rank: Frequent Contributor
timestamp: September 28, 2015, 09:18:06 pm
content: You may be pleasantly surprised by the possibilities: I have 10 NCR18650B cells sourced from AliExpress (around £3 each), which at 3350mAh each are an excellent power density. NB: they (hopefully) don't blow up; they have a valve built in so that they stop working if short circuited. I have bought one ofthese2S2P holders for them (it remains to be seen how good it is, but it looks promising). I charge the cells them individually using a USB power bank (ML-102), so balance charging isn't a problem. That said, it wouldn't be a problem anyway: I have one ofthese2S / 3S balance chargers from an RC hobby that never really happened — they may be cheap, but they have a good build quality and work fine for the price.