ESP8266 Digital Alarm Clock with DS1302 RTC and LCD I2C

ESP8266 26-02-26
33 0

Tutorial plan

1- Objective of the project

2- Required Components

3- Circuit Connections of system

4- Micropython program of ESP8266 Alarm Clock

 

 

Objective of the project

This project aims to build a digital alarm clock using the ESP8266, DS1302 RTC module, LCD I2C display, and a buzzer.
The system displays the current time in real-time and activates an alarm sound when the preset alarm time is reached. It is a practical embedded systems project that demonstrates how to interface a microcontroller with a real-time clock and output devices.

Working Principle

The DS1302 RTC module keeps track of the current time (hours, minutes, and seconds), even when power is disconnected thanks to its backup battery.

The ESP8266 reads the time from the RTC and displays it on the LCD I2C screen in digital format. At the same time, it continuously compares the current time with the preset alarm time.

When both times match, the buzzer is activated and an alarm message is displayed on the LCD. The system then continues running and updating the time automatically.

This project shows how to create a simple and reliable standalone alarm clock using ESP8266.

 

Required Components

1. ESP8266 NodeMCU

The ESP8266 NodeMCU, developed by Espressif Systems, is the main microcontroller of the system. It reads the current time from the RTC module, displays it on the LCD, and controls the buzzer when the alarm time is reached.

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.

4. Buzzer

The buzzer is an output device that produces sound when the alarm time is reached. It alerts the user that the preset alarm time has occurred. The ESP8266 activates the buzzer by sending a digital signal.

4. LCD Display with I2C Module

he LCD I2C display is used to show the current time and alarm messages.

5. Breadboard 

Breadboard

The breadboard is used to assemble the circuit without soldering. It makes it easy to connect and modify components during testing and development.

6. Jumper Wires

Jumper wires

The jumper wires are used to connect the ESP8266 with the RTC module, LCD display, and buzzer. They ensure proper electrical connections between all 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)

 

3- Connection of Buzzer to ESP8266 NodeMCU

Buzzer ESP8266 NodeMCU
Pin (+) D0 (GPIO 0)
Pin (-) GND

 

Micropython program of ESP8266 Alarm Clock

This program implements a digital alarm clock system using an ESP8266 NodeMCU, a DS1302 RTC module, an I2C LCD display, and a buzzer.

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