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

513 posts / 0 new
Last post
JasonWW
JasonWW's picture
Offline
Last seen: 53 min 33 sec ago
Joined: 10/22/2016 - 11:41
Posts: 12892
Location: Houston Texas

LightRider wrote:
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.

Texas Ace Lumen Tube and JoshK Sphere calibrated with Maukka lights

Click this to go to signature links. I'm still around, just not reading many new threads.

Tom E
Tom E's picture
Offline
Last seen: 1 hour 28 min ago
Joined: 08/19/2012 - 08:23
Posts: 15011
Location: LI NY

LightRider wrote:
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

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.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 17 hours 57 min ago
Joined: 01/12/2013 - 14:40
Posts: 10811
Location: (469219) 2016 HO3

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.

Tom E
Tom E's picture
Offline
Last seen: 1 hour 28 min ago
Joined: 08/19/2012 - 08:23
Posts: 15011
Location: LI NY

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.

 

CRX
CRX's picture
Offline
Last seen: 7 months 2 weeks ago
Joined: 04/02/2013 - 15:27
Posts: 4231
Location: Scotland

Definitely possible.

LightRider
LightRider's picture
Offline
Last seen: 3 years 7 months ago
Joined: 08/05/2015 - 09:52
Posts: 2007
Location: U.P. MI, USA

JasonWW wrote:
LightRider wrote:
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 plus charging 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.

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.
Tom E
Tom E's picture
Offline
Last seen: 1 hour 28 min ago
Joined: 08/19/2012 - 08:23
Posts: 15011
Location: LI NY

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.

JasonWW
JasonWW's picture
Offline
Last seen: 53 min 33 sec ago
Joined: 10/22/2016 - 11:41
Posts: 12892
Location: Houston Texas

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?


.

Texas Ace Lumen Tube and JoshK Sphere calibrated with Maukka lights

Click this to go to signature links. I'm still around, just not reading many new threads.

LightRider
LightRider's picture
Offline
Last seen: 3 years 7 months ago
Joined: 08/05/2015 - 09:52
Posts: 2007
Location: U.P. MI, USA
Tom E wrote:

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.

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:)

LightRider
LightRider's picture
Offline
Last seen: 3 years 7 months ago
Joined: 08/05/2015 - 09:52
Posts: 2007
Location: U.P. MI, USA

JasonWW wrote:
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?

!{width:95%}http://i.imgur.com/1JoZzyB.jpg?fb!

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. Big Smile

LightRider
LightRider's picture
Offline
Last seen: 3 years 7 months ago
Joined: 08/05/2015 - 09:52
Posts: 2007
Location: U.P. MI, USA
Tom E wrote:

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.

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?

Tom E
Tom E's picture
Offline
Last seen: 1 hour 28 min ago
Joined: 08/19/2012 - 08:23
Posts: 15011
Location: LI NY

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.

JasonWW
JasonWW's picture
Offline
Last seen: 53 min 33 sec ago
Joined: 10/22/2016 - 11:41
Posts: 12892
Location: Houston Texas

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.

Texas Ace Lumen Tube and JoshK Sphere calibrated with Maukka lights

Click this to go to signature links. I'm still around, just not reading many new threads.

LightRider
LightRider's picture
Offline
Last seen: 3 years 7 months ago
Joined: 08/05/2015 - 09:52
Posts: 2007
Location: U.P. MI, USA

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?

Tom E
Tom E's picture
Offline
Last seen: 1 hour 28 min ago
Joined: 08/19/2012 - 08:23
Posts: 15011
Location: LI NY

LightRider wrote:
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.

steel_1024
steel_1024's picture
Offline
Last seen: 4 months 5 days ago
Joined: 10/17/2016 - 14:06
Posts: 488
Location: Taiwan

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?

Sorry for my poor english.

LightRider
LightRider's picture
Offline
Last seen: 3 years 7 months ago
Joined: 08/05/2015 - 09:52
Posts: 2007
Location: U.P. MI, USA
Tom E wrote:

LightRider wrote:
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.

ok so i readded the comment to ask for max and then commented out the line that defines it as 255. this generated a table that i think will work. i just needed to change the last 7135 value from 0 to 255. Ill have to test it of course but cant see why it wouldnt work

LightRider
LightRider's picture
Offline
Last seen: 3 years 7 months ago
Joined: 08/05/2015 - 09:52
Posts: 2007
Location: U.P. MI, USA

steel_1024 wrote:
When I use the NarslM 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?

!https://farm5.staticflickr.com/4489/23821775868_04ed9ac43f_z.jpg!


Looks nice! too bad you have to rip into it. Ya, i would think you would need to set the thermal reg pretty aggressive with that set up. I have a u11 kit ready to go. only problem is i dont have a u11 to put it in. Smile
Tom E
Tom E's picture
Offline
Last seen: 1 hour 28 min ago
Joined: 08/19/2012 - 08:23
Posts: 15011
Location: LI NY

steel_1024 wrote:
When I use the NarslM 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? !https://farm5.staticflickr.com/4489/23821775868_04ed9ac43f_z.jpg! 

It should be very difficult to burn up a typical LED when mounted on a copper MCPCB. If they were low Vf LED's like XP-G3 or 219C's, then the risk is higher, but you have other things that can be done easy - use thinner LED wires, don't bypass the spring, use a lower performing cell, etc.

I used thermal grease on the contact points where that pill comes into contact with the housing - think it helps. But quads in a U11? Oh boy, not really made for that kind of heat - that pill design is pretty poor. I got a single XP-L2 NW in mine and love it though - it's my favorite 18650 EDC light.

Sounds like the 7135 is fried maybe...

LightRider
LightRider's picture
Offline
Last seen: 3 years 7 months ago
Joined: 08/05/2015 - 09:52
Posts: 2007
Location: U.P. MI, USA

Well i posted too soon. it works with 2 channels, but not 3.

Tom E
Tom E's picture
Offline
Last seen: 1 hour 28 min ago
Joined: 08/19/2012 - 08:23
Posts: 15011
Location: LI NY

LightRider wrote:
Well i posted too soon. it works with 2 channels, but not 3.

Did you specify 3 channels in the header? Located the tables at the right place for 3 channels?

LightRider
LightRider's picture
Offline
Last seen: 3 years 7 months ago
Joined: 08/05/2015 - 09:52
Posts: 2007
Location: U.P. MI, USA
Tom E wrote:

LightRider wrote:
Well i posted too soon. it works with 2 channels, but not 3.

Did you specify 3 channels in the header? Located the tables at the right place for 3 channels?

You mean the first entry in the string or somewhere in the code?

LightRider
LightRider's picture
Offline
Last seen: 3 years 7 months ago
Joined: 08/05/2015 - 09:52
Posts: 2007
Location: U.P. MI, USA

Just to be clear the script works with three channels as is but the code I modified is only working with an entry if 2 channels.

Or, I say working but I don’t know if the generated ramp is smooth or not

Tom E
Tom E's picture
Offline
Last seen: 1 hour 28 min ago
Joined: 08/19/2012 - 08:23
Posts: 15011
Location: LI NY

You are using setups-31S.h, right? Then in RampingTables.h, it has to be under the banner:

//---------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------
#elif OUT_CHANNELS == 3    // Triple Channel
//---------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------

And under 3 channels, there are two separate tables, depending on what compile switch is set, TRIPLE_3_7135 or TRIPLE_8_7135.

So, you have to have everything set up properly in the "Setups" header file you are using.

I am probably assuming wayy too much knowledge to do all this setup and configurations, but what you are trying to do is pretty advanced customization, and I did build in a lot of provisions for customizing things withkeeping the main source code in tact.

 

Tom E
Tom E's picture
Offline
Last seen: 1 hour 28 min ago
Joined: 08/19/2012 - 08:23
Posts: 15011
Location: LI NY

Just finished all the bug fixes and couple features/enhancements for the next release. I need to get more testing in on it, but so far all the changes tested ok.

Of course it's not everything I wanted to get in, but running out of time at this point. Here's a brief list:

  • ADDED : (from MAD777, maybe others) if strobes are disabled, a 2X click from 2X turbo should restore the previous level you were at
  • FIXED: 4X clicks in modes operation engages lockout - not supposed to
  • ADDED: operation change: make click&hold in MODES or STROBES wrap from 1st mode to last
  • FIXED: in LVP switch LED control: the LED sometimes is left on after an LVP drop, and is not blinking the way it should be. The "bug" is that I'm trying to control the switch LEDs from multiple places so it's getting turned off quickly after turned on, and left on when it should be left off. It's a timing thing, so has sort of a random pattern - sometimes left on, sometimes left off. The 8 sec LVP blink need to be qualified better, and should not be calling Setlevel() as is because it wants to control the LED
  • FIXED: temp stepdown should not happen right away from turn ON. Delay it by 15 seconds
  • FIXED: for temperature stepdown, in moon mode, a temp stepdown is actually done because moon mode is marked as special level 255, which is considered as a high level of output instead of very low. The stepdown results in the light switching much brighter. This should only happen id the temperature threshold is set to a low temp, or the light is still hot and not cooled down when moon mode is chosen. It can also result in an immediate jump to the stepdown level as soon as the light is turned on in moon mode. Might appear as a bright flash when ramping first starts.

There's more previously implemented:

  • ADDED: momentary/tactical mode via 5X clicks - only active til a power reset   2X or 5X clicks exit tactical mode (full turbo only when switch is held down)
  • full BLF GT buck driver support
  • capability of setting max ramping to less than full max FET (Hi mode), while the 2X click still goes to full FET turbo. This is being used for the GT buck driver configuration.
  • added more compile switches, little better custom configuration of the source in header files

 

 

MRsDNF
MRsDNF's picture
Offline
Last seen: 3 months 3 weeks ago
Joined: 12/22/2011 - 21:18
Posts: 13473
Location: A light beam away from the missus in the land of Aus.

Nice work Tom. Thumbs Up

 

djozz quotes, "it came with chinese lettering that is chinese to me".

                      "My man mousehole needs one too"

old4570 said "I'm not an expert , so don't suffer from any such technical restrictions".

Old-Lumens. Highly admired and cherished member of Budget Light Forum. 11.5.2011 - 20.12.16. RIP.

 

JasonWW
JasonWW's picture
Offline
Last seen: 53 min 33 sec ago
Joined: 10/22/2016 - 11:41
Posts: 12892
Location: Houston Texas

Yeah, great job!

Texas Ace Lumen Tube and JoshK Sphere calibrated with Maukka lights

Click this to go to signature links. I'm still around, just not reading many new threads.

leroycp
Offline
Last seen: 7 months 1 week ago
Joined: 12/27/2015 - 19:24
Posts: 738
Location: Stewart TN

Excellent!

Tom E
Tom E's picture
Offline
Last seen: 1 hour 28 min ago
Joined: 08/19/2012 - 08:23
Posts: 15011
Location: LI NY

Wow, once you drill out the driver screw holes and put decent screws in there, extend the LED wires to 67-70 mm, the Q8 is one of, maybe the easiest light around to upgrade firmware with. I find it easier and quicker than even driver retaining rings.

The 2nd round production Q8's should be easier with the screws, but looks like they shortened the LED wires in some, maybe all, so I haven't tried one of those yet.

LightRider
LightRider's picture
Offline
Last seen: 3 years 7 months ago
Joined: 08/05/2015 - 09:52
Posts: 2007
Location: U.P. MI, USA

That’s a nice list of updates! Do you have it available yet? It would save me trying to finish trying to mod the code for ramping to less than full max. I’m close, but flashing testing, flashing testing to fully figure it out could take me a while yet. Smile

Pages