Developing a customizable driver

Simple tailswitch, simple UI, sounds about right.

If I’m looking at the right thing, that Z1 is definitely without sharp edges, but my pocket won’t accomodate a two-inch bezel. The lights I have to play with are in the 25-30mm neighborhood which is pretty comfortable so I’d like to stay in that size range.

It’s probably pretty crappy by y’alls standards but back around 2012 I picked up a couple of single-mode lights in some branding or other (I believe Small Sun ZY-C84) of this body. One was stolen and the other burned out but I still have the body and it was about the only thing I found that fit all my criteria for size, general appearance, function and non-stabbyness.

I wouldn’t mind being able to offer a fixed reflector option as well in a similar form-factor. P60 body is just what I have on hand to mess with (and also what I know I can acquire in bulk) but isn’t a design requirement. I lack the machining infrastructure to make my own at present, but maybe someday.

I would guess, based on your linked list of popular lights, that 18650 “Duty lights” would be most likely the category I’d try to work in. “Simple operation” and “reliability” are two of my favorite things to design for. My best friend is a first responder, daughter of a cop and an ambulance driver, and she’s already asking about getting some lights for volunteer firemen and as door prizes at fundraisers. I would enjoy being able to offer customizable packages for her people.

Also got word my prototype PCBs should arrive on Monday so I’ll get to start testing next week. Still need to adjust my code for the different microcontroller but that shouldn’t take long.

Hi Sidehack, welcome to BLF!

Is your initial design for 1S?

Yeah, single-cell only.

Couple sample bodies arrived from the factory yesterday so hopefully soon I’ll get a board populated. It’ll take a few hours to update the program for the right microcontroller but hopefully next week I have something working.

I will be waiting for that 8A+ 1S boost driver you will make one day (;

Not sure how I didn’t notice when tracking down parts, but the micro I had in spades in 8-SOIC and have been programming with for years is also available in the tiny QFN package so I’ll just be getting that one instead and not have to adjust the program. There’s a lot of benefits to coding in assembler but the main drawback is lack of portability. Should have some results next week.

My regular work has been slowing down, and I know I’m new to the community and have zero reputation but I’m considering looking at design work and bidding small-batch jobs. I get PCBs from a US factory and have pick-and-place and reflow equipment with my assembly business, so I can bid small manufacturing runs of outside designs if anyone’s interested.

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: