RTC real time clock DS1307
🕒 Real Time Clock (RTC) Module – DS1307
Overview:
The DS1307 RTC Module is a battery-backed real-time clock that keeps accurate time even when your main microcontroller is powered off. It stores time in seconds, minutes, hours, day, date, month, and year format, and it’s widely used in Arduino and embedded systems for time-stamping, clocks, and scheduling.
Key Features:
Real-time clock with I²C interface
Maintains time even during power outage using CR2032 battery
Tracks seconds, minutes, hours, day, date, month, and year
56 bytes of non-volatile battery-backed SRAM
Programmable square-wave output pin
Plug-and-play with Arduino, ESP32, STM32, and Raspberry Pi
Technical Specifications:
Parameter | Value |
---|---|
IC | DS1307 |
Voltage Range | 3.3V – 5.5V |
Interface | I²C (SDA, SCL) |
SRAM | 56 bytes |
Clock Accuracy | ±2 ppm (typical) |
Battery | CR2032 (not always included) |
Dimensions | ~28mm x 27mm |
Wiring with Arduino Uno (I²C):
RTC Module Pin | Arduino Pin |
---|---|
VCC | 5V |
GND | GND |
SDA | A4 |
SCL | A5 |
💡 Make sure a CR2032 battery is installed to maintain time when unplugged.
📦 Applications:
Digital clocks and time displays
Data logging with timestamps
Smart home automation scheduling
Alarm systems
Real-time control systems
📚 Library:
Library Name: RTClib by Adafruit
GitHub: https://github.com/adafruit/RTClib
✅ How to Install Library:
Open Arduino IDE
Go to Sketch > Include Library > Manage Libraries…
Search for RTClib
Click Install (by Adafruit)
🎥 YouTube Tutorial:
Title: Arduino Real Time Clock (RTC) Tutorial with DS1307 and LCD
https://www.youtube.com/watch?v=gOtNeRJVx8w&utm_source=chatgpt.com