How to Choose the Right RTC for Low‑Power Projects
When a battery‑powered sensor has to run for months on a single cell, the real‑time clock (RTC) becomes the silent hero that keeps everything on schedule. Pick the wrong part and you’ll waste power, lose accuracy, or spend weeks chasing a ghost bug. Below is a step‑by‑step guide that helped me get my garden‑monitoring node to run six months on a CR2032. It works for any low‑power design that needs a reliable time base.
Start with the Power Budget
Know your sleep current
The first number you should write down is the sleep current of the whole board. In my last project the MCU slept at 2 µA, the radio was off, and the only thing drawing current was the RTC. If the RTC adds another 5 µA you’re looking at a 7 µA total. Over 180 days that translates to roughly 300 mAh – well within a coin cell.
Look for “ultra‑low‑power” spec sheets
Not all RTCs are created equal. The DS3231, for example, is a fantastic chip for accuracy but it draws about 1 µA in battery‑backed mode and up to 150 µA when the temperature sensor is active. The MCP7940N, on the other hand, can sit at 0.5 µA in standby. For a low‑power project you usually want a part that stays under 1 µA when the system is idle.
Accuracy vs. Power Trade‑off
Do you really need sub‑second precision?
If your device only logs daily temperature, a drift of a few minutes per month is acceptable. In that case a cheap 32 kHz crystal with a basic RTC will do. If you need to timestamp events to the second, consider a temperature‑compensated crystal oscillator (TCXO) built into the RTC, like the DS3231. It costs more and draws a bit more, but the drift stays under 2 ppm (about 10 seconds per year).
Temperature matters
Crystal frequency changes with temperature. In a greenhouse the temperature swings from 15 °C at night to 35 °C in the day. A plain crystal can drift several minutes over that range. A TCXO or a chip with built‑in temperature compensation will keep you on time without having to calibrate in software.
Interface Simplicity
I²C or SPI? Pick what you already use
If your MCU already talks I²C to a sensor hub, adding an I²C RTC saves pins and code. The DS1307 is a classic I²C RTC, but it needs an external crystal and has a higher sleep current. The MCP7940N also uses I²C and includes a built‑in crystal, which reduces board space.
Register map size
Some RTCs expose dozens of registers for alarms, square‑wave output, and battery‑swap detection. If you only need date and time, a simpler chip with a small register map keeps the driver lean. I often start with the minimal set and only move to a richer device if the project grows.
Battery Backup and Switchover
Does the chip need a separate backup battery?
Many RTCs have a Vbat pin that can be tied to a coin cell. The DS3231, for instance, will automatically switch to Vbat when Vdd drops. That means you can keep the main supply at 3.3 V and let the RTC run off a tiny backup cell without extra circuitry.
Switchover delay
When power returns, the RTC may need a few milliseconds to resume. In a fast‑wake design that matters. The MCP7940N reports a “power‑good” flag that tells the MCU when the clock is ready, which can simplify the wake‑up sequence.
Package and PCB Realities
Size and footprint
If you are building a tiny wearable, the 2 × 3 mm SOIC package of the PCF8523 fits nicely. Larger DIP packages are easier to hand‑solder but take up precious board real estate. I usually order a few of each size and let the prototype dictate the final choice.
Crystal placement
A crystal needs a clean layout with minimal stray capacitance. Keep it away from noisy traces and large ground pours. In my garden node I placed the crystal right next to the RTC and used a 12 pF load capacitor on each side as recommended in the data sheet. The result was a stable 32.768 kHz signal even with the board in a metal enclosure.
Software Support
Driver availability
Before you order, check that a driver exists for your MCU’s SDK. The STM32 HAL, ESP‑IDF, and Arduino libraries all have ready‑made drivers for the DS3231 and PCF8523. If you are using a bare‑metal setup, look for an open‑source driver on GitHub – it can save you days of debugging.
Calibration routines
Even the best RTC can drift a bit. Most chips let you write a correction value to a register. In my last project I added a one‑time calibration step that compared the RTC to an NTP server during the first Wi‑Fi connection, then stored the offset in flash. The code was only a few lines and gave me sub‑minute accuracy for the rest of the deployment.
Putting It All Together
- Define the sleep current budget – aim for <1 µA for the RTC.
- Choose accuracy level – plain crystal for daily logs, TCXO for second‑level timestamps.
- Match the interface – reuse I²C or SPI lines you already have.
- Check battery backup – make sure the chip can run off a coin cell without extra parts.
- Validate footprint – pick a package that fits your board size.
- Confirm software support – a good driver can turn a complex part into a few lines of code.
When I followed this checklist for the “Real Time Clock Insights” garden sensor, the final board used a 0.5 µA MCP7940N, a 32.768 kHz crystal, and a single CR2032. The node logged temperature every hour, woke up, sent data, and went back to sleep – all while staying under 300 µA total draw. After six months the battery was still at 80 % capacity, and the timestamps were within a minute of real time.
Choosing the right RTC isn’t about picking the most expensive part; it’s about balancing power, accuracy, and ease of integration. Keep the checklist handy, and you’ll spend less time fighting clock drift and more time building the features that matter.
- → Designing a Low-Power PLA for Battery-Operated Projects @palflashlogic
- → A Practical Guide to Reducing Power Consumption in CPLD Designs @cpldinsights
- → Step‑by‑Step Guide to Reducing Power Consumption on ARM Cortex‑M4 Microcontrollers @microchipchronicles
- → Designing Low-Jitter Clock Integrated Circuits: A Step-by-Step Guide for Embedded Engineers @siliconpulse
- → Optimizing FPGA Resource Utilization for Real-Time Embedded Applications @logicdesignlab