Mike C drivers: v6 series, ATtiny841 based (obsolete and replaced by v8 series in OP, post kept for reference only).
There are the v6 versions of my F series drivers. The v6 boards are on the way from OSH Park so they are currently untested.
The idea behind these drivers is to have a single design that is compatible with single or multiple cell voltages, and clicky, momentary or dual switch setups, all using the same firmware. I went with the 841 as it has the exact same pin configuration as the 84A MCU that I was usings earlier. The 841 is newer and has far better power consumption characteristics, mainly for OTSM but also for lights with only a momentary E-switch. Another benefit as that the 841 has 8 PWM capable pins, 6 can be PWM:ed at the same time.
F-2: Single sided 17mm driver with FET and 2 x 7135s
F-4: Double sided 17mm driver with FET and 4 x 7135s
If the two 7135s on the battery + side are left out, it’s identical to the F-2 except the battery contact pad is slightly smaller. In theory this makes the F-2 obsolete but I prefer the cleaner F-2 if I am building a single sided driver for a light with limited space.
Some technical details about these boards:
OTSM with a 0805 capacitor. I’ve got consistently around 20 seconds of measurable off time with a 100uF capacitor. I’ll test 47uF and 22uF caps later.
OTSM is detected by pin change interrupt. The output of the voltage divider is connected to two pins, one for voltage monitoring, the other for power off detection. In order to keep voltage divider output high enough for pin check I’ve used two 3K resistors. As this only halves the battery voltage the 2.2V internal reference voltage is used for LVP. This setup works very well.
The negative side of the voltage divider does not go to ground, it goes to a pin on the MCU. I do this so I can turn off the divider when in sleep mode to minimize parasitic drain for E-switch only lights.
For multi cell lights I’ve used the LT1761 LDO. It does not leak reverse current so it’s good for OTSM. However, for single cell lights it’s not needed, a SOD323 diode will do and can be mounted on the LDO footprint. I’ve modified the LDO footprint to show how the diode should be mounted:
They are 17.8mm diameter so they can be filed down for snug fits. The QFN MCU doesn’t have accessible pins for flashing, so vias are provided for acupuncture style flashing:
The vias are marked for the pins used for flashing:
V = VCC
R = Reset
G = GND (there is two of them as one is reserved for E-switch)
F = PA4 (SCK)
S = PA5 (MISO) (there is two of them as one is reserved for E-switch)
D = PA6 (MOSI)
Voltage divider output on PA7 and PA6.
Voltage divider negative on PB0.
E-switch on PA5.
FET on PA4.
PWM dedicated 7135 on PB2.
1 x constant current 7135 on PA1.
2 x constant current 7135 on PA2 (F-4 only).
C1 is 0603 input capacitor. I use 1uF.
C2 is 0805 OTSM capacitor. I’ve used 100uF, will test 47uF and 22uF.
R1 is 0603, it’s the same as DEL’s R5 “input resistor”. I use 4.7ohm.
R2 and R3 are the voltage divider resistors. For 1S lights both R2 and R3 are 3K, for 2S lights R2 is 9K, R3 is 3K.
R4 is FET gate resistor. I use 100M.
My full feature firmware won’t be of interest to most but I can share a sort of baseline firmware when I have it ready. It should be enough to get people going. However, there is no point in sharing it if no one actually orders any of these boards. I have noticed that there is sometimes a lot of interest for some things, but once these things are done and shared, no one ends up trying them out. From what I can see I am not alone experiencing this. So, before I commit to making a readable, understandable firmware with all the documentation that is needed for easy understanding, I’ll wait and see if there is any real interest for these boards. Until then I’m just going to save myself the hassle of making comprehensive documentation that has little more interest than for educational purposes.
As usual, these drivers are the results of not just my own ideas and time spent, but of many others like Flashy Mike, Flintrock, fixed it, DEL, Lazy-R-us, Toykeeper, Texas_Ace etc etc… You all deserve credit (and a kick in the butt if you ask my girlfriend).