D4v2 E21a Top of Ramp Setting Help

I am sure it’s somewhere, how to “calculate” the ramp levels, but basically what I want is to set the top of the ramp to ~300 lumens. I have been searching and I can’t figure out the “curve” so that I can figure out roughly where that would be. Turbo (150) on the e21a version is 1200 lumens of course, so can anyone give me guidance on how I would find ~300 (¼ of max) to set as my ramp ceiling?

Thanks for any help someone gave give!

If possible I would like to know roughly where ~75 lumens falls as well.

Here you have 4xE21 curve:

For 5A it shows 1585lm.

Your configuration produces 1200, so 1200/1585 = 76%

If you want to find 300, you have to multiply it by 1585/1200 and find it on the chart. 300*1585/1200 = 396. It’s just below 1A.

So you have to deliver 1A to have 300 lm output.

The second part is to find the correct PWM value. Max is 1024 for 5A, so 1024*1A/5A = 205.

Then you go to the firmware source: https://bazaar.launchpad.net/~toykeeper/flashlight-firmware/trunk/view/head:/ToyKeeper/spaghetti-monster/anduril/cfg-noctigon-kr4-nofet.h#L14

There you can find level 203 (pretty close to 205) which is 78th ramping step. That’s your ramp level :slight_smile:

I hope you can figure it out for 75 lumens! :slight_smile:

Thank you! That was extremely helpful