DFR0386 DS1307 RTC Module with Battery for Raspberry Pi (Compatible with Raspberry Pi 4B)

Introduction

The RTC module is specifically designed for Raspberry Pi. It communicated with Raspberry Pi through I2C bus. There is a Maxim DS1307 and CR1220 button cell on the board to keep the real time for a long time after the Raspberry Pi has it's powerdown. Set a serial port, TTL convenient way online debugging.

Specification

  • RTC module: DS1307
  • Battery model: CR1220 button cell
  • Opearting Voltage: 5V
  • I2C address: 0x68
  • Clock precision: ±2ppm (0~40°C)
  • Unit information: Second, Minute, Date, Week, Month and Year
  • Two calendar clock
  • Operating temperature: -10°C至+85°C
  • Compatible with Raspberry Pi B/A+/B+/2B
  • Interface: 2*5p 2.54mm

Dimension

DFR0386 DS1307 RTC Module with Battery for Raspberry Pi (Compatible with Raspberry Pi 4B) Dimension

HOW TO USE

Connection

  • Connect the module to your Pi
DFR0386 DS1307 RTC Module with Battery for Raspberry Pi (Compatible with Raspberry Pi 4B) Connection DFR0386 DS1307 RTC Module with Battery for Raspberry Pi (Compatible with Raspberry Pi 4B) Connection
  • The module leads to the TX&RX pins, you could set the information via this port.
DFR0386 DS1307 RTC Module with Battery for Raspberry Pi (Compatible with Raspberry Pi 4B) Connection DFR0386 DS1307 RTC Module with Battery for Raspberry Pi (Compatible with Raspberry Pi 4B) Connection
NOTE: DO NOT power it again if the Raspberry Pi has been powered, or it will damage the module and Raspberry.

Test

  • 1. Input "sudo raspi-config" to Open Raspberry Pi I2C interface
DFR0386 DS1307 RTC Module with Battery for Raspberry Pi (Compatible with Raspberry Pi 4B) Test
  • 2. Select "Advanced Options"
DFR0386 DS1307 RTC Module with Battery for Raspberry Pi (Compatible with Raspberry Pi 4B) Test
  • 3. Select "I2C"
DFR0386 DS1307 RTC Module with Battery for Raspberry Pi (Compatible with Raspberry Pi 4B) Test
  • 4. Select "YES"
DFR0386 DS1307 RTC Module with Battery for Raspberry Pi (Compatible with Raspberry Pi 4B) Test
  • 5. Input "sudo vim.tiny /etc/modules" to add the module
DFR0386 DS1307 RTC Module with Battery for Raspberry Pi (Compatible with Raspberry Pi 4B) Test
  • 6. Add "i2c-dev" device
DFR0386 DS1307 RTC Module with Battery for Raspberry Pi (Compatible with Raspberry Pi 4B) Test
  • 7. Install I2C tools, input "sudo apt-get install i2c-tools"
DFR0386 DS1307 RTC Module with Battery for Raspberry Pi (Compatible with Raspberry Pi 4B) Test
  • 8. Input "sudo reboot" to reboot Raspberry Pi; Input "sudo i2cdetect-y1" after a reboot. If everything goes well, the module will be detected normally.
DFR0386 DS1307 RTC Module with Battery for Raspberry Pi (Compatible with Raspberry Pi 4B) Test
  • 9. Input "sudo su--" to get "root"; input "modprobe i2c-dev" to load I2C device.
DFR0386 DS1307 RTC Module with Battery for Raspberry Pi (Compatible with Raspberry Pi 4B) Test
  • 10. Input "echo "ds1307 0x68" >/sys/class/i2c-adapter/i2c-1/new_device" to load to Raspberry Pi system I2C device.
DFR0386 DS1307 RTC Module with Battery for Raspberry Pi (Compatible with Raspberry Pi 4B) Test
  • 11. Now you can use "hwclock" command to use this module, refer to "man hwclock" for more details.

"hwclock -r" Get RTC module time
"hwclock -w" Set system time

DFR0386 DS1307 RTC Module with Battery for Raspberry Pi (Compatible with Raspberry Pi 4B) Test

More Documentation