I know, first post (here, not anywhere), so what do I know? Maybe not much. And maybe I'm way behind the ball on this thought, but a couple of questions and an idea:
How efficient is an led driven by an FET when it's being pulsed, compared to say a linear regulator, let's say in the context of single 18650 XM-L? The FET itself is more efficient but you're driving the LED at high current, for brief pulses. I guess the efficiency for the LED is more aligned with expectations from the average current though, not the pulse current, so my guess is the FET setup still wins, no?
I suspect this is why the bistro clickly firmware exists with an option for 50% power on its high mode. Get the efficiency of an FET, but without the battery draining 6A or whatever high mode that you maybe don't even want.
That's great maybe, but once the battery is down to say 3.6V, especially depending on the type of battery, a 100% mode is likely not 6A and 1300 lumen's anymore. It's maybe more like 1A, and 50% pulsed is then even less. So couldn't it be nice to have that 50% FET mode when my battery is full but maybe 100% when it's a bit low? Then I keep more constant output?
In other words, active-feedback on PWM to current-regulate with an FET, or some approximation of it.
The closest thing I've noticed is I think the H17F which regulates on heat. That's a reasonable proxy for current but it's going to have uneccessary short-term fluctuations that are unpleasing not wanted in this context. The goal here is controlled battery life and consistent output. I don't want the 6A even for a few seconds. I just want a controlled power level.
So ideally what I'm saying is monitor current and adjust PWM accordingly (preferably smoothly too). However I don't know if there's a way to monitor current. It seems like there are ways to monitor temperature, or to estimate it/fake it maybe. It seems like some software has ways to monitor battery level. That would be a start at least, increase duty cycle as battery level drops (up to some point where you might eventually want the opposite). But I guess if battery level can be monitored then current can be estimated more directly too.
Does this exist? Is it crazy? Is linear regulation more efficient anyway?
Updating first post with summary:
a) monitor battery voltage, assume VERY close to LED voltage, determine LED current from parameterization.
or b) change hardware to add better current monitoring.
pseudo code for a)
while true {
turn_switch_on(); // 100% duty factor during adc read.
sleep 100 micro-seconds; (maybe)
pulse_V=readadc(blah);
pulse_current = a +b*pulse_V+c*pulse_V^2;
duty_factor = min ( mode_current/pulse_current, 100) ;
enable_PWM(duty_factor);
sleep(30) ;
}
a, b, and c define the current vs voltage curve for a particular LED. c can optionally just be defined as 0 for a simplified linear curve.