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

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.

I've played around with it the other day in 2 channel Q8 configuration, and could not find or notice any issues whatsoever.

So, I don't know what problem or issue you are referring to exactly, but apparently you are using a triple channel configuration, not 2 channel.

This is pretty easy to do. I'll work on it in v1.1 which is still "in progress". Haven't had much time to work on it as of late. I've added it to the current OpenIssues.txt file, shown here:

Open Issues
-----------
- re-work triple channel ramping tables: add more to the FET range, check/test for different
# of 7135's in the bank (5/27: not sure this is necessary now with new 3 chan ramping table)
- (from JasonWWW) triple channel mode sets are not completely defined, and are different than 2
chans - need to, at a minimum, document it this way
- (from JasonWWW) possible problem with mode memory in 3 chan config - must check it out

Possible New Features
---------------------
- besides supporting turbo/max on power up, add support if powered up with the button pressed,
come up in moon (lowest) mode
- joechina recommended to do a quick ramp to max, maybe even quick fade to OFF to ease tension to
the eyes. The Olight A1R does this.
- enhancing tailswitch support: full mode sets w/memory (Lexel)
- add ability to have timed and temp step down simultaneously (Lexel)
- research "bump protection" - tolerate a short loss of power
- build in a method to show the current config settings
- more blinky modes, like lightning, campfire, etc.

Done Issues/Features

--------------------
- FIXED: Tom E: in mode sets, step down settings wasn't working correctly
- FIXED: 1 Lexel/BLF spotted: Blinkies unable to turn off in ramping
- FIXED: delay processing of fast click operations to avoid max/turbo flash and allow more fast
click options (over 4 doesn't work)
- DONE: add in buck driver support cleanly (BLF GT)
- DONE: add momentary/tactical mode

Awesome, thank you!

From the Q8 thread

My two cents:

In battery check:
You write about percent discharge. I guess more people (including me) find it easier to remember if it would be remaining capacity in the table.

Also nice would be a guess how long the Q8 if it runs on 3.25V.

I also don’t know if it runs 10 min or 1 hour if it steps down.

Maybe a runtime graph could be added when a production version hit our shelves?

What exactly is bad with the sailboat 7135? I just got some of them from Intl-outdoors and was thinking of stacking them on a convoy driver.

So, we got the normal 3 channel TA board working as a 2 channel FET+1 with 1 cell.

Now, what would need to be done to get the TA 20-30mm LDO board to work as a 1 channel FET only 2s+ cells?

I have the 30mm TA LDO built. I'm using the MIC5235-5.0YM5 LDO with R1 of 360k and R2 at 47k, C1 and C2 at 10uf, R3 100k, R4 47 ohm, R5 4.7 ohm, R6 0 ohm jumper, R7 0 ohm jumper, D1 nothing ? , SIR800 FET, and Attiny85V 10SU.

Is the D1 Schottky required with the LDO 2s?

I reassigned the pins in the RegisterSettings.h, made the change in the main() to enable PWM on pin 3, used the Setups-1Chan.h, un commented #define USING_360K, commented out the #define D1_DIODE 2. Fuses are lfuse 0xE2, hfuse 0xDE, efuse 0xff.

When I connect power to the driver, 2s connected to an MTG2, the led erratically flickers for several seconds until it finally blinks 2wice and stops for awhile. It'll ramp up and down, do turbo, bat check, strobes and then all of a sudden it's doing its own thing. It'll ramp to max on its own and I'm unable to shut it off or anything else with the e switch. Sometimes it works but most of the time it's Psycho!

I've swapped the caps, MCU and the FET. I've tried a few different things with the firmware but it's always the same

I'm sure there's something super simple I'm missing. Please help...

Nothing wrong with the sailboat for 4.2v 1 cell drivers. They work.

It's when you use 8.4v 2+ cells in series that they'll fry.