“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.
Bill Of Materials
Make sure to install the following library types required for coding in Arduino
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)
Initialize the required libraries and variables with the required time duration of the bell. (See Fig.2)
Then create a setup function for debugging serial port baud rate. Also, setup the OLED and RTC module for I2C communication. (See Fig. 3)
Next, we create a loop function for viewing date, time and day on the OLED display. (See Fig. 4)
Now, create an ’if’ condition to check the date and time for the bell to ring. (See Fig. 5)
|Arduino PIN||Components PIN|
|GND||OLed and RTC GND|
|5V||VCC of OLED and RTC|
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.