better low modes with dynamic PWM

Thank you for the explanation. That is very useful to know.

I have modded a couple of Hank’s lights to Nichia 219b a long time ago and they have worked perfectly for a long time. I am sure I am not the only one. I would appreciate it if you kept the 60% FET version available regardless of whether Hank prefers the 50% or 60% FET.

I can't see the OP pics - not sure if you changed something already or not.

Thanks for these tweaks! This probably has usages in many of the newer CC drivers being developed.

I am thinking if this new configuration will work to provide a lower moonlight level for the Lume1 driver.

I can still see them. Strange that some can and others can’t. BTW, I’m using Safari on a MacBook.

I'm on Win 10 running chrome, but also verified they don't wrk for me in Edge. If I "view source" the links in the html source works fine. She hosts them on her http://toykeeper.net/ website.

It’s because of the mixed content policy of Chrome. The images don’t use TLS, but BLF does. In Firefox I just get a warning. Not sure if this is due to a setting or extension.

Just flashed from Anduril 1 to 2 (8-13-21). The low ramp is usable now! The PFM explanation is appreciated as well!

Yeah, sorry about that. It’s complicated, and I haven’t had a lot of time or energy lately since I’m dealing with some health issues. So I don’t end up with a lot of productive time I can use for flashlights or server maintenance. Have mostly had to use that time for seeing doctors, learning medical stuff, and basic life tasks which are now a lot harder than they should be.

But if I get a day or two to work on it, I really need to add https to my site(s).

Don’t worry about the images, take care of your self—your health is the most important thing so spend your energy with that.

One option might be using a free proxy that provides HTTPS termination like Cloudflare. It’s normally simple to set up (if you’re willing to hand over your DNS to them). As with anything like this it has pros and cons and may not fit your needs. If it does then it can be a 10 minute job.

As others have said, health is more important though.

On a KR4-nofet 5a driver (E21A), dynamic PWM seems to work quite well! It’s a much better approach than simply slowing down the ramp as I had tried.

Small heads up - in lockout-mode.c, the JUMP_START_MOON code doesn’t seem to apply to the “click and hold” moon there, which confused me at first as I use that most often (due to autolock).

In normal “off” mode, the jump start does give a noticeable boost to the speed of moon level waking up. Most of the time there’s still a ramp up, but it’s faster. Other times I see a subtle flicker to higher brightness, but nothing eye-searing - if anything, it feels like a nice “yes the flashlight is on” confirmation.

Given this, if anyone wants to compare with/without the moon jump start, try it in “off” (active) versus “lockout” (no jump start).

Yeah, it should probably jump-start in more places… not just hold-from-off. It also should be runtime-configurable, because it seems the optimal value is different depending on the hardware. Not sure where to fit another option into the UI though. Or, more generally, where to fit some awkwardly global settings into the UI, like double-click style, mid-ramp blinks, jump-start level, and maybe other things which don’t fit anywhere else. Maybe 9H or 11H from off? Extend the Ramp 10H menu? The button mappings are already pretty cluttered…

I also need to apply the dynamic PWM thing to some other t1634 lights, and possibly even to some single-channel t85 lights.

Perhaps on a day when I’m more awake. *yawn*

This is a wonderful upgrade to so many lights! Thank you.

If you end up adding a bunch of runtime configurable items, it would be nice to include the double click to turbo (Anduril 1 style) in there, which is now, if I understand correctly, only configurable during compiling.

EDIT: Maybe you meant the same by double click style :slight_smile:
EDIT2: 9H seems reasonable to me.

Flashed the new version to my KR4 and it’s a night-and-day improvement, no pun intended.

Level 1 starts up faster from off, and the low-end is much smoother and more gradual when ramping.

Also enjoying the change where 2C from on goes to full turbo (in full/advanced mode at least), this is a very sensible change IMHO. Don’t know if that’s recent or not, but thought I’d give my positive feedback regardless.

Thanks for making these changes! I’ve flashed a few of my lights and the low modes are much more usable now. It would be great to see these changes for the K9.3 as well.

I absolutely would like to see an advanced configuration menu. I wouldn’t worry too much about cluttering the UI as a menu like that would probably only matter to the most advanced users.

I prefer the original Anduril 2 double click style of 2C to top of ramp, so I’d definitely like to see a runtime configuration option for that.

Great work ToyKeeper!

I just flashed the 2021-08-16 builds on my D4v2’s (both 9A CC driver, one with 219B’s, the other with SST20’s). I used KR4-219B and KR4, which hopefully was correct.

With the KR4 build, moonlight at level 1 now starts almost immediately. Sometimes it flashes, s0metimes it still fades in as usual.
With the KR4-219B build, it still fades in in the same speed as before. I have no issue with that (in contrary, I even prefer that somehow), just reporting. Sometimes is flashes before fading in.

Ramping is much smoother, more controllable and in short just better than before. Thank you for fixing that!

Would it be possible to get firmwares without the moonlight jump-start? My moonlights worked quite well before and I sometimes find that flash really disturbing when I want to enable moonlight for using its low brightness specifically.

Yes. Now that I’ve heard a wider variety of results from different lights, it’s pretty clear that the option needs to be configurable… so I plan on adding that soon. Then people can set the jump-start however they like.

I may also attempt to make the behavior more consistent, by force-resetting the PWM phase when the light turns on. If my guess is correct, this should greatly improve the consistency from one activation to the next. As-is, the wave generator is free-running, so the timing is random. It wasn’t an issue when the wavelength was imperceptibly short, but with the longer cycles now, it’s more important.

The configurable jump start with force-reset PWM works great and is basically always consistent (temperature aside)!

For my Noctigon KR4 with E21A in 2700K, I noticed the following:

Jump start value Result
25 Default - only slightly faster fade-in
30 Faster soft fade-in
35 Very slight fade-in, almost instant
37 Generally instant on - see following note on temperature
40 Flashes briefly to a higher brightness if light is even slightly warm

Note: with Jump Start level 37, it works fine if I’ve kept the light on ramp level 65 or lower (including off). However, if I run the light to turbo/ramp level 150 and wait 2 minutes (throttling to custom limit of 40°C), entering moonlight mode will result in slight flashes while it’s still above warm/hot. Once it’s cooled down to “noticeably warm”, it works fine. If it’s particularly cool (around 21°C or lower), there’s a very slight fade-in, still fast enough to let go of the button in time when ramping up from “Off” state.

Though unintended, for me, that could even be seen as a feature - it takes time for one’s eyes to adjust, so the flashlight gives a confirmation flicker if it was recently in turbo.

If others notice this as well, in theory the jump start level could be temperature compensated, but that feels rather complex? Besides, what I’ve heard suggests the LEDs should have a more difficult time turning on if hot, not vice-versa.

Wondering how “dynamic PWM” will effect drivers with switching topology ( like Lume1). In MEL7135 drivers i can get super moonlight by disabling dynamic_underclocking.

I assume that it will be even less predictable. It all depends on the time characteristics of the 7135. Does the turn on time change depending on the temperature?