I'm doing an application using RTC on STM32F091. I'm using a small rechargable Li-Ion battery (such as MS920SE-FL27E) as the Vbat power source for the RTC.
My concern is, how can I protect the battery from deep discharge?
- Battery is small (due to physical restrictions), thus changing it after one 'season' (3-6 months of OFF time) is not a very good option.
- hoping to reuse the battery more by cutting off the battery usage when V level is getting dangerously low.
I'm aware I can measure the Vbat voltage level to know when the battery is getting too low. What would be a good way to cut power from the Vbat entirely (and thus 'kill' the system completely) in RTC mode?
My one idea was to abuse the RTC_ALARM output. Set it high (during normal application) to keep a transistor open in-line with VBAT (ALARM should keep the state when VDD cycles on/off...). If VBAT is measured too low, the ALARM would be LOW and killing the connection to VBAT. Haven't been able to think of any other idea though :/.
EDIT 22.06 From 1st Answer I made a PMOS equivalent circuit. Current consumption for such circuits seems to be an issue for me. RTC usually consumes <3uA.
EDIT 28.06 Took some time to look for appropriate MOSFET and I believe I have found it. NX1029X (using the P-channel one). I set the gate voltage so that the MOSFET should turn itself off around 2.3V-2.4V of RTC Battery voltage. Seems to work. Only issue is, can I reliably use MOSFET's Vgs, to make the cutoff? Have used it before though but on higher voltages (was easier to set the gate-source voltage).
I'd go for this: RED (Chl A), BLUE (Chl B), GREEN (Ch C) (capacitor is for avoiding convergence issues)
ON current is ~470nA extra, so 3.47uA. OFF consumption is ~20nA (around the transition 0.5uA or so). I think I can live with that :P.