Flashlight Firmware Repository

Thanks Tom!!! It worked! :partying_face:

Finally did my first FW flash after all these years. However it did not work with extreme burner AVR, it shows “mismatch at location 0x0000”. So I used AVRdude command instead, success in the first try.

Now I have my Courui D01 flashed with TK’s ramping FW, very nice!

Time to start desoldering leads… :slight_smile:

Holy cats!

You just un-bricked like a dozen of my drivers. I had a bunch which refused to flash, but I moved one wire, tried a dead driver, and it lives again! I’ve seriously had a wire in the wrong place all this time??? Wow.

Would have been nice to know this last summer. :slight_smile:

:open_mouth:
ToyKeeper too.

When I first got a usbasp I searched google images for the pinout. I found tons of bad pinouts so I didn’t trust any of them. It’s a little conspiracy.

The problem with the bad pinouts, as you’ve seen, is that leaving the gnd unconnected actually works on some chips.

Oh boy, good news/bad news (). Really sorry, but I thought I made a big stink bout it at the time. Even got update access to the flashlight wiki to correct the errors, just didn't want to remove the original stuff because I really was unsure if the old dongles were still around.

Think Halo confirmed this at the time as well, also WarHawk had it right way back.

I encountered these problems early on with the 25/45/85's, researched it, then found the fix, but some others already knew about it. It's probably all in the early part of the 25/45/85 thread, I think.

Ok - looked it up, here we go:

Problem - Post #233 here: https://budgetlightforum.com/t/-/34900/233

Problem - Post #241 here: https://budgetlightforum.com/t/-/34900/241

Solution post #263 here: https://budgetlightforum.com/t/-/34900/263

Post #265 mentioned same as just posted earlier: https://budgetlightforum.com/t/-/34900/265

Well I’ve now set up to build my own drivers. Did some practice by flashing luxdrv to a couple 105c drivers. So, I am finally ready to attempt one of these drivers. Could someone some up for me what firmware is out there that will work well with these triple down boards? I love the ability for the user to choose between two mode groups. I’ve been looking at the firmware repository, but I’m a little lost trying to sort through it all.

So far just one firmware (that I know of) that works with the TripleDown. It’s a variation of the BLF-A6 firmware, so it does have 2 mode groups. It is linked in the OP of the TripleDown thread. As downloaded it is set up to test driver function, so you will need to edit some values to give proper function,

Is alt pwm the third channel?

ModesNx are the larger bank of 7135s. Modes1x is the single 7135. Put the word TURBO to toggle the FET

Ok. I don’t real know what I am doing, but I might as well jump in and learn to swim:)

Can the FET only be toggled? I got the attiny85 for the added pwm, so will the 85 go to waste with this firmware, or is there still benefit? Sorry if my questions sound like I don’t know what I’m talking about. please humor my ignorance:)

I don’t know how it works with anything other than a 13, or even if it will work at all. I personally have not left the 13

Don't think there's any added PWM (??). 25/45/85 all have the same PWM limits, as I understand it.

I was talking about the number of outputs, but clearly I don’t know enough to be asking questions yet. I will keep reading. :person_facepalming:

Oh, um, the attiny13a has one PWM counter and two PWM channels. A 3-channel driver will need to use a general I/O pin for one of the channels, which is useful if you want a super-bright turbo and don’t care about the levels between turbo and 100% 7135. So, like, you could use 7135s to go smoothly from moon to about 1000 lumens, then go directly to a 3000-lumen turbo, and you wouldn’t be able to access anything between 1000 and 3000 lumens.

The tiny25/45/85 have two PWM counters and four PWM channels. So, it should be able to go smoothly all the way from moon to turbo even on a 3-channel driver.

I got a tripledown attiny25 board yesterday and am hoping to get bistro working on it soon. So far all I’ve done is update the ramp calculator to support 3 channels, and haven’t gotten into the actual driver code yet. Bistro works on it in 2-channel mode (1x7135 and 6x7135), but the third channel (FET) is currently unused.

Ok. Thanks. I was just reading your posts in the tripledown thread. I mistakenly posted a question about the tripledown firmware here. Oh well.

I think you are working on exactly what I am looking for so I will continue to follow the tripledown thread anxiously awaiting your developments. For now I’m going to continue to practice flashing firmware with small customizations so hopefully I will advance my knowledge a bit.

After someone else confirms it works, and maybe the defaults are tweaked back to a more user-focused config, I should be able to merge the tripledown-bistro code into trunk. For now, it’s working but is only in the tiny25 development branch.

For tiny13-based tripledown drivers, that’s a different matter. It can’t do PWM on the FET pin, and it has only half as much space, so it’s significantly trickier to get working.

Dear ToyKeeper,

I have flashed your Baton FW for my light and it is great. I noticed that the green and the red indicators were turned on and off during the transition period when the voltage was dropping to the on/off threshold. Can you help me to make it turned on/off sharply.

Hi, um, what exactly is it doing, and what do you want it to do?

In my testing, the indicator tends to stay green above 3.9V or so, then starts to flicker orange occasionally, and the flicker gets longer and more frequent as it gets near the next voltage threshold. Eventually it goes fully orange and stays that way. Then as the cell voltage drops more, it eventually turns red. But I haven’t seen the same soft flickering transition effect between orange and red.

I think this is because the voltage measurement is made out of phase with the PWM signal. So, sometimes it measures with the main emitter off, sometimes with it on. And this results in pretty different readings depending on when exactly the measurement was taken. It was unintentional but I kind of like the result since it gives a finer resolution, more than just green/orange/red.

At lower voltages it doesn’t seem to matter as much. The emitter isn’t using as much power so it probably doesn’t vary as much.

If you want it to not flicker orange as it nears the orange threshold, it’ll need to sync the measurements to happen at a consistent part of the PWM cycle. I’m not sure how to do this though.

Thanks for your prompt reply.

What I want to do is that you have explained. I have modified the code that
FULL BATT indicator off
LOW BATT indicator on
ALMOST EMPTY indicator blink

As you have said, the led flickered before it was stably on. I try to get rid of the flickering. It seems that is not easy to be done by changing a few lines of the code.

ive been playing around with tk’s starry-offtime firmware(and others). Does anyone know where i can find the .h files that are referred to in the STAR firmware? Or do i not need them? Thanks for any help! These are the files i am talking about:

#include <avr/pgmspace.h>
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/wdt.h>
#include <avr/eeprom.h>
#include <avr/sleep.h>
//#include <avr/power.h>

oops!

#include <avr/pgmspace.h
#include <avr/io.h
#include <avr/interrupt.h
#include <avr/wdt.h
#include <avr/eeprom.h
#include <avr/sleep.h
//#include <avr/power.h