E-switch in the tailcap mod via additional button cell

26 posts / 0 new
Last post
EasyB
Offline
Last seen: 1 hour 26 min ago
Joined: 03/09/2016 - 15:24
Posts: 1031
Location: Ohio
E-switch in the tailcap mod via additional button cell

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.

Edited by: EasyB on 03/07/2017 - 12:14
The Miller
The Miller's picture
Online
Last seen: 14 min 33 sec ago
Joined: 12/14/2015 - 12:08
Posts: 7514
Location: Charente France

Respect ! This I way beyond me so highly impressed!

MRsDNF
MRsDNF's picture
Offline
Last seen: 1 hour 1 min ago
Joined: 12/22/2011 - 21:18
Posts: 10907
Location: A light beam away from the missus in the land of Aus.

Yep, what the Miller said. SmileThumbs Up

My current and or voltage measurements are only relevent to anything that I measure.

Budget light hobby proudly sponsored by my Mastercard and unknowingly paid for by a hard working wife. 

djozz said "it came with chinese lettering that is chinese to me".

old4570 said "I'm not an expert , so don't suffer from any such technical restrictions".

Old-Lumens. Highly admired and cherished member of Budget Light Forum. 11.5.2011 - 20.12.16. RIP.

 

MILSPEC
MILSPEC's picture
Offline
Last seen: 17 min 46 sec ago
Joined: 10/12/2016 - 06:02
Posts: 446

really like this mod.

Firelight2
Firelight2's picture
Offline
Last seen: 6 hours 28 min ago
Joined: 04/08/2011 - 15:17
Posts: 2101
Location: California

Wow! Amazing work.

Looks like this would work with any e-switch driver.

EasyB
Offline
Last seen: 1 hour 26 min ago
Joined: 03/09/2016 - 15:24
Posts: 1031
Location: Ohio

Thanks!

It is very satisfying to see it work as I’ve put a lot of thought into it.

Yes, I think this should work with any e-switch driver.

Firelight2
Firelight2's picture
Offline
Last seen: 6 hours 28 min ago
Joined: 04/08/2011 - 15:17
Posts: 2101
Location: California

I’d like to try to replicate this mod, but I’m not sure where everything should be wired up.

Would it be possible to post diagrams, labeled pictures, or more detailed instructions on where to wire what. I don’t want to do it wrong and have my flashlight explode.

Thanks!!!!! I have so many lights I’d like to try this with. Cool

Lexel
Lexel's picture
Offline
Last seen: 10 hours 31 sec ago
Joined: 11/01/2016 - 08:00
Posts: 1797
Location: Germany

Here is a topic for eswitch modding
http://budgetlightforum.com/node/26093

Just add a bleeder parallel to LED and a charge resistor in front of the small battery

EasyB
Offline
Last seen: 1 hour 26 min ago
Joined: 03/09/2016 - 15:24
Posts: 1031
Location: Ohio

Firelight2 wrote:
I’d like to try to replicate this mod, but I’m not sure where everything should be wired up.

Would it be possible to post diagrams, labeled pictures, or more detailed instructions on where to wire what. I don’t want to do it wrong and have my flashlight explode.

Thanks!!!!! I have so many lights I’d like to try this with. Cool


Sure, I can make some graphics that make the connections a bit more clear.

FYI, there are also smaller Li ion 1220 cells for smaller lights.

I looked into using a super capacitor instead of a battery, but I don’t think it would work for this purpose. They just don’t store enough charge. Super capacitors in this size range have around 0.5F, so they would store around 4V(0.5F)=2C of charge. The attiny13 takes about 2mA when it’s active, so that means the cap would have enough charge for roughly 2C/(0.002C/s)=1000s, which is only about 15 minutes of on-time. Apparently the Ti tool uses a super cap to power its tail e-switch, so I’m not sure of how that works specifically. I would guess there is less of a power requirement.

Lexel
Lexel's picture
Offline
Last seen: 10 hours 31 sec ago
Joined: 11/01/2016 - 08:00
Posts: 1797
Location: Germany

The tool only powers a fet as eswitch in tailcap
MCU is in the head

tuelleric
Offline
Last seen: 1 month 1 week ago
Joined: 12/05/2016 - 12:17
Posts: 107
Location: Germany

Wouldn’t it be possible to do it that way?

You just need to reverse the battery and make a negative contact area around the plus pole. The flashlight body now is the conductor for the regulated current with positive voltage.

What do you think?

EasyB
Offline
Last seen: 1 hour 26 min ago
Joined: 03/09/2016 - 15:24
Posts: 1031
Location: Ohio

tuelleric wrote:
Wouldn’t it be possible to do it that way?

You just need to reverse the battery and make a negative contact area around the plus pole. The flashlight body now is the conductor for the regulated current with positive voltage.

What do you think?


I think this would work, but not with the FET drivers we normally use. I think a P channel FET is needed for this arrangement.
EasyB
Offline
Last seen: 1 hour 26 min ago
Joined: 03/09/2016 - 15:24
Posts: 1031
Location: Ohio

I realized I miscalculated the bleeder resistances necessary to keep the coin cell charged. I updated the OP with details.

EasyB
Offline
Last seen: 1 hour 26 min ago
Joined: 03/09/2016 - 15:24
Posts: 1031
Location: Ohio

I lowered the resistance of the bleeder resistors. I ended up using 470 ohms on the driver and 100 ohms in parallel with the LED. These resistances will lead to a deltaV for the coin cell of (570 ohms)(0.18mA)=0.10V below the main cell voltage.

The resistor in parallel with the LED had an unexpected effect. It lowered the lowest brightness possible with a FET only driver. It lowered the lowest brightness from ~5 lumens to 0.5 lumens, depending on the battery voltage of course, turning it into a proper moonlight mode. The lowest mode brightness can be tuned by adjusting that resistance. Adding this parallel resistance has a similar effect to adding a gate resistance, which I recently investigated to achieve the same effect.

Lexel
Lexel's picture
Offline
Last seen: 10 hours 31 sec ago
Joined: 11/01/2016 - 08:00
Posts: 1797
Location: Germany

Another solution for tailcap driver without coin cell is use the tube only as negative conductor for the LED
And use a bleeder resistor parallel to the LED that can fully power the MCU

But you need to adjust the LVP and VCC detection resistors
As well as moon modes levels need to be adjusted as the bleeder uses current thats not going through the LED

EasyB
Offline
Last seen: 1 hour 26 min ago
Joined: 03/09/2016 - 15:24
Posts: 1031
Location: Ohio

Lexel wrote:
Another solution for tailcap driver without coin cell is use the tube only as negative conductor for the LED
And use a bleeder resistor parallel to the LED that can fully power the MCU

But you need to adjust the LVP and VCC detection resistors
As well as moon modes levels need to be adjusted as the bleeder uses current thats not going through the LED

I don’t think this would work.

If you added the second bleeder resistor that I have (connecting driver positive to FET drain/body tube) it might power the driver with the flashlight off, but when the FET opens the voltage at the driver will fall to nearly zero.

Lexel
Lexel's picture
Offline
Last seen: 10 hours 31 sec ago
Joined: 11/01/2016 - 08:00
Posts: 1797
Location: Germany

It works I have a light here on the table which does exaclty this
when I measure parallel to the LED I get 33 Ohms for the bleeder in this imalent light
I bet a 100-200 Ohms will do fine as well

EasyB
Offline
Last seen: 1 hour 26 min ago
Joined: 03/09/2016 - 15:24
Posts: 1031
Location: Ohio

What are the details of this light?

If I’m reading your drawing correctly it looks like if the FET closes (becomes a short) the MCU positive and negative are shorted together.

Lexel
Lexel's picture
Offline
Last seen: 10 hours 31 sec ago
Joined: 11/01/2016 - 08:00
Posts: 1797
Location: Germany

The light must use a little PWM even on highest mode to charge a capacitor
this also leads to the relatively small bypass resistor of 33 Ohms

tuelleric
Offline
Last seen: 1 month 1 week ago
Joined: 12/05/2016 - 12:17
Posts: 107
Location: Germany

Actually, I still do not get this. How is the driver connected to positive when the light is running?

EasyB
Offline
Last seen: 1 hour 26 min ago
Joined: 03/09/2016 - 15:24
Posts: 1031
Location: Ohio

Here is a diagram of the circuit described in the OP.

I am currently using 100 ohms for the resistor near the LED and 470 ohms for the other resistor. The total resistance will affect the voltage at which the coin cell settles and the charge speed. The top resistor might affect the very low modes of the light. The bottom resistor will affect the parasitic drain of the coin cell when the flashlight is on. As described in the above posts.

EasyB
Offline
Last seen: 1 hour 26 min ago
Joined: 03/09/2016 - 15:24
Posts: 1031
Location: Ohio
tuelleric wrote:
Actually, I still do not get this. How is the driver connected to positive when the light is running?

If you are referring to the system Lexel described: as Lexel wrote, I think there must be a capacitor or something in parallel with the MCU in order for the MCU to be powered while the light is on. In his diagram the MCU essentially receives the voltage across the FET/driver, which would be mostly zero when the FET is 100% on, and at some non-zero value when the FET is not completely on.

There would be some nice things about using a capacitor instead of a coin cell, like not having to worry about over discharging and ruining the cell while storing the light without a main cell, for instance. But I suspect that capacitors in this size range just don’t store enough charge to reliably perform the function of powering the MCU, at least without making severe power restrictions on the flashlight.

tuelleric
Offline
Last seen: 1 month 1 week ago
Joined: 12/05/2016 - 12:17
Posts: 107
Location: Germany

Yes, I was referring to Lexel’s drawing. I still think that the only way to avoid a coin battery or a capacitor is to turn the battery by 180° as I tried to illustrate.

Lexel
Lexel's picture
Offline
Last seen: 10 hours 31 sec ago
Joined: 11/01/2016 - 08:00
Posts: 1797
Location: Germany

I did a bit more research in the tailcap driver

actually its not using a capacitor it seems to use a inductor to power the MCU while the LED is on

EasyB
Offline
Last seen: 1 hour 26 min ago
Joined: 03/09/2016 - 15:24
Posts: 1031
Location: Ohio

Interesting. It must have a lot less drain than the ~2mA of the attiny13A while on.

Lexel
Lexel's picture
Offline
Last seen: 10 hours 31 sec ago
Joined: 11/01/2016 - 08:00
Posts: 1797
Location: Germany

It is not using an attiny 13A
it is using a much smaller smd MCU

I think the Inductor with some caps and diodes are the power supply for the MCU,
even PWM the FET a bit on highest level will result in a negative voltage in the inductor powering the MCU