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

Hey Tom I just realized I never checked back in after this bit of advice. Just wanted to say that changing R1/R2 to these values (or very close, my set didn’t have exact matches) seems to have fixed mine right up. Works great now. Thanks again for all your help.

Cool! Glad to hear!!

Okay, so when in mode sets you loose instant turbo (2x), batt check (3x), lock out (4x) and all strobes/beacons etc…(2×2)?

That is a big loss, I didn’t know that.

And you say it’s normal for mode set memory to be glitchy as well? Momma mia! Lol

Do you have any idea why in mode 8 I only have 2 of the 3 levels or why I have to press the side button several times just to get the light to turn on?

No, did you read the manual? Tells you how to access all that stuff in mode set operation - I ain't repeating it here

Ohh - the mode set #8 problem... I can't see any problem there, least in the code. I'll test it on a Q8 proto I have here w/NarsilM later, though it's not the same options you have, Q8 is 1S, not 2S. I don't have a NarsilM v1.0 2S light with me at work.

For the issue of several clicks to turn the light on, I dunno. I have to re-read your description.

Are you certain it's NarsilM v1.0 you are running, that Lexel setup for you? I'm confused about all this...

Edit: Ooops!!

Ok, I see the problem with mode set #8: a 3 channel configuration uses a different set of modes. Only 8 sets of modes are defined, not 12, and mode set #8 should be 2 modes only:

  1. max of all 7135's (single and bank channels)
  2. Max FET

So what you are seeing is correct for what it's defined as. I never got around to filling up all compatible 12 sets of modes for triple channel configurations. I'll need to document it this way some where. I'll update the OP for now to mention it.

Also, to explain the modes:

  • mode percentages are roughly based on 1,500 lumens being 100%, typical XM-L2 type of LED, near full battery, moderate resistance reductions
  • The single 7135 is assumed to be 150 lumens which is 10%
  • if I rated a mode at like 40%, I was assuming 30% of the FET is used, and the 7135 at max (30% + 10% is 40%)
  • 2S setups are roughly double that. For example on my MT03 running 2S and triple XHP70.2's, one 7135 at max is about 320 lumens. A single XHP70 should be roughly 300 lumens.
  • of course the modes will work with any LED compatible to the driver, so an XP-E2 for example might max out at 600 lumens on the full FET, while a 4X XP-L2 SRK is ~6,000 lumens max, so the percentages kind of lose their meaning. This is the problem of rating output percentages based on 1 or 2 channels that are fixed in amps, and another channel that is basically wide open, where output depends on LED's, batteries, driver, and resistance in the full circuit.

Manual? I don’t need no stinkin manual. Lol jk

Okay, so I see that in mode sets you can still access batt check and lock out, but the procedure is different. (I can’t get strobes, but I may have strobes turned off)

Wow, it’s like 2 completely different firmwares loaded onto the same chip.

How are things looking for the Q8? Are the mode sets working well and spaced evenly? They are not spaced evenly on my 7k+ lumen light. That’s okay though. I plan to make a user video then go back to ramping mode. I like it a lot more.

OK, all good. Actually just played around in the 4 modes set (plus moon), 5 total, and with mode memory turned on and it seemed to be working pretty good, consistent functionality.

The Q8 was locked down to NarsilM v1.0 a while back. Now I can't recall, but I did bring it up that the mode sets could be tailored/tweaked in both settings and documentation to match up with a 5,000 lumens light, as the Q8 is, roughly. I don't think that ever happened though, so unfortunately it is what it is now. Triple channel mode sets are different from 2 channel mode sets, at least in the firmware, so I'm not sure how it would compare with your set up.

One nice feature added in to NarsilM was a "Reset to factory defaults" ability, so if you think the settings are all messed up, you can return back to a known good configuration: get to displaying the revision # of the firmware (in ramping, 3X click to battery status, 2X click to temperature reading, 2X click to firmware version), then press& hold til the light blinks -- this comes in handy

Please go to http://bit.ly/narsil-cs
load the newest PDF. In the first rightmost leftmost Table you see clearly the different klick comands from RAMPING and MODES. ONLY ON and OFF is the same.

What are you showing me here? These look like the the copies I already have. Did you misread that I was only joking about not having a manual? I have manuals for NarsilM and V1.1 which I think covers V1.2. I couldn’t find one that said V1.2.

Time is always a bottleneck, but it sounds like you’ve been particularly overloaded lately. How have you been doing? Is there anything you’d like help with? I’ve been trying to get in touch, but I don’t want to take away time you don’t have.

Wait, is the Q8 a 2 channel driver? I was thinking it was 3 channel for some reason.

EDIT: I scanned post 1 on the Q8 thread, but didn’t see it mentioned. Looking at the driver board I only see one 7135. I guess that means it’s 2 channel.

Yes, the Q8 uses two channels. They came last year with a way to free a pin for a third channel.

Even the Emisar D4 is a dual channel.

The FW3A will be a tripple

JasonWW
Yes I missed you were joking.
If you need the cheat sheet for Narsil v1.2 please PM me your email address.

Dang, yes, saw your pm, but didn't get a chance to read thru it. Still have over 45 unread pm's.

We do need to collaborate. Man, if you got the time, it would be great. Thanks for bailing me out on the D4, btw - I got overwhelmed, reached a point were I couldn't get anything done because I had so much to do, and other issues, limiting my workshop access. I guess I had to turn off BLF for a while to keep my sanity, I dunno, but also my regular consulting work, single client, has gone ballistic with pressure on projects over the last couple of months and will continue for a while.

I also know you had some really good suggestions for Narsil, think maybe early in this thread.

The Q8 is pretty much a done deal at this point - ThorFire is making 2,000 pieces, so it's the full batch, all with NarsilM v1.0, but trying to write up an advanced guide now, plus on-going support issues.

At this point, I forget or dunno where we are with the GT, it may be locked down now, not sure, Lumintop isn't communicating much so we don't know exactly where they are, but they are in a rush apparently. I thought one more single updated GT proto would be sent out, but not sure. We are at least asking for pics and clarifications over the battery carriers. Might be able to sneak in an update to NarsilM, but dunno.

The GT buck driver is kind of a whole new world - true regulating buck, no PWM output on the LED, but using PWM's to control amps, and can do it quickly and smoothly, so full smooth ramping works well -- it's bout as ideal as you can get. Our main problem is the voltage supplied by the cells is not higher enough than the draw of the LED, so, it will fall out of regulation if driven at high amps. At 2 amps, it can run long in regulation, but at 2.5A, it's getting dependent on voltage drops from the springs, circuit, carriers, etc. The XHP35's Vf is way high -- it's not based on the new generation LED's that have a lower Vf, but rather uses high Vf XP-E2's. DEL did a fantastic job though updating Narsil in implement the ramping and mode sets, and other changes for supporting the two PWM outputs. All I did was merge it into the NarsilM header structures so we, again, have one code base supporting 1, 2, and 3 channel 7135/FET outputs, as well as the GT buck driver as a "special" 2 channel option.

So, in the BETA NarsilM, I added support for a max ramping level, separate from the max output. so we have the GT configured for 2 amps max in ramping, and ~2.5A turbo (2X click), and 6 mode sets set for 2.0 amps max, and 6 mode sets set for 2.5 amps max.

Oh boy, sorry we didn't make that clear. Not sure how this all originated, but think the Q8 project was started just before, or about the time the triple channels started catching on. At the time, I probably didn't have the support for 3 channels and a switch LED, but now I do, least for a 1S battery configuration.

The good thing about all this is that DEL really engineered a much improved design to support the ATtiny 25/45/85's, which TA and HQ incorporated into their driver designs, so something really useful came out of this effort, mainly for the Q8, early on. Though TF dragged their feet along the way, we always though we were just couple weeks away, and didn't think an upgrade of the driver was possible without delaying the project. Little did we even think it was possible it would be 18 months in the making...

Thanks for directing me back up the page a bit Tom. I skimmed past Lexels post and didn't even notice that my problem had already been solved. I had already set the out_channel 2 and reassigned the pins. When I flashed that hex the driver would only work on the 7135 channel and not the fet. I did what you suggested to Lexel with the main() and reflashed that hex. It's now working great. Problem solved!

It's hard to believe it was that simple after all the head scratching I did last night trying to make it work. I've reflashed this one probably 10 times all with no luck. Till now.

Thanks for all your efforts Tom and while your all swamped with things to do and feeling like it's to much to handle just remember your one of the key components of what makes this forum great!

Oh wow, that's really good news, and thanks for the appreciation!

Tom, on the Q8 set to mode sets, do you still recommend memory be not used or does it work reliably?

Is this the proper place for making feature requests? If so, I’ve got one:

I spent some time poking around the codebase and found something that I didn’t know was there, something I’ve been looking for. In the setups.h file, if you comment out the STARTUP_LIGHT_OFF and STARTUP_2BLINKS variables and build it, the driver will come on max output at power up. That’s a much better operational style for two-switch lights, like the L6. Hit the tail switch and actually get light out! Love it!

Here’s what I want — when I hit that mechanical switch I want it to come on in turbo (like it already does), but if I’m holding down the e-switch I want it to come on in moonlight. (Yes I stole that idea from EagleTac). Looking at the code I thought that would be easy. I tried adding a simple if(isPressed()) check to the STARTUP_LIGHT_OFF codeblock just inside the main method, but that didn’t work for some reason. I also tried adding that check several other places, like after the watchdog timer is started. No work. The only place I actually got it to work is inside the main while loop, but right there of course it basically overrides everything and then I just have a two-mode light - not what I’m after.

I’ll spend some more time poking around, maybe I’m missing something obvious, but just in case some of you smarter people have time and want to tackle it, I’m putting it out here. Thanks all! :slight_smile:

I do know that NarsilM can be programmed to go to Turbo, do 2 blinks, go to moon or do nothing when first powered on.

I think your trying to get it to switch between 2 of those options at power on.

Hmmm, interesting idea.

Right now my work around, for my L6 with turbo at power on, is to just cover the head like with my hand or leg then power on and hit side switch. Now I can turn back on in moon if I want.

Your wanting to improve on that?

Yes. I want it to come on in turbo like normal if all I do is close the mechanical tail clicky, but I want it to come on in moonlight if the e-switch is closed at power-up. Basically I just need the code that currently sets it to turbo at power-up (which I’ve already found, its not hard to see how that works…I think) to check the e-switch first and if that input is closed, do moonlight instead. It should be a simple if-else statement, but…that didn’t work for me. I’m missing (or misunderstanding) something.

Its not a new idea so I get no credit. EagleTac’s “tactical” dual-switch lights work like this, like my DX30LC2. Its a good feature.