[ GXB172 - 50W Single Cell 17mm Boost Driver! ]

I have all the parts needed and the pcb’s. Doing a lot of prep work to hopefully make soldering and reflowing these small components easier.
I enlarged and printed off all relevant pics and list on the GXB172 ,so I didn’t have to keep scrolling on loneoceans page to reference parts and their locations.
After OSHpark sent the email stating the pcb’s were being sent to Fab, they came in the mail a few days later.
Good to know we have both crawled down the same hole. I might need some guidance. :person_facepalming:
Maybe we will both come out shinning our new GXB172 boost driver flashlights. :wink:

Also have a copy of GXB172 and the parts for the 6V BoM, and will be embarking on a similar quest soonish.

I’m also interested in the schematic and source code, as I’d like to know how the opamp/current sense works in detail (esp with the DAC output, which I’m assuming is used to change the current output?).

I have looked but have never come up with anything. Hoping he might publish this at some point, it would be of great help.

I got the coil side completely populated and reflowed. Working on the spring side now.
Hoping I don’t have problems trying to program the 841 with avrdude. From what I have read it’s not supported and needs a patch in the config file.
I may end up having to buying a new programmer.

I explained it a few times already, but in other threads (and PMs). Can’t find it right now though.
You should be able to find out yourself what it does, but if not, the OpAmp essentially acts as an inverting integrator. With it comes some drawbacks in controlling the current, but it’s the only simple solution that I can think of (which is “independent” from the LED voltage).

And please don’t call an RC network a “DAC”, its a filter.

moderator007, I just want you to know we are applying the kid’s birthday party rule set to this.

If you make one for yourself you have to make one for everyone in the thread, it’s only fair…

I’m no professional at this, just a hobby. I’m just hopping I can actually make it work. :wink:
May the soldering gods please shine on me. :beer:
0402 size is no joke, they are small that’s for sure. Not much bigger than a grain of salt. :person_facepalming:

I just want to comment on the XHP50.2. I don’t think it’s bad heat path that kills them. I had 4 out of 7 fail in my 7xC8 light, all came on 20mm noctigons from MTN, running 5A or so each for just a few bursts. Unfortunately they just seem fragile and/or bad process control in their production.

Gotcha. I’ll take a look!

I’ve gone so far as trying to diagram the circuit, starting with an opamp in a basic low-side current sense config, then attempting to hook in a “control” signal to see how that affected the output, along with tying it with the nominal voltage set network. Futzing with various resistor values from the BoM, I did manage to get something that output 0.5V, but seems a bit overall magic to me.

Hah, my apologies. I’m not a EE so I’m mostly winging the terminology here. :slight_smile: It’s a low pass RC filter on a PWM output from the ’841, then, yeah?

You should be able to run ```avrdude -p ?``` and it will tell you what chips it’s configured to support. I’m running whatever is in the latest version of Ubuntu, and was able to get the given .hex file programmed after only populating the bottom side. Command line looked something like this:

I’m using a USBTiny ISP as the programmer. No mucking about with fuses, just use the defaults (as he notes in his instructions, IIRC).

If you have an Arduino environment setup, you can download support for the ’841. Look for ATTinyCore in the boards manager. Since we only have the hex file, I’m not sure that you can actually use Arduino to program the chip, but you should be able to compile an empty sketch, grab the avrdude command from the log output, and try to use that to program the hex file Lone provided.

Ok, finished my GXB172 build this weekend and can confirm it works! Overall a decent and fun DIY experience. Pix (complete album):


Fully assembled and operational. Fiat lux!


Halfway done


Fully assembled, top


Close up shot of the driver mounted in the pill. I had to dremel down the inside of the retaining ring, as C1*5* was shorting out on it.


XHP70.2 4000k P2 bin LED for testing


Beam shot, taken during daytime.


Assembled flashlight with the two other GXB172 PCB copies from OSHpark.


Thermal image of light just before it turned off from thermal shutdown (or voltage, hard to tell if it’s 4 or 5 blinks). Outer shell is 64C, which would make the 75C threshold for thermal shutdown likely since it’s going to be hotter inside the brass pill.

Notes for fewllow attempters:

1. Miso en place. I sorted and labeled all my components in to two bins, one for the top and one for the bottom. The resistors are mostly unlabeled, so if something goings flying, you may want some tweezer component testers to make sure you are putting the right value in the right place.

2. Get some magnification, some good tweezers, plenty of toothpicks (for solder paste application), a LOT of light, and plenty of patience.

3. Took me about an hour or so to set all the components on the bottom side. Top side went quicker, though I don’t remember the exact time it took.

4. If you are using a Convoy S2+ as your host, the XAL7070 inductor will fit. However, watch the clearance on the bottom side! C1*5* was shorting itself out on the brass retaining ring for me, so I had to dremel it down until the ring no longer made contact with both sides of that cap. (Contacting some parts is fine, as long as the side is already connected to groud. C16 is sideways, so it winds up shorting out entirely (I did not power it to find out what would happen with it shorted).

5. The ramp-in took some getting used to; sometimes was hard to tell if it switched modes or not. However, I wound up figuring out a way to tell what mode I was in because…

6. There is audible noise for me at the 250mA and 1000mA power levels. I’m using the low/50/250/1000/4200 set of modes, J1 bridged, J2 open. The noise is fairly high frequency but definitely audible (I double checked with my roommate). Strangely, it is NOT present at the low or 50mA levels, nor is it present on the turbo level (due to the ramping turn-on, the noise will start when you switch to turbo mode, then get higher and higher frequency until it is no longer audible).

7. In the S2+, it switches off from thermal limits and does not seem to reduce output to keep within limits. Not sure if this is a bug or something wrong with my build, or working as intended.

Definitely would like to take a look at some source code, to see what can be modified and how to adjust things like power limits (I want a version that tops out at 3A output, so I can do some versions with LH351D’s in 3S and 4S configs).

EDIT: Corrected capacitor name that was causing the shorting problems — C15, not C16 as I originally had (C16 is on the top side of the board).

Really good writeup and thanks for putting in the effort to test it and document. I think this is what this project needs to go further. Beyond my scope but maybe not once it’s more refined or adapted to 20-22mm

Well done and documented schizobovine. :beer:

Just a bit beyond my abilities as well.

schizobovine, wow this is very good job on your build! I am inspired to finish mine.

For the C16 problem, I notice that loneoceans also previously had to add a ring of wire around to avoid this. He also did this in his gxb17 original driver.
Imgur

I am amaze you use XHP70 in such a small flashlight! This is very impressive!!

For the audible noise, I read in the loneoceans website that he use ultrasonic mode below 23khz to avoid audible sound. base on datasheet of mp3431, the mode pin (10) when floating should be automatically in ultrasonic mode. If low is high or low (in range), then it can become audible. My guess is maybe if you can hear it, then either pin 10 is shorted somewhere or there is some residue on pcb / leakage? Base on loneoceans layout picture it looks like pin 10 is not connected to anything so this can be a place to check?

Is there way for you to measure power / light output of the driver?
I am curious of how bright the high mode is, and how low the lowest mode is.

I like your idea of using brass disc for spring. May i know when you get brass disc from?

Did you use hot air or oven to reflow the pcb components?

thank you for details of your build! You must be second person in this world to have such a powerful driver and probably first in world with XHP70 led in such a light! I hope we can have more of them soon!

Current/voltage at LED and current at tail would be interesting to know.

If using a brass button on the driver like schizobovine you will want to thin the ring otherwise your batteries will be way too loose. S2+ host has a lot of extra room in it as it is.

I think the 18350 tube is a bit tighter fit though if I recall. Age old S2+ problems I suppose.

User kiriba-ru sells a really nice copper single pill with a custom thin ring (pictured bottom right) that I highly recommend for this type of build:

very good find contactcr. This look like it will be perfect for such application, with better thermal property of copper and thin ring. schizobovine, does the flashlight get very hot quickly?

This looks like perfect match for the copper pill: https://budgetlightforum.com/t/-/51666

contactcr, it looks like there is a gxb202 and it works at 12V, but I have not seen the files for it yet.

I got both sides of the driver populated yesterday and soldered on some small wire to the programming pads.
Tried testing the 841 but avrdude gave me errors. I knew this could be a problem since avrdude doesn’t support the 841.
Found someone who had a config patch file for avrdude that claimed to work with 841. I installed the patch file and now I get

error : program enable : target doesn’t answer. 1
initialization failed, rc=–1
double check your connections and try again. or use -f to override this check.

I’m trying to get this to work with a USBASP which most everyone has. I’m going to go through my wiring again.
All I can tell about what pad is what on the driver is by loneoceans PogoProg. I found vcc and ground and assuming all the others are correct as on the PogoProg I should have it wired correctly but I will check again anyway.

I used a heated lab stirrer with a chunk of aluminum setting on top of the hot plate to help spread the heat and drop the temp some. I used a old pcb board and tested at what setting my reflow solder began to melt, noted how long it took to get to that temp and ran a few test that were very repeatable. When I felt confident with the settings I placed the coil and the boost converter on the board and began to reflow. Worked like a charm. Populated the coil side of the pcb with all the other components and used the hot plate again.
Flipped the board over and started working in 1/4’s (like a slice of pizza) of the board. Set 5 or 6 components and used the hot air station to reflow them. Then began another 1/4 until I was done. I tried to always watch what component I was setting next so as I didn’t make it difficult on me setting the next one (nobody in the way).
The only problem if you wanna call it that, I had was setting the temp sensor. This thing is tiny and has four legs that point straight down. Its hard to see if its reflowed on all the legs, it’s tiny and I had a magnifying headband on. I actually didn’t even see it beside the huge coil when I populated the coil side the first time.

Glad you got it working schizobovine, at least I know now it can be done. Great job :+1: .
What programmer are you using.
Edited: I see in your post USBTiny ISP

It’s great to see this driver working. :slight_smile:

Took some filing down on the reflector to get it to fit at all. I went with the XHP70.2 because I have been continually underwhelmed by XHP50’s. They never seem to get to the light output I expect AND it’s hard to find them in high brightness bins.

I’m defintely happier with it in the S2+ than the L2 I had it in before. :wink:

From reading the docs, yeah, I was surprised by the noise as well. I checked the mode pin, but doesn’t look to be shorted anywhere. I figure it’s either some voodoo with PID algorithim OR (more likely) the inductor got cooked a bit during reflow and something’s loose in it. Part of why I was posting was to see if anyone else had the issue — I’m quite willing to blame it on my bad soldering rather than design, but don’t really have a good way to test short of reworking the inductor and using another (which I may yet try).

Best I can do there is the dark room + lux meter method, but it’s on par with the other XHP70.2 I have (MTN direct driver for it).

I think I got them from MTN electronics but FastTech and Kaidomain both carry them, IIRC. For S2+’s, it’s near perfect for high-current.

Hot air rework station, set at 270C. Solder was Maker Paste (which I recommend to anyone else wanting a tiny bit of lead-free for odd jobs).

One note: I’ve had problems when using hot air and lead-free solder joints being “cold”/brittle. I compensate by using a crapton of flux and a “cool down” stage. My hot air station keeps blowing even after you turn it off (until the temp hits 100C), so I just sorta keep it blowing over the board until it drops to 150C or so. Had way fewer issues with cold joints once I started doing that.

D’oh, should have included these from the start! From a test I just did:

Moonlight ~= 12 mA
Low ~= 70mA
Medium ~= 480 mA
High ~= 2.2 A
Turbo ~= 10.8 A (!!!)

…which roughly seems in line with the output for each mode (low/50mA/250mA/1A/unlimited). I used a fully charged LG ICR18650HG2 for the test. First 4 modes were measured with my multimeter. Turbo could only be done by my clamp meter, so that 10.8A should be given a wide error range (+/-0.5A).

I probably should have mentioned I’m using a rather stiff tail spring bypassed with copper braid, which reduces a bit of that extra clearance. Magnet shims are usually my go-to for fixing batteries that are too short.

I think the 18350 tube is a bit tighter fit though if I recall. Age old S2+ problems I suppose.

Oooh, that is very intereting. I’d been looking at getting some spare S2+ pills, and solid copper ones would definitely be a nice upgrade. Thanks for the tip!

Ooohhhhhh yeah. Minute or two on turbo before it cuts out due to thermal limits.

Yeah, I had the same issue. That thing must have popped out of my tweezers 4-5 times before I finally could get it into position. I was terrified the hot air would blow it off and I’d never find it again, lol. But I focused on the other side of the inductor and the heat eventually got it to reflow over there.

It took me a few tries with the programming, too. I wound up having to flip each 3 pin side of the 2x3 pogo breakout I got, which got it working immediately. I’d figured I’d just screwed up the wiring, but maybe the pads are mirrored on the board?

To try to illustrate:

(Before)
MISO | SCLK | RST
VCC | MOSI | GND

(After)
RST | SCLK | MISO
GND | MOSI | VCC

The currents you measured at the tail are on the low side. At least the highest mode.
The driver can do 19A input (and loneoceans, as well as me use that), and because it’s a switching power supply, the current goes from 0 to 19A at a rate of 600kHz. The current clamp and multimeter just measure something in between that. You need an oscilloscope to measure the current precisely.

The audible noise was there on my design too. Don’t quite know where it comes from. Either coil whine (very unlikely with molded inductors), or it could come from the “battery to brass button” connection, since the cell and driver are just held together, and not soldered (arcing, oscillation or whatever).

With my design, the noise at least got quieter with more pressure on the cell.

Last night was a bad night. I had 3 of the programming pads ripped up off the pcb that I had soldered wires to.
I guess I moved the wires around to much trying to make sure I had it wired correctly.
I’m going to try soldering wires directly to the 841 appropriate pins this time, since I don’t have but 3 pads left.
Still haven’t got avrdude to talk to the 841 yet. May end up having to buying a better programmer.

Hmm, well I can see if the noise changes any if I add some spacers in there to push the cell harder against the contacts. I sadly do not have a proper oscilloscope. I can try to get the clamp meter around the LED+ wire (probably in another build) to see what it’s actually pushing out there.

I’d believe it could hit 19A in a better setup, but between the hard switch and my questionable soldering, I’m pretty happy that it can do 10A at all! Also I’m using the 4.2A max mode, as I didn’t want to push the LED beyond it’s rated limits in such a small light. It’s a lot more than what I’d expect from the raw power numbers so it may also just be running really inefficiently. Anyone want to check my math here?

Pout = Iout * Vfled = 4.2A * 6.35V ~= 26.67W
Pout = Pin * Efficiency = Pin * 0.8

Pin = Pout / 0.8
Pin = Iin * Vbatt

Iin = Pout / 0.8 / Vbatt = 26.67W / 0.8 / 3.7V ~= 8.6A

I have to crank down the efficiency to about 67% (ew) to hit 10.8A. I’ll see what numbers I get when I swap in the MOSFET based tail switch (waiting on parts for that).