# Capacitor as power buffer for battery change

I have a quite simple question and quite a simple circuit in mind. I have an application, which is battery powered and uses a RTC clock for timekeeping. I would like to preserve the time during battery change, which is to be expected less than 10mins. The RTC consumes 5uA max. and keeps working until Voltage is as low as 1.3V.

According to the standard RC discharge formula, a capacitor of about 1mF would be enough.

Is this circuit for backing up the RTC too simple/ have I forgotten anything on there?

simulate this circuit – Schematic created using CircuitLab

• The circuit is enough to work as a short-time backup. Placing R1 as a limiter is good because a 1000uF capacitor can draw a relatively high amount of current (if it's discharged, of course) for a short time right at the first startup after battery replacement. But you can increase R1 to decrease that current further (this increases the battery life). Even if a 5k resistor will drop about 25mV during the time that RTC is supplied by C1. You can test it and see if it works. Feb 22, 2021 at 18:00
• Just a note, C1 must be rated for 3.3v or greater. Many supercaps are only rated for 2.7 or 2.5v. If you have to use two in series to double the voltage rating, remember the total capacitance is divided in half. Feb 22, 2021 at 18:18
• This was pretty much how old ultracaps looks like in the 90's with high ESR for PC's. Some RTC's might like 0.01uF as well. Feb 22, 2021 at 18:20
• You might also consider a rechargeable coin cell. There are LiFePO4 coin cells that can probably do what you need. You can set them up easily to charge from the 3.3V rail. Feb 22, 2021 at 19:00
• @mkeith I thought about that, but what would be the advantage here? I want it to be as simple/cheap as possible. I think a capacitor will do, but thanks for the hint! Feb 22, 2021 at 21:03

R1 in your circuit limits the charge current when you connect the new battery. It is not related to the discharge time (as the "equivalent resistance" of your RTC is much higher).

Your capacitor holds 3.3 mC (3.3V x 1mF) and will hold 1.3 mC when discharged to 1.3 V.

Assuming a 5uA discharge, this means 6 minutes and 40 seconds. Since you mentioned this is the max. current, it seems fine from the info you provided. You could test the discharge rate of the open capacitor to check the leakage current.

• Thanks a lot, I was aware that the equivalent resistance of the RTC is in the MOhm area, just formulated it badly :) Feb 22, 2021 at 21:00

Just to supplement already good answer by @vangelo, you may find detailed application notes related to the use of backup battery for you specific MCU. Something like this one for Vbat input on STM32.

Also note that some MCUs even have built-in charging circuits for external batteries/capacitors. For example you can configure STM32L4 to charge Vbat from Vdd via internal 5k or 1.5k resistors.

• I am using an ESP32. I might do a little research if it has such a feature as well, thanks for the hint! Feb 22, 2021 at 21:01