Two Sofirn flashlights I own have a ramping option. The ramping is perceptually not quite smooth.
Anduril ramping is reported to work better. Would anybody know what function it uses to achieve it?
p.s. This may be naive, but I figured that the normalised current should increase as roughly the 4th power of the normalised ramping time (normalised being scaled from min to max as 0 to 1 or 100%) to make brightness changes more perceptually satisfying.
Based on FC11C current/lumens measurements and the assumption that inverse gamma function can satisfactorily map luminance to perceived brightness.
The shape depends on the driver because the response of the driver might be different. There is a level_calc script in the repository that can help you with calculating the ramp values. Often it is used multiple times for different parts of the ramp.
It seems to me that Anduril ramping uses [NormCurrent] = [NormRampTime]^3 by default.
This is not that far off from the exponent of 4 that I suggested based on nesting measured lumens vs amps relationship for Nichia 519a and gamma 2.2 mapping lumens to perceived brightness.
It’s complicated. There isn’t a single formula which always works well. I have to adjust it for each light.
As a rough approximation, I’ve used anything from x**2 to x**9 for the shape on various lights, though it’s usually in the range of 3rd to 6th power. And because of complications in the individual drivers and the difficulty of accurately modelling their behavior, the ramp calculator script often can’t produce an exact ramp for each light in one pass. So I often calculate it in multiple segments, or post-process the values, or manually tweak them to fit better based on manual testing.
I also generally try to make the ramp and other behaviors feel similar across different hardware models, different brands, etc. This sometimes means making large changes to the ramp shape or other parameters, to compensate for differences in underlying power circuitry.
So if an Anduril light ramps smoother, it’s probably because I (or another contributor) put more effort into tweaking the ramp tables and curves. Like, SammysHP has made some pretty good ramps.