ESP8266 digital Clock with DS1302 RTC module

ESP8266 21-02-26
24 0

Tutorial plan

1- Objective of the project

2- Required Components

3- Circuit Connections of system

4- Micropython program of ESP8266 Clock

 

 

Objective of the project

The objective of this project is to create a digital clock system using the ESP8266 NodeMCU microcontroller, a DS1302 Real-Time Clock (RTC) module, and an LCD I2C display. The system is designed to display the current time and date accurately and continuously. The RTC module, developed by Maxim Integrated, maintains precise timekeeping even when the main power is turned off, thanks to its backup battery. The ESP8266 NodeMCU, produced by Espressif Systems, serves as the main controller that manages communication between the RTC module and the display.

The functioning of the project is based on reading, processing, and displaying real-time data. The DS1302 RTC module continuously keeps track of the current time and date. The ESP8266 NodeMCU reads this information through its digital pins, formats it into a readable form, and sends it to the LCD I2C display. The display then shows the time and date clearly for the user. This process repeats continuously, ensuring that the displayed information remains accurate and updated in real time.

 

Required Components

1. ESP8266 NodeMCU

The ESP8266 NodeMCU is a microcontroller. It acts as the main controller of the project. Its role is to communicate with the DS1302 RTC module to read the current time and date, process the data, and send it to the LCD I2C display.

2. DS1302 RTC Module

The DS1302 is a Real-Time Clock (RTC) module used to keep track of the current time and date. It can maintain accurate time even when the ESP82866 is powered off because it uses a backup battery. It provides information such as year, month, day, hour, minute, and second. The ESP8266 reads this data through digital communication pins.

5. LCD Display with I2C Module

The LCD I2C display is used to show the date and time to the user. It uses the I2C communication protocol, which requires only two wires (SDA and SCL), making connections simpler. The display can show text such as the day, date, and current time in real time.

6. Breadboard 

Breadboard

A breadboard is a reusable prototyping board used to build and test electronic circuits without soldering. It allows you to easily connect components such as the ESP8266 NodeMCU, DS1302 RTC module and LCD I2C display.

7. Jumper Wires

Jumper wires

Jumper wires are used to connect the ESP32 to the RTC module and the LCD display. They allow electrical signals and power to flow between the components.

 

Circuit Connections of system

 

1- Connection of DS1302 RTC Module to ESP8266

DS1302 RTC ESP8266 NodeMCU
CLK D5 (GPIO 14)
DAT D6 (GPIO 12)
RST D7 (GPIO 14)
VCC 3V
GND GND

 

2- Connection of LCD I2C display to ESP8266

LCD display ESP8266 NodeMCU
VCC VIN
GND GND
SDA D2 (GPIO4)
SCL D1 (GPIO5)

 

Micropython program of ESP8266 Clock

This program is designed to create a digital clock system using the ESP8266 NodeMCU, a DS1302 RTC Module, and an LCD I2C Display 20x4. It reads the current date and time from the RTC module and displays them on the LCD screen in real time.

You need to install this libraries :

i2c_lcd et lcd_api for I2C LCD screen

ds1302 for DS1302 RTC module

0 comment

Leave a comment

Veuillez noter s'il vous plaît*

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Purpose of this website

Educational robotics refers to the use of robots and robotics technology to promote learning in educational settings. It involves the integration of technology, engineering, and computer science into the classroom, allowing students to engage in hands-on, project-based learning experiences.
In this context, our website represents an excellent resource for parents, teachers and children who wish to discover robotics.

Contact details

Zaouiet Kontech-Jemmel-Monastir-Tunisia

+216 92 886 231

medaliprof@gmail.com

Pictures of the articles

Robotic site created by Mohamed Ali Haj Salah - Teacher info