Guide: how to flash ATtiny13a based drivers (NANJG, QLITE, etc.) with custom firmware

Thanks TK, I’ll give those a try now. And thanks gchart, I’ll probably start by trying to flash yours :slight_smile:

All of you do great work here, and I really appreciate the help.

gchart’s ramping firmware is definitely a good choice. I should go back and try it again now that some time has passed. :slight_smile:

Looking at mine again, I don’t remember why I made it ping-pong automatically instead of stopping at the end. Seems like a weird way to do it. Perhaps I’ll change that in a later version.

Hello everyone,
i’m trying to move my first steps in flashing drivers but i’m having some issues.

After receiving a clip, a USBASP programmer and some cables, i successfully set up the flashing environment in a Linux VM. I decided to try flashing a couple Convoy green drivers (the ones with 3/5 modes) and, after disconnecting the pin no. 5 of the ATtiny13a from ground, i managed to make a successful test connection to the drivers using avrdude. I also had no problems building a firmware from the sources, thanks to the build script in the repository. I tried then to compile and flash the Biscotti firmware; the flashing process worked fine, but after the flashing the driver doesn’t work properly. In particular, it doesn’t seem to recognize fast clicks, so i can’t obviously change modes/groups.
I also tried to build and flash two other firmwares, gchart’s ramping firmware and Crescendo. With gchart’s firmware i had the same problem i had with Biscotti (no fast clicks, so no ramp stopping), while Crescendo seems to work almost fine (after obviously disabling memory and other special modes in order to make it fit the 13a). Crescendo recognizes fast clicks (although if i click too fast some weird things happen, such as the flashlight staying off with the switch in the on position, or a very fast ramp).

In some messages on this forum i read that some firmwares need an off-time capacitor in order to use off-time memory like Biscotti; could this be the source of the problem with my Convoy driver? Or could i have damaged the driver by disconnecting the pin 5 of the MCU?
I was also exploring for some 7135-based drivers, can i flash this one https://www.fasttech.com/products/0/10001683/1122302-8-amc7135-4-group-25-modes-led-flashlight-driver-c (Nanjg 105c) with firmwares like Biscotti, Crescendo, gchart’s ramping etc. without further modifications to the driver?

Thanks in advance for your help!

Hi Adrian, welcome to BLF!

I’ll answer the last question first. Yes, those nanjg105c’s from Fasttech will work great without any mods (ie, you won’t have to disconnect pin 5). Those are the same ones I use all the time.

Long version: I can’t say for sure what you’re running into, but I’m guessing it’s due to different components in that driver. I think I’ve run into the same issue and gave up and just used a 105c. Our fast press “trick” relies on the driver retaining functionality for a very specific amount of time after losing power. Different components can affect how this works.

Short version: just try one of those 105c drivers you linked to.

Good luck!

Thanks for the info! I guess i’ll order some 105c drivers to play with.
Just another question: i have a driver like this BLF X6 X5/Astrolux S2 S3 SS SC Taschenlampe Treiber Sale - Banggood Deutschland-arrival notice-arrival notice on the way, and i’d like to use it with Crescendo, since it is based on an ATtiny25V and should support the full feature set of that firmware. Is there a way to back up the firmware currently on the driver, before flashing a new one? I know i could simply build and flash the Bistro firmware in case something goes wrong, but i’d like to play safe.

If Banggood hasn’t locked the Attiny and didn’t block the programming interface - yes. They did the latter a while ago, I’m curious if it’s still the case:

Regarding your first problem: double check if you have set the proper fuses!

Even if you can’t, just grab the Bistro hex file here. It should be the same thing.

Where can I find the default firmware used in convoy s2 or s2+?

The closest might be Dr Jones’ NLITE. Find it and many others here. Check out the INDEX file for an overview of the different firmwares.

Other great options for that driver include ToyKeeper’s Biscotti or my Babka.

Although biscotti is useful for stock drivers, it’s not very relevant for people who reflash firmware. It devotes space to runtime config options so people can get something they like without reflashing but, if you don’t mind reflashing, that space could be used for other things. Instead of a dozen mode groups, just hardcode the one you like and use the extra space for whatever else you want.

A lot of my older nanjg-style lights use the “s7” firmware, which has no config options and instead has a bunch of fancy extra modes. It’s also hardcoded for low-to-high mode order with offtime-based button response and no memory, because that’s how I like it. It’s not universal, but that’s kind of the point… it doesn’t have to be.

Thanks. Any of those firmwares has a ramping variable brightness mode?

Yes, babka gChart’s ramping UI and crescendo have ramping.

It’s better with a 2-channel driver though, like a FET+1 or Mtn’s “moonlight special”. Better resolution at the low end. Otherwise the low modes are less of a smooth ramp and more of a staircase.

(edit: I mixed up babka and gChart’s ramping UI, oops)

Thanks, I found babka but couldn’t find crescendo. I saw a ramping directory in Tom_E and I’ve also heard luxdrv has a ramping mode. are they any better?

Also is Simon still selling Convoy S series with erroneous biscotti or did he get it fixed?

ToyKeeper’s Crescendo: link

My basic ramping firmware (no blinkies): link

Thank you very much, how did I even miss it. :slight_smile:

Would it work fine on convoy s2+ ATtiny13a?, since I see these firmwares were all tested on ATtiny25s

Crescendo was made for the ’25 but can be tweaked to work on the ’13. It’s documented somewhere but I don’t have a link handy. Mine, however, was built for the ’13 and is ready to run on it.

I see, can you tell me the mode of operation of your firmware? I mean how to use it’s modes. I saw a picture for crescendo on how to operate it, do you have one?

Update: Does anyone know whether Toykeeper’s BLF A6 firmware will work with a Convoy S2+ 1400mA?

A6 firmware: after tweaks, yes. It’s made for an attiny13a, but for dual-channel by default. In this case, that’s a FET + 1x7135. Change it to be single-channel and you should be set - a 105c has only one channel, typically 8x7135’s.

Operation of my ramping firmware: check out the top (lines 8-18) of the C file for instructions. I don’t have a fancy graphic made up.

I see, I was going to use 4x7135’s. I heard some of the modes in A6 were unregulated, will that be a problem with S2?

Ok I saw the C file and I got a basic Idea. I didn’t want a fancy graphic, just wanted to know how it operated.

“Unregulated” isn’t really a problem… more of a “feature” of FET drivers. FETs try to pass thru as much juice as possible, whereas a 7135 will allow a regulated 350mA (or 380mA) to pass. Assuming 350mA binned chips, 4x7135 will regulate to 4x350mA = 1.4 amps. That’s great if you are trying to achieve a specific power (amp) output. But for those seeking maximum output, they use a FET.