thefreeman’s HDR Anduril 2 high efficiency drivers - update : FWxA boost driver

I think two/three well selected firefly moonlight levels would be good enough. With two channels, you get three modes 10 01 and 11. This would make the hdr dual sense circuit redundant. You’d be giving up ramping ultra lows for possibly drastic extensions in runtime.

Oh right of course :person_facepalming:

But the ultra long runtime can be achieved with the buck converter, Zebralight does it and the Attiny1616 is capable of it by using the TCD for running the PWM in ULP, or the DAC, but I can’t implement that in Anduril, this is a job for the software guys/girls.
That way there is no need to give up the ramping and especially the firmware adjustable levels, personnaly I don’t want to have to swap resistors to change a level.

At the present time though I can increase the efficiency a bit by lowering the frequency to 2.5MHz (1.1mA) for low modes (dynamic underclocking), I need to check how much ripple the lower PWM frequency (2.5kHz) produces with the RC values used.

I can’t speak for others but I’m happy to help with the software any way I can. I don’t currently have a t1616 test board though. I’ll post some general thoughts later about these low modes.

I’d love to give this buck driver a shot with using the t1616’s DAC. And I bet we could shoehorn the new Dynamic PWM functionality to switch Vref (0.55, 1.0, 1.5, and 2.5V) on the fly to support lower modes without needing a second current sense resistor.

You design the hardware to support the DAC output instead of LDO-PWM-RC and I’ll get the code working :wink: That should help reduce the part count and some of the complexity. Perhaps making single-sided possible?

Note that the hardware resolution is limited, this is the reason in the first place I’m using this dual sense resistor topology, going lower than 40~50uV Vsense is asking for trouble. (So with 50mV max Vsense that means 1000:1 i.e. 10bits), It doesn’t really matter that you can achieve a higher PWM or DAC resolution except for making the ramp smoother on the low end.

Mike C for his boost driver used the DAC with both 2.5V and 0.55V Vref in order to achieve a resolution slightly higher than 10bit, then switched to dual sense resistor because it achieves a much higher resolution.

BTW this one has only 3 passives on the back (+ the hardware delay components, because no software delay yet) which can be hand soldered.


(R3 R4 and R8, FF1 is not needed)

Is the 40-50uV issue a limitation with the op-amp range? I guess going with DAC vs LDO-PWM-RC does more to help with low-level flickering than it does with viable range, right?

Yes, we get too close to the Op-Amp offset voltage and the one I’m using is already very precise.
I already get a different curent value than expected at the lowest level due to this, roughly +–30%, if we go lower this error will increase a lot, and also sometimes it can flicker (filtered PWM or DAC has no effect on this).

BTW I believe the lowest level of the KR4 firmware use this uhm… ”effect”, the PWM level of the lowest ramp level is zero, so the op-amp should adjust the gate of the mosfet to get 0V at its inverting input, except with the offset voltage it might get 10uV (for example) at the inverting input, thus a current. And it’s not stable so it flickers, offset voltage also varies with heat.

Zebralight on their recent drivers use the internal op-amp of the MCU (PIC16F1705), it has a terrible precision, 1uV 1mV offset voltage, this is why they use three sense resistors and relatively high Vsense.

Correction : this was measured on my linear driver and it’s the total Iin at 4Vin and 5uA Iout, at 2.5MHz Iin is 1.1mA.

With the buck driver I get 2.44mA Iin at 4Vin and 6.4uA Iout, 2.52mA at 118uA Iout so the efficiency of this buck converter is really good at very low output.

I get 1.14mA at 2.5MHz 6.4uA Iout, as expected. It doesn’t change much at 3Vin, +~20uA.
So it should last something like 3 and half a month at 100μA Iout with 3000mAh, good enough for me.

The SC62 from this famous reddit post did 412 days, if it uses the same moonlight current as the SC/H600 II then it’s 100uA too.

Great thread and great work thefreeman! I have no questions (or too many) about the driver yet, except: is this open source and how much does it cost for a minimum order?

My main question is about the KR1 + ledil olga mod: Did you not need a 2mm riser board underneath the led board? Loneoceans KR1 mode here
shows the stock refloctor being 2mm longer that the olga optical lens.

Thanks!

Thanks.

Open source for the shematic ? I posted the one for a prior TPS61288 version on the thread, I’ll probably post the new MP3431 version, that said do I need to use a open source license ? does it make sense to use one for hardware ? I’m a bit clueless on the subject honestly.

Made by me ? Firstly if I make drivers to sell it won’t be a lot because I’m handicapped and unfortunately my health has worsened as of late, I do the designing and modding because it’s a rewarding hobby, but making several drivers to sell is another story, plus I’m not equipped for any medium production run. So yeah, I don’t know about the price yet but it won’t be cheap.

Yes there a copper spacer, you can see it on this pic :

The Olga RS is ~3mm shorter than the reflector+centering ring, as mentionned before I planned to have it sit on the aux board (0.9mm) and so I used a 2mm spacer (plus plastic spacer on the MCPCB in the meantime), since it degrades the beam I’ll make it sit on the MCPCB an I’ll have to make a 3mm one.

For testing stuff with the 1616 I use an xplainednano board on which I replaced the 416 by a 1616, then plugged onto a breadboard (I use it as a programmer for my drivers too), there is the Xplained mini with a 817 but Anduril2 takes just a bit more than 8kB, although it can probably fit after removing some stuff like blinkies and such.

Well as I mentionned previously I mostly hacked support for the HDR (dual sense resistor), proper support would be great, we can discuss further in pm if you want ?

Thank you for your answer!

Ahh so it has to sit directly on the MCPCB through a big hole in the aux board (without any plastic centering ring). I’ve already ordered this 2$ TIR from kaidomain but it’s a long shot if it’ll still fit correctly without the plastic spacer… it seems to have the same dimensions as the Olga RS though…

I’m not really knowledgeable about the subject either but I think there are some fair use/”hobbyist laws” that lets us come up with designs that manufacturers can’t sue us over… I have no idea about licensing PCB designs though.

I’m sorry, I shouldn’t casually ask side questions without thinking about them first… I meant to ask how much would this cost someone to order the pcb and parts (sample PCBs are often sold as a batch (JLCPCB sells 5 boards for 10:money_mouth_face:). By “open source” I just meant to ask if you had the shared the cad files (KiCad??). I’m also wondering if maybe paying for smd assembly of common components (jelly bean) on one side of the board can be worth it… as I don’t have any smt resistors and capacitors in various sizes at home.

I realize this is a bigger question than what I meant to ask and I still haven’t finished reading the whole thread (very informative, and it’s impressive to see you discuss optimal component values).

I’m wishing you the best thefreeman (mes meilleurs voeux).

I’ll share oshpark projects and a mouser cart like I did here for linear drivers for those who wants to make it themselves.

The boards are not very costly, 3.7$ for three 22mm boards, for JLCPCB I’ll need to re check but I think I would have to enlarge some vias to use the default (cheap) capabilities.

I’ll have to run the total for the parts, it’s the same as the linear drivers but without the linear FET and + the MP3431,XAL7030/7070, and 1206 caps.

Ideally I’d like to do a final version before sharing it without the hardware delay (4 components) for the HDR FET (when full anduril support) and with a few minor layout changes.

Thanks.

It can be made very small if so desired :

Although I’m not sure what host to use it in, it seems like lot of side switch 14500 lights have the switch mounted on the board, which isn’t very problematic, just need a different layout, some have 2 PCBs like the Sofirn SP10S, that’s a bit more annoying, plus the SP10S is too big for a 14500 light in my opinion.
I’m interested if you know of small 14500 hosts that would be suitable.

There is the FWAA, adapting to it is easy (just add a switch ring), although I prefer a single emitter version, which apparently is in the work.

I wish Hank would make a small 14500 light, and a small 18650 single emitter one too.

Sure, this is fine with me, or here is ok. I may also have to consult ToyKeeper for advice so I hope she will be ok with that.

Regarding boards, I think most non-hardware people aren’t really equipped to assemble their own drivers from a blank board, given the need for SMT soldering and rework tools, and the need to possibly get parts from multiple sources. As a software person without a proper electronics lab, I hate working on hardware because I too often find I need a 5 cent resistor for something, and I have to order it online instead of pulling it out of a parts drawer. Then after it arrives and I install it, I find I have to order another one. So it would be great to have assembled boards available.

Do you think it might be possible to use Seeedstudio or someplace similar to manufacture boards? I’d be happy to buy some boards. I’d like for us to become more independent from flashlight manufacturers for this stuff.

It is too early to be able to use this but I hope you’ve seen Spence Konde’s article about the new AVR DA/DB/DD series, which will among other things have improved analog instrumentation compared to what we have now. The DD series is probably the most relevant for us. It is not yet available but it might be by next year. The article is here: GitHub - SpenceKonde/DxCore: Arduino core for AVR DA, DB, DD, EA and future DU-series parts - Microchip's latest and greatest AVRs. Library maintainers: Porting help and adviccee is available.

Are you me?

So I’m in the process of converting my drivers to use the DAC instead of PWM, there was two reasons I was on the fence about the DAC :

  • the lower resolution of 8bits, which would make the bottom of the ramp quite coarse and decrease the dimming range, even with 2 sense resistors (HDR) the minimum for a 5A 6V driver would be 77uA 6V, my goal has always been at least 100uA 3V (ZL H600 II) so that’s not enough, but if Gchart succeeds to implement dynamic VREF then there will be enough resolution.
  • the main point about using the DAC is to not have to use the LDO and a bunch of passives that comes with it and PWM (input C for LDO, VBATT divider, PWM RC filter), but I need a constant voltage to drive the HDR FET that switches between the two sense resistors, since the Rdson of this FET is part of the total Rsense it has to remain constant through the whole battery range (4.2 to 2.8V). Except that was with the previous FET, the new one I use has a very flat RDSON/VGS curve according to the datasheet, so I measured it to be sure :

Only about +0.25mΩ from 4.2 to 2.8V, which for example on a total Rsense of 8mΩ means only –3% output current at 2.8V vs 4.2V, which is… completely fine!

Additionally the DAC is faster than filtered PWM, which is good for fast strobe modes, it produces no ripple, and shouldn’t make a flash when ramping up, so no delay needed on HDR FET turn on.

Conclusion : let’s remove the LDO and 5 passives.

Thanks to the lower component count the BCK18_HDR (18mm clearance) driver can be one sided.

You should see how I’m equipped :disappointed: I think many modders here have better equipments than me.

For reflowing I do it on a ”hotplate” which is just a small sheet of copper heated by my soldering iron. For the second side or for rework I preheat the board on the hotplate (with a spacer) and heat the top of the board with an infrared heating tool I made from a car cigar lighter…

For applying the paste, because I prototype a lot buying stencils each time would cost quite bit, so I use one only for the T1616, I do the rest manually with this dispenser which main advantage is to dispense precisely with one hand, same precision can be achieve with two hands and a 1ml syringe with 25G tip. But once I’ll have more final versions I’ll use stencils because it is so much faster and easier.

And then a small 10x loupe for inspection, but that’s it mostly, a bit primitive but it works.

About parts, well I built an inventory because I prototype, but once you have a BOM that’s not a problem.

Though I understand that people would prefer to buy already made drivers, I looked very briefly at PCB assembly services before but I haven’t done a simulation or something like that, what I remember seeing here is a GXB172 driver group buy that never went through due to not enough quantity to be viable. One problem is also the many different sizes.

About the Dx series, I skimmed through it when you posted it on Gchart’s thread, but I don’t know what is really good for us there, the bigger DB ones have internal Op Amps, but with 8mV max V offset they are not suited for our application. Still only one DAC output so we can’t use it for dual channel drivers, but it’s 10bit so thats better than 1 series, DU has native USB but unfortunately sacrifices the DAC for it.

Wow it’s great to scroll through and see your iterations. That last one looks like it has few enough components to be able to be fit into a FWAA sized board!

Good work! These 1616s are unavailable again :frowning:

Thanks.

Digikey should receive 30000 1616 this month, last month they got 6000 and they were gone in 3 days lol.

Yeah according to your measurement it needs 16.5mm on top and 14 on the bottom, so I’ll try to do a 14mm clearance one with the DAC, then just add the switch ring to it.

Yeah, drivers are rough. Grab a random light off the shelf and decide I want a different firmware on it?

Gotta find out if there even is an available driver in the right size, for the right voltage input/output. Is it from somebody that uses Anduril or ATTinys already? Which ATTiny and do I have the means to flash it, or do I need to figure that out too? Check the BOM for the driver, order from OSHPark. Wait. Then I have to schedule a full evening to build and program the driver, and test it before assembling the light…

Hot plate, hot air, soldering iron, test-LED bed, bench power supply. Solder, solder paste, flux, wires, test leads, magnification of some sort usually, multimeter, a bunch of different tweezers…

I have so many lights that I just don’t reach for on a daily basis simply because of the UI. And it’s so hard on the creators’ side too, like you’d have to make and upload so many versions of each driver in applicable sizes.