Knowledge Base

The AB Electronics UK Knowledge Base provides support solutions, tutorials and troubleshooting guides.

Realtime Clock RTC Pi and Beaglebone Black

Created 02/10/2015 | Realtime Clock RTC Pi and Beaglebone Black

The RTC Pi can be used with the Beaglebone Black linux computer board

Connecting the RTC Pi to the BeagleBone Black

Turn off and unplug your BeagleBone Black

You also need to add a 2K resistor between the SDA to 3.3V and SCL to 3.3V. The Beaglebone Black needs a lower pullup resistance than the Raspberry Pi.

RTC Pi Function BeagleBone Black P9 Pin
1 3.3V 3
2 5V 5*
6 GND 1
3 SDA 20
5 SCL 19

* If you are powering your BeagleBone Black via the USB lead this will need to be connected to pin 7 as pin 5 is only powered via the power socket.

Connecting RTC Pi to Bealglebone Black

Once you have connected the RTC, insert the coin cell before powering on.

To verify your wiring by running the following on the command prompt:

i2cdetect -y -r 1

The Beaglebone Black will scan the I2C bus and should return the following with 68 being displayed.

Terminal Output

Now the RTC board has been verified as connected, execute the following:

echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device

Now check the communication between the boards and return the current RTC date and time, execute the following:

hwclock -r -f /dev/rtc1

Set the system time from an online time server, execute the following:

/usr/bin/ntpdate -b -s -u

To check the updated date, execute the following:


Now you need to set the date and time on the RTC board, execute the following:

hwclock -w -f /dev/rtc1

Verify clock date and time, execute the following:

hwclock -r -f /dev/rtc1

Terminal Output