Real Time Clock Rtc Esp Study Shuaiwen Cui Github Io
This chapter introduces the use of the ESP32-S3 real-time clock (RTC). The real-time clock can provide an accurate time for the system. Even if the system is reset or the main power is cut off, the RTC can still run. Therefore, the RTC is often used in various low-power scenarios. RTC (Real Time Clock) refers to a clock installed on an electronic device or an IC (integrated circuit) that implements its functions. When you call it a "clock" in digital circuits, you may think of a periodic signal, but in English, "clock" also means "clock".
So why do we need a separate RTC? The reason is that the CPU's timer clock function only runs when it is "started" or "powered on" and stops when it is powered off. Of course, if the clock cannot continuously track time, you must manually set the time. Usually, the RTC is equipped with a separate power source, such as a button battery (backup battery). Even if the power of the DNESP32S3M minimum system board is turned off, it can still operate and display the time in real-time. Then, when the DNESP32S3M minimum system board is turned on again, the built-in timer clock of the computer reads the current time from the RTC and displays the time based on its own mechanism...
By the way, since the button battery is relatively cheap and has a long service life, the RTC can operate at a very low cost. Based on this function, it can also be used as memory. 📜 Check and Download My CV - English (2026) 📜 Check and Download My CV - Chinese (2026) Ubiquitous Computing and Intelligence | AIoT | Structural Health Monitoring | AI Agents Embedded System Hardware and Software Development | Edge Computing and Intelligence | Signal Processing | Internet of Things | Digital Twin | Artificial Intelligence | System Identification | Structural Health Monitoring
CV1711 Engineering Drawing (CAD) and Building Information Modeling (BIM) AY2025/2026 This tutorial is a getting-started guide for the DS3231 Real Time Clock Module with the ESP32. The DS3231 RTC module is a great module for accurate timekeeping, it also allows you to set alarms, output square waves with different frequencies, and get temperature readings. Using a DS1307 RTC Module? Follow this tutorial instead: ESP32: Guide for DS1307 Real Time Clock Module (RTC). In this tutorial, we’ll cover the following topics:
RTC modules, such as the DS3231 and DS1307, have their own tiny clock inside to keep track of time by themselves. Usually, they come with a battery holder to connect a battery so that they keep working even if the ESP32 resets or loses power. The DS3231 and the DS1307 are some of the most popular choices to use with microcontrollers. Both are compatible with the ESP32 and communicate via I2C communication protocol. The DS3231 is more accurate because it gives temperature-compensated results. Additionally, it’s also possible to set external alarms with the DS3231, which can be extremely useful.
This circuit integrates an ESP32 microcontroller with a DS3231 Real-Time Clock (RTC) module. The ESP32 is a versatile microcontroller with Wi-Fi and Bluetooth capabilities, while the DS3231 is a highly accurate RTC with I2C communication interface. The circuit is designed to allow the ESP32 to communicate with the DS3231 to maintain accurate timekeeping, which can be useful in time-sensitive applications. There is no code provided for the microcontrollers in the circuit. To fully utilize the ESP32 and DS3231 RTC, embedded code is required to initialize the I2C communication and handle the data exchange between the two components. The code would typically include setup routines for the I2C interface, functions to read from and write to the RTC, and logic to process and display the time and date information.
Since no code is provided, this section cannot be completed. However, if code becomes available, it should be documented here with explanations of the functions, setup procedures, and any libraries used to facilitate communication between the ESP32 and the DS3231 RTC. Accurate timekeeping is crucial for electronics and IoT projects. A Real-Time Clock (RTC) is essential for maintaining precise time, especially during power outages. However, more than relying solely on the RTC module might be required for long-term projects due to drift over time. This is where Network Time Protocol (NTP) comes in.
By synchronizing the RTC with an internet time server, you can ensure that your system stays perfectly in sync, regardless of how long it runs. In this guide, we’ll show you how to set up a Real-Time Clock using ESP32 and an RTC DS3231 module, with the added benefit of NTP synchronization. Whether you’re new to electronics or an experienced developer, this tutorial will help you create a system that maintains precise and reliable time in all conditions. In this setup, the DS3231 RTC and the I2C LCD share the I2C communication protocol, using the same SDA (data line) and SCL (clock line) pins on the ESP32. This reduces the number of GPIO pins required and simplifies the wiring. Checkout the article on How to interface RTC module with Arduino and ESP Board
<img fetchpriority="high" decoding="async" class="aligncenter size-large wp-image-24456" src="https://bestengineeringprojects.com/wp-content/uploads/2024/09/Real-Time-Clock-RTC-with-ESP32-and-DS3231-with-NTP-840x703.jpg" alt="How to Set Up a Real-Time Clock (RTC) with ESP32 and DS3231 Using NTP Time Synchronization" width="640" height="536" srcset="https://bestengineeringprojects.com/wp-content/uploads/2024/09/Real-Time-Clock-RTC-with-ESP32-and-DS3231-with-NTP-840x703.jpg 840w, https://bestengineeringprojects.com/wp-content/uploads/2024/09/Real-Time-Clock-RTC-with-ESP32-and-DS3231-with-NTP-436x365.jpg 436w, https://bestengineeringprojects.com/wp-content/uploads/2024/09/Real-Time-Clock-RTC-with-ESP32-and-DS3231-with-NTP-768x643.jpg 768w, https://bestengineeringprojects.com/wp-content/uploads/2024/09/Real-Time-Clock-RTC-with-ESP32-and-DS3231-with-NTP.jpg 900w" sizes="(max-width:... In this ESP32 tutorial, we will interface DS3231 RTC Real Time Clock module with ESP32 which used to get current time. We will display RTC values on an OLED. We will build a Real Time Clock (RTC) with the help of DS3231 module, ESP32 and OLED display. A real time clock is basically a digital clock which is responsible for keeping track of accurate time in terms of hours, minutes, seconds, months, days and sometimes even years. They are helpful and used in situations where low power mode is used.
There are many RTCs available in the market such as DS3221 and DS1307 which usually consist of a controller, oscillator, and an embedded quartz crystal resonator. In this user guide, we will focus on DS3231 RTC module and program it with ESP32 in Arduino IDE to create a Real Time Clock. We have a similar guide with ESP8266 NodeMCU: The DS3231 precision RTC module is one of the most commonly used RTC module which keeps track of the current data and time. It is used in electronics projects for time keeping, data logging, building clocks, timers etc. This module runs on the DS3231S RTC chip and also contains the AT24C32 EEPRROM for accurate time keeping.
It has a very accurate real time clock which houses an integrated temperature compensated crystal oscillator and crystal. Additionally, due to the presence of the crystal resonator, the DS3231 module gives more accurate time keeping results in the long run. One of the interesting features of this RTC module is that it consists of a CR2032 battery holder where a 20mm 3V Lithium coin cell is inserted. Therefore, even if the power supply to the module is cut off, it will still keep track of the data and time. Once the timekeeping is started, it will always be maintained. The diagram below shows the backside of the module which consists of the CR2032 battery holder and the coin cell respectively.
A key element in many Arduino projects is time management. Whether to create an alarm clock, a data logger, or any other system requiring precise time management, the use of an RTC (Real Time Clock) module proves to be the perfect solution. In this tutorial, we will learn about the RTC module for ESP32 and see how it can optimize the accuracy and reliability of your projects. Here is the diagram associated with the project: To use the DS1307 clock module, you will need to install the RTClib library in Arduino IDE. To do this, click on Library Manager then RTClib:
The DS1307 is a widely used real-time clock (RTC) module designed to maintain accurate timekeeping, including automatic leap year compensation. Unlike the DS1302, it communicates via I²C, simplifying integration with ESP32, Arduino, and other microcontrollers. With its I²C interface and reliable backup capabilities, the DS1307 is an excellent choice for data loggers, automation systems, and real-time event tracking. 🚀 🔗 Looking for a different RTC? Check out the DS1302 for a 3-wire alternative with trickle charging.
Prices are subject to change. We earn from qualifying purchases as an Amazon Associate. Complete technical specification details for DS1307 Real-Time Clock (RTC) Hello, welcome to the SunFounder Raspberry Pi & Arduino & ESP32 Enthusiasts Community on Facebook! Dive deeper into Raspberry Pi, Arduino, and ESP32 with fellow enthusiasts. Expert Support: Solve post-sale issues and technical challenges with help from our community and team.
Learn & Share: Exchange tips and tutorials to enhance your skills. Exclusive Previews: Get early access to new product announcements and sneak peeks. Special Discounts: Enjoy exclusive discounts on our newest products.
People Also Search
- Real Time Clock (RTC) - ESP_STUDY - shuaiwen-cui.github.io
- Shuaiwen CUI - GitHub
- Shuaiwen-cui
- ESP32: Guide for DS3231 Real Time Clock Module (RTC) | Random Nerd ...
- ESP32-Based Real-Time Clock Synchronization | Cirkit Designer
- How to Set Up a Real-Time Clock (RTC) with ESP32 and DS3231 Using NTP ...
- ESP32 Real Time Clock (RTC) using DS3231 and display on OLED
- RTC Clock - ESP32 board
- ESP32 DS1307 Real-Time Clock (RTC) Pinout, Wiring, ESP32 and more
- Lesson 16: Real Time Clock Module (DS1302) - SunFounder
This Chapter Introduces The Use Of The ESP32-S3 Real-time Clock
This chapter introduces the use of the ESP32-S3 real-time clock (RTC). The real-time clock can provide an accurate time for the system. Even if the system is reset or the main power is cut off, the RTC can still run. Therefore, the RTC is often used in various low-power scenarios. RTC (Real Time Clock) refers to a clock installed on an electronic device or an IC (integrated circuit) that implement...
So Why Do We Need A Separate RTC? The Reason
So why do we need a separate RTC? The reason is that the CPU's timer clock function only runs when it is "started" or "powered on" and stops when it is powered off. Of course, if the clock cannot continuously track time, you must manually set the time. Usually, the RTC is equipped with a separate power source, such as a button battery (backup battery). Even if the power of the DNESP32S3M minimum s...
By The Way, Since The Button Battery Is Relatively Cheap
By the way, since the button battery is relatively cheap and has a long service life, the RTC can operate at a very low cost. Based on this function, it can also be used as memory. 📜 Check and Download My CV - English (2026) 📜 Check and Download My CV - Chinese (2026) Ubiquitous Computing and Intelligence | AIoT | Structural Health Monitoring | AI Agents Embedded System Hardware and Software Dev...
CV1711 Engineering Drawing (CAD) And Building Information Modeling (BIM) AY2025/2026
CV1711 Engineering Drawing (CAD) and Building Information Modeling (BIM) AY2025/2026 This tutorial is a getting-started guide for the DS3231 Real Time Clock Module with the ESP32. The DS3231 RTC module is a great module for accurate timekeeping, it also allows you to set alarms, output square waves with different frequencies, and get temperature readings. Using a DS1307 RTC Module? Follow this tut...
RTC Modules, Such As The DS3231 And DS1307, Have Their
RTC modules, such as the DS3231 and DS1307, have their own tiny clock inside to keep track of time by themselves. Usually, they come with a battery holder to connect a battery so that they keep working even if the ESP32 resets or loses power. The DS3231 and the DS1307 are some of the most popular choices to use with microcontrollers. Both are compatible with the ESP32 and communicate via I2C commu...