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

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
https://www.monolithicpower.com/en/documentview/productdocument/index/version/2/document_type/Datasheet/lang/en/sku/MP8859/document_id/4033/
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?

Why?

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

Since we’ve been PWM’ing FETs forever, I have to imagine you’re referring to something else. Since you’ve talked about it before, do you meaning trying to use the MCU to operate the FET linearly without using an op-amp (à la YLP)? I’d like to explore that at some point, but I’m sure it won’t be a walk in the park.

Would a simple parallel R+C between the mcu pwm pin and gnd create a variable voltage controlled by duty cycle?

Yup. That scheme has been employed by Emisar in the recent linear drivers as well as the FireFlies Lume1 drivers (LoneOceans design). But those feed the RC-filtered voltage into an op-amp instead of directly into the FET (or in the case of the Lume1, the buck regulator).

We need a right code to run mosfets in way we like. I ques its all about coding, to keep circuit simple, cheap and reliable as possible.

Have you calculated the capacitor requirements for higher output (>5 amps) with the low switching frequency from ATtiny’s? Of coarse you can use lower capacity on them but then you have a load of ripple, not a very good driver.

Seems like a bunch of work for a driver that will work worse so why bother? If you think it’s worth it, make it.

For 5A (30W!) output you will need big host with plenty space inside anyway. And its big question will you see PWM at hi output, because human eyes see no difference in bright light changes. I’d like to make it, but its all about code and i have no skills.
BTW some reading about TI buck -boost led dimming.

If you want to use SMD capacitors, then the cost of the boost ICs is replaced by large capacitors instead, only for a driver not working as good. I’m not saying it’s not an interesting idea, myself and others might at least be interested in discussing it but perhaps you should create your own thread and the discussion can continue there instead of posting this suggestion in all other driver threads.

And about about not having coding skills, I can assure you that no one here had any coding skills before they started learning how to code either.

This sounds a bit harsh….I think there’s nothing wrong with Quadrupel offering some of the skills needed to make a driver that he’d like to make while asking for a collaborator to fill the rest.
Maybe he won’t find such person and then it will indeed boil down to whether he wants to invest this much time to learn a new major skill.
But maybe someone will chime in.

Some time ago I posted here in BLF as Quadruppel I think he also posted the DC/DC converter based only on MCU. It is very nice idea and there is achieved in YLP Unicorn as well in LED drivers from Tamagochi user from Fonarevka. The hardware is easy to make but difficult part is software. Also AVR are not the best MCU for that. PIC mcu have better candidates for that. In simple solution you will need some MOSFET and coil and sense resistor. If we don’t use external amplifier wee will need 16-bit ADC at least for good performance. Another problem is switching frequency which will be low anyway. There will be needed chips with fast PWM with higher PWM resolution to achieve better efficiency with higher frequency and control.

The Unicorn/gekko/panda 4 use a linear driver, not DC-DC, but yes Tamagotchi’s driver is what Quadrupel was likely talking about, I don’t know if he has ever made higher power boost drivers than his H03/H04 ones, and with synchronous rectification, because his were asynchronous unfortunately.
Gate drivers will also be probably needed because I doubt the MCU can drive the mosfets without significant switching losses especially at higher frequencies (which as you mentioned an Attiny isn’t probably the best). In the end I don’t think we can really gain anything in space, cost, efficiency.
Here the buck converter I used is synchronous, all N-FETs with an integrated charge pump so it’s capable of 100% duty cycle, very high switching frequency of 2.4 MHz allowing to use a small inductor and low capacitance (I actually oversized both) while still having very low switching losses.
It might be a cool project but it’s likely a long road ahead to achieve that 95~97% efficiency without huge components.