wight catchup

It looks like I’m back for a while after a long break. My time away from the forum started 30 months back and I’ve missed a few things. :wink: I’m really looking forward to taking advantage of the new features which have cropped up while I was gone - thanks for the hard work folks! :slight_smile:

While I get my thoughts together (and ask for help!) I thought it might be best to try and consolidate my notes here.

  • Parasitic drain / quiescent current in an e-switch driver can now be as low as ~0.02mA. Apparently this is primarily due to improvements in firmware implementations for sleeping the MCU. In ToyKeeper’s Emisar D4 review thread there is some discussion of the consumption starting at post #1568 and continuing for the next several posts. TK clarified this info for me in post #4900 as well.
  • MCU lockups/freezes in high-current applications have been mitigated. These were primarily a problem on the ATtiny25/45/85 rather than the ATtiny13. Forum user DEL put in a lot of good work with the oscilloscope and testing changes to the basic FET+1 circuit. Posts about that work seem to start with post #648 in the Attiny25/45/85 FW Development Thread. After putting in some work (and sharing more scope traces) DEL showed a good looking comparison of a modified vs unmodified BLF Q8 in post #991 of the FW dev thread. Really good work!
  • 1s drivers can now do “internal” or “inverted” battery voltage measurements on ATtiny25/45/85. The internal vRef is compared against Vcc. Forum users Halo… and DEL showed demo code in posts #731 and #1081 of the Attiny25/45/85 FW Development Thread respectively.
  • The OTC (“off time capacitor”) method used by clicky drivers to measure click length is now outdated may one day be outdated by the OTSM (“off time sleep mode”) technique. Initially we used the OTC to determine whether the flashlight was being turned on from an “off” state or a short “tap” had been used to change modes. (eg long press and short press.) The capacitor was attached to the MCU on a pin with an ADC and we’d check the voltage on that pin when the MCU booted, then start charging the capacitor. If the voltage on that pin was above a certain level on boot we would assume that there had simply been a short tap to change modes. Below that level the assumption was that the flashlight was coming on from an “off” state and the current mode should be maintained. Later this technique was extended to allow for a third “medium” press by using additional threshold values. The medium press could be used for extra UI navigation eg backwards mode cycling or similar. Unfortunately none of this was super reliable as capacitor temp, battery voltage, BOM, and probably even firmware/fuses could have effects on the initial capacity and drain rate on the cap. OTSM seems to stand for Off Time Sleep Mode according to Texas_Ace in post #1386 of the Texas Avenger driver series thread. It seems that in OTSM the MCU starts sleeping as soon as it detects power loss and wakes intermittently using a watchdog timer. A count is kept of the wakes in order to figure out how long the press is. Currently support for OTSM is limited to new-production ATtiny25 and ATtiny45, no support for the ATtiny85. Flintrock’s modified version of ToyKeeper’s Bistro firmware, Bistro HD, supports OTSM and Flintrock includes a technical discussion on OTSM here in the OP of the firmware thread: https://budgetlightforum.com/t/-/44344#OTSM_theory -> TK reviews the current situation for OTSM in this “wight catchup” thread in posts #25 & #38, Flashy Mike shares non-assembler proof-of-concept code in post #40 :))
  • Alternatively the OTC can be eliminated without adding more components if only basic short/long press support is needed. The noinit/memory-decay method can be used guess how long the light has been in the “off” state with enough accuracy to work. (this actually happened before I left, but I didn’t have a chance to try it!) According to Flintrock’s notes in the Bistro HD manual, Bistro HD has an option to make this technique more reliable.
  • Texas_Ace has created popular driver layouts and shared them in this thread: Texas Avenger ‘TA’ Driver series - Triple channel + Bistro or Narsil + Clicky or E-switch - The Ultimate open source driver! The schematic is available in the OP. R5 is the new resistor intended to prevent ringing (eg the one which DEL recommended).

Nice to see you back again my friend ... now wheres thst pic of Mula Jojovich ?

Welcome back. Did you miss us? :stuck_out_tongue:

Frankly I just came back for the condiments. :stuck_out_tongue:

Welcome back

You did peek inbetween, in all these months, admit it!
But always good to know you around

Oh, a lot happened
More folks here, less DIY and more commercial topics, but we convinced several manufacturers what flashlight enthusiasts really want and that shows on the market. And lots of great firmware development here. Some board design went the proprietary path, boost drivers for 6V/12V emitters made progress, DEL’s findings are the de-facto standard in the FET design.

To some of your notes

1. parasitic drain in (momentary) driver
A great step to lower the current was turning off ADC before going into SLEEP_MODE_PWR_DOWN. That in connection with higher values for R1/R2 had already brought it down to µA values.
About these ~4mA:
@Toykeeper, did you (besides underclocking) re-introduce the watchdog timer (WDT)?
At some point along the way, you had discarded it, presumably to gain space in the 13A. The WDT alone eats ~160 bytes in the firmware, that’s a lot when you want to cram some more stuff in 1k :wink:
LED off with WDT and interrupt lowers the current consumption of the system to way below 1mA, while without WDT my DMM showed ~4mA (again: LED off, just the Attiny who seems to suck this power). So this value sounds quite familiar.

3. voltage measuring without R1/R2
Afaik it’s beyond demo already.
The latest version of Narsil, NarsilM, does not rely on voltage divider any more so should omit the current drain in the divider (and frees Pin7, which of course is awesome).
I’ll see for myself, my latest Oshpark SRK driver should be in the mail any day.


Hey there wight! Great to see you back here! :beer: :THUMBS-UP: :THUMBS-UP:

Wight, welcome back! We never wrote/read each other on here, but in your absence I joined BLF, ordered and built a wight driver that is still working! Thanks for everything you did back in the day and I am glad you are back!

Welcome back wight. There’s a lot of nice new flashlights and led choices as well since you were gone.
I know not much about electronics but still use your driver designs occasionally.

It's good to have you back, wight!

Good summary Wight.

Now, please start contributing again, openly, and if you can, astonish us with something new, which is sadly needed.

I don’t really think that you have not been following things meanwhile. For 2 1/2 years.

Though this place can get far too intense and burn-out the creatives, which has happened rather a lot. Too much take, very little give. Or understanding. Only the most level-headed have stood the pace.

And don’t get sucked into the dark-side too badly (though the money could be tempting, if you play your cards wight). You might even get to see your name etched on every driver (again).

There is a hotsauce thread

Welcome back!

When you’re interested in drivers:

BLF programming Key
Look in Lexels signature for his drivers

Schoki started this thread:
LED drivers and Accessories you want, but don’t exist

Welcome back wight! I’m glad you’re able to return, and I hope you get to really enjoy BLF once again!

Nice to see you return :THUMBS-UP:

HQ - You caught me, I did peak! :blush: Not much though; I would estimate that I peeked once per 6 months on average. Could you provide relevant links to the boost drivers you are thinking of? I appreciate all the info!

SB - Thanks, it’s great to see so many folks I know still active on the forum.

duramax - I’m glad to be of service!

djozz - So I hear! The Emisar series from Hank seems very good. Someone mentioned the BLF Q8 and BLF GT in a PM; those look interesting and I’ll have to take a closer look at them. Are there any lights from the past couple of years that really stand out to you?

racoon city - Good to see you again!

Tom Tom - I would like to contribute again. We’ll see how it goes. My intention is that if I make any new layouts I would release source materials. I haven’t firmly defined my goals in that respect; I’d have to write everything down and find a license agreement which fits (probably a creative commons one). Making money on flashlights is not a priority for me today, I don’t think I’ll ever break even on my flashlight “investment”. When I do take bribes they’ll be in dark alleys and paid in unmarked flashlights. :wink:

joechina - That definitely looks like good catchup info, I appreciate the links!

DavidEF - Thanks, I’m very happy to be back and I hope to spend some time enjoying myself. :slight_smile:


CRX - :slight_smile: Are you drawing those UI cheatsheet diagrams?

No, just harvesting what’s available and sometimes editing in places.

Here are a couple of loneoceans’ boost drivers that might be of interest:


I joined BLF after you started your break, so I’d like to take this chance to say “thank you” for your previous driver work. I have some of the lights you helped make happen, and they are definitely a step up from the ones I had before that :THUMBS-UP:

Dope, I jumped to a conclusion on that. Thanks for putting it all together in one place.

They definitely sound interesting! I’ve only taken an initial glance, but I see that loneoceans has released the work under the CC BY-NC license which is great as well. I see that loneoceans also has an interesting FET tailswitch project: https://budgetlightforum.com/t/-/50404

Welcome back amigo!

I’m glad you’re back around CK; you took a long break yourself!