Digital Church Bell Using ESP32, LCD, and DFPlayer Mini

Digital Church Bell Using ESP32, LCD, and DFPlayer Mini

A Digital Church Bell System automates the traditional bell ringing at specified times, making it ideal for churches, schools, or any setting where bells ring at specific intervals. Using modern electronics, this system can play pre-recorded bell sounds stored on a memory card and trigger them based on set times. This article will guide you through designing and building a Digital Church Bell using an ESP32, 16x2 LCD, and DFPlayer Mini. We will cover the necessary components, the working principle, the schematic and PCB layout, and provide source code for the system.

Components Required

To build the Digital Church Bell system, you will need the following components:

  • ESP32 microcontroller: The core controller of the system.
  • DFPlayer Mini: A small, low-cost MP3 player module that reads audio files from a microSD card.
  • 16x2 LCD (I2C interface): To display current time, system status, and scheduling information.
  • Real-Time Clock (RTC) module DS3231: For keeping track of time to trigger the bell at the correct moments.
  • Push Buttons: For setting bell ringing times and other configurations.
  • Amplifier and Speaker: To play the bell sounds loudly.
  • Memory card (MicroSD): Stores the bell sounds in MP3 format.
  • Power supply: To power the ESP32, DFPlayer Mini, and other components.
  • PCB and connectors: For organizing and interconnecting components.

Working Principle

The Digital Church Bell system is designed to ring a bell sound at specific times, such as at the start of services or certain times of the day. The system works by reading the current time from the RTC (DS3231) module and comparing it to pre-configured bell-ringing schedules. When the current time matches a scheduled time, the ESP32 commands the DFPlayer Mini to play a pre-recorded bell sound.

The system allows the user to set ringing times via push buttons, which can be adjusted based on different schedules (e.g., daily, weekly). The LCD display provides real-time feedback, showing the current time, upcoming bell rings, and system status. The EEPROM stores scheduled times, ensuring that the bell schedule persists even after power loss.

Key Features:

  1. Automatic Bell Ringing: Rings the bell at scheduled times without manual intervention.
  2. Real-Time Clock (RTC): Ensures accurate timekeeping for triggering the bell.
  3. DFPlayer Mini MP3 Module: Plays pre-recorded bell sounds stored on a microSD card.
  4. LCD Display: Provides feedback on the current time, bell status, and allows for easy configuration.
  5. EEPROM Storage: Saves scheduled times, so the system retains settings after power loss.
  6. Easy Configuration: Push buttons allow for manual adjustment of ringing times.

Schematic Diagram

Below is the schematic diagram of the Digital Church Bell System:

Key Schematic Connections:

  • ESP32 to DS3231 RTC: The I2C pins (SDA, SCL) of the DS3231 connect to the ESP32 to read the current time.
  • ESP32 to DFPlayer Mini: The TX pin of the ESP32 connects to the RX pin of the DFPlayer Mini for serial communication.
  • ESP32 to LCD: The I2C pins of the LCD display are connected to the same I2C bus as the RTC module.
  • Push Buttons: Connected to the ESP32 GPIO pins, used to set bell ringing times.
  • Speaker and Amplifier: Connected to the DFPlayer Mini to amplify and play the bell sound.

PCB Layout

The PCB layout is designed to ensure all components fit neatly and operate efficiently. The PCB layout accommodates the ESP32, DFPlayer Mini, RTC, LCD display, and buttons. Special care is taken in the design to avoid interference between the audio signals and the digital circuits.

DOWNLOAD PCB FILES

Source Code

Here’s the source code for the Digital Church Bell system. It allows you to set and trigger bell sounds based on the current time using the RTC, and play audio files stored on the microSD card through the DFPlayer Mini.

Code Explanation:

  1. RTC Integration: The DS3231 module provides the current time, which is compared against the bell's scheduled time.
  2. DFPlayer Mini Control: The ESP32 uses serial communication to instruct the DFPlayer Mini to play the selected MP3 file (the church bell sound).
  3. Button Handling: Push buttons are used to set the bell's ringing time.
  4. EEPROM Storage: The bell ringing time is saved in EEPROM, ensuring it remains even after power loss.

Setting Bell Times

Users can configure the bell ringing times using the SET, UP, and DOWN buttons. Once the desired time is set, the system will automatically ring the bell at that time every day.

Conclusion

The Digital Church Bell System using ESP32, DFPlayer Mini, and RTC DS3231 provides a modern, automated solution to the traditional bell ringing system. This device can be used in churches, schools, or any institution that requires scheduled bell ringing, allowing for easy control and automation. The system's flexibility, ease of use, and reliability make it an ideal solution for automating bell sounds without requiring manual intervention.

Share:

No comments: