The Raspberry PI HAT - Real Time Clock is a battery backed real-time clock board for the Raspberry Pi A+, Raspberry Pi B+, Raspberry Pi 2 Model B, and Raspberry Pi 3 Model B.
8 Item Items
Warning: Last items in stock!
Despite the Raspberry Pi is a great low cost computer with thousands of different uses it comes without a real-time clock. In order to keep updated the date and time the Raspberry Pi connects to an Internet Time Server and synchronizes them using the Network Time Protocol (NTP). If the Raspberry Pi is not connected to the net, every time you switch it off, it forgets the date and time and you have to manually set them again next time you switch your Raspberry Pi on.
The Raspberry PI HAT - Real Time Clock is a battery backed real-time clock board for the Raspberry Pi A+, Raspberry Pi B+ and Raspberry Pi 2 Model B and Raspberry Pi 3 Model B. It keeps the date and time while the Raspberry Pi is switched off. When Raspberry Pi switched back on, it can synchronizes the date and time from the Real Time Clock.
The Raspberry PI HAT - Real Time Clock uses the DS1307 RTC real time clock and a CR2032 battery to maintain the date and time when the main system power is not available. The Raspberry PI HAT - Real Time Clock also includes an I2C logic level converter making the Raspberry Pi's I2C bus, 5V devices tolerant.
Warning: Do not connect the Raspberry PI HAT - Real Time Clock to your Raspberry Pi when powered without the battery installed. This can damage the DS1307 RTC chip.
The Raspberry PI HAT - Real Time Clock uses a CR2032 button battery (battery included).
Installing Raspberry PI HAT - Real Time Clock on a Raspberry Pi with Raspian Linux 3.18 or later
Step 1: With your Raspberry Pi switched off install the Raspberry PI HAT - Real Time Clock on the Raspberry Pi GPIO port and insert a CR2032 coin battery into the battery holder.
Step 2: Run the Raspberry Pi config utility and enable I2C
Select "Advanced Options" and then "I2C - Enable/Disable automatic loading". A prompt will appear asking Would you like the ARM I2C interface to be enabled?, select Yes, exit the utility and reboot your Raspberry Pi.
Step 3: Install i2c-tools using:
Step 4: Once you have installed I2C check that the Raspberry PI HAT - Real Time Clock has been detected using:
The Raspberry PI HAT - Real Time Clock should appear on channel 68 as shown in the screen shot below. If the Raspberry PI HAT - Real Time Clock does not appear check that the battery is installed correctly and is fully charged:
Step 5: Edit the file config.txt:
At the end of the file add
Save your changes.
Step 6: Add the module to /etc/modules:
Add at the end of the file
Save your changes.
Step 7: Next edit edit /lib/udev/hwclock-set
Commend out the following lines with #
if [ -e /run/systemd/system ] ; then
Save your changes.
Reboot the Raspberry Pi.
If this is the first time you have run the Raspberry PI HAT - Real Time Clock it will display a date of January 1st 2000.
Step 8: If the Raspberry Pi is connected to the internet the correct date and time should be set automatically otherwise you can set the current date and time using:
You can check the current linux date with the command (date). To save the date onto the Raspberry PI HAT - Real Time Clock use the following command:
Verify the date has been saved onto the Raspberry PI HAT - Real Time Clock with:
If everything worked correctly the Raspberry PI HAT - Real Time Clock should be initialized on boot and the current date and time will be loaded into Linux.
You can download schematics from github at:
To download the schematics to your Raspberry Pi type in terminal:
Other purchase options
You can buy this item at Amazon