Flashlight Firmware Repository

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.

Nope, clicky switch lights and e-switch lights need completely different firmware.

Thanks for the info toykeeper. I might have to give that H-M-L H-M-L strobe a try. That just might do it. I know I used that one before but I can’t remember exactly which one it was. I’ll go and look through them again.

I don’t think any of them do that by default, but it should be a relatively easy change to write.

I think I should be able to figure it out. If it works out I’ll let you know. Thanks again

ok. I am completely lost. I have read every post on this thread and multiple other threads like this one and this one and this one. I am using a Mac, which makes it worse because most of the info is about using AVRDude. I downloaded Crosspack-AVR. I am unsure if there is anything else I need. Is there a step by step guide on how to do this programming? I read the info at Ladyada.net and I still don’t understand it at all. I saw a thread that had screenshots, but none of the pictures were viewable. I have built 2 of the USB devices to flash the MCU’s but I don’t even know how to properly test them. I have 20 Nanjg 101-AK-A1 that I want to change the firmware on and I have 20 separate Attiny13a’s that I’ve ordered just sitting there. Where is the guide for morons for this? I just want to do simple programs, but it seems I may have just wasted money. I don’t usually let stuff get to me, but I just can’t wrap my brain around this stuff.