STAR Firmware by JonnyC - Source Code and Explanation

The FET & 7135 are controlled independently, so you can set whatever value you would like in the firmware for each, or a combination of both.

Important Note on this parasitic drain issue - it's being discussed in the 25/45/85 thread here, and they are mentioning the diode, besides the resistors, we use adds to the parasitic drain as well.

I did the tests. First removed the diode, bridged the pad with solder, and saw absolutely no difference in the parasitic drain at all - zero, nothing. Still doing in the 0.30 to 0.32 mA range.

Then I pulled the 22K resistor. The light acted kind of weird, because I didn't re-burn the MCU with firmware not supporting LVP. Anyway, it would settle down, and go into its sleep state. There I measured in the 0.16 mA range, which is about exactly what I expected - it went to half the draw, as calculated from the resistor values.

I've been looking around a lot on the forum, but can't get a definitive answer to my noob question..

I'm planning to build my first triple XPL HI in the DQG tiny 4. Can the BLF driver

Banggood link

be used to flash the STAR momentary firmware to and use it with the e-switch?

Then do I just connect the e-switch to ground and MCU pin 2 (PB3) and should be good to go? Or does it have to be piggy backed?

Or is the LD-2 driver the one to go for?

I already have the BLF driver.

I'm sorry if this is in the wrong thread, but help is much appreciated!

The DQG Tiny 4, reviewed here (https://budgetlightforum.com/t/-/36824), has no room to swap drivers. The LED is mounted on the driver itself to save space. Unless you know a method of doing so, I sure don't know how it would be done. These super compact lights make modding/upgrading difficult, to say the least.

Thanks for your reply!

Firelight2 already dit it with the tiny 3
DQG tiny 3 mod

Since the triple carclo optic is shorter, there is a few mm to play with.
The tiny 4 unscrews really easy, just might need to machine some parts out of the head.
It’s not going to be easy, but I’d like to attempt it.
I already modded a few P60 dropins and a thrunite TI with the 10DD driver from RMM with the XPL Hi. This is a nice step up :wink: No guts, no glory.

Since the heatsinking will be “marginal” at best, learning to flash and adjust the settings would be a nice extra skill to learn.

I’ve got all the parts inbound, but can’t find out about the BLF driver and momentary switch options… :question:

Interesting… I haven’t tried re-flashing a BLF A6 driver from BG, but as long as they didn’t lock it, which I’m pretty sure they didn’t do, I would think it could be re-flashed with STAR momentary just fine.
Firelight2’s thread doesn’t have much detailed pics, but he mentions the switch is side mounted and has 2 tiny wires - one goes to pin #2, the other must go to ground (batt-).
As far as mounting the driver, he describes a bit after the 1st pic, and has one pic - partially drills it out, and uses the remainder to mount the replacement driver.

It’s very creative work he did there.

Thank you for the answer Tom E! The mod Firelight 2 did, does look really nice indeed. I’m hoping I can pull it off with the BLF driver. Very nice STAR firmware, hope I get it working!

I’m think’n this mod is a bit beyond my comfort zone. The copper work and mounting of the driver and MCPCB based on what you have to work with is a challenge for me. The results are rewarding though - a triple compact e-switch with a big cell (18650) is a rare combo.

I haven’t tested it yet, but I think there are a few methods left to reduce power. A big one is to turn off the ADC in sleep mode, and basically turn off everything except WDT and/or pin change interrupt. This will require a bit of extra code on sleep and wake, to disable/re-enable things, but the longer standby time is probably worth it. I especially want to get power draw as low as possible for the “smart” tailcap mods, so it can be both fancy and efficient.

That’s the other thing on my list to try. :slight_smile:

In theory, the voltage divider values can be increased as long as their relative values are still proportional. Multiplying each by, say, 10X, should reduce standby current. I think. So instead of 19.1k and 4.7k, maybe 191k and 47k?

… and now I see Tom E already did both of these things, oops. I should read more before I respond. :slight_smile:

No prob! I’m a mess with this - I got things posted between 3-4 threads. Did a bit more testing, and it’s looking real good so far. Love the 0.016 mA draw from an 85. Only got bout 10 resistors with the 10X values, so I’ll be limited initially, but plan on updating a bunch of my e-switch lights running Narsil with the indicator LED’s. Modded Narsil this eve to have a quick way to toggle the locator LED functionality: quick click followed by click&hold, the let go as soon as the main LED goes OFF. Maybe sounds a little complicated but takes less than a 1/2 sec.

I just don’t think we gave e-switch support much attention, and that’s why these things haven’t been explored - one line of code cut parasitic drain by half, then the resistors cut it by 90%.

Anybody have a version of STAR offtime with strobe added? Or something comparable that works on standard 17DD hardware?

I got it for the 25 posted up on my google drive share w/mode changing that works like luxdrv (short cycle). Not sure if I got a version for the 13A, think I do, but not sure it’s posted - @work now so might not have access.

Thanks, been a change of direction though. I'm updating a light I built for somebody a long time ago and it had phase-correct luxdrv on it, no ramping mode, with strobe & battcheck. Turns out it's the strobe he doesn't use, and I guess hacking luxdrv's battcheck into STAR would be impractical. He's OK with the way it was before, I'll just give it a fast PWM version of luxdrv and call it done.

Ahh - luxdrv was my baseline driver code for years, tweaked to each individual's mode choices. I kind of abandoned it now in favor of STAR offtime, then tweaked my flavor of STAR offtime with some unique features, but then went on to the 25/45/85 stuff. Sorry - it's impossible for me to keep all these variations/tweaks in my head - my heads spinning from just typing bout it .

I have a version of STAR with a strobe I can link when I get home tonight, but is there a reason you don’t want to use TK’s blf-a6 firmware? It has strobe functionality built-in and you can just disable all of the other bells and whistles that you don’t want (that’s what I do)

The blf-a6/tk-otc.c code is made specifically for easy mods. It has the config mode stuff removed to make room for other changes, assuming that if you’re compiling it you probably don’t need runtime config options. Most things are easy to turn off or change if you don’t want them default. I don’t have one specifically configured as described though.

I would like to build a flashlight for general & bicycle use.
I am thinking for h-l-strobo.
Is it possible to add a slow strobo in Star firmware?