High Accuracy RTC (DS3231) for Raspberry Pi



  • Support Raspberry Pi Zero/2/3B/3B+/4
  • Maintains seconds, minutes, hours, day, date, month, and year information. 
  • Support 24-hour or 12-hour format with AM/PM indicator
  • Low-Power Consumption
  • Two Time-of-Day Alarms
  • Fast (400kHz) I2C Interface


The High Accuracy Pi RTC is based on the clock chip DS3231. The DS3231 is a low-cost, extremely accurate I2C realtime clock (RTC). It provides an RTC for Raspberry Pi via the I2C interface. With the clock source from the TCXO(temperature compensated crystal oscillator), the RTC maintains seconds, minutes, hours, day, date, month, and year information. 

The date at the end of the month is automatically adjusted for months with fewer than 31 days, including corrections for leap year. The clock operates in either the 24-hour or 12-hour format with an AM/PM indicator.

The clock provides two programmable time-of-day alarms and programmable square-wave output. The INT/SQW pin either generates an interrupt due to alarm condition or outputs a square-wave signal and the selection is controlled by the bit INTCN.

If you want to retain the time infomation even when the Raspberry Pi is powered off, you need to insert a 3V CR1225 lithium cell into the battery holder.

If you are looking for an RTC for your Arduino project, please also take a look at our blog  Arduino RTC Tutorial: Using DS1307 RTC with Arduino to easily get started. 

Typical Applications

Any applications need Real-Time on Raspberry Pi such as:

  • Utility Power Meters
  • Telematics
  • GPS

Pin Out

Technical details

Dimensions25mm x25mm x15mm
WeightG.W 13.9g

Part List

High Accuracy Pi RTC (DS3231)1
2pin Header1



Source: High Accuracy RTC (DS3231) for Raspberry Pi

About The Author

Muhammad Bilal

I am highly skilled and motivated individual with a Master's degree in Computer Science. I have extensive experience in technical writing and a deep understanding of SEO practices.

Scroll to Top