🕰 RTC Battery Power with Automatic Switching to Main Source
Intro
If your device has separate RTC (Real Time Clock) chip you will definitely want to keep clock running continuously, even if the main power is not present or main battery (if exist) is disconnected.
For this purposes on many electronic device boards (especially old phones with removable battery) you can see small coin cell battery, that act as an independent backup powering for RTC IC.
Structural Diagram
ORing block have two power inputs and one power output, so it give a chance to connect backup coin cell with external power input and connect output voltage to the RTC chip.
Electrical Schematic
Main power pass through diode D1
Backup power pass through transistor Q1
R1=10k-470k (Make sense to increase resistance in case of battery powering)
Schematic Simulation
Using Microcap 12 it's very easy to simulate schematic working:
*It is recommended to replace the silicon diode with a Schottky diode. |
When coin cell is not present and USB device is powered from USB 5V RTC supplied from USB through diode D1, so the output voltage less by diode drop voltage.
When main power (USB 5V) is disconnected RTC supplied from secondary input (coin cell battery) through MOSFET Q1:
When both power sources is connected (USB 5V and BAT 3V) RTC supplied from main power (USB 5V), so secondary power input (coin cell backup battery) not drained.
Which battery is suitable?
In case of using real RTC chip, e.g. the most popular PCF8563 has wide supply voltage range:
PCF8563T SOIC-8 | ![]() |
PCF8563TS MSOP-8 | ![]() |
Clock operating voltage: | 1.0V-5.0V |
Coin cell battery could be different chemical type, which means different voltages:
MnO₂ | LiMnO₂ |
1.5V | 3.0V |
So, because minimum RTC operation voltage is 1.0V it's possible to use even low voltage 1.5V MnO₂ coin cell battery.
Board
Using SOD-323 package diode and SOT-23 transistor with 0402 components makes backup circuit pretty small.
Real Testing of Backup Circuit
Testing performed on the development board.
VIN1 (USB) MAIN POWER | VIN2 (BAT) BACKUP POWER | VOUT RTC_VDD | NOTES |
5.002V | x | 4.867V | USB powering is connected, battery is absence |
x | 2.952V | 2.947V | USB powering is not present and battery is connected (backuping) |
5.003V | 2.968V | 4.869V | USB powering is connected and battery is absence |
Changing coin cell battery without clock reset
If you need to change the RTC battery (no external supply connected) the clock will be reset.
If you want to save clock you can additionally have backup capacitor, that can act as a small reservoir of energy for supply RTC chip during battery replacement.
How much time can you have?
If RTC chip current I < 1 uA:
Backup Capacitance | Time |
4.7 uF | 6-7 seconds |
1000 uF | 20-30 minutes |
Conclusions
- Battery reserve powering of independent RTC it's not difficult, all you need it's ORing (FET + Diode) circuit unit
- If device connected to the primary (main) power supply RTC chip doesn't drain battery, that give a chance to significantly increase device clock life
- Additional backup capacitor can be used for powering RTC chip during coin battery replacement
- Using internal MCU RTC can be more smart solution (e.g. some STM32 have dedicated VBAT pin for RTC and some register data backuping).
- Comments