Introduction: How to Use DS3231 Real Time Clock Module With Raspberry Pi 3 Model B

Subscribe to our YouTube Channel: https://goo.gl/Ah3izH

YouTube: https://goo.gl/LCcXcu

Instructables: https://goo.gl/gwY1Lq

Facebook: https://goo.gl/Cn2hZB

Twitter: https://goo.gl/XZufMV

Google+: https://goo.gl/5FddS1

Copyright © 2018 AVI SOFTWARE INDIA. All rights reserved.


Step 1: Components Required

Raspberry Pi 3 Model B

16x2 LCD Display Module (Serial I2C)

DS3231 Real Time Clock Module

Breadboard (MB102 400 Points)

USB Cable (Type A to Type Micro-B)

Ethernet Patch Cable (Straight)

Jumper Cable

Step 2: Circuit Schematic

Connect SCL Pin of LCM1602 IIC to Pin No. 05 (GPIO03) of Raspberry Pi 3 Model B

Connect SDA Pin of LCM1602 IIC to Pin No. 03 (GPIO02) of Raspberry Pi 3 Model B

Connect VCC Pin of LCM1602 IIC to Pin No. 02 (5V) of Raspberry Pi 3 Model B

Connect GND Pin of LCM1602 IIC to Pin No. 06 (GND) of Raspberry Pi 3 Model B

Connect SCL Pin of DS3231 Real Time Clock Module to Pin No. 05 (GPIO03) of Raspberry Pi 3 Model B

Connect SDA Pin of DS3231 Real Time Clock Module to Pin No. 03 (GPIO02) of Raspberry Pi 3 Model B

Connect VCC Pin of DS3231 Real Time Clock Module to Pin No. 02 (5V) of Raspberry Pi 3 Model B

Connect GND Pin of DS3231 Real Time Clock Module to Pin No. 06 (GND) of Raspberry Pi 3 Model B

Step 3: Wiring Components As Per Circuit Schematic

Step 4: Coding

Check YouTube Video Description Box for Download Source Code

Enable I2C in Raspberry Pi:

sudo raspi-config

Install I2C Tools & Python SMBUS in Raspberry Pi:

sudo apt-get install i2c-tools

sudo apt-get install python-smbus

Detect I2C Device Address:

i2cdetect -y 1

Enable DS3231 Real Time Clock Module in Raspberry Pi:

sudo nano /etc/rc.local

Add the following lines at the bottom of the file before the exit 0 line. Save the file.

echo ds3231 0x68 > /sys/class/i2c-adapter/i2c-1/new_device
hwclock -s

Setting the Timezone in Raspberry Pi:

sudo raspi-config

Read Date & Time from DS3231 Real Time Clock Module:

sudo hwclock -r

Note: In case of no display, adjust Contrast using the Blue Color Potentiometer on LCM1602 IIC

Step 5: Watch Project Demo

For Best Viewing Experience, Choose Video Quality to 1080p

Comments

About This Instructable

124views

2favorites

License:

Bio: Tutorials on Software | Programming | Hacking | Mobile Development | Much More
More by avisoftwareindia:How to Use A3144 Hall Effect Sensor Module With Arduino Uno Rev3How to Use 4x4 Matrix Membrane Keypad Module With Arduino Uno Rev3How to Use DS3231 Real Time Clock Module With Raspberry Pi 3 Model B
Add instructable to: