[[ GXB20 Driver – Homemade Constant Current Programmable XHP50 Single-Cell Boost Driver! ]]

Woah, great work you did
I will definitely buy more than 1 when you releave to market

loneoceans, Wow! I have been a lurker here for about a year . Seeing your driver project has motivated me to register so I could get in line to buy a few of your boards. You have done an incredibly amazing job in such a short amount of time! I have three XHP50s sitting on my bench waiting to be put to good use. Your driver would open up several opportunities to build a compact sun!

I have sent you a pm.

Any possibility of a parts kit with flashed mcu?

+1 please!

Thanks everyone for the good feedback.

Rfusbduck, unfortunately I can't offer a parts kit but the components should be easy to order at your favorite electronics distributor. As for offering boards with a programming ATtiny84A, I think I should be able to do that and maybe just $2 more but I'm currently out of parts so those interested drop me a message so I can order a few more controllers. This will be programmed with the latest firmware though any changes after - you'll have to program it yourself :)

I'm planning to keep 5 for myself for development and testing so I can only offer 10, so do let me know if you're interested! Again I'd like to reiterate that the board is very small as are the components, are may be tricky to put together if you don't have a decent micro-soldering or reflow/hot-air setup. Also it's currently still a 'prototype' in my mind, but it'll be fun to get some people playing with them and helping find bugs or issues :)

Finally I wrote a quick page with the BOM, firmware, schematics etc:

http://loneoceans.com/labs/sales/gxb20v1

Hopefully this will be useful :)

Aaah! I'd love to assemble one by hand. I can dissect stuff with my close-range sight (removed the loupe from my helping hands accessory, to me having that stuff right there is more of a hindrance than anything else, seriously). :-)

Wow! That stuff has a good deal of parts crammed into.

What is the maximum driving current this driver can handle without major issues? I say this because, well, you know some of you will want to raise the driving current “a bit higher”. I presume the driving current values are coded somehow in the ATtiny 84A flash, obviously related to what seems to be ≈90mV of “sense” reference voltage. ;-)

High amp switches recommended.

Cheers ^:)

Thanks for making it all available. I was skeptical it first, you are far from the first person to enter this forum with a thread like this. I was beginning to believe they where all the same person pulling the same joke. The Russian driver looked nice but the majority of us do not read Russian nor tolerate Google translated technical specs and discussions. Anyhow, a few questions if you don’t mind.

You are using a digital potentiometer. It appears to have 256 steps, but you are using 20 of them? If you used a potentiometer with different values (possibly with resistor in series), wouldn’t you be able to utilize all 256 steps for higher resolution? If so, this could be useful for implementing a ramping mode.

You are using the value of 20 for the 2770mA mode. Is 2770mA the roof of what your driver is capable of? If the value is increased to say 25, what would happen?

What would you need to do in order to boost an input voltage of 6V to 12V ? Or even from 3V to 12V?

I’m interested in trying out your driver and possibly adapting one for SRK usage, but will develop my own firmware as I prefer the AVR Studio environment over Arduino. I have made a few drivers and firmware based on the 84 already, so I’ll just stick with what I am familiar with. Would you send one or two bare boards to Sweden?

Edit: Another question if I may. On your website you wrote this: “LED brightness adjustment via constant-current limiting (no more PWM flickering!)”. I understand that the adjustment is done by constant current, but the LED still receives PWM because the output from the boost converter chip is PWM? Or have I misunderstood something?

I’d probably mess it up then but thank you. Better that they go to someone like Mike. Please keep posting your results as this is a very popular driver notion.

+100500

If you mean SRK boost drivers that are used in Meteor, they were made by guy from Ukraine.

Yeah, you’re right. It’s the Indigo driver I was thinking about. I had a quick look at those links Serp provided earlier in the thread and left faster than it took me to paste the URL into Google translate. Unreadable.

Very interested in a 17mm edition with a nice firmware!

Thanks for your comments and suggestions - here's a quick response to your questions. I say quick because I'm about done with a more detailed write up, though as I've found, the documentation is taking -wayy- more time than I had expected, and certainly much more than actually making the driver in the first place. I'm glad to have found this forum since it's given me a lot more motivation to work on this project and to hopefully make a 'commercial quality' product in the end instead of just an experimental hobby project.

About the digital potentiometer, - that's correct, when I was first designing the GXB20, keep in mind I did the entire schematic and layout all in a single day when I had nothing to do... I wasn't really expecting this to work as well as it did, but I didn't put as much thought into in as I would have for a product like this (since I was just making it for fun). Back then I wasn't aware of the flashlight community so I didn't think too much about the levels, and ramping etc.

The digi-pot works in conjunction with an op-amp as a variable gain amplifier. There are some limitations as I have found, i.e. the gain adjustment was a little too cramped at the low end. I found that values 0 to 20 get you about the full range to 3A output. However you can increase this further by changing the current sense resistor to say 60mR, which would give you 0 to 40 but twice as much power dissipation in the sense resistor. Regardless, I do have plans to re-do this section to make use of the full 256 taps :). I also need to analyze the feedback more carefully to ensure that the system keeps within regulation and the loop response is kept in check.

The limit of the driver depends on various factors - power / heat dissipation, saturation of the inductor, PCB trace thickness etc. But as-is, the limit is currently set by the input current limit which is set via the 115kR resistor for just about 9A input. So it should be able to handle ~4A+ output, so I haven't tested it just yet. As for why it's 2770mA, that was due to a modification I made to the driver to test! Nominally writing 20 to the digipot with the default schematic values should give around 3A out. One of the main limitations I found with the digipot is the very high wiper resistance, especially at low drive voltages. So I'm looking to replace this part with another one. I'll update the firmware to reflect more accurate values. :)

[edit] - My page has been updated with refined V0.9 firmware and code. Please discard the older one which was still under development.

As for boosting to 6V to 12V or 3V to 12V, this is all possible with this driver but I don't have a simple answer for it, since I'll have to redo the math on the magnetics to make sure they check out ok. But is it possible with some modifications, yes.

I prefer Atmel Studio as well, but I decided to do it in the Arduino IDE because it's much more hobbyist friendly, so I thought that would be useful. Regardless this should be very straightforward to just port to use in Atmel Studio, or in fact any of your favourite IDEs.

Finally, your last question on PWM - no the LED receives a regulated constant current supply. You are right in that the switching state of the FETs in the converter operates like a PWM at the switching frequency. However the inductor in the boost circuit is key - it resists sudden changes in current flowing through it. So while the voltage across the inductor can look like a PWM, the output is sustained by both the output capacitor and the inductor current. As long as the time constant of the RC output is high compared to the switch period, the output voltage approaches a constant DC output voltage.

As you can see above, the cyan line shows the output voltage, and you can see that the ripple looks to be fairly decent with no PWM :).

If you'd be interested in boards I can certainly send them to Sweden in a regular envelope. Drop me a PM if you'd like :)

To conclude - I understand that there are certainly many improvements I can do to the GXB20 and I welcome all criticism and comments! I'm definitely not the best firmware and/or electrical engineer since I'm just doing this for fun, but it's been a lot of fun and if I can make something that the community can use, I think it's a worthwhile endeavor and hopefully people better than myself can use the details I've released as a starting point or even just for inspiration. Thanks!

Thanks for your detailed answer. I know all about writing documentation :confounded:

I didn’t think about the inductor. My knowledge of these things are very limited. But yeah, great news on the constant current.

PM inbound.

There are other well-known highly efficient drivers which make use of low ohmic value sense resistors: the LD-29 and LD-29S buck drivers. You may want to take a peek at the way these resolve the digipot + operational amplifier dyad, since they equip R025 and R020s.

Efficiency is key to power handling. Since usually only a reduced amount of power can be wasted in the driver, it becomes clear high efficiency is a must for high power output drivers (and hell, preferably for any power level). This remembers me I'd been thinking in a way to get rid of the sense resistor. Please bear in mind I may speak some bollocks due to lack of proper technical background but, wouldn't it be possible to use the actual inductor direct current resistance (DCR) to feed the operational amplifier? This, of course, would require placing the inductor on the low side, or switching to difference/instrumentation amplifier setups.

By the way, 80mΩ on the torch's switch sucks. It may be time for a change to FET tail switches, there are some good & cheap small FETs with very low ESR which could be parallelled and gate driven with tiny button cells (a couple in series CR1620s, for example). Sounds right?

Cheers ^:)

To quickly answer the question if I could drive the LED higher, I quickly did a test. I wanted to see what would happen with ~24W into the driver.

Driver seems to work just fine. This was with a measured 3.8V in at 6.32A, and as you can see an LED current of 3.26A with ~1850+ lumens of CRI90 light. Total efficiency was just around 88-89% including some LED wire loss, which is not too bad but still significant ~2.6+W dissipated just in the driver and wires! Things get warm fast, but the driver seems to handle it ok :)

This is awesome!
This driver is also perfect for driving high power UV led from one Li-Ion as they have high Vf.

Good, but I'd prefer to see how the figures are under a worst-case scenario.

Can it handle its duty well when the input voltage is barely above cutoff? At 3.01V, let's say. :-)

For these high drain duties, it'd be also a nice idea to set the cutoff a bit lower than usual, maybe 2.9 - 2.8V.

Cheers ^:)

Great job Loneoceans! Very impressive! Welcome to BLF! BTW, I do have small springs if you need some. Let me know what size you are looking for. You can PM me and I could send them to you free if you’re in the USA. :smiley:

Willie

Nice work, thanks for sharing. Sitting under a hot LED encased in a host with no air flow. I think drivers bleeding out that much heat might need potting. A few good materials out there should nip frying in the bud.

I bought a bunch of ATtiny84A MCUs :). Let me know if anyone is interested in a board with populated and programmed MCU (only MCU, you need to solder on the rest yourself) :). The rest of the details and BOM can be found here: www.loneoceans.com/labs/sales/gxb20v1