. Automatic School Bell Using Arduino ~ SmartElectronicsDIY

Automatic School Bell Using Arduino

 

(Time Table Bell Alarm System)

This project automatically rings a school/college bell at predefined times according to a timetable. It is very popular for B.Tech 1st year, diploma, and IoT basics.



🎯 Project Objective

To design an Arduino-based automatic bell system that:

  • Rings the bell at fixed periods

  • Reduces manual effort

  • Works accurately using RTC (Real Time Clock)


🧠 Working Principle

  • RTC module (DS3231/DS1307) keeps real-time even after power loss

  • Arduino continuously compares current time with stored timetable

  • When time matches → Relay ONBell rings

  • After few seconds → Relay OFF


🧰 Components Required

ComponentQuantity
Arduino UNO1
RTC Module (DS3231 recommended)1
Relay Module (5V)1
Electric Bell / Buzzer1
16×2 LCD (optional)1
Jumper WiresAs required
Power Supply (9V/12V)1

🔌 Circuit Connections

RTC (DS3231) → Arduino

RTC PinArduino Pin
VCC5V
GNDGND
SDAA4
SCLA5

Relay Module → Arduino

RelayArduino
IND8
VCC5V
GNDGND

⚠️ Bell is connected via relay COM & NO terminals


⏰ Example Time Table

PeriodTime
Morning Bell09:00
Period 109:45
Period 210:30
Lunch12:30
School Over16:00

💻 Arduino Code (Fully Working)

#include <Wire.h> #include <RTClib.h> RTC_DS3231 rtc; int relayPin = 8; // Set bell times (HH, MM) int bellHour[] = {9, 9, 10, 12, 16}; int bellMinute[] = {0, 45, 30, 30, 0}; int totalBells = 5; void setup() { pinMode(relayPin, OUTPUT); digitalWrite(relayPin, HIGH); Serial.begin(9600); rtc.begin(); // Uncomment only once to set RTC time // rtc.adjust(DateTime(F(__DATE__), F(__TIME__))); } void loop() { DateTime now = rtc.now(); for (int i = 0; i < totalBells; i++) { if (now.hour() == bellHour[i] && now.minute() == bellMinute[i] && now.second() == 0) { ringBell(); delay(60000); // Avoid repeat ring } } } void ringBell() { digitalWrite(relayPin, LOW); // Bell ON delay(5000); // 5 seconds digitalWrite(relayPin, HIGH);// Bell OFF }

📌 Features

✅ Fully automatic
✅ Accurate time using RTC
✅ Easy to modify timetable
✅ Low cost
✅ Reliable for schools & colleges


📚 Applications

  • Schools & Colleges

  • Factories (Shift Bell)

  • Offices

  • Prayer Timers

  • Exam Halls

0 comments:

Post a Comment