# How to charge backup battery with single regulator?

Having single LM1117 regulator for 3V, how can I charge it whenever there is Vin and protect from discharging through regulator whenever Vin is gone? It's for MTK GPS chipset which has VBackup pin.

Update with details:

Goal is to have a backup battery for GPS receiver to work more than 700 days without replacement, since there is no user access to device in order to replace it. Preferable cheap solution like 2032 or smaller battery with holder on PCB.

-
What type of battery is it? –  Oli Glaser Dec 24 '12 at 23:48
It's CR2032 lithium battery. –  Pablo Dec 24 '12 at 23:51
A series diode? –  EJP Dec 25 '12 at 0:06
@Pablo - can you confirm yours is a rechargeable type? Also, how long does it need to last for? (as passeby notes the current draw is very low for typical backup applications, so unless you have something else loading the battery or it needs to last for many years without being changed, then it may not be worth the trouble of recharging it) –  Oli Glaser Dec 25 '12 at 1:15
Your data and those of your respondents is inconsistent. Links to your chipset and the datasheet of the battery you will be using are essential. If you do not have an actual datasheet and if 227 days is not good enough then you CANNOT design what you want with the precision asked for with the data that you give. "Best guess" and "may be right" is the best that anyone can do. If you provide the information that you MUST have to do the job as well as you say you want it done then people here can give you a superb answer. Otherwise, the answer is effectively "Yes. blue. Not on bank holidays" –  Russell McMahon Dec 25 '12 at 10:58

First, A CR2032 is NOT a rechargeable battery type.

Second, on the MTK GPS, these normally have a dedicated vbackup pin, so it will decide when to switch to the backup battery, no need to worry about V-in affecting it. You might have to cut a trace, but we would need a model number or picture to confirm. The current draw for the backup battery is <10ua's, so you really shouldn't need to worry about charging a cr2303 anyway, they will last for years at that rate.

Intersil has a technical brief on adding charging to a backup battery solution. http://www.intersil.com/content/dam/Intersil/documents/tb45/tb456.pdf It is related to rtc backups, but the idea is the same.

Essentially, either a regulator, or a resistor divider, connected through a blocking diode will provide a trickle charge circuit for a real rechargeable battery, and prevent it from draining out.

UPDATE:
Both the datasheet you provided for the mt3339 chip, and this Application Note http://www.auroramobile.ru/content/files/pdf/gtop/g6b/gtop_module_application_note_a00__mt3339_series_.pdf answer your question! Page 8, Section 2.1.2 Vbackup Battery

The MT3339 has a built in charging circuit, made of a simple blocking diode and resistor, from VCC. When regular power is applied (normally 0.3v higher than the backup battery), power goes through the diode, and powers the vbackup pin. At the same time, power goes through the internal resistor back into the backup battery. This prevents discharging, and provides a nominal trickle charge to the battery.

Additionally, the battery you mentioned is a LiR2032 battery. It is 3.6v, and while capacity varies between manufacturers, most datasheets provide a 35ma to 45ma capacity. It requires a 4.2v charging voltage for maximum charge. This would require a vcc of 4.3 or so. And the math you are doing to compute how long the battery would last in a single charge is off. In perfect situation (no self discharge, constant output voltage and current, etc), 45mah / 7 ua is 6428.57143 hours, which is 267 days. But you need to take into account how the GPS module actually works with a backup battery. Since it has a internal blocking diode from VCC to VBackup, any time VCC is applied at (VCC + Diode Vf), the backup battery is no longer in use! So it will last significant longer, you know, if it weren't a rechargeable battery (datasheets show a self-discharge of 15% over 30 days after a full charge)

To compare, A regular CR2032 provides 200ma on average. This is 1190 days at constant 7ua current draw.

-
You can actually get rechargeable 2032 cells, such as this one, but the OP needs to confirm his is this type. –  Oli Glaser Dec 25 '12 at 1:10
Just to note also, the app note is for a 3.6V input, the OP has only a 3V input which will be dropped by the diode, but since the MTK GPS datasheet gives 2V-5V range for the backup pin, this should be okay anyway. +1 for the note on typical current draw and lifetime (might be worth adding some calculations for how long 10uA would take to discharge a typical 2032 to illustrate the point) –  Oli Glaser Dec 25 '12 at 1:29
@passerby: I'm not looking for switching mechanism. Never mentioned switching in my original post. Just to charge it. –  Pablo Dec 25 '12 at 8:54
@OliGlaser There are variants of the "2032" sized batteries, like the LR2032/LiR2032/CR2032R but the "CR2032" should always refer to standard non-rechareable lithium cell batteries. The one you link is a ML2032. The pre/suffixes are important. –  Passerby Dec 25 '12 at 10:09
And yes, at 3v from the regulator, it would make it incredibly hard to provide the require voltage needed to charge an appropriate 3v rechargeable cell. Luckily, the lm1117 is an adjustable regulator. Bumping it up to 3.3 or 3.6v only requires a change of a resistor, the mkt gps have a wide input range, and if not, a diode towards the rest of the circuit would drop the difference in voltage provided. –  Passerby Dec 25 '12 at 10:14