Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Semiconductors & ICs
  4. ›DS3231 vs DS1307 Real-Time Clock Modules

Comparison · Beginner · 3 min read

DS3231 vs DS1307 Real-Time Clock Modules

By Geekobot Learning Team · Updated 24 Oct 2026

On this page
Short answerDS3231 or DS1307?Wiring and codeThe coin-cell charging trapTry itCommon mistakesFAQsParts and next steps
Short answer

A real-time clock module keeps the date and time running from a coin cell while your project is off. The DS3231 has a temperature-compensated oscillator accurate to about 2 ppm, roughly a minute a year, runs from 2.3 to 5.5 V and has two alarms. The cheaper DS1307 needs 5 V and an external crystal, so it can drift by minutes a month. Both use I2C address 0x68.

Key specs at a glance

Interface
I2C, address 0x68 (both chips)
DS3231 accuracy
±2 ppm from 0 to 40 °C, about ±1 minute per year
DS1307 accuracy
Depends on the crystal, often ±1 to 2 minutes per month
Supply
DS3231 2.3 to 5.5 V; DS1307 4.5 to 5.5 V
Backup
CR2032 (or LIR2032 on some modules)
Extras
DS3231: 2 alarms, 32 kHz output, temperature reading; modules often add an AT24C32 EEPROM at 0x57
01

DS3231 or DS1307?

DS3231DS1307
OscillatorBuilt-in temperature-compensated crystal (TCXO)External 32.768 kHz crystal
Typical driftAbout 1 minute per yearMinutes per month
3.3 V boardsYesNo, needs 5 V
Alarms2, with interrupt pinNone
ExtraTemperature sensor (±3 °C)56 bytes battery-backed RAM
Best forLoggers, timers, clocksSimple 5 V clocks where cost matters most
Oscillator
DS3231:
Built-in temperature-compensated crystal (TCXO)
DS1307:
External 32.768 kHz crystal
Typical drift
DS3231:
About 1 minute per year
DS1307:
Minutes per month
3.3 V boards
DS3231:
Yes
DS1307:
No, needs 5 V
Alarms
DS3231:
2, with interrupt pin
DS1307:
None
Extra
DS3231:
Temperature sensor (±3 °C)
DS1307:
56 bytes battery-backed RAM
Best for
DS3231:
Loggers, timers, clocks
DS1307:
Simple 5 V clocks where cost matters most
02

Wiring and code

Connect VCC to 3.3 V or 5 V, GND to GND, SDA to SDA and SCL to SCL (A4 and A5 on an Uno, GPIO 21 and 22 on a classic ESP32 by default). Modules include pull-up resistors, so no extras are needed for one I2C device.

Install the RTClib library. Set the time once with rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));, upload, then comment that line out and upload again, otherwise the clock resets to the compile time on every boot. Read it with DateTime now = rtc.now();. On Wi-Fi boards you can sync the RTC from NTP whenever the network is up and fall back to the RTC when it is not.

03

The coin-cell charging trap

Many low-cost DS3231 modules include a resistor and diode that trickle-charge the backup cell. That is meant for a rechargeable LIR2032. A normal CR2032 is not rechargeable, and charging it can make it swell or leak. Either fit a LIR2032 or remove the charging resistor (or diode) on the module if you use a CR2032. A CR2032 in a DS3231 typically lasts several years because the chip draws only a few µA on battery.

04

Try it: I2C pull-up calculator

Change the values and the diagram and results update as you type.

05

Common mistakes to avoid

  • !Leaving the rtc.adjust() line in the sketch.
  • !Charging a non-rechargeable CR2032 on a DS3231 module.
  • !Running a DS1307 from 3.3 V.
  • !Forgetting the backup cell, so time is lost at power-off.
  • !Two devices at 0x68 on one bus, such as an MPU6050 and an RTC, without changing the MPU6050 address.
06

Frequently asked questions

How accurate is the DS3231?

About ±2 ppm from 0 to 40 °C, which is roughly a minute a year.

Can I use a DS3231 with ESP32 or Raspberry Pi Pico?

Yes. It runs from 3.3 V and uses standard I2C.

Why does my RTC reset to the same time after every restart?

The sketch still calls rtc.adjust() at start-up. Remove it after setting the time once.

Does the RTC module conflict with an MPU6050?

Both default to 0x68. Pull the MPU6050's AD0 pin HIGH to move it to 0x69.

How long does the coin cell last?

Usually several years in a DS3231 when main power is present most of the time.

Parts for this guide

  • DS3231 Precision RTC Module with EEPROM
    ₹269View
  • Basic RTC Module (DS1307 / DS1302)
    ₹42View
  • RTC IC (DS1307 / DS3231)
    ₹16View
Shop Interface ModulesShop Timers & RTC ICs

Calculators

I2C pull-up calculatorBattery life calculator

Terms in this guide

RTCReal-time clock: a chip that keeps the date and time running, usually from a coin cell when main power is off.TCXOTemperature-compensated crystal oscillator: a crystal oscillator that corrects its frequency for temperature, giving a clock accurate to a few ppm.I2CInter-Integrated Circuit: a two-wire bus (SDA and SCL) that connects many devices by address.ppmParts per million. Used for gas concentration (outdoor CO2 is about 420 ppm) and for frequency accuracy: a 20 ppm crystal can drift about 1.7 seconds a day.InterruptA hardware signal that makes the microcontroller pause its program and run a short function immediately, for example when a button pin changes.

Projects that use it

Put this into practice: 142 step-by-step builds in our project library use parts from this guide.

Beginner · 1 hourDigital clock with real-time clockView projectIntermediate · 2 hoursAlarm clock with LCDView projectIntermediate · 2 hoursTemperature data loggerView project
Browse all 142 projects

Keep learning

Concept explainerIntermediateI2C ExplainedI2C is a two-wire bus that lets one microcontroller talk to many sensors and displays using a data line (SDA) and a clock line (SCL).4 min read · Electronics FundamentalsComponent guideIntermediateCrystals and OscillatorsA quartz crystal vibrates at a precise frequency and, with the microcontroller's built-in oscillator circuit and two small load capacitors, sets its clock.3 min read · Passive ComponentsComponent guideBeginnerArduino UnoThe Arduino Uno is a beginner-friendly microcontroller board that reads sensors and controls LEDs, motors and relays using simple C++ programs called sketches.5 min read · Boards & MicrocontrollersComponent guideBeginnerESP32 GuideThe ESP32 is a low-cost 3.3 V microcontroller from Espressif with built-in Wi-Fi and Bluetooth, used for IoT devices, smart-home controllers and web dashboards.5 min read · Boards & MicrocontrollersHow-toBeginner16x2 LCD with I2CA 16x2 LCD shows two lines of 16 characters using the HD44780 controller.3 min read · Displays & LEDs

Sources

  • Analog Devices (Maxim) DS3231 datasheet
  • Analog Devices (Maxim) DS1307 datasheet
  • Adafruit RTClib documentation

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerDS3231 or DS1307?Wiring and codeThe coin-cell charging trapTry itCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide3 items · ₹327

DS3231 Precision RTC Module with EEPROM · Basic RTC Module (DS1307 / DS1302) · RTC IC (DS1307 / DS3231)

Ask the Community

Ask a question