25 June,2026 to 27 June,2026

Introduction :

Water overflow from storage tanks is a common problem that leads to unnecessary water wastage and increased maintenance. The Smart Tank Overflow Alarm System is designed to solve this issue by automatically detecting when the water tank reaches its maximum level. Using an Arduino, a float sensor continuously monitors the water level and activates a relay-based alarm when the tank is full. The system also includes a mute button that allows the user to temporarily silence the alarm. Once the water level decreases, the system automatically rearms itself, making it a simple, reliable, and cost-effective solution for efficient water management.

Objective :

The objective of this project is to develop an automated water tank overflow detection system that monitors the water level, activates an alarm when the tank is full, allows temporary alarm muting through a push button, and automatically resets the alarm after the water level drops

Apparatus Required :

1.Arduino Uno
2.Float Level Sensor
3.Relay Module
4.Push Button (Mute Switch)
5.Power Supply
6.Jumper Wires
7.Connecting Cables

Working Principle :

The system continuously monitors the water level using a float sensor connected to the Arduino. When the water reaches the maximum level, the float sensor changes its state, indicating that the tank is full. The Arduino processes this signal and turns on the relay, which can activate a buzzer or any external alarm device. If the user presses the mute button while the tank remains full, the relay is turned off and the alarm is silenced. The alarm remains muted until the water level drops below the full level. Once the water level decreases, the Arduino automatically rearms the system, allowing the alarm to activate again during the next overflow condition.

Code :

define SENSOR_PIN 4 // Float Sensor pin

define RELAY_PIN 5 // Relay pin

define MUTE_BUTTON 6 // Push button

define TANK_FULL_STATE HIGH // Changed from LOW to HIGH

bool alarmMuted = false;
bool wasTankFullPreviousCycle = false;

void setup() {
Serial.begin(9600);
delay(1000);

pinMode(SENSOR_PIN, INPUT_PULLUP);
pinMode(MUTE_BUTTON, INPUT_PULLUP);
pinMode(RELAY_PIN, OUTPUT);

digitalWrite(RELAY_PIN, LOW); // Relay OFF initially

Serial.println(“=== SMART TANK OVERFLOW SYSTEM READY ===”);
}

void loop() {
int sensorState = digitalRead(SENSOR_PIN);
int muteState = digitalRead(MUTE_BUTTON);

// Mute button pressed while tank is full
if (sensorState == TANK_FULL_STATE && muteState == LOW) {
if (!alarmMuted) {
alarmMuted = true;
digitalWrite(RELAY_PIN, LOW);
Serial.println(“Mute pressed. Relay OFF.”);
}
}

// Tank FULL
if (sensorState == TANK_FULL_STATE) {

wasTankFullPreviousCycle = true;

if (!alarmMuted) {
  digitalWrite(RELAY_PIN, HIGH);   // Relay ON
  Serial.println("Tank FULL - Relay ON");
} else {
  digitalWrite(RELAY_PIN, LOW);    // Relay OFF
}

delay(200);

}

// Tank NOT FULL
else {

digitalWrite(RELAY_PIN, LOW);      // Relay OFF

if (wasTankFullPreviousCycle) {
  Serial.println("Water level dropped. Rearming alarm.");
  wasTankFullPreviousCycle = false;
  alarmMuted = false;
}

Serial.println("Water level safe. Relay OFF.");
delay(1000);

}
}

Features :

Automatic water level monitoring
Overflow detection using a float sensor
Relay-controlled alarm system
Manual mute button for alarm control
Automatic alarm reset after water level decreases
Simple and reliable Arduino programming
Low-cost and energy-efficient design

Conclusion :

The Smart Tank Overflow Alarm System provides an effective solution for preventing water wastage by automatically detecting when a tank reaches its full capacity. The integration of a float sensor, relay module, and mute button ensures reliable operation while minimizing manual intervention. Its automatic rearming feature enhances usability, making the system suitable for residential, commercial, and industrial water management. Due to its simplicity, affordability, and scalability, the project serves as a practical application of Arduino-based automation.