Raspberry Pi DS3231 User manual

Type
User manual

Raspberry Pi DS3231 is a precision real-time clock (RTC) module for Raspberry Pi Pico, featuring the DS3231 chip with an I2C bus interface and a CR1220 button cell backup battery for continuous timekeeping. It offers accurate timekeeping, even during power outages, and can be used for a variety of applications such as logging data, scheduling events, or creating custom clocks.

Raspberry Pi DS3231 is a precision real-time clock (RTC) module for Raspberry Pi Pico, featuring the DS3231 chip with an I2C bus interface and a CR1220 button cell backup battery for continuous timekeeping. It offers accurate timekeeping, even during power outages, and can be used for a variety of applications such as logging data, scheduling events, or creating custom clocks.

Precision RTC Module for Pico
Incorporates High Precision
User Manual
What's on Board:
1- DS3231
high precision RTC chip, I2C bus
2- RTC backup battery
supports CR1220 button cell
3- Power indicator
- enabled by soldering a 0Ω resistor on the jumper, disabled by default
4- Raspberry Pi Pico header
for attaching to Raspberry Pi Pico, stackable design
Raspberry Pi Code:
1. Open a terminal of Raspberry Pi
2. Download and unzip the demo codes to directory Pico C/C++ SDK
#Note that the directory of SDK may be different for different users, you need to check the actual
directory. Generally, it should be ~/pico/.
wget -P ~/pico https://www.waveshare.com/w/upload/2/26/Pico-rtc-ds3231_code.zip
cd ~/pico
unzip Pico-rtc-ds3231_code.zip
1. Hold the BOOTSEL button of Pico, and connect the USB interface of Pico to Raspberry Pi
then release the button.
2. Compile and run the pico-rtc-ds3231 examples
cd ~/pico/pico-rtc-ds3231_code/c/build/
cmake ..
make
sudo mount /dev/sda1 /mnt/pico && sudo cp rtc.uf2 /mnt/pico/ && sudo sync && sudo umount /mnt/p
ico && sleep 2 && sudo minicom -b 115200 -o -D /dev/ttyACM0
Pinout Definition:
3. Open a terminal and user minicom to check the sensor's information.
Python:
1. Refer to Raspberry Pi's guides to setup Micropython firmware for Pico
2. Open the Thonny IDE, and drag the demo to IDE and run on Pico as below.
3. Click the "run" icon to run the MicroPython demo codes.
Windows:
Download and unzip the demo to your Windows desktop, refer to Raspberry Pi's guides to set up
the Windows software environment settings.
Press and hold the BOOTSEL button of Pico, connect the USB of Pico to the PC with a
MicroUSB cable. Import c or python program into Pico to make it run.
Use the serial tool to view the virtual serial port of Pico's USB enumeration to check the print
information, the DTR needs to be opened, the baud rate is 115200, as shown in the picture
below:
Others:
- The LED light are not used by default, if you need to use it, you can solder a 0R resistor on the R8
position. Click to view the schematic diagram.
- The INT pin of DS3231 is not used by default. if you need to use it, you can solder the 0R resistor
on the R5,R6,R7 positions. Click to view the schematic diagram.
o Solder the R5 resistor, connect the INT pin to the GP3 pin of Pico, to detect the
output status of the DS3231 alarm clock.
o Solder the R6 resistor, connect the INT pin to the 3V3_EN pin of Pico, to turn off the
Pico power when the DS3231 alarm clock outputs low level.
o Solder the R7 resistor, connect the INT pin to the RUN pin of the Pico, to reset Pico
when DS3231 alarm clock outputs low level.
1
1
2
2
3
3
4
4
5
5
6
6
D D
C C
B B
A A
32KHz
1
VCC
2
INT/SQW
3
RST
4
NC
5
NC
6
NC
7
NC
8NC 9
NC 10
NC 11
NC 12
GND 13
VBAT 14
SDA 15
SCL 16
U2
DS3231
+3.3V
C6
0.1uF
GND
GND
P_SCL
P_SDA
BAT1
I2C Address: 0x68
Pico-RTC-DS3231
aveshare
W
GP0
GP1
GP2
GND
GP3
GP4
GP5
GND
GND
GND
GP6
GP7
GP8
GP9
GP10
GP11
GP12
GP13
GP14
GP15 GP16
GP17
GND
GP18
GP19
GP20
GP21
GND
GP22
RUN
VBUS
GP26
GP27
GND
GP28
VSYS
GND
3V3_EN
3V3(OUT)
+3.3V
3V3(OUT)
P_SCLP_SDA
GPIO0
1
GPIO1
2
GND
3
GPIO2
4
GPIO3
5
GPIO4
6
GPIO5
7
GND
8
GPIO6
9
GPIO7
10
GPIO8
11
GPIO9
12
GND
13
GPIO10
14
GPIO11
15
GPIO12
16
GPIO13
17
GND
18
GPIO14
19
GPIO15
20 GPIO16 21
GPIO17 22
GND 23
GPIO18 24
GPIO19 25
GPIO20 26
GPIO21 27
GND 28
GPIO22 29
RUN 30
IO26/ADC0 31
IO27/ADC1 32
AGND 33
IO28/ADC2 34
ADC_VREF 35
3V3 36
3V3_EN 37
GND 38
VSYS 39
VBUS 40
U1
Pi pico (40P)
ADC_VREF
GND
L_PWR1
R1
1K
+3.3V
R2
10K
INT
INT
R3
10K/NC
R4
10K/NC
+3.3V +3.3V
R5
0R/NC
R6
0R/NC
R7
0R/NC
GP3
3V3_EN
RUN
R8
0R/NC
H2
Identification
1
2
3
H1
I2C0 1
2
3
H3
I2C1 GP6 GP7
GP20 GP21
Schematic:
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7

Raspberry Pi DS3231 User manual

Type
User manual

Raspberry Pi DS3231 is a precision real-time clock (RTC) module for Raspberry Pi Pico, featuring the DS3231 chip with an I2C bus interface and a CR1220 button cell backup battery for continuous timekeeping. It offers accurate timekeeping, even during power outages, and can be used for a variety of applications such as logging data, scheduling events, or creating custom clocks.

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI