Real Time Clock (RTC)

“A real-time clock (RTC) is an IC that keeps an updated track of the current time”

  • Low power consumption
  • Continue to run when the main system is powered off
    • Usually powered by a battery that can keep it running for a long time
  • Usually interfaces with a microprocessor through SPI or I2C


How does it work?

To keep time, an RTC keeps count of the cycles of an oscillator (usually a 32.768kHz crystal oscillator circuit). Crystals have a specified operating temperature range, usually between -10oC and 60oC. Outside of this range, the accuracy of the crystal deteriorates.

An example wiring for the DS1307 RTC IC can be found here: http://www.learningaboutelectronics.com/Articles/DS1307-real-time-clock-RTC-circuit.php

The IC is powered by a supply voltage VCC. However, if VCC falls below a threshold (Vbat), then the IC switches to being powered by the battery. Thus, the operating life of the RTC is maximized by using battery power only when necessary.

Power Supply for the RTC

RTCs can derive their power from a dedicated battery, a charged supercapacitor, or a separate power supply from the main system.

Applications

  • Can be used in a GPS receiver to shorten its startup time: if the last received signal was less than a few hours ago, then it can still be used. Received GPS signals can be time-stamped with an RTC.
  • Integrated in motherboards to keep time.


SAM-M8Q Chip

  • Uses a 32kHz crystal oscillator for its RTC. Can save data in backup RAM if the main voltage supply fails and the RTC is connected to a backup battery.


RTC Backup Power Alternatives Comparison

Battery

Commonly, a lithium coin cell is used as the backup battery.

To calculate cell life:

cell life = cell capacity (Ah) / timekeeping current draw of RTC (A)

Pros

Cons

- High energy density: take up little room on the PCB

- At room temperature: < 1% self-discharge per year

- Cannot use IR reflow: must be soldered on after reflow or placed in a holder

- Above 60oC: rapid self-discharge


Supercapacitor

Large low-leakage capacitors.

To calculate backup time:

backup time = C * (VBACKUPSTART - VBACKUPMIN) / IBACKUPMAX

C = capacitance of capacitor

VBACKUPSTART = initial voltage

VBACKUPMIN = ending voltage

IBACKUPMAX = maximum VBACKUP current (obtained from data sheet)

Pros

Cons

- Allows for IR reflow

- Fewer regulations for shipping and disposal (environmentally friendly)

- Almost infinite cycle life

- Charges faster than a battery

- Require a charging circuit

- Much shorter backup time

- Capacity may decrease with use and at high temperatures

- Requires some initial time before being fully charged


Sources

https://www.electronics-tutorials.ws/connectivity/real-time-clocks.html

https://en.wikipedia.org/wiki/Real-time_clock

https://www.u-blox.com/sites/default/files/SAM-M8Q_DataSheet_%28UBX-16012619%29.pdf

https://www.maximintegrated.com/en/design/technical-documents/app-notes/3/3816.html

https://www.eaton.com/content/dam/eaton/products/electronic-components/resources/technical/eaton-supercapacitors-rtc-memory-backup.pdf

https://www.arrow.com/en/research-and-events/articles/supercapacitor-vs-battery-ultracapacitor-pros-and-cons