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

Previous post has the GT mode sets. The Q8 is different.

As the Mrs said (Steve), the intent is prolonged runtime to max at 2.0A. If you want the full 2.5A, there's a duplicate set of modes available shown above, plus in ramping, ramping max's out at 2.0A but a 2X click goes to turbo at 2.5A.

Tom,
The Q8 in MODES:
What is the lock out comand?
(I thought 2x + click&hold )

But on my Q8 it is 4 clicks like in RAMPING.

Edit: I already did a reset to factory.

joechina, According to your cheat sheet it is 4 clicks for lockout in both ramping and discrete mode, I just verified with one of mine as well.
[edit]It does work this way, but I read the UI cheat sheet wrong. Tom has verified this is a bug.[/edit]

In MODES operation:

  • 2 quick clicks followed by click&hold works for me (as designed)
  • 4X clicks though will restore it from lockout, as well as 2X clicks + click&hold (as designed, both ways work).
  • Just tried it: the 4X clicks to enter lockout in MODES is also working -- this was unintended. I did not want it to function like this because someone can click quickly through modes and unintentionally lockout the light. Granted though, I made the multi click operations pretty quick, so it's harder to get it occur unintentionally, but it can happen.

Ok, another bug

fyi: Don't have a Q8 with me, but I'm using a Manker U11 modded with NarsilM v1.0, so exactly the same as the Q8, or should be?

Thanks for acknowledge Lazy-R-us.

But I wrote in the cheat sheet for MODES you can only lock out if the lamp is off, with 2 clicks and a click&hold.

I noted that a year ago, so maybe Tom changed it.
Tom answered above

Hey, you put a lot of work into that sheet, and it has helped me figure out how to use this great light. But, apparently, I need to print it even BIGGER, because I neglected to read that the left two tables differ based on “from on” or “from off” and have left/right sections for ramping or modes.

I’ll go edit my post above.

I am sorry for the small size!

Your printer should have a poster mode. Print it in double size and glue it together.

Another way to use:

- put the PDF on your smartphone. There you can zoom in.

  • view the PDF on your computer screen.

Yes the left part has the clicks for

- Lamp is OFF for RAMPING

- Lamp is ON for RAMPING

- Lamp is OFF for MODES

  • Lamp is ON for MODES
    Each row has the same klicks, it is sorted by clicks, not by actions: You see there is double click for RAMPING, but not for MODES. And if you want battery check when you are in MODES you can see you reach it only if the lamp is off.

Let me start by saying thanks so much to you all for helping me.
.

Thank you, I will be sure to incorporate these points.

Yes, that is definitely part of the problem I had. Didn’t realize that.

YES! That definitely looks like what I am seeing. Will you be making a ref sheet with this outlined in it? I want to direct people to the sheets you an JoeChina have made right form the start.

Think we should be doing the docs - dunno how far off we are, or how finalized all this is. Waiting on replies from our contact.

awesome, thanks

OK, my switch LEDs are off.

What I did:

  1. Was in MODES and got “temporarily locater LED OFF” with 1x + click&hold
  2. Switch to RAMPING
  3. Switch LED still off

From a strict logik it’s ok this way.
As a user it would be nice if the SW LED start working.
But its also garbage user input.

I don’t know, if people fumble to much they should reset!?

Sometimes I think the complications and issues associated with the indicator light in the side switch are just not worth it. I’m mainly referring to mass production lights like the Q8.

Would it be a step backwards or an improvement to just have the side switch light stay on whenever the batteries are connected?

I’ve got two narsil lights that I’ve wired up so the switch always stays lit and it’s been super simple. No funny blinks, you always know when power is applied or if the light is locked.

Since Narsil can be quite complex, why make it even more complex with indicator functionality?

Well it's open source. It's easy to add a simple compile switch to just turn it on upon power up and stay on. I could also add this to the switch configuration settings UI. You lose some functionality of course - channel use indicator blinks, LVP blinks, etc.

To Tom or any eaqually intelligent individual:
What has been the go to way if limiting max output?

I am using the otr m3 setup and have tweaked some settings in narsilm.c but the only thing I need to do now is limit output some how. I guess I could adjust the pwm values in the mode sets but it would be hard to scale them down to keep the modes balanced. Also, That wouldn’t work for ramping.

I read somewhere along the line that mode groups and ramping can be scaled back while at the same time leaving the double click to turbo at full 255 value. This would be my preferred way of setting up this light if possible.

So, I’m sure it’s been covered but if someone can refresh me or get me started or point me to a previous discussion I will be grateful! :slight_smile:

Also, I have anew feature request.
It would be nice if the user could select between volts/tenths battcheck and 1-10 batt level via the setups file.

Just a thought. Would be nice for me, but I may be alone. Idk?

Thanks for your work Tom!

Oh yes. I also can’t find where to define the type of 7135 used. I see it referenced to in the code but can’t find where the value is set. Maybe it is a sub setting of a larger setting group defined?

Anyone have any ideas how to throttle these drivers?

Eh… no one? I guess I’ll start trying to scale the ramping tables by guessing at perceived percentages. Might take a while but I guess it should work. Atleast I’m racking up post count by conversing with myself. :stuck_out_tongue:

Ohh - sorry. Well. Have you though bout added resistance? Use 26/28 AWG long LED wires for example?

Sure you can rebuild the ramping table easy enough by running the Python script, tweaked to your needs, and redefine all the mode sets. In the source code I include the full python script options I used to build the tables (several). It's TK's pythons script: level_calc.py, in her repository.

// For FET+1: FET and one 350 mA 7135 (tested/verified to be smooth):
// level_calc.py 2 150 7135 3 0.3 150 FET 1 1 1500
PROGMEM const byte ramp_7135[] = {
3,3,3,4,4,4,5,5, 6,6,7,8,9,10,11,12,
13,14,15,17,18,20,22,24, 26,28,30,33,35,38,41,44,
47,51,54,58,62,66,70,74, 79,83,88,93,99,104,110,116,
122,128,135,142,149,156,164,172, 180,188,196,205,214,223,233,243, // 49-64
253,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,
255,255,255,255,255,0 // 145-150
};

PROGMEM const byte ramp_FET[] = {
0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, // 49-64
0,2,3,4,5,7,8,9, 11,12,14,15,17,18,20,22,
23,25,27,29,30,32,34,36, 38,40,42,44,47,49,51,53,
56,58,60,63,66,68,71,73, 76,79,82,85,87,90,93,96, // 97-112
100,103,106,109,113,116,119,123, 126,130,134,137,141,145,149,153, // 113-128
157,161,165,169,173,178,182,186, 191,196,200,205,210,214,219,224, // 129-144
229,234,239,244,250,255 // 145-150
};

btw, DEL uses his own equation, think it's cube root, forgot. Think he gave me the Excel spreadsheet he used to implement it. Works well - the GT buck driver/NarsilM is using it.

TK's though supports multiple channels, don't think DEL's does because it didn't have to, not sure of this though...