Help with PCF8563 RTC module on Arduino – time drifting & setup questions

owen000821

Member
Joined
Jun 22, 2025
Messages
6
Reaction score
1
Hi everyone,

I’ve been experimenting with a PCF8563 RTC module for a small Arduino-based clock and logging project, but I’m running into some issues and could use some advice.

Setup Details:

  • Arduino Uno
  • PCF8563 RTC module (I2C connected on SDA/SCL pins)
  • 32.768 kHz crystal included on the module
  • Backup battery (CR2032) installed
  • Using Arduino IDE with an RTC library for PCF8563
What I’m seeing:

  1. The time drifts after a few hours (loses/gains seconds). I expected RTCs to be more stable.
  2. Sometimes when I reset the Arduino, the module doesn’t keep the correct time even though the backup battery is connected.
  3. I’m not sure if I need to initialize the RTC time in code every time or just once.
  4. I read that PCF8563 has lower accuracy compared to DS3231 — is this normal, or should it still be good enough for simple applications?
What I’ve tried so far:

  • Verified wiring (SDA/SCL connected correctly, pull-up resistors already on module).
  • Checked that the battery is new and providing voltage.
  • Used two different PCF8563 libraries to rule out software issues.
  • Adjusted the crystal position slightly to make sure it’s soldered properly.
My Questions:

  1. Is time drifting common with the PCF8563, and is there a way to calibrate it for better accuracy?
  2. Do I need to set the time in the code on every startup, or should the backup battery keep it running indefinitely?
  3. Has anyone compared PCF8563 vs. DS3231 in real-world Arduino projects — is it worth switching if I need higher accuracy?
  4. Any best practices for reducing drift or ensuring stable operation?
Thanks in advance! I’d like to get this module working reliably before I decide whether to upgrade to a DS3231.
 
Top