A tiny DS3231 real-time clock module that plugs straight onto the first five pins of a Raspberry Pi header, and wires to Arduino, ESP32 or any I2C board. The DS3231 is temperature compensated, so while powered it holds time to about 5 seconds a month, far steadier than a microcontroller's own timer or a DS1307. No backup cell is fitted: set the time at start-up, for example from NTP.
Specifications
Datasheets
What's in the box
With the 5-way header socket fitted. No backup cell.
Great for
Wiring & getting started
- Connect it
On a Pi, push it onto the first GPIO header pins so + D C NC - line up with pins 1, 3, 5, 7 and 9. On any other board, wire + to the supply (3.3V on a 3.3V board such as an ESP32, 3.3V or 5V on a 5V Arduino), D to SDA, C to SCL and - to GND.
- Enable / add a library
On a Pi, enable I2C and the DS3231 overlay. On Arduino or ESP32, use RTClib (RTC_DS3231).
- Set the time at start-up
With no backup cell, the time is lost whenever power is removed. Set it each time the board powers up, for example from NTP on an ESP32 or network time on a Pi.
- Let it run
While powered, it holds the time to about 5 seconds a month at room temperature.
Note: If your project must keep time through a power cut, choose the DS1307 Tiny RTC instead. It has a coin-cell holder.
