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

It was a challenge for sure. Sanding down the driver PCB was the most time consuming part. It is amazing though - same basic driver/design in a 37K lumens 16X XHP50 light, and the tiny OTR M3. I carry the M3 in the little pocket inside the regular jeans right hand pocket - no scratches, feels fine, no accidental ON's, don't have to lock it out.

All the pics here on the M3: http://s1054.photobucket.com/user/TomE2012/library/Custom%20Mods/OnTheRoad%20M3

All the pics here on the 16X S88 clone, 37K lumens monster: http://s1054.photobucket.com/user/TomE2012/library/Custom%20Mods/16X%20S88%20clone

Hmm? I haven’t noticed any problems with the indicator led either. But maybe I don’t know how it is actually supposed to work and therefor I’m thinking its working. What can I test to see if mine acts as yours or if it is really working?

I have high hopes for this one. I have it on the way. It’s hard to believe it has all the features for the price! And I’m thinking the space inside the head is going to limit the use of custom driver? Just think, add USB charger to that board Tom made :person_facepalming:

My M3 definitely works, been checking it. If all those things don't work, what does work? Does anything work with the Ind. LED?

I'm thinking maybe you got the default config settings set to disable the Ind. LED function, maybe?

These settings should be as follows:

define DEF_LOCATOR_LED 1 // Locator LED feature (ON when light is OFF) - 1=enabled, 0=disabled
#define DEF_BVLD_LED_ONLY 0 // BVLD (Battery Voltage Level Display) - 1=BVLD shown only w/onboard LED, 0=both primary and onboard LED's
#define DEF_ONBOARD_LED 1 // On Board LED support - 1=enabled, 0=disabled

I have not disabled the indicator LED in setup, I even activated it in the UI settings again

I have downloaded the narsil files from your google drive again

put in the OTR M3 setup

build a hex file and flashed it

the LED blinks when I push the button sometimes,
but it does not blink out voltage ot is active when the light is off

Ok. Mine works with battery voltage so pretty sure mine is working too. I’m using narsilM though…

The first I tryed the indicator did not work but then I read through setup, .c and all the included files to make sure the settings were right. However I do not recall what setting I changed in fact I don’t think I even knew what I did different. Sorry this doesn’t help you much though…

Can you upload your NarsilM folder somewhere?

Are you using r1&2? What pin is the indicator connected too?

I am not using R1 and R2 and its connected to Pin 7

I downloaded NarsilM here

I have uploaded the zip here, containing the original NarsilM files with the OTR M3 setup.h and build hex file

http://www.metronixlaser.de/bilder/flashlight/NarsilMulti.zip (link is external)

The only different file from what I’m using is the m3 setup file. I’m just using the main built in setup file. I didn’t know there was an m3setup file. Sorry, I am unable to flash your .hex file right now. That might be helpful. Idk? If your still having trouble I might be able to do that tomorrow. I’ll keep watching. Hope you get it working. Working through these details can be frustrating !

I found the error, the switch wires were soldered the wrong way :person_facepalming:

Don't sweat it - no problem.

Amazing work as usual Tom. That 18 led light with all the wires is incredible. Thanks for all the pictures. :+1:

I did mod the Klarus G35 with the dead driver today with NarsilM driver

further testing showed that the indicator LED as locator does not shut down with low voltage when the battery gets depleeted from it
it draws not too much on my setup with green LED and 4.7kOhms about 85uA at 2.7V

so there is a parasitic drain that can kill unprotected cells if the light gets stored over a longer period of time with the locator on with almost depleeted batteries

BUT
when the light shuts down from LVP it starts to blink for low voltage warning when the light is in standby, but it does not shut down
even worse the blinking means the MCU is not in deep sleep and it draws more current
then it draws 3mA from the battery which can be within a few days lead to a overdischarged battery, as the battery is almost depleeted

By design, when the light is shut down in a low voltage state, it does the blink to indicate low voltage, as you say, but does it only for 6 minutes, then shuts down the MCU. So after 6 minutes, it should go into a "deep sleep" (power savings) mode. After the 6 minutes is up, it should turn off the Indicator LED before going into power savings mode.

So, did you wait the 6 minutes to see that occurs or not?

I'm pretty sure I tested this in the older Narsil version, but not in NarsilM, nothing was changed in this area.

However if your cells are pretty low but not in a low voltage state, and you leave the light with the main LED off and Indicator LED on for several months, or maybe weeks, depending, then yes - there is no smarts in the MCU running to determine low voltage, therefore it cannot shut the LED off, so it will over drain the cell(s). This parasitic drain is pretty low though, depending on what LED and LED resistor value you use. I've left several flashlights in this state with the Indicator LED on for months without noticing much battery voltage drop.

Here's the code:

         //---------------------------------------------------------------------
         // Be sure switch is not pressed and light is OFF for at least 5 secs
         //---------------------------------------------------------------------
         word wWaitTicks = 310;  // 5 secs
         if (LowBattState)
            wWaitTicks = 22500;  // 6 minutes
     if (((!ramping && (modeIdx == 0)) || (ramping && outLevel == 0))
                        &&
         !IsPressed() && (wIdleTicks > wWaitTicks))
     {

#ifdef ONBOARD_LED
// If the battery is currently low, then turn OFF the indicator LED before going to sleep
// to help in saving the battery
#ifdef VOLT_MON_R1R2
if (byVoltage < ADC_LOW)
#else
if (byVoltage < BATT_LOW)
#endif
if (locatorLed)
TurnOnBoardLed(0);
#endif

        _delay_ms(1); // Need this here, maybe instructions for PWM output not getting executed before shutdown?

        SleepUntilSwitchPress();   // Go to sleep
     }</code></pre>

OK I didnt wait more than a minute in my Test
If it shuts down after 6 minutes thats OK

As I wrote with a medium resistor and 0603 LED the parasitic drain gets really low when the battery is almost depleeted which takes months to be a problem

I assembled a L6.

TA LDO 30mm PCB
NarsilM V1.0
XHP70.2

I Can not turnoff by E-Switch,like below link veido.

How to check?

It happens sometimes that a AMC7135 does not shut down completely

they are drivern over their voltage specs and their quality varies from different supplies

Solution is to unsolder them and find the damaged one

I reassembled a new driver.

The situation is the same.? :cry:

Remove the single AMC7135
then opposite of the FET

One thing for sure if you remove all 7135s its most likely gone