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

From wo to go you have amazed. What an effort. :beer:

Simon, are you reading? :crown:

In all greatness, nice to see someone driver design knowledgeable with the same spirit as me (efficient boost & buck drivers).

SK98, nice choice; pretty popular. I see you've managed to fit that into its short shelf.

May sound a tad weird but, would it be more or less easy-feasible to turn it into a boost/buck engine for 2S input? I mean, compatible with 2S li-ion input for bigger torches, even if it means the driver has to grow a bit.

Cheers ^:)

Buck drivers already exist (mtn electronics has one). The Boosting at high current is what makes this new driver interesting.

Can you change the boost voltage up to 12V
For driving xhp35 led

A buck driver cannot regulate an emitter over the full battery input voltage range if it falls below what the emitter needs plus overhead, The_Driver. Also, a boost + buck engine could be made with a wide output voltage range and, with a few board/programming changes, allow for the desired input voltage cutoff (2.75V, 5.6V, custom values for different chemistries, etc) for over-discharge protection. Sort of a high efficiency universal driver.

Cheers ^:)

Recently I saw a 20mm 3A boost driver for 6V leds on kaidomain

http://kaidomain.com/p/S026606.H1-A-20mm-3A-1-cell-5-Mode-Boost-Driver-Circuit-Board-for-Cree-XHP50-6V-MT-G2-MK-R2

Looks promising to me!

Interesting find!

I’d still love to see the GXB20/17 come alive, especially when it comes with the possibility to use an electronic switch.

Quick update:

I put together a little setup to do a bit more testing and it looks like it's generally working. Also tested the low battery routines, modes, as well as over-temperature and it all seems to generally work out well!

For the record, this is with Firmware V0.8.

In addition, I had a friend who was making some PCBs so I tagged on a little on his order and got a small batch of 15 low-cost PCBs made:

I soldered up two of the boards as well as updated them with the newest firmware, and made them into a flashlight! I will be testing it in-real-life use for a while to see how it does but for now it does seem to be working as I had intended :)

Finally if anyone is interested in playing with these, I'm offering 10 bare PCBs for sale for a token $3 each. I'll be putting up a more detailed page together with schematics and BOM soon. It's tricky to put together because of the small components but I figured maybe some people here will be interested. Unfortunately I will not be able to offer assembled drivers at this time.

Thanks everyone for following so far! I'll be testing out the flashlight extensively In-The-Field with the GXB20 over the next few days!

Thank you for the update. Your skills and perseverance in seeing your project through to completion are amazing!

I couldn’t agree more. :beer:

Considering the wattage potential what Copper weight or thickness are you using?

Ideally I'd like to use 2oz copper, but for these cheap PCBs I'm using regular 1oz copper. That said, care was taken to reduce the total trace resistance for all high current paths and some additional solder masking was removed to allow extra solder to thicken the traces.

That said, the vast majority of the heat actually comes from the LED itself, so based on my quick tests, it doesn't quite seem to be a major problem using 1oz copper yet :)

As a side note, I thought I'll draw a little state diagram showing the basic functionality. Also, I thought I'll use this thread to post some thoughts I have using the GXB20 so far:

[Edit - updated with latest V0.9 of the firmware]

Ideas for improving so far (will be continually updated):

  • LED in State 3/4 gets hot fast, and hits the 50/59C temperature within several minutes. Probably can increase Temp Limits. However this also really depends on the flashlight heatsinking / driver mounting etc... would it be a good idea (though more complex) to have pads for an external thermistor directly to the LED heatsink? Right now the thermistor is just sitting near the edge of the board along the ground plane. This has been improved in V0.9.

  • Implement some sort of clever PID control?

  • My SK98 switch / contact isn't actually that good and has significant voltage drop due to ohmic losses! Sometimes when using a cold battery, the under-voltage kicks in at power level 4 - either a better connection needs to be made to the case / battery, use a better host / switch, or drop the voltage cut-off

    • Update - did some quick measurements with a LG HG2 high discharge cell. When supplying about 6A, the cell voltage quickly drops to about 3.8V. I also did a quick measurement of the switch resistance of the SK98 flashlight and found it to be very significant - about 80mR (this was measured by sending a constant 5A through and measuring the voltage drop across it). This means with just 6A flowing through the switch, a ~0.48V voltage drop occurs across the switch. Then there are 3 more connection points (2 screws and 1 press fit) to the ground plane of the driver, and it's very easy to hit the ~3V battery cut-off at high currents! Unfortunately this will be a problem with low-voltage single cells, without proper kelvin connections added into the flashlight..
  • So for 90CRI Of 4000K light at 1500++ lumens has been very nice indeed :) Realistically though I think a 1000 lumen max is generally good enough and strikes a good balance between runtime and a single 18650 constraint.

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?