Electronic – Use one RTC battery for two circuits

rtcstm32

I'm designing a circuit with STM32F407 and a DS3231 chip clock. The MCU has a separate VBat pin that can be used and on the other hand, the DS3231 chip has its own RTC. I'm wondering can I use a single RTC battery for both circuits? I found some circuits that suggest using a common Schottky diode like bat54c before connecting the battery to MCU. Should I use it too or not?
Thanks.

Best Answer

This is perfect example of XY Problem.

Without studying the datasheets you've made several incorrect assumptions and decided to use external RTC, which created new power supply problem for you. Here are the assumptions:

  • The DS3231 is more accurate.

The DS3231 accuracy is ±2 ppm. The basic accuracy of STM32F407 is 5 ppm. However it also has digital calibration feature that allows you to output clock to external pin for measurement and subsequent calibration in 0.95 ppm steps.

So, the achievable accuracy of MCU RTC is 2 times better than external RTC.

  • The power consumption is less with external RTC.

DS3231 consumes 110 µA in standby mode. STM32F407 requires only 4 µA in standby mode with SRAM backup or 3.3 µA without backup. Note, that even if you use external interrupt to wake up MCU, both of them will be consuming power in standby.

So, the power consumption with DS3231 is 33 times more than with internal RTC only.

  • MCU can not calculate Date Time directly.

Here is a quote from the datasheet: "Two 32-bit registers contain the seconds, minutes, hours (12- or 24-hour format), day (day of week), date (day of month), month, and year. Compensations for 28-, 29- (leap year), 30-, and 31-day months are performed automatically." Not only that, but it also can be programmed for Daylight Saving Time compensation, something that DS3231 cannot do.

So, RTC in STM32F407 can do everything DS3231 does, and more.

To summarize, there is no need whatsoever to use DS3231 with STM32F407.

Having said that, there is a way to reduce power consumption even more, by using nano-power external timer, like TPL5110 to switch MCU power supply OFF completely. In this case (called VBAT mode) the RTC will continue running, consuming only 0.96 µA from backup battery. The timer itself adds negligible 35 nA, for total consumption under 1 µA (3 µA savings, compared to standby mode).