The High Accuracy Pi RTC high precision real-time clock is based on the DS3231 clock chip. The DS3231 is a low-cost, yet extremely precise Real Time Clock (RTC). It connects to the Raspberry Pi via a UART interface. The source of the clock is TCXO (Temperature Compensated Quartz Oscillator), so RTC provides information about seconds, minutes, hours, day, date, month and year. The date at the end of the month is automatically adjusted to months that have less than 31 days and a correction is made for the leap year. The clock operates in 24 or 12 hour mode with AM/PM (morning/evening) indicator.

The clock provides two programmable time alarms and a programmable rectangular output. The INT / SQW pin generates an interrupt at an alarm condition or sends a rectangular signal, selection is controlled by the INTCN bit.

If you want the module to continue to calculate the time after disconnecting the Raspberry Pi from the power supply, you must install a CR1225 3 V lithium battery.

Buy now

Version

Product versionAmendmentsDate of premiere
High accuracy Pi RTC (DS3231) Original version September 2018

Note

The kit does not include batteries.

Features

  • Works with Raspberry Pi 2/ 3 B/B+ Zero
  • Calculates seconds, minutes, hours, days of the week, month, year
  • Operates in 24 or 12-hour mode with AM/PM indicator (morning/evening)
  • Low power consumption
  • Two time alarms
  • High-speed (400kHz) I2C bus

Specifications

FeatureValue
Operating voltage 3,3 V
Working temperature from 0℃to +70℃
Accuracy ±2 ppm from 0°C to +40°C
Interface I2C
I2C address 0x68
Dimensions L: 25 mm W: 25 mm H: 8 mm
Weight 4,2 g
Packaging dimensions L: 85 mm W: 7 5 mm H: 25 mm
Gross weight 15 g

Typical applications

Every application for Raspberry Pi requires real time.

Output diagram

Note

1- The chip itself supports the alarm function, we have also reserved a suitable hardware interface, but our software library does not include this function (pin S/INT), you have to create the corresponding software yourself.

2- RX/TXwas not used with this module, but the strip with 5x2 pins occupies the RX/TX pin with the Raspberry Pi, so we exit the RX/TX and come out with a 2-pin plug.

Required equipment

Raspberry PiHigh Accuracy Pi RTC(DS3231
Buy now Buy now

Note

Please connect to the USB port carefully, otherwise it may be destroyed. Please use USB cables with 4 wires inside, those with 2 wires do not transmit data. If you are not sure about your cable, you can buy ithere.

Installation

The driver we provide only applies to Raspbian Jessie/Stretch.

Please refer to .
If you don't know how to use Raspberry Pi, go here before you start.

  • Step 1: Installation of the controller

Enter the following command into the terminal

git clone https://github.com/Seeed-Studio/pi-hats.git

After installation, enter the following command into the terminal

cd pi-hats
./install.sh -u rtc_ds3231

  • Step 2: Disconnect the power supply from Raspberry Pi

sudo shutdown -h now

  • Step 3: Insert the cap into Raspberry Pi

Make sure to connect pin 1 of the cap to pin 1 on the GPIO Raspberry Pi plug, exactly as shown above.

  • Step 4: Connect thepower supply to the Raspberry Pi

Applications

Now you can enter the following command to check if the driver is installed correctly.

./install.sh -l

If you want to uninstall the driver, use the command below:

sudo ./install.sh -u

Now let's see what the RTC real-time clock module can do:

Read the hardware clock and print out the result

sudo hwclock -r

Set the system time from the hardware clock

sudo hwclock -s

Set the hardware clock from the current system time

sudo hwclock -w

More applications

hwclock --help

Links

Botland.store - shop for makers!