Thursday, November 21, 2024

RTC Automatic Electronic Ring Bell

“Ting-Ting-Ting” – We are all familiar with that sound of school bell which rang before morning assembly, lunch break and at the end of the day. These bells are often operated manually. There are some electronic bells available out there in the market but their setup is quite expensive. So, let’s make a low-cost prototype of a modern automatic bell.

- Advertisement -

 

Bill Of Materials

Prerequisites

Make sure to install the following library types required for coding in Arduino

- Advertisement -
  1. TimeLib
  2. DS1307RTC
  3. U8g2lib

To do so, go to Sketch in the main menu ? Include Library ? Manage Library. Enter the above library types in the search bar and download them. (See Fig.1)

Fig-1 Installing Library

Coding

Initialize the required libraries and variables with the required time duration of the bell. (See Fig.2)

Fig 2. Arduino

Then create a setup function for debugging serial port baud rate. Also, setup the OLED and RTC module for I2C communication. (See Fig. 3)

Fig 3. Setup function

 

Next, we create a loop function for viewing date, time and day on the OLED display. (See Fig. 4)

Fig 4. Arduino Code

Now, create an ’if’ condition to check the date and time for the bell to ring. (See Fig. 5)

Fig 5.

Connection

Fig 6. connection

 

Arduino PIN Components PIN
GND OLed and RTC GND 
5V VCC of OLED and RTC
SCL A5 SCL
SDA A4 SDA
PIN 6
  • Buzzer pin 
GND
  • Buzzer pin

 

Testing

Ensure to cross check each connection. Any mistake will fry your costly board. After confirming that everything’s correct, power the Arduino Uno board with either USB or by using 5-12V battery. The OLED will start displaying time and other information. The buzzer will then automatically ring as per the time set for the bell.

Download Source Code

 

Ashwini Sinha
Ashwini Sinha
A tech journalist at EFY, with hands-on expertise in electronics DIY. He has an extraordinary passion for AI, IoT, and electronics. Holder of two design records and two times winner of US-China Makers Award.

6 COMMENTS

SHARE YOUR THOUGHTS & COMMENTS

EFY Prime

Unique DIY Projects

Electronics News

Truly Innovative Electronics

Latest DIY Videos

Electronics Components

Electronics Jobs

Calculators For Electronics

×