Through the use of an RTC/Real Time Clock, an electronic device will have the date and time available to it at the moment it turns on, without any reference to an external source. The RTC must be able to function flawlessly, even if all external power is removed from the unit for months, or even years.
What is a Real Time Clock in Embedded Systems?
A microcontroller’s timer must not be confused with an RTC clock. Most microcontrollers include a timer function that counts the time elapsed from the moment that the unit is turned on. Because it reverts to zero when the unit is turned off, it cannot function as a true RTC. An actual Real Time Clock may well be the only thing that stays on and functions when system power to the overall device is removed, and for this reason, it is often implemented on a separate chip that is powered by a tiny battery devoted solely to this purpose.
Because of the extended time period over which the RTC must function, as well as its tiny power source, low power consumption is essential. In order to conserve battery power, the RTC will normally function using the system power, and will only employ the battery when system power is absent because the system has been turned off.
Related: Arduino RTC Tutorial
RTC Crystal Oscillators
The key element to an RTC is a crystal oscillator, which often operates at 32,768-kHz, because that works out to a convenient 215 pulses per second. The crystal, like the battery, can either be built into the Real Time Clock or it must be provided for externally. Of course, the size of an RTC chip that incorporates more elements internally will be larger than a barebones version.
See related product
Texas Instruments’ BQ32002DR is a basic Real Time Clock available from Arrow Electronics. While this 8-Pin device comes in an SOIC package and does not contain an internal backup battery or a crystal, it comes in a package that takes up a scant 20 square millimeters of board space.
This device’s datasheet reveals that it employs the industry-standard I2C serial data bus to transmit the time information to the system at large, or to receive information regarding the correct date and time from the user. The BQ32002DR automatically goes to standby mode when the system voltage drops below a defined voltage threshold, and in that state, it only dissipates current in the order of a microampere. Note that in lieu of a battery, this unit can instead utilize a 0.22 Farad supercapacitor.
Figure 1: Block Diagram of the BQ32002DR. (Source: Texas Instruments)
Many newer Real Time Clocks now include the additional capability of themselves switching the system’s VCC back on, effectively awakening it. The RTC achieves this end via internal, user-programmable sub-timers.
RTC Chip & Wearables Devices
STMicroelectronics’ M41T62LC6F is a Real Time Clock chip that is one of a new breed of devices designed for incorporation in wearable devices. The challenges here are low footprint, and most of all, low power. This device takes up approximately 5 square millimeters, draws 350 nanoamperes of current when in standby mode, and can operate in standby with a voltage as low as one volt. This RTC actually includes its own crystal oscillator despite its miniscule footprint.
See related product
This M41T62LC6F’s datasheet reveals that it is part of the M41T6x family of devices. The M41T62LC6F employs a 400 kHz I2C serial data bus for communication with the CPU. Incredibly, despite its tiny size, this unit incorporates an alarm function to awaken the system at pre-chosen times. This Real Time Clock includes eight internal registers holding the century, year, month, day, day of the week, hour, minute, and finally, the second, all in BCD format.
One Step Further: Low Power RTC
In many types of electronic applications, it is only the Real Time Controller that needs to operate with very low current, because once the device turns back on, it will have access to ordinary system power. But, in today’s new world of wearables and the IoT, it is only ultra-low power that will be available whether the device is sleeping or in full operations mode. For that reason, it makes sense to consider the incorporation of the RTC on the same low-power chip that houses the microcontroller. STMicroelectonics does just that with its STM32L4 family of microcontrollers with their onboard RTCs, available from Arrow Electronics.
Top 5 Considerations When Selecting an RTC for your Next Application
1) How much power does the RTC require during standby?
2) Does the RTC include an internal battery?
3) Is there an internal crystal?
4) Will the ultimate deployment of the device require it to be turned on automatically at specific times?
5) Is it physically small and light enough for IoT and wearable devices?
New Developments in Real Time Clock Technology
With the advent of the Internet of Things (IoT) and wearable devices, the new marching orders are to be smaller, to be cheaper and most of all—to use less power. Unlike the desktop environment or even today’s mobile device world, the power available for all uses in these new types of devices will be extremely limited, even when the device is active.
As we have seen, changing design considerations make it logical, in some cases for the RTC to be included with the microcontroller chip, and not as a separate component. New RTCs will have to be power-stingy not only during standby, but also when they and their devices are active as well. Meeting this extreme new power challenge will shape the subsequent development of Real Time Clocks.