New 105D. replacing Nanjg-105c @ FT? (no stars!)

:bigsmile:

For those that were wondering how this ended up, my ultra-low-LED flashlight was considered ‘too bright’ with a 252kohm resistor on it for sensing current. I’ve been meaning to go back and measure the current with a fluke but the last time I tried it didn’t go low enough…. and I’m not taking a flashlight over to the NIST lab for testing.

I couldn’t accurately measure the flux on most instruments. The reflector was causing most of the problems due to the focus of the beam- which was why it was designed that way.

But at least I had fun and got a SOIP programmer :slight_smile:

Ugh! I have a need to reflash 4 drivers and convert them to off-time memory with the added capacitor, but when I checked the lights I see they have 105*D* drivers installed! Ugh! I guess my best and easiest option is to replace them with 105*C*’s? Unless someone can point me to a firmware that gives me proper off-time memory without the capacitor. What I am really looking for is to have “off-time memory” on a driver set to “no memory” (it makes mode switching much much easier!). I’m very much a novice with firmware code and flashing, so it would have to be easy for me to modify and reflash (I’m currently only using STAR & STAR Off-Time and only modifying PWM levels for modes).

-Garry

Hi Garry,
take a look at a relatively new firmware @Toykeeper has written.
It’s named “biscotti”.
Written for the 105D, offtime memory without cap by using brown out detection (BOD). And she crammed in all functionality the 13A with 1 kB can take.
You find it in Toykeepers firmware repository.
Just be sure to use the right fuses, there are reports of bad timing when flashed incorrectly.

EDIT: And take a look whether you already got the driver version where pin 5 of the attiny seems to be connected to ground. You might need to cut this for biscotti to work as intended.

Thanks HQ! Quick questions: does biscotti work with regular tailcap switch lights (as opposed to momentary switch lights)? Does the off-time memory function no matter how long the light has been off? (Though in my case it shouldn’t matter since I want “no memory” once turned off for say 2+ seconds.)

Can you give me some guidance (or point me toward some) for a simple-stupid here’s what settings to change, here’s an example flash command with appropriate fuses . . .? I’m not real savvy with flashing firmware and right now just modify my existing command-line avrdude “flash command” line of text I saved in a text file. I assume the code is easy to find where I modify PWM values for the modes I want. I assume I don’t have to touch anything else in the code (except maybe to toggle memory on or off).

I’ll check into it when I get more time.

Thanks,
Garry

Garry, biscotti and similar firmware use a trick (RAM decay on a NOINIT variable, explained by TK here) to accomplish OTC-like functionality. I can’t say an exact timing, but it’s around 1/2 a second. Anything shorter than that is considered a short tap (mode switching), longer than that is considered to be the light turned off. It works out really well for typical clicky switches. The only advantage, to my knowledge, of a proper OTC is the ability to detect “medium” presses (say, more than 1/2 sec but less than 1 sec).

Don’t get too hung up on the fuse settings, but the correct ones are necessary. Assuming you don’t need to play around with the code, just download the hex file from here and then flash it to your driver using this command:

The above command was borrowed from TK’s flash.sh script, I’ve used it with biscotti and it works just fine. It works for most of the attiny13a drivers (105C, 105D, etc)

Also, mode memory can be turned off in biscotti (or is it off by default? I forget), which is what you’re looking for if I read that correctly. So if the flashlight is off for more than 1/2 second, it will start back at the first mode. This isn’t something you’ll need to change in the code, it’s user-selectable via button taps once you’ve got the light assembled.

Hmm . . I’m a little confused. Tell me this: Say I have the light set to have 2 modes (high, then low) with no memory, always starts on high from “off”. Say the user has the light on in “high” mode for a minute (or could be 2 mins, 3 mins, whatever, but much longer than just a few seconds) and that user wants to switch to “low” mode, will 1 “quick” half-click change it to “low” mode? Secondly, say the user turns the light off from “high” but 10 seconds later turns it back on, will it come on in high again?

Thanks,
-Garry

That is correct. The amount of time that the light is on does not matter, just the amount of time it’s off.

With mode memory off, whenever you’ve got the light off for more than 1/2 second, it will return to it’s first mode (high in your example).

Just FYI… Biscotti doesn’t have a 2-mode setting that starts on high, but there is a 3-mode starting on high (mode 6: 100% - 20% - 1%). I know it was an example, just thought I’d mention it.

Great! Thanks!

Wait a minute, can I not set my own modes in the code like I can do with STAR? I’m counting on being able to customize the modes exactly as needed (balance of runtime & brightness for my co-workers use underground).

-Garry

I didn’t like 105D’s either, until I modified the BLF-A6 code to have the OTC pin next to the GND pin. 0805 cap fits nicely across.

I just caught this “Edit”. I have pics of the backside of the drivers, but not the front (mcu) side. I’d have to desolder them to remove them to check. Well 1 is a Convoy M2 with a driver retaining ring; I could check that one easy. (Btw - I didn’t see any pics posted showing the trace that needs cut or any of the other issues.)

I’m thinking I’ll just plan to swap these drivers out with good old 105C’s. It’ll give me the chance to get the drivers done ahead of time without pulling the lights out of service for an extended period of time. Plus, it avoids the users being able to access a programming mode and change settings.

I just read the biscotti “instructions” in that Convoy C8 thread and see it’s a user-programmable multi-group driver.

-Garry

I didn’t realize ToyKeeper had a version of STAR modified with the same “brown out detection” until RMM posted it here. I’ll proceed with trying this out so then I can set my own modes and not worry about another user mistakenly entering programming.

-Garry