I have been playing with Toykeeper’s ramping FW on my e-switch lights and really like the features, so I’ve been thinking of ways to convert my rear clicky switch lights to e-switch. There are generally two ways to do this. You can keep the driver at the head and just route the wires for the e-switch back to the tailcap, but this requires some fancy contact engineering to be able to make and break an additional connection when you replace the battery. I’ve seen a couple threads of people doing this, here and here.
Another way is to put the driver in the tailcap so you don’t have to route the e-switch wires, but then you need a separate power source for the driver MCU and FET gate. I chose this method. I purchased a Li-ion 2032 rechargeable coin cell and got to work.
The light I chose to do the mod on is an Ultrafire F13 which I’ve modded to a triple dedomed XPL and CUTE-3 optic.
I made a pill for the tailcap consisting of the e-switch at the left attached to the 2032 cell, then a plastic spacer, then the retaining ring with the driver attached. It is lightly epoxied together.
The battery positive is connected to the LED positive, but is not connected to the driver positive. The LED negative is connected to the flashlight body/ground.
The driver ground is connected to the main battery negative, but it must be separated from flashlight body/ground in order for the FET to act as a switch. I have a plastic ring separating the driver ground ring from the retaining ring.
The output from the FET is then connected to the retaining ring and flashlight body. Coin cell positive and negative are connected to driver positive and ground, respectively. Connections are soldered to the coin cell.
I used a bleeder resistor system to keep the coin cell charged. There is a 4.7KOhm resistor in parallel with the LED, and another 4.7KOhm resistor connecting the driver positive/coin cell positive to the flashlight ground right after the FET. The resistors are placed such that when the flashlight is off the two batteries are in parallel through the two resistors and the coin cell can charge from the main cell. When the light is on the coin cell has a parasitic current through the one 4.7KOhm resistor, and it powers the MCU. Together this is about a 3mA current when the flashlight is on. The coin cell is ~50mAh (rated), so this allows for a long on-time.
The driver is a 17DDm FET+1 from mtnelectronics, but the FW on the attiny13A is FET-only so the 7135 is not used. I have been working to make this FW work with FET+1 drivers in order to get a lower low, but have not been successful yet.
I plan to do this e-switch mod on my S2+ and thrunite T10, hopefully with working FET+1 ramping FW.
Update 3-7-17:
It turns out the two 4.7KOhm resistors are much too large to keep the coin cell charged while off. I discovered this when I found the coin cell had discharged. This is because of the parasitic currents of the MCU in sleep state (~0.18mA) and from the voltage divider for voltage monitoring (~0.17mA with 23.7KOhm total resistance). I have removed the voltage divider so this leaves just the 0.18mA current to deal with. The charge current is equal to the difference in voltage between the main cell and the coin cell divided by the total resistance in the bleeder circuit. The voltage of the coin cell will settle at the value such that the charge current equals the parasitic drain of 0.18mA. This means that the voltage of the coin cell will settle to some value that is lower than the main cell voltage.
The coin cell will have a voltage that is lower by the amount:
deltaV=R(0.18mA)
where R is the total resistance of the bleeder circuit which consists of the resistor that is in parallel with the LED and the resistor on the driver that connects the driver positive to the flashlight body after the FET.
As can be seen, with the two 4.7KOhm resistors the deltaV would be 1.7V, which is too much; this is why the coin cell discharged. A lower total resistance of 1KOhm means the deltaV will be 0.18V. This deltaV is still significant but workable. It means the coin cell will always be at a lower state of charge than the main cell.
The lower resistance required means the parasitic current of the coin cell while the flashlight is on will be higher. If I choose 800Ohms at the driver and 200Ohms at the LED, that is around 3.8V/800Ohms=4.8mA from the coin cell while the flashlight is on. This is significant but again is workable if the coin cell actually has around 50mAh capacity. Also that parasitic drain is for when the FET is open 100%; in lower modes the parasitic drain would be less.
So the constraints for this system to work are narrower than I first thought. The main possible failure is when the main cell is at a low voltage. The coin cell will be at an even lower state of charge and the allowed on-time could be lower than I’d like.