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

Wonder if it's case sensitive - code checks for "FET"...

Yours looks quite strange - it generated values over 255, weird. I've done a lot of them, experimenting, etc. This is one example below. I always use .BAT files so i can capture the exact command line options:

rem for FET+1, 124 levels 4X LED's
level_calc.py 2 124 7135 3 0.3 160 FET 1 10 5000

PWM1 values: 3,3,4,4,5,6,8,9,11,13,15,18,21,25,28,33,37,43,48,55,61,69,77,85,94,
104,115,126,138,151,164,178,193,209,226,243,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,255,255,255,0
PWM2 values: 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,1,1,2,3,3,4,5,6,7,8,9,10,11,12,13,14,15,17,18,19,21,22,23,25,27,28,30,31,33
,35,37,39,41,43,45,47,49,52,54,56,59,61,64,66,69,72,75,78,80,83,87,90,93,96,100,
103,107,110,114,117,121,125,129,133,137,141,146,150,154,159,164,168,173,178,183,
188,193,198,203,209,214,220,225,231,237,243,249,255

What exactly do you want to generate? Maybe I can help? Is it for a Q8? What's the estimate on max lumens, if it's modded?

Yep - just proved it -- it's case sensitive - must specify FET in all caps. I got the same results as you when using "fet".

It’s probably worth mentioning that python 2 and python 3 are different languages, not simply a version bump. Python2 scripts require python 2 to run correctly, and Python3 scripts require python 3 to run correctly.

However, scripts can often be written to support both 2.7 and 3.X… and I just pushed up a new trunk revision which does so. It also checks to make sure each channel is a recognized type, to avoid the huge values it was generating.

Ok. Thank you both. Tom, I’ll give the new file a try. I did not know 2&3 were different!

I’m using it to generate a throttled back ramp with double click to full power for the m3 clone. Anyway, I’ll report back. Thank much

You mean the $13 On The Road M3 clone. Tom E put Narsil on his genuine M3. We were talking about a future blf project using the the M3 clone with Narsil.

ToyKeeper has Anduril which might already do what you want. I don’t know much about it, though.

I've been using Python 3.6, but not sure if I had to change anything to get it to compile - I don't think so but not sure. It was an easy dnld - don't recall from where. It's got an "Idle" dev environment tool with it.

That OTR M3 is an awesome light to put Narsil on. I’m hoping that someday we can make a BLF clone of the Olight S-Mini with one of our custom drivers. It’s like the OTR M3 but even smaller, and getting it to run a BLF driver with fancy e-switch firmware would make it one of the best EDC lights ever made.

Yea, the Olight Mini was the light I really wanted to mod to install it on - I got one or two and was able to open it, but can't recall the challenges. Now we have a few guys capable of laying out an OSHPark board, so we have more resources. Of course if we want to go with a custom big run, we would have more options.

The switch mounts usually is what messes up space and real estate, but there's been some real creative modding posted here, and I've learned a lot more possibilities to handle the switch since 1-2 years ago.

Definitely possible.

Yes it’s the clone. If I can finally get the code figured out it will be a three channels with 3 7135s on channel 2 and fet on channel three. The mode sets and max ramp will hopefully be throttled back to about 2.5-3amps while preserving direct drive for the double click to high option. I think max ramp/modes is separate from max double click. Atleast I’m hoping it is:)

It’s been hard to choose what direction to go hardware wise but I think I have all the geometry figured out now. Actuall won’t be that bad but will require some intricate wiring.

Ohh - you want ramping throttled but 2X click still max FET? That's exactly what we are doing in the GT, so the new NarsilM supports it -- hhmm, not yet posted I think.

Just a heads up, the M3 has been updated with built in charging and is called the U16. The head is a little bigger, I assume because of the usb input, then again, the $13 clone (JAXMNVE M3) was able to fit a USB port in the old size body. Maybe this new model host body has more internal room for a good switch?


.

Yes, exactly. If max level is defined separately somewhere it should be doable but if max ramp and max double click are the same define then it’s going to be over my head for sure:)

When this version first came out I really wanted to like it cause I am all about built in charging these days but it always seemed awkward got me. Idk? It should handle heat a little better with the bigger head and defined cooling fins. It may throw a bit better as well.

This m3 with charging is the stuf thiugh. And a custom pcb that works with the stick switch board is very possible. Makes me want to draw one up but I need to stay focused. I can only relearn one skill per month and a basic python script is taking up all the space. :smiley:

I hadn’t read one word of the gt thread til today as I haven’t been interested. So I just followed enough of your posts to catch on the the tweeted Narsil. That nearly exactly what I am looking for. There are some other things in there but the operation of a throttled ramp with db click to max is right on.

So is there now a way to do this without much trouble? Maybe there is a section of the firmware that I can just copy over to my file or is it more complicated than that?

Well, it's an upgraded version - lots of changes in header file organization, etc.

Bout the U16, I got one recently tore it down, I'll post pics in a min. Here they are:

The problem is very tight vertical space - the vertical board i the pill full height, and of course that big switch. I think we'd have to replace the stock driver and I think a lower profile switch could be used, and a vertical board mounted on the edge near the rubber boot. Maybe then a decent pair of boards could be made up on OSHPark. Maybe we could create a custom horiz. OSHPark board that would work with the stock vertical one, not sure.

Cool pics, thanks. I’ll get my U16 in a couple days still.

I also found out this “new” body style is based on the older JETBeam EC-R16. So not completely new.

Narsil would be sweet in one of these even without the charging.

Looks like i was able to make all the right changes to level_calc.py to get it to run on vers 3. The problem was the case sensitivity as tom pointed out.

In order to generate a ramp table with throttled max i will need to modify Level_calc.py to ask for channel max pwm input frpm the user on each channel. as is, it assumes a value of 255. If i am able to change the pwm max of the fet i think it will generate a ramp with user definable pwm ceiling.

TK, could you direct me if this is a simple/doable change?

I'd look at the line of code: chan.pwm_max = 255

A simple search in the source code for 255. She had a prompt for this value, but commented it out, so at one time at least it was considered.

When I use the NarsilM V1.0 3C1S for Manker U11 quad LED.
Forget to set the temperature control first.
Burned one LED. and then below 350mA can not light.
Small flashlight, poor heat dissipation, perhaps need to limit the current?