Translate

Arduino-Based Water Bell System for School Students

 1. Introduction

An Arduino-Based Water Bell System is a smart automation project designed to remind school students to drink water at regular intervals. It helps promote healthy hydration habits by triggering a buzzer alert (bell sound) at predefined times.

This system is ideal for schools, classrooms, and hostels, ensuring students stay hydrated throughout the day.


2. Components

  • Arduino UNO / Nano
  • DS1307 RTC Module (or recommended DS3231 RTC Module)
  • Buzzer
  • Jumper Wires
  • Breadboard
  • Power Supply
  • CR2032 Battery (for RTC backup)

3. Circuit and Connections

Pinout Diagram of Arduino Uno R3


Pinout Diagram of DS3231 RTC
RTC DS3231 Pinout Diagram


Pinout Diagram Buzzer

RTC Module

  • VCC → 5V
  • GND → GND
  • SDA → A4
  • SCL → A5

Buzzer

  • Positive → Pin 8
  • Negative → GND

4. Detailed Step By Step Circuit Working

  1. The RTC module continuously keeps track of real-time (hours, minutes, seconds).
  2. Arduino reads the current time using I2C communication.
  3. Predefined water reminder times are stored in the program.
  4. When the current time matches the preset time:
    • Arduino activates the buzzer
  5. The buzzer rings for a few seconds and stops automatically.
  6. This process repeats throughout the day to remind students to drink water.

5. RTC Time Setting Code (IMPORTANT – DO THIS FIRST)

Before running the main project, you must load the correct time into the RTC module.

Step 1: Upload This Code Once

#include <Wire.h>
#include <RTClib.h>

RTC_DS1307 rtc; // Use RTC_DS3231 rtc; if using DS3231

void setup() {
Serial.begin(9600);
Wire.begin();
rtc.begin();

// Set RTC time to your computer time
rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
}

void loop() {
}

Step 2: Important Instructions

  • Upload this code only once
  • It will set RTC time to your computer’s current time

Step 3: VERY IMPORTANT

After uploading:

👉 Comment or remove this line

rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));

❗ If you do NOT remove it:

  • Time will reset every time Arduino restarts

Step 4: Optional Manual Time Setting

If you want to set custom time:

rtc.adjust(DateTime(2026, 4, 1, 10, 0, 0));

Format:

Year, Month, Day, Hour, Minute, Second

6. Main Code (Water Bell System)

#include <Wire.h>
#include <RTClib.h>

RTC_DS1307 rtc;

int buzzer = 8;

void setup() {
Serial.begin(9600);
Wire.begin();
rtc.begin();

pinMode(buzzer, OUTPUT);
}

void loop() {
DateTime now = rtc.now();

int hour = now.hour();
int minute = now.minute();

Serial.print(hour);
Serial.print(":");
Serial.println(minute);

// Water reminder times
if ((hour == 10 && minute == 0) ||
(hour == 11 && minute == 0) ||
(hour == 12 && minute == 0) ||
(hour == 14 && minute == 0)) {

digitalWrite(buzzer, HIGH);
delay(5000);
digitalWrite(buzzer, LOW);
}

delay(60000);
}

7. Detailed Step By Step Code Working

  1. Libraries Used
    • Wire.h → I2C communication
    • RTClib.h → RTC control
  2. RTC Initialization
    • rtc.begin() starts the RTC module
  3. Reading Time
    • rtc.now() reads current time
  4. Condition Checking
    • Compares current time with preset schedule
  5. Buzzer Activation
    • If matched → buzzer ON for 5 seconds
  6. Loop Delay
    • Runs every minute

8. Tips

  • Always set RTC time before running project
  • Use DS3231 for better accuracy
  • Ensure RTC battery is inserted
  • Customize timings as per school schedule
  • Use relay + electric bell for louder output

9. Uses

  • School water reminder system
  • Classroom automation
  • Hostel hydration alert
  • Office break reminder
  • Kids health monitoring

10. Conclusion

The Arduino-Based Water Bell System is a simple yet impactful automation project that promotes healthy habits among students. With proper RTC setup, it ensures accurate and reliable reminders.

തുടക്കക്കാർക്കായി ഇലക്ട്രോണിക്സ് ലളിതമായി പഠിക്കാം.

Empowering students in Kerala with hands-on technical skills.