better low modes with dynamic PWM

84 posts / 0 new
Last post
Kaddaman
Offline
Last seen: 1 year 3 months ago
Joined: 03/01/2021 - 16:34
Posts: 9
Location: Germany

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.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 2 weeks 4 days ago
Joined: 01/12/2013 - 14:40
Posts: 10895
Location: (469219) 2016 HO3 // I get way more privmsgs than I can respond to, so please ask in a public thread if possible, for a faster answer.
Kaddaman wrote:
Would it be possible to get firmwares without the moonlight jump-start?

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.

digitalcircuit
Offline
Last seen: 1 month 1 week ago
Joined: 12/01/2020 - 23:53
Posts: 24

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.

Quadrupel
Quadrupel's picture
Offline
Last seen: 22 min 41 sec ago
Joined: 12/03/2017 - 10:40
Posts: 1144
Location: Lithuania

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

SammysHP
SammysHP's picture
Offline
Last seen: 1 hour 15 min ago
Joined: 06/25/2019 - 14:35
Posts: 1706
Location: Germany

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?

Kaddaman
Offline
Last seen: 1 year 3 months ago
Joined: 03/01/2021 - 16:34
Posts: 9
Location: Germany

Yesterday, I installed the KR4 and KR4-219b firmwares from 2021-08-23 onto my two D4v2. It feels like the jump-start with a short flash is disabled completely again, which I find really nice. I never had any issues with level 1 moonlight with both my 9A drivers. The short flash at a high brightness kind of defeated the purpose why I entered moonlight completely IMO, I don’t want my light to flash when I want to use an ultra low brightness specifically. I tested the heck out of it and the flash is now gone completely, I guess that’s because the standard jump-start level is set so low. I didn’t look at the code yet, but as user “digitalcircuit” reported, that’s probably it.

I initially created my own Anduril2 config with disabling the jump-start completely, but I like the way the official firmware comes now.
Great work, ToyKeeper! Amazing how quick things get sorted out recently.

Is there any information about how Hank is handling the situation? I’ve had a lot of people asking on Reddit how they should proceed when ordering a new Hanklight. My general recommendation currently is to ask Hank specifically for the most recent firmware specifically.

SammysHP
SammysHP's picture
Offline
Last seen: 1 hour 15 min ago
Joined: 06/25/2019 - 14:35
Posts: 1706
Location: Germany

Kaddaman wrote:
Is there any information about how Hank is handling the situation? I’ve had a lot of people asking on Reddit how they should proceed when ordering a new Hanklight. My general recommendation currently is to ask Hank specifically for the most recent firmware specifically.

This is highly experimental code, still in development. I hope that Hank doesn’t use the firmware files that are available from ToyKeeper’s server, but asks ToyKeeper for a “good” version.
Kaddaman
Offline
Last seen: 1 year 3 months ago
Joined: 03/01/2021 - 16:34
Posts: 9
Location: Germany
SammysHP wrote:
This is highly experimental code, still in development. I hope that Hank doesn’t use the firmware files that are available from ToyKeeper’s server, but asks ToyKeeper for a “good” version.

From my limited experience, I would say that TK only releases new firmwares when they are ready and working, AFAIK there is no beta-channel. In general, isn’t that basically the thing of open-source?

Forsythe P. Jones
Offline
Last seen: 1 year 1 month ago
Joined: 08/15/2021 - 00:40
Posts: 413
Location: California

I just ordered a Hank light and figure by the time it gets here (a few weeks?), there will have been a few more Anduril builds anyway. So I expect to reflash it, no big deal. Being able to reflash it is why I bought it after all.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 2 weeks 4 days ago
Joined: 01/12/2013 - 14:40
Posts: 10895
Location: (469219) 2016 HO3 // I get way more privmsgs than I can respond to, so please ask in a public thread if possible, for a faster answer.

digitalcircuit wrote:
configurable jump start … I noticed the following:

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.

… 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.

As you say, that sounds unusual. I haven’t seen a light behave like you’re describing. I only have a very small sample size though. What I’ve seen is that it typically starts slower when hot, like when it was just at a high brightness mode.

It seems that the optimal pulse strength varies quite a bit with hardware. I set the default at 21, because that’s the sweet spot of the fastest light I have available for testing. On another, I find 30 is about right. And you had to turn it up as high as 37.

A better solution would be to modify the hardware… but that hasn’t happened, so this workaround exists to try to improve things as much as possible.

As long as a miscellaneous or “global” config menu is being added, I’m planning to add another setting or two there before I bother Hank about the new versions. In particular, the double-click behavior changed from Anduril 1 to Anduril 2, and it seems to be a divisive change, so I’m hoping to make that configurable. Then I’ll ask if he can update the revision he’s using.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 2 weeks 4 days ago
Joined: 01/12/2013 - 14:40
Posts: 10895
Location: (469219) 2016 HO3 // I get way more privmsgs than I can respond to, so please ask in a public thread if possible, for a faster answer.
Kaddaman wrote:
From my limited experience, I would say that TK only releases new firmwares when they are ready and working, AFAIK there is no beta-channel. In general, isn’t that basically the thing of open-source?

I used to publish builds more often, but then I found out that both users and manufacturers were using those versions on the assumption that they were stable instead of experimental… so I’ve really cut back on how often I upload new .hex files.

There are still some experimental builds though, so it’s always a use-at-your-own-risk sort of thing. I don’t often do the full test suite, because it takes a very long time… especially thermal tests. So most of the time, I focus the testing on whatever part of the code changed recently, and anything else I think might have been affected.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 2 weeks 4 days ago
Joined: 01/12/2013 - 14:40
Posts: 10895
Location: (469219) 2016 HO3 // I get way more privmsgs than I can respond to, so please ask in a public thread if possible, for a faster answer.
Quadrupel wrote:
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 don’t know what the effect would be. So the dynamic PWM thing is only enabled for KR4, and I’ll try it on other devices as I have time. Next is probably K9.3.

digitalcircuit
Offline
Last seen: 1 month 1 week ago
Joined: 12/01/2020 - 23:53
Posts: 24

ToyKeeper wrote:
As you say, that sounds unusual. I haven’t seen a light behave like you’re describing. I only have a very small sample size though.

Noted, and thank you for the context! It’ll be interesting to see what other folks discover if they try tuning the jump start level, too.

Additional context:
Before jump start was added (or if I set it to 0 now), my KR4 with 5a driver’s E21A 2700K LEDs always turned on to lowest level even after max ramp (level 150 up to 40 C, custom thermal limit), so perhaps lack of that issue allows a secondary effect of the warmer driver circuit to result in faster reaction times..? I’m not sure.

Regardless, I’m happy with the current jump start behavior as a way of making the most of the unchanged hardware design. It’s a noticeable improvement over previous behavior, and well worth spending around 5-10 minutes of my time dialing in the right level (after which I added it to my custom build config).

ToyKeeper wrote:
I used to publish builds more often, but then I found out that both users and manufacturers were using those versions on the assumption that they were stable instead of experimental… so I’ve really cut back on how often I upload new .hex files.

There are still some experimental builds though, so it’s always a use-at-your-own-risk sort of thing.

Would it make sense to have a subdirectory called experimental, testing, etc in the firmware download folder , making the distinction of what’s “ready” and what would benefit from wider testing?

I don’t know if that’d worsen the situation by implying files outside that directory are more stable, raise expectations for how you publish, etc – feel free to disregard!

(I’m also not sure if Launchpad’s recipes for automated builds would be useful to offer .hex files for recent commits. Unfortunately, it looks like it’s geared towards building a Debian package and not really anything else , though I might have overlooked something in ~15 minutes of searching for details.)

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 2 weeks 4 days ago
Joined: 01/12/2013 - 14:40
Posts: 10895
Location: (469219) 2016 HO3 // I get way more privmsgs than I can respond to, so please ask in a public thread if possible, for a faster answer.

digitalcircuit wrote:
Would it make sense to have a subdirectory called experimental, testing, etc in the firmware download folder , making the distinction of what’s “ready” and what would benefit from wider testing?

I’m also not sure if Launchpad’s recipes for automated builds would be useful…

As you say, Launchpad is mostly designed to produce .deb packages. It also frequently has a large backlog on the build servers. So I haven’t really looked into whether it’s capable of producing automated builds for this project. It’s a pretty simple matter to just build locally and sync it to a site.

I’m hoping to do some restructuring soon… In particular:

  • Modify the build system so, instead of a flat list of cfg-*.h files, it has a directory structure… like cfg/username/modelname/config.h . This would help unclutter the base directory, help keep related files together, make it easier to structure the files, allow for expanding what can be configured, and make it easy to keep both personal and manufacturer configs in the repository.
  • Fork the current fsm branch into an anduril1 archival branch, since it’s effectively dead now.
  • Merge the anduril2 branch into fsm, and merge fsm into trunk.
  • Do some housekeeping on the published builds, to move old builds to an archive and move new builds to the base directory. Maybe also restructure how builds are published, to match the new config hierarchy.
  • Move FSM’s hwdef and other includes into the FSM directory, since they’re really not useful for other projects. Maybe even move the hwdefs so they’re in the same directory as the configs. This would keep all the model-specific files in a single place.

I’m also hoping to modify the fsm and anduril code to make things easier to customize at a deeper level on a per-build basis… replacing functions as necessary, or adding hooks, etc.

And, of course, I have a pile of patches to merge. I’ve been embarrassingly slow about that.

Yokiamy
Yokiamy's picture
Offline
Last seen: 2 hours 29 min ago
Joined: 10/18/2016 - 15:47
Posts: 3280
Location: Netherlands

That’s awesome TK!
Exactly what can be found in many Anduril lights.
I now really have a good excuse to buy a programmer from Hank for my Emisars / Noctigons

Champfc3000
Offline
Last seen: 6 hours 55 min ago
Joined: 10/14/2020 - 15:41
Posts: 35
Location: New york

Does this work for d4v2 with e21a?

pol77
Offline
Last seen: 12 hours 47 min ago
Joined: 02/21/2019 - 07:54
Posts: 471
Location: London

Champfc3000 wrote:
Does this work for d4v2 with e21a?

Definitely. E21A comes with the CC driver. You need the KR4 No FET firmware for it.
Champfc3000
Offline
Last seen: 6 hours 55 min ago
Joined: 10/14/2020 - 15:41
Posts: 35
Location: New york

Where do i find the new firmware

Terry Oregon
Terry Oregon's picture
Offline
Last seen: 5 hours 14 min ago
Joined: 10/21/2017 - 17:03
Posts: 627
Location: Grants Pass Oregon

ToyKeeper wrote:
raccoon city wrote:

I cannot see the images in the OP unless I open the image in a new tab.

Ah, right, I forgot about that. Ever since BLF switched to https, browsers aren't loading embedded images from plain-old-http sites any more. I'll have to fix that another day... because it's not going to be a quick or easy process. (name-based vhosts sharing a single external IP behind a reverse proxy... makes it tricky to not only route the traffic, but also to get certbot to work for LetsEncrypt certificate renewal)

 

Interesting, Chrome and Edge don't show the pics, but Firefox does.

When did BLF switch to https ?

My reviews: , My personal collection of lights LINK,  J5 Tactical V1 Pro review LINK,  Thirteen Optical Sensors review LINKZebralight SC700d review LINK,  Ray-O-Vac Super Power Sportsman review LINK,  Convoy S2+ color combos LINK,  How To flash D4V2 LINK,  Convoy S21A LINK

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 2 weeks 4 days ago
Joined: 01/12/2013 - 14:40
Posts: 10895
Location: (469219) 2016 HO3 // I get way more privmsgs than I can respond to, so please ask in a public thread if possible, for a faster answer.
Champfc3000 wrote:
Where do i find the new firmware

It’s in the anduril2 branch in Launchpad, or in my anduril2 file dump. It’s pretty much always a work in progress though, so use at your own risk.

Anyway, I got some test results from a wider variety of lights… and I’m seeing jump-start levels anywhere from 21 to 50 depending on the exact hardware being used. So it’ll probably take some tweaking on a per-light basis, for people who care to configure it.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 2 weeks 4 days ago
Joined: 01/12/2013 - 14:40
Posts: 10895
Location: (469219) 2016 HO3 // I get way more privmsgs than I can respond to, so please ask in a public thread if possible, for a faster answer.

Rayoui wrote:
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.

That’s added and working now. The user can finally choose their turbo style, with different settings for simple and advanced modes. The available styles are:

  • 0: no turbo, only ceiling
  • 1: Anduril 1 style (Ramp 2H -> full power)
  • 2: Anduril 2 style (Ramp 2H -> ceiling, unless already ramped up to ceiling)

This also controls the level of the momentary turbo shortcuts.

Turbo style is the 4th item in the ramp extras menu, or in the simple UI menu.

Some other new options were just added too, so some menus have changed…

Smooth ramp: (Smooth ramp 7H)

  1. Floor
  2. Ceiling
  3. Speed (new)

Ramp extras: (Ramp 10H)

  1. Automatic memory
  2. Manual memory timer
  3. Ramp after moon? (Off -> 1H) (new)
  4. Advanced UI turbo style (new)

Simple UI menu: (Off 10H)

  1. Floor
  2. Ceiling
  3. Steps
  4. Simple UI turbo style (new)

Hopefully this will let each person get the style they like.

pol77
Offline
Last seen: 12 hours 47 min ago
Joined: 02/21/2019 - 07:54
Posts: 471
Location: London

Thank you TK. That is a wonderful addition! Anduril2 has become perfect in my eyes, with the latest work you have put in it!

Looking forward to someone updating the cheat sheets Wink

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 2 weeks 4 days ago
Joined: 01/12/2013 - 14:40
Posts: 10895
Location: (469219) 2016 HO3 // I get way more privmsgs than I can respond to, so please ask in a public thread if possible, for a faster answer.
pol77 wrote:
Looking forward to someone updating the cheat sheets Wink

Putting the UI into a diagram is … harder than it was before.

Tom E
Tom E's picture
Offline
Last seen: 3 months 1 week ago
Joined: 08/19/2012 - 08:23
Posts: 15065
Location: LI NY

Lux-Perpetua should be able to add/update the UI diagrams. He's got several versions for a variety of Anduril 2 configurations.

 

See: https://budgetlightforum.com/node/76941. I just added a post there.

 

pol77
Offline
Last seen: 12 hours 47 min ago
Joined: 02/21/2019 - 07:54
Posts: 471
Location: London
ToyKeeper wrote:
Putting the UI into a diagram is … harder than it was before.

Indeed it is, but some talented individuals have risen to the task admirably and have produced some very helpful diagrams. I hope they can include the latest improvements.

Rayoui
Rayoui's picture
Offline
Last seen: 3 weeks 6 days ago
Joined: 08/06/2019 - 00:38
Posts: 691
Location: Portland, OR

This is excellent! Thanks for all the work you’re doing.

LuxWad
LuxWad's picture
Offline
Last seen: 18 hours 8 min ago
Joined: 08/07/2021 - 13:22
Posts: 124
Location: USA

I’ve been testing this with my E21A D4V2 and it’s been great, ultralow is so much more convenient now and makes the light more useful for me. Output appears more stable and startup is quicker. I especially love the ability to enable/disable ramp after moon activation, that’s a huge one for me.

I don’t quite understand though, how does exactly does the ramp speed configuration work? How many values are available? I only tried it up to about 20 clicks, which was maddeningly slow. What does each click represent exactly?

Also sorry dumb question but I am wondering, which hex would I flash to the DT8? I have both a 219b and a W2, do I just flash the respective KR4/KR4-219b versions?

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 2 weeks 4 days ago
Joined: 01/12/2013 - 14:40
Posts: 10895
Location: (469219) 2016 HO3 // I get way more privmsgs than I can respond to, so please ask in a public thread if possible, for a faster answer.

LuxWad wrote:
I don’t quite understand though, how does exactly does the ramp speed configuration work? How many values are available? I only tried it up to about 20 clicks, which was maddeningly slow. What does each click represent exactly?

Also sorry dumb question but I am wondering, which hex would I flash to the DT8? I have both a 219b and a W2, do I just flash the respective KR4/KR4-219b versions?

The control chip has a timer which ticks at about 62 “frames” per second — one tick every 16ms. It’s pretty close to the speed of a common video screen. Normally, the ramp moves at one ramp step per frame, and there are 150 ramp steps, so it takes about 2.4s to ramp from end to end.

The ramp speed option changes it to one ramp step every N frames. So it slows things down… one step every 2 frames, every 3 frames, every 4, etc. Doing N clicks in the config makes the ramp 1/Nth as fast.

For reflashing a DT8, the readme file in my .hex file collection explains how to determine which file to use. The models file will probably be useful too. Basically, match up the model number.

CollectEverything
CollectEverything's picture
Offline
Last seen: 9 hours 41 min ago
Joined: 07/17/2021 - 00:19
Posts: 1053
Location: USA

Is there a way to add adjustable/more brightness levels for the AUX leds? I agree with a statement by ToyKeeper I saw on Youtube. The low setting is too low and the high is too high.

------------------

My Collection

------------------

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 2 weeks 4 days ago
Joined: 01/12/2013 - 14:40
Posts: 10895
Location: (469219) 2016 HO3 // I get way more privmsgs than I can respond to, so please ask in a public thread if possible, for a faster answer.
CollectEverything wrote:
Is there a way to add adjustable/more brightness levels for the AUX leds?

Nope, not without changing the hardware. The hardware only has three brightness levels:

  • High
  • Low
  • Off

The way it produces those levels is by turning power on and off, and by inserting and removing a resistor along the path of current. The control chip provides the power, and it can either do that directly or it can add its internal resistor.

  • High = power on, internal resistor off
  • Low = power on, internal resistor on
  • Off = power off

Those are the only three levels available.

The high mode’s brightness can be modified by changing the resistors on the aux board, or by replacing the resistors with potentiometers… but that’s pretty much the whole extent of the ways it can be adjusted.

Pages