Flashlight Firmware Repository

I just went to RMM’s site and he has a FET+7135 driver with the option of a attiny85. I don’t really want to go that route but if that’s my only option, so be it. I also have the BLF X6 X5 driver coming with the 25. Can I just replace it with the 85 or do I need RMM’s driver.

Yeah I seen that done some where here before. I just need to Know if everything still works right if I do it.
I do have a hot air work station and the reflow paste.

It should be possible to swap the MCU and flash it with relevant firmware. Also might be a good idea to remove the voltage divider resistors since both NarsilM and FSM use a different method of measuring voltage, and the resistors mostly just increase the parasitic drain in standby.

That’s with replacing the attiny13 with the attiny85 on the nanjg 105c?
No problem removing the resistors. Thanks for the tip. :+1:

Bending legs on the 85… those where the days! I did it to save some space and made my own custom footprint for it:

However, my custom 85 footprint was actually a little smaller than the original 13/25 footprint so you should have a little more room than I had. I think you can even get away without hot air soldering station if you have a soldering iron with a very fine tip and solder paste.

any plans to support 2 e-switches into Firmware like Narsil?

Doing 2 e-switches shouldn’t be hard to add to FSM on a technical level, but I’m not sure how 2-switch interfaces should work or how exactly button events should be described internally.

Before implementing the back end, there is perhaps a more important question: How should a multi-eswitch interface work? What are the features and functions which make the extra button(s) worthwhile? What kinds of input events are used and how do they map to actions?

you could store any output or blinky to the second button short press lock it in, long press momentary switch back to old when released, triple click to store current mode

when in locked stored mode short click turns the light off long click goes back to level you were before entering 2. button mode

Which lights/hosts have two E-switches? I have dual E-switches in my headlamps, but no hand held lights.

Niwalkers new thrower has 3 switches, many Nitecore have 2 switches

I also thought about if its possible someone to match the I/O pins of an Attiny84 MCU to Narsil firmware, as the 85 is always short of I/O pins
on those 42-47.5mm drivers a 16 pin MCU makes sense

Three switches? Wow, that’s a little overkill I think… but I guess I could find use for them all if I had such a light.

Converting from 85 to 84 was fairly easy, I was using it for a while. There was one or two registers that where a little different if I remember correctly… don’t remember the details though.

Hi All,

I would like to ask your help.
I’m trying to modify the Biscotti fw, unfortunately i have some issues.
I am really not an expert, can do small things, but deeper not really.
I tried to build for Atiny 25 with activated temp monitoring, but it is not working as in the NANJG_LAYOUT the #define TEMP_CHANNEL xxx is not defined.
Is it possible to define it? I mean what should be the value?

Also i would like to use the offtim3 (nanjg_layout) for s2+, but these are not defined:
#define CAP_PIN
#define CAP_CHANNEL
#define CAP_DIDR

Is it possible to make this work?

Thank you,
Janaboy

if you go to Attiny25 just use Bistro
Biscotti is Bistro mini for the 13a with a lot stuff removed

As i see the Bistro is using fet 7315 layout which is not good for me.

If your driver doesn’t have an offtime capacitor, the CAP/OTC/OFFTIM3 stuff can’t be used. Does it physically have one?

Bistro can use other layouts… it already supports 2 or 3 channels, and doing just 1 is mostly a matter of giving it new ramp values. However, without an OTC it won’t have reversing or hidden modes and potentially also no blinkies (unless you add them to a mode group).

Another option to consider is Crescendo, which already has options for single-channel boards, doesn’t need an offtime capacitor, supports both tiny13 and tiny25, and has thermal regulation (better than Bistro’s).

There’s also gChart’s Babka, which is an improved version of Biscotti. It has no thermal regulation, but does have a turbo timer.

In any case, Biscotti’s thermal code is merely inherited from Bistro and has never been tested. It probably doesn’t work, and was only included there to minimize the diff from its ancestor. The other options would probably be a lot easier.

I got a wild hair last March and…

  • Soldered an attiny25 onto a nanjc105c
  • Stacked on 4 extra 7135’s for 4.2A instead of 2.8A
  • Attempted to add Bistro’s thermal regulation to Babka
  • I then put it all together in a Convoy S2 with an XP-L

So… what happened? That’s a great question. It stepped down too quickly, IIRC. But I don’t think I even put it into temp calibration mode to address that. Life got busy and I’ve forgotten to go back to it.

I think it uses all of TK’s standard include libraries. The only exception is I added “#define TEMP_CHANNEL 0b00001111” right at the end of NANJG_LAYOUT in tk-attiny.h . Otherwise, I went ahead and threw my code in Pastebin in case you’d like to monkey with it. I’d consider it to be pre-production, but it could give you a decent starting point.

That reminds me… thermal stuff is likely going to be a pain, and will require per-light calibration. Expect to do some time-consuming testing.

I still haven’t finished the thermal bits in Anduril yet. There’s a very narrow range of acceptable behavior between too sensitive and not sensitive enough, between too spastic and too stable. I really should get on that again, but it’s thoroughly unenjoyable so I’ve been dragging my feet.

I converted a Nanjg driver with removing all 7135s and putted on one fet and wanted to replace Attiny13 with Attiny25 and Janaboy trying to help me with firmware things. so that is the case. Now I looked the babka firmware and we like it has turbo timer so I maybe stay with Attiny 13 and no thermal reguletion just timed stepdown will be enough.
Thank you all for your help!

Gotcha. You can easily change the length of the turbo timer in Babka at compile time. It is set up to ramp down (instead of jump down) by default. And you can disable the turbo timer in the runtime config options.

That has some pretty huge differences from the version in the repository. Should it replace the v1.1 copy?