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

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:


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.

How do you see when digikey is getting stuff and the quantity they’re getting? Mouser has that info right on the page but I couldn’t find it anywhere on digikey.

”check lead time” and type in a large number.

Ahh nice… 1 sided and acceptable quantity off components. Now id like to try to design PCB for D10 headlamp;))

I just ordered parts and PCBs for one of the DAC-controlled layouts. Now for the wait before everything arrives… should give me time to get the firmware ready!

Actually we don’t need DAC controller ,we need proper code for attiny. Is it so difficult to write it?

We’re talking about the attiny’s internal DAC, using that to control current instead of using PWM. Not an external DAC. So I guess maybe you could say that this is “proper code for attiny”.

And as you’re probably trying to bring up again… yes, YLP has created a control mechanism within the attiny to control a FET linearly instead of relying on an op-amp. In reading some of the posts they’ve made of their control scheme, yes, it actually does sound difficult and involved. Certainly not impossible though. So I invite you, if you feel that it should not be so difficult, would you like to go ahead and make that and share it with the rest of us?

Some of that control mechanism might actually be easier to write (and faster to execute) with the newer attiny’s with the use of Core Independent Peripherals and the Event System. Basically you could have the input (reading of Vsense) trigger updates to the output control (DAC or PWM) without relying on CPU cycles.

If attiny can output analog signal why we using PWM? Anduril was written for primitive hardware , maybe its time to adapt to switching topology.
Maybe it can be helpfull Technoblogy - 10 or 12-bit DAC from the ATtiny85
arduinoslovakia/pwm10bithuman.ino at master · RoboUlbricht/arduinoslovakia · GitHub

Like I said… This is an attempt to use the analog output. So we’re working our way that direction (fingers crossed).

I hope you will succeed. Good luck!

Great news about DAC implementation thefreeman. I saw your DAC shared project these days at OSHPark. In future also implementation of external DAC with higher resolution will be very good.
Gchart and you do the great job with your project. I am also very involved with them and if I can help anyway I will enjoy of that. I have master degree of Electronics and Power Electronics so I think I can help.
About time response I know you don’t like two stage RC filters like in Convoy drivers but one of advantage of them are they have better time response compared to simple one stage. Also I thinked time ago it is possible to be used active LPF filter for PWM DAC for best time response but this just go to be very complex and will add additional components on small boards.
About driving mosfet with constant voltage I have one idea which I simulated time ago and think is better from LDO solution. Because output voltage from MCU is not very accurate and constant I thought to be used for chopping of constant voltage with external load switch.
I have question to you. For HDR low side FET you need only to turn it on with constant voltage, right? Simple solution which you can use is that. You can connect to output in series shunt voltage regulator like TL431. In that case you will always have 2.5V on gate of mosfet.

For future DC/DC drivers I think is time to go with I2C control. Most of new and advanced DC/DC converters are controlled via I2C anyway. With that case it will be cery easy to control maximum output voltage or current limit just with software solution and not need to change any resistors in FB voltage dividers for example. I think it is not very difficult to be implement in firmware.

Do you know of any DC/DC converters (buck or boost) with I2C current control that might be a good fit for flashlights? I knew that some controllers used I2C, but I haven’t looked too far into them. I2C from the attiny should be fairly easy, but it seems like most DC/DC converters are made for constant voltage (which of course could be converted to constant current with some extra ICs, but that adds complexity).

In most cases you can fine adjust output reference voltage or current limit via i2c. Current limit its only in most cases for protection to set maximum current of device. You right if we need CC control of converter we will need again Opamp control solution for LED current limiter. I think I have been seen before some digital controllers from LT and TI in which you can set the output current limit but I didn’t it will be with fine steps for our needs. I will try to find tommorow some examples.
I think I find good example in new PD chips. You can adjust with them easy output voltage and current
Maybe for smooth ramping current and voltage step settings are not fine but for simple UI with stepped ramping or simple current presets it will be great choise.

In fact as quadrupel ask to have digital software control in future it will be the best choise. Years ago I read about digital power control most cases is used PI or PID feedback control. With I2C chips that will be easy because in fact when you control FB voltage reference you will control also current via LED. For that we will also need another current sense amplifier because most of ADC of MCU doesn’t have great low voltage resolution, also software for that.

There are a few regulators with I2C current control but usually it’s large steps like 50mA, not suited for our application. For voltage control it seems to be often 10mV steps which is maybe fine enough ? Not sure . It would require software regulation and to read Vsense, the easy way is a current sense amplifier (which has the advantage of producing a GND referenced voltage from a non GND referenced one, allowing to do high side current sensing), or the hard way Inferion implemented it in YLP lights (high resolution DSM ADC).

The thing is there aren’t that many attractive regulator/converters for our application, if you add I2C to the mix that severely restrict your choices. The little 6A buck converter I’m using here is excellent and with AFAIK no I2C equivalent in size, efficiency, simplicity of implementation .
For boost converters (integrated switches) there are like two that I consider to be great for small drivers, again, no I2C.

This is too restrictive, just to gain 3 resistors.

What about direct FET swiching control with IC?


Simple schematics, cheaper, any size and power mosfets can be used?