Flashlight Firmware Repository

Thank you. All “STAR” firmwares do not have independent PWM channels.
I think Flintrock/bistro-hd is the one that I was looking for.

It’s worth mentioning that no OTC and no OTSM means no medium presses, so no reversing or hidden modes in a blf-a6 style UI. And if you’re already modifying a Qlite driver, it’s not hard to add an OTC. So you could probably run blf-a6 if you like.

On my clicky-switch lights, I mostly run the following UIs:

  • Cypreus2 (tiny13, 2 channels, OTC)
  • Bistro (tiny25, 1/2/3 channels, OTC)
  • S7 / brass-edc (tiny13, 1 channel)
  • Crescendo (tiny13 or tiny25, 1/2/3 channels)

I haven’t done much with clicky UIs lately though, so all of those are at least a year old. Ever since I got some nice mod-friendly e-switch lights, I’ve hardly touched anything else.

gchart, thanks for the heads-up about CandleFlicker - I will be trying it out. I’m curious to see how it compares to TK’s version.

ToyKeeper and gchart, thanks for the info and explanation about what would be involved in getting CandleMode on an ATtiny13a. This is definitely not something I am ready to tackle. (Not that I wouldn’t be thrilled if someone more knowledgable than me did it… :smiley: )

If CandleFlicker doesn’t cut it, I’ll have to use that as an excuse to get a driver compatible with an e-switch and build a new 3000K light with Andúril.

Oops, I had forgotten all about Werner’s candleflicker code.

I gave it a try on a dev host just now to see what it’s like, and glanced over the code. It looks like we came up with completely different methods which have very different-looking results:

  • Parkhays (and Werner) used some pretty fancy math and modelling, starting with white noise and filtering it down to a wave with approximately the same amplitude and frequencies as a candle he measured.
  • I treated it like building a synth patch from basic component waveforms — triangles, sawtooths, and random… and tweaked the knobs and modulation routing according to what looked good during a hot bath.

I’m not sure Werner’s is running at the right speed on my dev host though. It seems really slow. Looks better if I triple its UPDATE_RATE value to 450. It also doesn’t try to model the thing candles do when disturbed by an air current, where it has diminishing bounces for a while before stabilizing again. But it does really well at the thing where a candle almost goes out once in a while before going back to normal brightness… or where a candle briefly gets extra-bright. And since it isn’t slaved to the WDT, it can update at a much higher frame rate.

So I’ve been giving “programming” a try… After losing too much hair, I give up :person_facepalming: (for now)

The hardware part is all good, I have updated my Q8 to Narsil 1.2. And tried erasing a BLF A6, and trying out some different stuff.

So, my abilities are limited to needing firmware in a compiled .hex.

I was looking to re-flash a D4. And have two questions:

1) If I’m going to flash NarsilM 1.2, should i go for the NarsilM3C1S.hex or NarsilMQ8.hex (is the D4 2 or 3Channel?)

2) If a kind soul would compile a Anduril.hex for the D4, it would be much appreciated. (from this and uncomment line 41 as the only change)

edit: words

I tried out CandleFlicker, changing UPDATE_RATE to 450 as TK suggested. It still looks like a candle, but it’s a different feel than Candle Mode from Andúril. I ended up putting it on a 2 x 7135 driver in a Convoy S2+ host, and I ran it both ceiling-bounced and with a diffuser. Even on 2 x 7135, it was far too bright to use a like a real candle in a dim room; I missed the adjustable brightness that Andúril provides.

Given all the limitations of using an ATtiny13A for something like this, I decided this was an excuse to buy another flashlight for this purpose. I just got an Emisar D4 (my first one, I am behind the times) and a new quad board with 3000K Nichia 219Cs. Now I just need to figure out why the driver won’t come out to let me flash Andúril.

The D4 has 2 channels. The 3-channel build won’t work correctly on it.

The most recent Anduril build I put up for D4 is here:
http://toykeeper.net/torches/dbcstm/anduril-d4.2018-01-24.hex

The “START_AT_MEMORIZED_LEVEL” thing means that when you put a battery in, it’ll turn on automatically. This is for dual-switch lights and not relevant for the D4.

It’s also worth mentioning that Anduril’s thermal regulation is probably more likely to overheat in a D4 than the firmware it shipped with, so be careful with turbo. It should be fine once it has settled, but the initial thermal ramp-down is slower because I haven’t finished tweaking that yet.

Duly noted, and thanks alot for the .hex (and all your amazing work) :sunglasses:

I have the next gen of buck driver designs ready, but the Buck chip needs an enable input

So I want to switch MCU pin 3 which is in the GT 2 channel the Indicator for a constant on as soon as the MCU leaves the standby

Sounds cool, Lexel.

Is that a replacement driver for the GT? I don’t have a GT yet, but if one ever shows up it’ll be fun porting stuff to run on it.

This one is for CFT-90 LED TN42 or GT, just the Buck chip has with 3mA when it is enabled too high current, so I need to swap ind LED pin to enable for it

First of all thank you Toykeeper and all the other guys for your awesome work!

I’ve had the flashing gear laying around for months but I was always procrastinating because I thought it was quite a complex things to learn, but yesterday I finally started looking into it and thanks to the repository and to the guides on the forum I managed to compile and flash “my” first firmware really quickly! :slight_smile:

Now I’m exploring this new world… for example I just tried the candleflicker above :stuck_out_tongue:

But I already have a question: I recently bought a sand S2+ XP-L HI from Simon and I noticed the long click time was much longer than on my other convoy red driver and that was quite annoying (I like to use the biscotti firmware like she suggests in the readme, without memory and in one of the complete mode configurations with batt check… so I often use the long click to go back to the first mode). I thought it was due to the off time capacitor tolerances and so I thought about adjusting the calibration… but for some reason just reflashing it with biscotti without touching anything else fixed the issue, now it takes more or less the same time as in the other driver.

I’m just wondering how is that possible :o isn’t Simon just flashing the same compiled firmware?

That’s pretty strange. Simon should be using the same thing… but maybe the fuses were different or something, leaving the MCU underclocked and maybe lowering the rate of power drain? I’m not sure.

There are also sometimes other ways to affect the time it takes to go empty while off, but I don’t think any of them would be relevant here. And I’m not sure the MCU speed even works that way.

Without having the driver’s ROM and fuses dumped beforehand, it’ll probably remain a mystery.

I see, nevermind :slight_smile: next time I’ll make a dump then, thanks.

Something like this should work…

#!/bin/sh
# Usage: ./read-tiny13.sh foo
BASE=$1
avrdude -p t13 -c usbasp -n -Uflash:r:${BASE}.hex:i
avrdude -p t13 -c usbasp -n -Uflash:r:${BASE}.raw:r
avrdude -p t13 -c usbasp -n -Ulfuse:r:${BASE}.lf:h
avrdude -p t13 -c usbasp -n -Uhfuse:r:${BASE}.hf:h

Need help with hex files please.
I currently have no way to compile a hex file since my tablet and laptop both has recently been stolen. I am able to flash a driver with my phone but I can not compile a hex, I can edit the code and calibrate the voltages and the otc and send them to whom ever is willing to help. Litterally I can do everything to the point ready to make a hex file and even flash the driver with the generated hex. If anyone is willing to help please send me a P.M., the help would be appreciated greatly since I’m bashing my face trying to find a way to do it with Android OS.

Please tell how. Is there some Android app that will allow you to use a stabdard USB AVR programmer (with a USB adapter)?

To generate hex files, you could rent a $5/month Linux VPS from somewhere like Digital Ocean and compile it remotely. There are other cheaper VPS providers but I know Digital Ocean are good. You can also pay hourly, which works out low cost for just a few hours. Once you’ve generated the file, you should be able to download it on your Android device.

I have a usb otg adaptor, asp ii, and use ZFlasher AVR.

Thanks to all that helped me here. I’ve got NarsilMQ to run on the BLFA6 driver successfully. The switch was the big downfall. The driver is very sensitive to the switch and running a modified forward clicky switch was the biggest issue.

Hi TK,
The other day I was surfing around and came across a thread here on BLF that listed all the current ATTiny based FWs (yours and others) with a brief description. I believe you were the thread starter but that may not be true…

All my searching now only brings me back to this thread. Any idea what thread I’m talking about?

I’m interested in the list because I’d like to compare all FW options with some sort of battery check function.

Edit: flashlight FW cheatsheat