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

Forgetting memory sounds interesting, however I am happy if it will always start on a low / moonlight setting like all my other favorites do.

I wouldn’t mind if the 5min wold be 4.
Maybe this works:
You do a cyclic battery check e.g. every 4sec. You set a counter with it. So a value of 15 equals 1min.
At a value 75 = 5min the memoriesed value is overwritten.

sorry if it’s completely nonsense

I don't understand - you do want the timeout to be whether is light is ON or OFF? There is no battery check when the light is in a deep sleep - 5 seconds after its turned OFF it enters the deep sleep mode where only a button press wakes it up.

MRsDNF
I don’t think Narsil can moonlight from 25 to 50 lumen, that would be my default brightness.

I know Narsil starts in MOON with a click&hold. My point is, I have to think again with every lamp: What is the UI? What does a click&hold? How do I change brightness? Tap or hold?

It’s grabbing the light, one klick, enough light for within arm lenght. The next click is off.

It is about not thinking.

Like a tool, a screwdriver on the pegboard at the workbench, you grab it and use it.

My hunch is operation gets easier.

Joe

Yes, timeout in On and Off

I didn’t know it goes direct to deep sleep, so I am sorry for writing nonsense.

you can change the code for higher moonlight
in ramping its easy just edit the ramping table
for mode operation I dont know where to start to get MM at 50 lumens

BUT if you dont care for code you could simply add a capacitor on a tiny FET to the single AMC channel
it switches on when the driver gives a signal to the single AMC channel
then just wire a resistor for 50 lumens to the LED minus

How would this software react to having a tail cap on/off switch? Is there a suggested hardware that currently supports this firmware? Something in the 17 to 22mm size range?

Was planning on adding links. Lexel has been building/selling TA boards that run Narsil. I would use either TA or DEL boards. I'll add the links to at least the driver board threads to the OP now -- links added!

TA, DEL, and HQ board designs have the extra parts to properly support the ATtiny85, either the 85 full pad size or mounting via the bent pin method. The extra parts (from original Attiny13A designs) were developed by DEL. Standard sizes of 17, 20, and 22 mm are available in both TA's and DEL's designs.

About the tail switch, there's compile time support for one that works for mode changing but only in mode set operation, not ramping. Otherwise, a tail power switch would simply be power ON/OFF. In ramping if you power off the light, you lose the last used level.

In case it helps at all, this is exactly what the soft-start code in bistro was intended for. It intercepts all brightness changes and makes the transition smooth. Bistro doesn’t use it much though, since the button cuts power. It was more about making things easier later if anyone ever made an e-switch UI based on it.

So, there may be code which can be copy/pasted if this feature is desired.

I’ve also been meaning to sync NarsilM’s updates to my repository, but with my main PC still out of commission everything is a little awkward. I really miss having a decent keyboard, multiple screens, and enough RAM.

If you want ramping in a light which only has a tail on/off switch, there’s a separate project (Crescendo) for that. But if you want it in a dual-switch light (e-switch plus tail on/off), I’m not sure if there is currently a good option… probably a future version of Narsil.

Psst… MELD-x with colors disabled

Tom, does Narsil M, in a 2S configuration, do LVP and temp control at same time or do you still have to choose only one?

I think this version was supposed to let you switch between the 2 choices.

Thanks Tom .

:+1:

Yes - I'm using in a L6, TA L6 board, with the proper resistor values and tested it to be accurate with battery level readings, and you still have full choice of temperature or timed step down. Parasitic drain is only 62 uA - nice for an LDO 2S setup. I have support for both LVP monitoring methods:

  • internal 1.1V reference with no need for R1/R2 (1S only!)
  • external R1/R2 support (I now use it only for 2S setups, but it can still be configured for 1S if you prefer)

Both methods are interrupt driven to do the AtoD readings.

You're welcome, and Thank You!

For “TA” LDO Driver series. Is the part value the same?

R1: 220 k for e-switch lights
R2: 47 k for e-switch lights
R3: 100 k
R4: 47 ohm
R5: 4.7 ohm
R6: 1206 0 ohm jumper
R7: 1206 0 ohm jumper
C1: 10 uF
C2: 0.1 uF

Right, I keep forgetting that MELD can be used as SELD instead. And, um, usually I just check the index file in my repository to find suitable firmware, so I tend to miss it.

Anyway, there’s lots of cool stuff lately and I hope I’ll be able to catch up on some of it soon. :slight_smile:

No, this is wrong - has a couple of problems - wrong value for R1 and C2 should be a 10 uF. Need couple minutes. PhotoBucket seems down right now.

Edit:

R1 should be 360K - noted in setups.h. That's what my default tables in the header file: tk-calibWight.h is set up for.

C2, for an LDO, is changed from a 0.1 uF to a 10 uF. Believe this is standard for our drivers when using an LDO. It's a make-do-with-what-we-got sort of thing. Be sure you use a proper LDO though. I got a part # somewhere... I know it's been mentioned, but I'm sure Lexel is using a proper one.

PhotoBucket still down - may be a long one. I got a pic of my L6 TA driver posted somewhere... That's what I was trying to get. Oh boy, should really be adding more info in the OP.

Oops, back up:

I should have used the SIR 404DP if I knew the XHP70.2 would be so high in amps. Can't tell, but C2 is a 10 uF cap.

Yes,

There should be a lot of people who need a “Muggle” Assembly information.

Especially, How to flash firmware. (avrusb.bat)

When setting up NarsilM to do triple builds I found one thing in setup.h where I am puzled

#define D1_DIODE 2 // Drop over rev. polarity protection diode: 0.2V normally, 0.3V for Q8

the value is set to 2, but comments say 0.2 or 0.3V

next mode sets for triple channel has a bug for 6. mode
5% mode and 10% mode have both 7135 bank set to 0, but 10% need a value like 60 or so

// 6 modes 0.8-2-5-10-50-max ~0.8% ~2% ~5% ~10% ~50% max
PROGMEM const byte mode7135Set6 = { 20, 110, 255, 255, 0, 0};
PROGMEM const byte mode7135sSet6 ={ 0, 0, 0, 0, 255, 0};
PROGMEM const byte modeFetSet6 = { 0, 0, 0, 0, 0, 255};

for reference this is my custom mode set file

Ramping table has still only 12 values for FET on 7135*8 set up

this is my customized ramp table which works better

for the temp calibration values I got also some drivers qith positive value
but for NarsilM is the temp calibration value just wasted space as it uses the config menu to read temp value when you stop heating the light?