The Raspberry Pi is a great low-cost computer with thousands of different uses, but one thing it does not come with is a real-time clock. This means that every time you switch off your Raspberry Pi, it forgets what the time is, and you have to manually set it again the next time you switch your Raspberry Pi on.
The RTC Pi is a battery-backed real-time clock module for the Raspberry Pi and other compatible single-board computers. It keeps track of the time while the Raspberry Pi is switched off and allows it to retrieve the current date and time from the RTC Pi when it is switched back on.
The RTC Pi is powered through the host Raspberry Pi using the GPIO port, and extended pins on the GPIO connector allow you to stack the RTC Pi along with other expansion boards. The RTC Pi uses the DS1307 RTC real-time clock and a CR2032 battery to maintain the date and time when the main system power is unavailable.
Unlike most other DS1307-based RTC modules, the RTC Pi also includes an I2C logic level converter allowing you to connect other 5V I2C devices to your Raspberry Pi.
The RTC Pi is beneficial for stand-alone projects where your Raspberry Pi will not have a network connection and, therefore, no way to retrieve the current date and time from the internet.
Mounting holes are provided so you can securely bolt the RTC Pi to your Raspberry Pi with our mounting kit (sold separately).
The RTC Pi can also be used on Arduino boards when connected via the I2C bus.
The i2c address for the DS1307 RTC is 0x68. If you use this board alongside the ADC Pi or ADC Differential Pi boards, you will need to change the i2C address on those boards.
Warning: Do not connect the RTC Pi to your Raspberry Pi when the power is connected without a CR2032 battery installed. This can cause damage to the DS1307 RTC chip.
The RTC Pi Plus uses a CR2032 button battery (battery not included).
How to set and read the time
Follow our tutorial to set up the RTC Pi on your Raspberry Pi.
Code Libraries and Demos
We have Python, MicroPython, C, C++, Node.js and Windows 10 IOT libraries for this expansion board. You can download all of the libraries from GitHub at:
https://github.com/abelectronicsuk/ or click on the logos below for your selected programming language.
Compatibility
We have tested the RTC Pi on the following platforms.
Model |
Status |
Raspberry Pi Pico series |
|
Raspberry Pi Model A / B |
|
Raspberry Pi 1 Model A+ / B+ |
|
Raspberry Pi 2 Model B |
|
Raspberry Pi 3 Model A+ / B / B+ |
|
Raspberry Pi 4 Model B |
|
Raspberry Pi 5 |
|
Raspberry Pi Zero |
|
Raspberry Pi Zero W / Zero 2 W |
|
Raspberry Pi Compute Module 4 IO Board |
|
Raspberry Pi 400 |
|
Orange Pi |
|
Asus Tinker Board |
|
Odroid |
|