Developing a customizable driver

5-6A good enough? Might have a few more projects coming up since I got a bunch of time now.

There is a pretty economic 5A driver from Convoy:
https://www.aliexpress.com/item/33021024834.html?spm=2114.12010612.8148356.9.3d8c3cf19IZ0B2

The emitter that are usually paired with these drivers are the Cree XHP70.2 because it is very efficient and very high output in 1 single emitter package.
The Convoy M3 is an example. The Convoy M3 does not have very good thermals.

The convoy M3 uses a 30mm diameter driver board. However if you could make a 20mm board which the Convoy L2 host uses, it would be exceptional host because the entire head is a solid pill for the emitter.

If you are designing an economic driver for mass production, probably 5A is a good balance. But if you are looking for something special, 8A+ would have a unique demand.

XHP70.2 is what I’m looking at for the project, so that’s just about right. I’m still working with 17mm but if it’ll fit in 17 it’ll fit in 20. I’ll start with what I’m looking at for a 4-5A boost (with thermal-limit ramping) and if it works well I can start digging up a design for a bigger one. If I want to.

Looking at a 6A high-efficient buck driver also. Nothing exotic so not terribly expensive.

I’ve been told I should look into a FET tailswitch for Convoy builds too, which will definitely help with efficiency for those high draws. Guess I should buy some Convoy lights so I know what everyone’s talking about.

Yes, convoy is truly economic. If anyone is going to mod, they will most likely start with one of their designs.

Are you talking about thermal management for driver only or LED also?

A FET switch would be a great boost to efficiency. Looking forwards to seeing that.

Figured it was safest to put temperature sensing on the MCPCB. Driver heat is both less prevalent and less critical than LED heat.

I’m working with a little zoomie right now I want to see about building into a 3-mode low/high/stupid with a FET tailswitch. What would be the best Convoy body to look at for a FET switch also? Not going fancy, no blinky lights, just on/off.

[quote=Lexel]

Very interesting new driver. Is that buck/boost driver is similar to lume1 or is total new design compatible with existing Bistro HD and Anduril firmwares?
For mosfet switch seems Convoy S2+ tailcap have enough room for that from what i see from that thread:

So what started as a single modest project has turned into a bit of a project family for me. Regular work has slowed down so there’s plenty of time now.

I’m looking at somewhat standardizing a control package, which means microcontroller, current sense amplifier, error-amp and temperature sensor set up in a fairly repeatable/reusable configuration. To start, I like the three-setting “low/high/stupid” where “stupid” is basically the max that the LED or driver will sustain, temperature-limited by a sensor placed near the LED. Software of course is flexible, so additional modes are possible. The microcontroller is intentionally fairly minimalist so there aren’t extra lines for fancy stuff, but sufficient to integrate one channel of 10-bit current setting, battery monitoring, temperature monitoring, one regulator en/disable and an off-time-capacitor read for mode switching, plus EEPROM for persistent memory settings. Everything I care about is possible.
I’ll also see about building a FET tailswitch for efficiency, but that’s not immediately necessary.

For current drivers, I’m looking at 1S voltages for input and would start with 17mm size. Attempts will be made at:
2.5-3A buck (existing project)
6A buck
4-5A boost (6V)
8A boost (6V)

My cousin and his mechanic friends have requested a decent penlight so I’ll also be working on something there. I’ve got some samples of a buck/boost that’ll pretty fully utilize 2xAAA voltage range.

Found a decent dual-phase driver for the 6A buck which will take up a bit more board space for inductors, but the resulting drop in conduction losses and reduced input and output capacitance requirements should more than make up for it.

The 8A boost will be fun, if it’s even possible. I’m looking at using a non-exotic controller and external FETs for increased flexibility, better heat handling and easier sourcing of parts. Eats up more board space so it may not fit in a 17mm but I won’t find out until I try.

8A out of 17mm would be ambitious to say the least! Usually it’s limited to 6-7 amps at 6v and in 20mm and more sized drivers. I’d love to see that a reality since you could make an absolutely amazing C8 out of it! That xhp70.2 would be upwards of 5500-6000lm. Thermal regulation would be critical though.

Looks like loneoceans has designed an 8A boost on a 17mm board but I’m not sure if anyone’s building it. I currently have no real use for this but it’s an interesting challenge. Low priority at present.

Thermal regulation would be implemented, as currently planned, by a SC70-5 temp sensor mounted on the MCPCB close to the LED and relaying directly to an ADC line on the microcontroller. The micro can use its internal temp indicator to trigger a shutdown based on driver PCB temperature, but current regulation would be done by limiting the max temp of the LED board, ramping down to maintain a maximum temperature (value TBD).

One thing to consider with the control package will be current sampling. I can either measure it directly from the low-side resistor and then use a resistor divider to scale my PWM output accordingly, or use a current-sense amplifier (ie INA199A1) to measure from a low- or high-side resistor. The former approach reduces parts and complexity but also reduces noise immunity and increases measurement error. The latter approach should result in a more precise setpoint at the cost of more parts, both passive and active, but should also allow for a smaller current-sense resistor and therefore a better efficiency. Amplifier sampling with kelvin connections will minimize ground-current errors also, and the higher voltages in use will reduce input offset voltage error. I assume the increase in precision (and marginal efficiency gain) is worth the extra effort?

How thick will it eventually be? If it is really thick, maybe the LED output terminals wires need to be strategically placed?

I don’t have experience with many hosts but maybe people can help out with what host they would use with the 8A driver and how deep the host’s driver bay is?

After doing some testing I’ve pulled the current sense amplifier from the control package. Too difficult to stabilize the control loop with the extra delay of that circuit in the chain, in addition to considerations like added cost and board space. I reckon it’s enough to divide down the filtered PWM signal. Done some hardware testing and it’s working so far with a little 2A driver, stable down to about 0.5% output power.

Next comes software. The PWM code is working fine, so what remains is ADC sampling of the off-time capacitor for mode switching, battery level monitoring, and eventually interfacing to a temp sensor for thermal throttling. I don’t have the temp sensor to test but I can simulate its signals. My hardware test board is a home-etch (sharpie resist in HCL/peroxide bath) but it works pretty well so I should be able to test everything and get functional code with a day or so of focus. I know for you guys this sounds a lot like reinventing the wheel but I don’t like using other people’s work, especially if I intend to sell it.

likevvii, I assume you’re asking how thick the 8A boost driver will be. I don’t know, and that particular design is a fairly low priority for me. I probably won’t even start prototyping until I have functional boards of the penlight, 3A buck and 5A boost. I’ll probably want a FET tailswitch too. I’ve got parts in to test with, but currently no PCBs and everything’s such fine pitch that it’s near prohibitively difficult to home-etch boards to mount ’em up. I need to work on my toner transfer abilities.

Mode setting with last-mode memory is coded and working. The button delay is roughly 0.5 seconds. I coded 4 modes at 25% intervals because it was easy, but the default will probably be 3 modes. PWM value is arbitrary and stored in RAM, per-mode, as 10-bit values. All code written in assembler, compiles to 165 2-byte instructions.
Need to wrangle buck driver enable in software, then set up low-battery detection, then the simulated temp sensor, but that’s all the easy stuff. Two or three hours tops for coding and testing. Then we can start on PCB layout for a proper driver disc, and LED MCPCB which includes the temp sensor.

The first test board will probably be built around the same 2A driver IC, since I have it pretty well characterized at this point. I may make an alternate version with a 3A IC I purchased but haven’t tested yet. It’d be easier to test temp sensor limiting performance with a higher current driver.

Don’t really know who cares at this point but I’m enjoying the project.

Good job Mr. Sidehack! Do you have progress photo to share with forum members? I think many people interested with this project. It is always nice to see so many people develop new drivers :beer:

Sure, but it’s not much to look at yet. Just a homemade test board.

The firmware works.
I have off-time reading for mode advance set to 0.5 seconds but the discharge curve of the off-time capacitor is consistent so I could change that to anywhere from probably 0.2 to multiple seconds if I wanted. Recharge is controlled by the micro and takes roughly 25 milliseconds from full discharge so there’s no worry about erroneously high reads or misreads from partial or automatic recharge. Only capacitor tolerance and temperature should affect the timing.

The default mode is the last-used mode. I have not implemented wear-leveling for the EEPROM, which is rated for 100k cycles, but it can be done.

It’s coded for 3 modes right now but the mode count is arbitrary and changed by altering 1 number in code. Any added mode PWM values (10-bit) need to be established in code, but the process is simple. The micro I’m using has sufficient RAM for 128 distinct brightness modes.

There’s a built-in 10mS delay between init and turning on the main regulator, which is controlled in software. This allows input capacitors and all reference voltages, including filtered PWM lines, to settle before turning on the light, to avoid erroneous bounces. I’ll probably tune this to the minimum on a per-driver basis.

Technically the regulator-enable function also allows for coded strobe modes but those are dumb and therefore not implemented.

I will wait until I have a functional prototype with a temperature sensor mounted LED-adjacent to worry about overtemp throttling. Depending what kind of control loop must be implemented, that feature may end up using as much code as all the rest combined.

The current unoptimized version (I know there’s some arbitrary code in there) compiles to 174 instructions.

Next step, PCB design.

Nice project sidehack, i have found very interesting reading your progress.
I wish i knew more about the topic to take part in the thread.

With work being so slow, both because of reduced sales and some process improvements that have greatly increased time efficiency, I’ve been in full R&D mode for most of the last two weeks. I’m sure y’all noticed a sudden quickening of the pace.

I forgot I hadn’t yet tested low-battery shutdown, but the adjustable linear regulator I was using in place of the micro’s LDO has a dropout of like 1V so definitely not suitable for continuing to power the micro at 2.5V with a battery input of 2.7V or so. I’ve now acquired the correct part and can test and program for that.

I also got in some of the analog temp sensors I want to test for LED temperature monitoring. They’ll work down to a fairly low voltage, and also operate on a max of 10uA, so I’m going to try powering them in parallel with the LED. The parasitic current should have an imperceptible difference on brightness even at low settings. This means only one additional wire to the LED’s PCB to get temperature readings.
The only problem now is the ground reference is floating. Fortunately that offset is always a known value - in fact, a value determined by the micro - so the math to compensate for it is easy. The simplest method is to simply scale the PWM value against the current-sense resistor, and account for the difference between ADC reference and Vcc (2.048V vs 2.5V, so a factor of roughly 1.25). Since all of those factors are constant the scaling factor is constant and determined at design time, therefore easy to program in as a constant in code.

I’ve got PCBs drawn up for 2A and 3A versions. Basically the only thing changing is the buck driver; the 2A version is a SOT25 package I can home-etch boards to test with but the 3A is an SC70-5 with pin pitch too fine for my Sharpie skills so, while I have some to test with, I’ve never actually lit one up. Its internal FETs have a lower on-state resistance though most other parameters are basically the same, so it should be more efficient.

What’s going to be the hangup in testing is LED PCBs. I’ll have to make do with regular 2-layer PCBs, thin and with plenty of vias for heat transfer, probably lap the soldermask off the bottom, but eventually I’ll want something proper. I’ve done a bit of looking at MCPCB threads on here but they were all a few years old. Who do y’all trust these days for small batch custom boards? I’m testing with two lights right now, one with a P60 dropin (16mm LED board) and a zoomie with a screw-in pill that takes a 17mm driver and 20mm LED, so I’m drawing up temp-sensor-integrated LED boards for both sizes.

Also because I got time, I’m working on prototype PCBs for a 1S 6V/5A buck, and the ~400mA buck/boost for a 2xAAA penlight. Got parts to play with, but no PCBs. They’ll probably be in the same order as the above test drivers. Next I’ll iron out the 6A buck, and then start hammering out the 8A boost, both of which will benefit from a FET tailswitch.

Spent basically the whole weekend doing design on this family. Today was regular work but some time spent checking and revising PCB layouts. Tomorrow I’ll have on order some test 17mm driver discs for the 2/3A buck builds and the basic LED PCBs with temp sensor pads.

Since the price of a prototype run of PCBs didn’t change if I increased the size a bit, I added test circuits for the 6A buck, the 6V/5A boost, the 6V/8A boost (using external FETs), and the penlight. Sunday and Monday were spent tracking down parts, drawing up a circuit and adding a 1S 5A buck/boost (also with external FETs) to the test board. So I’ll be able to test out all of them, wired to a pill-mounted LED with temp sensor, with the also-in-progress control system and firmware. Get some performance metrics, efficiency numbers. Hopefully everything works pretty well and I can start drawing up 17mm driver discs.

Also had a square centimeter of open space so I added a few test pads for SC70 and 0402 parts to verify my assembly equipment is up to the challenge. 0402 will be essential to fit this stuff in the final product. I’m really hoping the 6V/5A boost and the 1s 5A buck/boost work out well. Still need to add and test low-battery shutdown and temp sensor response in the firmware but otherwise controls are pretty complete.

I am eager to see your drawings :beer:

PCBs have been ordered. Probably won’t be much to talk about until they arrive in a couple weeks. I did do a quick test of the 3A driver circuit today and the buck IC wasn’t getting warm, which is good news. Probably put together a few of those in my zoomie and P60 test hosts and hand them out to my cousins for field-testing once I have the overtemp limit working.