Flashlight Firmware Repository

I got lights that flicker, but not by intent . Actually probably not difficult, but would need tinkering to nail the effect down. Takes some randomness, possibly some smoothing for transitions, but I think it's do-able, but can't be as entertaining as watching a true flickering flame.

Iā€™ve never tried it myself (or even read the code), I just know that it exists.

Werner: Candleflicker

Ha. Ya, Iā€™ve had that flicker as well. But mostly with the old cheap incan flashlights of the past:)

Thatā€™s great! I will give it a try. Dr jones did a good job with a candle mode on his rgbw driver. I used it by my bedside for a while til my fauther inlaw got ahold of it:)

I have flashed a few of Banggood's BLF X5/X6 drivers (after some hassle: https://budgetlightforum.com/t/-/42005). Thank you once more for the firmware and the support! :-)

Unfortunately, the C1 capacitor is really bad at handling temperature differences. When cold, a medium click is ~3s. When hot, this drops to a tenth of that. That makes medium clicks unusable for me. Thus, I ordered a bunch of X7R capacitors which should handle the temperature range better. I'll try them as soon as I receive them.

However, I had an idea. Have you thought about temperature compensation? The threshold levels "just" need to be increased for a cold lamp and decreased for a hot lamp. Problems I see: There is not much space left; other things might need to be disabled (I don't care about the strobe modes for example...) Timing; does it mess with any critical timings?!

Best regards

I hope you bought 1uf for the OTC, thatā€™s the one that handles switch timing, not C1.

Hi pilotdog68,

Thank you for your heads-up! Actually, I bought a bunch of Samsung CL21B105KBFNNNE (0805, 1ĀµF, 50V, X7R) capacitors. If you hadn't told me I would have swapped the C1 caps -- oooops. But instead, I'll need to change the one next to the red cable, correct?

Thanks again! This forum is great! :-)

(BTW, isn't the cap next to the positive wire larger than 0805?!)

they should all be 0805 sized. Some of the BG driver boards are mislabeled though, so they might have the OTC labeled as ā€œC1ā€ or vice-versa. You want to change the one that connects to Pin2 of the MCU. C1 is only connected to Pos+ and GND.

edit: I looked at some pictures in the other thread, and it looks like BG switched the OTC to be 0603 sized. Your 0805 size will still work, but it will be bigger than the one you are replacing.

You want to change the one next to the 7135 chip, not the LED+ wire.

I change out the OTC cap on all the BG drivers, all of mine have had horrible issues. As was said they are 0603 but you can use 0805.

Thank you guys for the quick answers and the clarification! :-)

To sum it up (in case somebody bumps into the same problem again -- which I assume will happen sooner or later as those BG drivers are absolutely not usable for medium presses imho...):

  • You need to desolder the off-time capacitor which is (falsely!) labeled as "C1" on some (at least all of my) boards in order to be able to use high voltage programming for the fuses (which are messed up so that normal programming does not work.). This cap is connected to pin 2 of the Attiny25.
  • The removed capacitor can/should be exchanged for a less temperature sensitive one. I chose a 1Āµf, 50V, 0805 size capacitor with X7R temperature rating.
  • The capacitor which is soldered directly next to the red wire does not need to be touched!

Thanks again and best regards! :-)

Wow, thanks! I should definitely read all your posts (and probably step up my searching game in this forum). It seems you already have thought about all questions I asked and found solutions/answers to them months ago. ;-)

I'll give the "high quality" caps a shot and if they don't work to my satisfaction, I'll try your solution as soon as I find the time to incorporate it in the Bistro code.

What FW are you using at the moment?

Iā€™m using selfbuilt firmwares.

Yep, I have flashed a flashlight firmwares before and got the tools. Many thanks!

This is the modified bistro I am using in my X6R build. (feel free to use it for your own projects, of course.)
paste link
For some reason I am getting my hidden modes mixed up in my muggle mode group. Like, still not reversing through them, they are just part of the mode group. What could be causing that?

Muggle mode does not have reverse modes, hence the point of muggle. lol

I know, but itā€™s not supposed to integrate your Normally hidden modes into the mode group, is it? Thatā€™s what itā€™s doing. My muggle mode is supposed to be 2 red modes and 3 white modes, but it is ending up as those 5 with two more red modes, batt check, and ā€˜offā€™ all in the normal rotation/whatever. It only happens on muggle mode

Very strange, no idea why the hidden modes would do that. Most likely a syntax thing in the mode group section if I had to guess.

Like TA said, thatā€™s very strange. I donā€™t know for sure, but I do have a conjecture.

In count_modes, it looks like we always add hiddenmodes to the modes array. As long as solid_modes is correct (5 for your muggle mode), next_mode should wrap before hitting the hidden modes. But if solid_modes gets off somehow, itā€™ll scroll through the hidden modes. When counting solid modes, we stop whenever we hit a zero value in the modesgroups array. The muggle set is the last line, the one weā€™ve been treating special (leaving off the extra zeroes). It works as long as you end the line with a zero. But in you modegroups, it ends in a 9ā€¦ so it keeps on incrementing solid_modes.

TL;DR - I bet if you add a 0 to the end of your muggle mode array, itā€™ll work just fine

(unless that 9 was a typo and supposed to be a 0)

No, it was supposed to be a 9, but Iā€™ll try adding a zero after it. That makes sense, thanks.