NarsilM - configurable e-switch firmware for Multi channels, v1.3

Tom, in v1.2, what should I edit if I want a faster response for double clicks to turbo? It seems like double clicks to turbo has a bit slower (pauses at memorized level about half a second). compare to v1.0
Thanks.

Yes, intentionally so. I've answered this question before but dunno where. It's not as long as 1/2 sec, it's definitely quicker.

If I didn't delay it, when you do a 3X, 4X or 5X click, you would get flashed with max/turbo every time. I did not want to delay the 1 click operations, so decided to start it at 2X since the flash of max/turbo is annoying.

From what I can tell, the delay is 0.288 seconds, as defined below. If you change it to be less, you will make the multi clicks tighter timed and might get difficult:

# define SHORT_CLICK_DUR 18 // Short click max duration - for 0.288 secs

Thanks Tom :+1:

This is now updated in the repository.

Thanx TK!

Does narsilm without voltage dividers require the 85v 10Mhz?

Yes, at least two of us have implemented it now, and there is some code for it in the repository. It’s included in the Emisar lights, Crescendo, and the FSM toolkit… and I’ve been dragging my feet about patching something into Narsil.

While not PID, Narsil already has thermal step-down. It was tuned for the Q8, but didn’t respond fast enough for use on a D4 (much smaller, similar power level). This is what I measured on a D4v1 light (which was way too hot from about 30s to 4m):

Yeah… these things take an inordinate amount of time to test, and I’ve found it tends to be really sensitive to small changes.

I tested a DrJones H17F driver’s thermal response recently, and it looks like his solution was to make the regulation response relatively slow and gradual. In my test, it took almost 8 minutes to reach a stable state… which was fine on the heavy copper host I used, but would be way too slow for something like an Emisar D4. However, it was very smooth and had no significant oscillations or noise. It merely stepped down one PWM level at a time, one channel at a time, until it was no longer overheating. And when ice was held against it afterward, it stepped back up just as slowly. I wouldn’t really say it’s a PID algorithm though, since it didn’t act like one. The I term seemed to be zero, I couldn’t tell if there was a D term or not, and if there was a P term it seemed to have only two states — two steps per second, or one step per second.

My attempts to make a more responsive PID regulator have been less than ideal. It works, but I’m not totally happy with it. After reaching a stable state, it’s still more noise-sensitive than I’d like, and occasionally I’ve measured rather undesirable behavior like oscillations. The response is proportional though, and fairly heavy on the derivative term so it can anticipate and “steer into” the turns, but I’ve mostly only used the integral parts as a way to reduce noise. And, as already mentioned, it’s still not at a point where I’m happy with it. Sensor readings are low-resolution and noisy and subject to thermal lag due to having the sensor in the MCU, and my attempts to deal with the lag have made it even more noise-sensitive.

Here’s FSM’s behavior compared to a H17F:

So… long story short: Yes, but it’s still a work in progress.

No, the "85V" version is not necessary.

Does double click to turbo go to turbo in mode sets as well as ramping?

I was able to get narsilm with throttle control working in ramping configuration so i assumed it was working in mode sets. However, today i was testing out the rest of the options and realized the 2x click in mode sets is not working for me. two clicks simply advances the out put two levels. Is this just me or is this the way it works?

I have the ramping mode stopping at 2amps for normal operation of the M3 clone. then a 2x click and “BAM!” IN YOUR FACE 7amp Max turbo. I like it! :smiley:

No, I don’t think you can jump to turbo while in mode sets.

Ahh. Ok, thanks. I thought it might be my inability to fast click. So good to know. It means I might still have my freakishly fast reflexes after all. Ch’ chahhh… :laughing:

Lightrider,
no it doesn’t.

The command for TURBO in MODES is:
The lamp is OFF: Click&hold
Nothing else

In the cheat sheet:
The row for 2x in the MODES column is empty, as other multible click commands.

Are you sure? It seems a click&hold from OFF first goes to strobe, then goes to the menu options.

For me, click&hold goes to max, then strobe, then menu

The click&hold to max may be a new option in the latest version only. Not sure

I was playing today with my Q8

The batteries were almost depleted the light was already down to ML level

When I turn on strobe it is the full FET brightness
no step down of the strobe is going on its still flashing at max brightness the battery can deliver

I have a feeling LVP will not kick in

already 0.05V dropped, since I started the test
Firmware blinks out 2.8V real cell voltage 2.96V

OK I got now the confirmation, driver blinks out 2.7V and in normal operation the light shuts down
Strobe is still going strong and depletes the cells

Your right, when you click and hold it goes to turbo first, then strobe, then the menu. I don’t have my lights right now, so I had to look at my own videos. Lol

I’m not a fan of mode sets. I learned them for the videos, but have appearantly forgot some stuff already. :stuck_out_tongue:

I looked through the code just now to see how it handles LVP. It appears to have cases to handle ramping and mode sets, but nothing else. It sets LowBattSignal when LVP should happen, but doesn’t do anything with it when the light is in any mode except ramping or mode sets.

The method I normally use is a bit different. In regular steady modes, it drops output or shuts off, similar to Narsil. In strobey modes it “steps down” to a low steady mode, then follows the same drop/off pattern as before. In any other mode (like battcheck), it just shuts off.

I dont konw if i would call it turbo as if the max fet level in mode sets is set under max, it will go to that level. so the clickhold goes to the highest level in that mode set. It will not go to full turbo 255 pwm though. I supose its a matter of symantics.

Are you talking about NarsilM v1 or the special GT version of NarsilM?

Yeah it looks like in special modes there has to be code added or changed to handle LVP as well