STAR Firmware by JonnyC - Source Code and Explanation

Is that from the MCU alone? Or is there perhaps also a voltage divider with resistors of a few Kohm only? Maybe Iā€™m an idiot for believing any of the numbers but the spec sheets for both the 13A and the 25/45/85 claim about 5 ĀµA in power-down mode with the watchdog timer running and one tenth that without. What youā€™re seeing is nearly 100 times more so something must be off (spec, hardware, firmware).

See over here . Itā€™s not quite what you want as I modified it for pilotdog68ā€™s triple channel driver but it would be easy enough to add a few ifdefā€™s to make the pin 3 turbo optional. As it is now, it would still work but without a useful turbo timeout. Oh and it isnā€™t tested yet so it might not quite work at all :wink:

Dunno, it's actually measured off a full up flashlight at the tail using either a wight v009 FET+1 driver or a MTN-17DDm driver, on both a Fluke DMM and a UNI-T UT50B DMM. No watchdog running, just the e-switch will wake it up. No idea if this is the right way to measure it or not. Again, I'm no expert at this stuff at all and don't claim to be. All I did was set the meter to read DC milliamps, moved the DMM lead to the connector marked for mA's, so I think I did it right?

If my measuring method is somewhat correct (no idea), then at least it proves our custom boards and firmware draw less amps than say a stock Eagle Eye X6R.

I can also see it step down when the power saving mode kicks in. I delay it for 10 seconds after turning the light OFF (PWM=0). For example, the ZY-T11 clone with no indicator LED was at 4.91 mA with the MCU running, then dropped to 0.302 mA after 10 secs (sleep mode).

Edit: did A few more tests of stock Olights, SWM, and NiteCore and it's interesting. These are much lower in power saving modes:

Olight S15: 0.001 mA, Olight S1: 0.002 mA

NiteCore MH20: 0.027 mA (button LED blink off), 0.061 mA (button LED blinking enabled)

So, there is something goin on here - why these lights are so much lower in standby than our designs. I thought we can't do any better in firmware (sleep mode with only the e-switch configured to wake it up), so would the 2 voltage divider resistors be actively draining power from the cell?

Edit #2: Again, not sure bout this, but using V = I * R, for 4.2v I calculate the 4.7K and 22K resistors in series would eat 0.157 mA. If so, that's bout 1/2 the current I'm measuring. Partially explains the amps draw at least.

Iā€™m no expert either but I think you have a reasonable method, as long as your DMM is able to measure that low (it looks ok by its spec sheet). I donā€™t know what RMM actually puts on the MTN-17DDm but his ā€œFET+7135 DIY kitā€ has 4.7k and 19.1k resistors. So thatā€™s about 24k between GND and VCC, meaning around 0.18 mA drain for 4.2V even if you rip the MCU off the driver. I think there was talk in wightā€™s driver thread about increasing these resistors for this reason but I donā€™t remember if it went anywhere.

Edit: Ok so you beat me to it :) But there's still a bit of current missing. Could be the firmware not shutting down everything it should. The missing current is about what the spec sheet gives for a idle MCU (vs powered off), or roughly between 0.3 and 0.4 mA.

I have a question about the STAR momentary firmware offered as an option on the mountain electronics FET+1 7135 driver. I have not gotten to the point of modifying FW code, so this is just a question about what I would get from mountain electronics.

Iā€™m interested in having a very low moonlight. Am I correct in thinking that the moonlight mode and low modes will use just the 7135 chip? If I was to do the custom mode levels, at which PWM % level would the output switch to just 7135 output?

Iā€™m trying to understand the user interface. This is my understanding from what Iā€™ve read.
From off:
short click turns on to lowest mode
long click turns on to highest mode
From on:
short click moves to next higher mode
double click moves to next lower mode
long click turns off?

Is this correct?

Thanks.

Thanks for being bugged :slight_smile:

I tried to measure the drain, but realized I did not have the correct equipment to measure that low.

If Haloā€™s idea is implemented using the internal vref, then we should see most of that drain gone.

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?