Flashlight Firmware Repository

FWIW, I did some tests a while ago for the mem-decay method of detecting short presses. If I drain the OTC, it seems to take about 0.5s for the memory to decay. If I leave the OTC fully charged, it seems to take about 4s for memory to decay.

Just a thought. I don’t even know if you’re using that method.

It’s actually just a cheap buck converter I use to test drivers, but I have a omten switch in series anyways.

Hhhmmm. Something wasn't right bout that setup I guess? if it worked once in the light.

I’ve had other issues with it before, especially with turbo timers. Idk if it’s ripple or what.

For instance on this driver, I have the timer set to 2 minutes. Its 6*7135 (2.3amps). If I have my buck converter limited to a lower output, like 1.5amps, the turbo timer steps down wayyyy early, like 1 minute instead of 2. But if I don’t limit output on the “power supply”, the timer works just fine.

I don’t understand it, but I’m slowly learning that if something isn’t acting the way the firmware says it should, try it on a battery before freaking out.

I do my initial tests on a batt 90% of the time - an old TrustFire in a holder w/red&black wires ended with alligator clips. Sometimes if it's more risky, I'll go slowly up with the bench PS. I'm usually carefully continuity testing everything out first, so not much risk applying power.

Oh, on a variable current / voltage power supply, with current limited, the voltage can do some weird things. You can only limit one or the other, basically, and the other will adjust itself accordingly.

I’ve been finding that even voltage calibration seems to work better with a battery than with a power supply (and a DMM to confirm voltage in real time).

Do we have a Yezl Y3 Star firmware - el switch and a tail switch, several modes switched through the el switch and an offtime memory?

I do. On the 25/45/85 thread, have a dnld link but it requires a 45 or 85. Blew past 2KB code, so the 25 won't cut it. It's also fully programmable (64 possible mode combos) and I posted an instruction manual (2 pages) on it's operation. Didn't upgrade a Y3 yet, but I'll have to do 4 of them shortly. Have the dual switch (e-switch/power) version dnld'ed in a X6R and works well so far.

Great, but can it be applied on wight`s A17dd ver 0.44 and tinny13? The last Y3 i modded was with that driver, el and tail switch and TK Ramping UI table firmware, V6 1D dedomed and 210k cds, came out exellent but now i need the firmware i mentioned

No tiny13 support, only a 45 or 85 on a FET+1 driver. I've only used the FET+1 wight drivers, like the BLF A6 driver, in 17 and 22 mm sizes. All my e-switch build/mods are or will be 85 based. It can be changed to work with a conventional FET or 7135 (only) driver but I don't see it worth the effort for now. There are some newer OSHPark boards available now for the larger footprint of the 45/85, but mostly I'm doing the "bent in pin" technique to retrofit.

thanks, fet+1 will do fine too, have to start trying 85 out now :wink:

Hi,

I’m thinking about giving bistro a try. I have components for wight’s 17mm FET+7135 and I recently ordered an Attiny 25. Unfortunately I got the normal 25, not 25V. Would I have to make some important changes to the code for the use of the “standard” 25?

Nope, no changes. In fact Richard at MtnE sells the 25, not the 25V. Only difference is low operating voltage, but the LVP kciks in before you should get that low anyway.

It should work on a non-V model. That’s actually what I used to write it.

Thanks Tom and TK. I will give it a try. I succeeded in flashing all different kinds of firmware from TK’s repository, but now I’ll have to find out how to work with these new *.h files. Will do some research now. If I think that’s over my head, I could just use the bistro.hex file, right?

edit: ok, I think I found out how to deal with these header files.

The headers are something I’m still deciding how best to set up.

Originally, I told the code to include “…/foo.h” so it would automatically look in the right place. But that makes it not work when all the sources are copied to a single directory, or when a project is one layer deeper. To fix that, I can include “foo.h” without the … for parent directory, but the build options will then need a “-I…” to add the parent to the default include path. Maybe a “-I…/…” too. Simple fix on a command line, but it means one more step when using AVRstudio.

It’s weird trying to support foreign build systems. Normal software doesn’t have these issues. Normally you’d ship a Makefile and force everyone to build in the same way, but AVRstudio doesn’t like that approach. As builds get more complex though, it gets harder to build with different tools. So I’ve tried to keep it pretty simple, but duplicating code all the time feels like scratching a chalk board.

@ TK and other awesome people

Ok, most of what you’re saying might be over my head, don’t even know what that foo.h is. I really don’t understand much of programming and flashing, and I wouldn’t be able to flash my drivers if there wasn’t some good tutorials here at BLF. My workflow is: compiling the code with Atmel Studio and than flashing the .hex-file with avrdude via command line, just like in hoop’s tutorial.

Now with your new headers, it’s not that hard to do it, in fact it’s easy once you know how it works. I just right-clicked the project in the solution explorer at Atmel Studio~~add~~>existing file, search for the directory, chose the file, click add. That’s what I did with all the headers that need to be included.

Another change from the way it is in hoop’s tutorial, quite important for someone inexperienced like me, is, because we’re using Attiny25 now, I had to adjust the command lines. t25 instead of t13 and other fuses.

test:
avrdude -p t25 -c usbasp -n

erase:
avrdude -p t25 -c usbasp -u -e

flash bistro:
avrdude -p t25 -c usbasp -u -Uflash:w:bistro.hex:a -Ulfuse:w:0xd2:m -Uhfuse:w:0xde:m -Uefuse:w:0xff:m

I know it’s really basic stuff for people like you or Tom…

When I found out how to do the above, compiling and flashing went just fine.

But it’s not my day today, hand-soldered the A17-HybridS, flashed it (wanted to check if firmware and driver are running as they should and do calibration afterwards), however, ruined a Convoy C8 then, because I destroyed the driver retaining threads. By the way the Convoy C8 has one of the worst driver retaining rings I’ve come across, really crappy. As if that wan’t enough my 60W soldering iron flew of the bench and in a really stupid reflex I caught it, ouch, that hurt, still does. Should’ve stopped there. But wanted to test out this awesome firmware. With the C8 ruined, I went ahead and grabbed a EE X6, thought something like “yeah, feels more like quality” and installed the driver. Works, but first mode doesn’t. Maybe too low of a value for the LED to light up?

I haven’t even read how the UI works and all, but one thing I noticed in an instant: it has soft transitions between modes and I LOVE THAT! This is something I’ve dreamed about for quite a while now. That is just awesome, you, TK, are just awesome!

No more typing for me, my hand really hurts…

Thanks for the tips chouster. I follow the same process as you, so I’ll probably reference this post when I get around to using the bigger mcu’s

The lowest mode is probably just too low for the hardware it’s running on. I’ve seen anything from 1 to 9 as the lowest effective PWM level, and it varies depending on the exact type of 7135 chip, the emitter, the battery voltage, etc.

Things aren’t going so well for me today either. I’ve managed to fry and replace a 7135 chip, and the new one needs a higher moon mode. I accidentally flowed a FET right off a board, burned myself three times, made a mess of flux, keep breaking things, and can’t seem to get anything to flash today… except for a bright emitter flash followed by an unexpected moon mode.

I feel a bit like this dude now:

Reflex catch…. Oww :weary: I’ve had that impulse to catch falling hot objects.

I liked that change. Noticed it shortly after you added it but neglected to comment.