Firmware Questions

I’ve just returned to the flashlight building world after about a year away. Before, I never took the time (had the guts) to wade into the world of flashing custom firmware in drivers. I’ve just spend the last 2 days reading the various threads and doing searches on questions that came up as I read.

I just want to say a BIG “thank you” to all of those that contributed to the various threads on this topic. It has been a big help on a topic that has a steep learning curve (at least for me). I still have 2 things I’m unclear on.

I read that with fast PWM, the light can never go to 100% and will never be completely off. How much short of 100% will it be? Will high PWM have a higher battery drain when off?

What is a FET driver?

Thanks again to all those who have given their time and efforts to make this topic more understandable!

Awesome! I hope you enjoy the new hobby of flashing firmware :)

With fast PWM, at least how it's implemented in STAR, it WILL be 100% on, but it will never be completely off (at least that's my reading of the Attiny13a datasheet, haven't pulled out the oscilloscope yet). That doesn't matter though, because with STAR you will always be in a mode with a PWM higher than 0, and in STAR_momentary the light will go to sleep when it is on mode 0.

EDIT: I just pulled out the oscilloscope and confirmed that with fast PWM, the way it's implemented in the STAR firmware, results in 100% on. I noticed the slight "blip" (my simple scope could barely pick it up) when PWM was 0 in fast PWM mode, but no blips at 255.

Check out www.mtnelectronics.com for FET drivers, he may have an explanation there. Basically it's like a switch, with the PWM turning it on and off (just like the 7135's on NANJG drivers), but with no current regulation. This means that it essentially goes direct-drive when PWM = 255. It's for your "hot rod" lights, where current regulation is not needed.

I’ll post my quesion here too….

Modes using a FET are still set by PWM levels, but since there is no regulation, as the battery voltage drops the actual output will drop as well, correct?
.
assuming that is true, does STAR allow different PWM levels for different voltage levels?
.
i.e., if I had a “medium” mode set at PWM = 150 normally, could STAR be set to raise the PWM level to 175 when Vbatt falls below 3.8v?

Cool. It makes sense. Thanks for the reply.

www.mtnelectronics.com did indeed give a good explanation of FET drivers.

Yes, output drops. No, STAR does not allow for different PWM levels for different voltage levels. I’m sure it’s something that’s crossed many of our minds, but I expect that are a handful of reasons that it hasn’t been implemented… mostly reasons which come back to all the math required I think. Lookup tables would be needed, which means that someone has to calculate the tables, the tables are not the same for every LED, etc… (EDIT: and then it all has to fit into the available flash space, which is already packed on the ATtiny13A)