Flashlight Firmware Repository

Nope.

Sounds like the OTC calibration is way off. You can get OTC values by flashing battcheck/offtime-cap.hex and then pressing the button for the length of time you want it to use. It should then blink out the OTC value for that amount of time, which can be plugged back into other firmwares. Similar story for voltage calibration, only using battcheck.hex instead.

^ Thank you TK. You must have one of the deepest knowledge bases on BLF in that brain of yours.

Unfortunately, my mod put an AMC7135 on top of the MCU with some wires. Now that I know the QTC is required, I'll first investigate the 1uf Cap. Maybe it was shorted or something. If that doesn't fix the issue, I'll follow your above advice.

Much appreciated :)

Maybe it’s just me, but one of my modding rules is to always make sure the MCU will be accessible (with no extra pins grounded) so I can reflash it later. I reflash pretty much everything from time to time, and I generally expect that I’ll need to flash each one a few times to get the calibration right. There’s always something a little off, whether it’s the PWM level for moon or the OTC timings or the voltage levels or … whatever.

^ That's a very good rule. I just didn't want to wait for the OSH Park DD +7135 boards to arrive. No matter what, I had to solder a wire to at least one of the MCU pins and it was late last night. But you have me thinking that I need to move the 7135 over to the top of the FET.

I have to give you a huge thumbs up TK. I just read much of the parts of this thread that deal with BLF-A6. Wow! Really impressive all the functionality and performance. And that UI diagram. I absolutely love that. It really helped me understand the UI. And what an impressive UI it is. Really excited about this new direction wight and you have opened up. Thank you.

Hey all,

Is there a way to power more than one LED separately using an FET driver and code.

What I mean is this. I am working on a head lamp for a guy that has the one main led that is white. And another LED that is red. His setup now is manual through a multi poll switch and a pile of resistors. Is it possible to get both LEDs included using a momentary switch and FET driver?

Thanks

For two channels of output w/ATTiny13A, yes - we do that now with the FET+1 7135 drivers, accept the 7135 output goes to the same LED+ pad as the FET -- if you separate those outputs, they can drive 2 different LED's. For a 3rd channel, little more tricky - actually I don't think you can PWM on a 3rd channel, but for the 2 channels the FET+1 drivers support, PWM's work great per channel. For 3 PWM outputs, I believe the PIC MCU's are a better choice, as C_K used.

So, you could driver 2 banks of 7135's, or 2 FET's, or the combo as the stock BLF wight FET+1 drivers do. It's all a matter of wiring the outputs.

Hope someone can confirm or clarify this - think I'm wight right Smile.

You’re right. A few people have done it, including myself. Wight even made a driver specifically for driving white and secondary red led’s. (although that driver is a royal pain)

Update on the problem I mentioned about. Got it working better, but still weird by doing the following (I don't know which change mattered):

  • Used a different new 1uf Cap
  • Relocated the 7135 to the top of the FET
  • Removed the solder to ground on Star 3

Now I can go up through the modes, but not down. It always goes into configuration mode when I switch connect the cell. Meaning, I connect the cell, there is a delay, then the 2 short flashes for 7/4 mode groups, another pause, then the 2 flashes for memory, another pause, then moonlight mode turns on. I can click between the first 2 flashes to pick the other mode group and that works. I can't seem to get memory to work.

I'll try to run battcheck/offtime-cap.hex as TK recommended sometime soon, but reported the above in case it means something to anyone.

That sounds annoying to deal with.

The only way it should be able to enter config mode is if the OTC reads out a short press and the “fast_presses” value has its 0x10 bit set. This shouldn’t happen on “first boot” unless your OTC values are way, way off and you’re unlucky enough to have the RAM decayed into an unfavorable state.

You might want to try uncommenting this line and rebuilding:
if (fast_presses > 0x20) { fast_presses = 0; }

This will make it reset the counter if it appears to have decayed, which should prevent the immediate config mode. However, you’ll still need to fix the OTC if you want to access hidden modes or be able to move backward.

It sounds like your OTC must be always reading 255 no matter how long it has been off. This is likely a hardware problem, not just a matter of calibrating the software. This issue would also interfere with the mode memory function, since that’s only used on a long press (and it seems you can only get short presses).

In case you have trouble building it, I put up a custom build here:
http://toykeeper.net/torches/blf-a6/otc-fail-workaround.hex

^ I'm leaning towards hardware problem too. I probably won't get a chance to work on the driver until this weekend. I'll follow your advice and report back hopefully this weekend.

Thanks again for taking the time to share your thoughts on matter. :)

EDIT: It just occurred to me that I tested the driver (in all cases) right after doing solder work (including soldering the OTC). So the driver was probably quite warm. I understand from some the posts that temp is currently presenting a challenge with this driver/FW. I will try the driver out again tonight while it is normal room temp.

I second that! Results are amazing, but the work is a nightmare

Got a link for this driver? Not familiar with it (thought I knew all the wight drivers -- big fan!).

Ooops, here for the 2 output driver board: https://budgetlightforum.com/t/-/31956

Just starting to get back to modding after I had my shoulder operated on and trying to catch up. Wow you guys move fast.!!

Anyone have a VERY basic program with a hidden strobe, like a minidvr with strobe? How about something simple that starts on high? I see the one that can start on high set up for “stars” but I’m talking about something for a basic FET driver.

I don't have anything very basic... Smile

I got a somewhat hidden strobe in a e-switch driver: click for ON to 1st mode or next mode, hold for prev mode, long hold for strobe. Once a mode is set for ~1.2 secs, next click turns the light OFF. My favorite modes for this driver is 5, including a moonlight as the 1st.

A little while ago I asked about a single mode program with LVP. Nobody really had one. Could the standard nlite program just be modified so that each mode is 100%?

^ That (Tom E's post above) is absolutely my favorite momentary switch FW Tom. I use it in all my momentary lights (which is slowly becoming all of them).

Do you think you could make a variation that doesn't turn off?

It would force lock out to turn off. Most of buck drivers and zenier DD's have pretty bad parasitic drain.

Yep I have used that one and it’s great thanks. Anyway I can make that work on a clicky light?

Toykeeper has a STAR_1mode firmware in her repository.

I doubt the temperature is the issue. Being hot makes the timings shorter, so it should be easier to get med/long presses while hot and harder to get short presses. But you’re only getting short presses, and it sounds like it’s acting worse than it would if it was below freezing.

If you used 1912 and 4701 resistors, the temperature sensitivity is greatly reduced. 22k and 4701 is where the temperature issue happens.

Anyway, if you can’t get the OTC to show different values for different off-times, the only options are the mem-decay/noinit method or on-time.

You might be able to get a STAR variant to do it… depends on how much code you’re willing to change, and how you define “hidden”.

For example, you could do an offtime-based driver which goes H/M/L/H/M/L/strobe (like EagleTac does), or go with _the_'s approach where on-time will reset the normal mode loop after it has been on a while. So, you could loop H/M/L over and over as much as you like, as long as you pause at least once per cycle to let it reset. The only way to move past it is to go through the cycle twice quickly.