Water overflow problem almost har ghar me hoti hai:
Tank overflow hota hai
- Tank overflow hota hai
Paani waste hota hai
- Paani waste hota hai
Electricity waste hoti hai
- Electricity waste hoti hai
Motor dry run hoti hai
- Motor dry run hoti hai
Bill unnecessary increase hota hai
- Bill unnecessary increase hota hai
Is problem ko solve karne ke liye maine design kiya hai:
π₯ Smart Water Tank Overflow + Bill Saving System (Advanced)
π₯ Smart Water Tank Overflow + Bill Saving System (Advanced)
Ye system:
β Tank level monitor karta haiβ Pump automatically control karta haiβ Overflow prevent karta haiβ Dry run protect karta haiβ Electricity bill reduce karta hai
π₯ Problem StatementTraditional water systems:
β Manual motor ON/OFFβ Overflow detection nahiβ Dry run protection nahiβ Electricity wasteβ High electricity bill
Result: Water + money dono waste.
π‘ Proposed Advanced Solutionβ Ultrasonic Water Level Monitoringβ Automatic Pump ON/OFFβ Dry Run Protectionβ Overload Protectionβ Electricity Usage Trackingβ Estimated Water Pump Billβ MQTT Cloud Monitoringβ Mobile Notification
π§° Required Hardware1οΈβ£ ESP32 (Main Controller)Role:
WiFi communication
- WiFi communication
Logic control
- Logic control
Cloud connectivity
- Cloud connectivity
Role:
Tank water level detection
- Tank water level detection
Role:
Pump electricity consumption tracking
- Pump electricity consumption tracking
Bill estimation
- Bill estimation
Role:
Pump motor control
- Pump motor control
Trig β GPIO5Echo β GPIO18VCC β 5VGND β GND
Relay β ESP32IN β GPIO4VCC β 5VGND β GND
PZEM β ESP32TX β GPIO16RX β GPIO175V β 5VGND β GND
βοΈ Working Logic1οΈβ£ Measure tank level2οΈβ£ If water level < 30% β Pump ON3οΈβ£ If water level > 90% β Pump OFF4οΈβ£ Track pump electricity consumption5οΈβ£ Calculate estimated bill6οΈβ£ Publish data to MQTT
π» Complete ESP32 Code (Core Logic)#include <WiFi.h>
#include <PubSubClient.h>
#include <PZEM004Tv30.h>
#define TRIG_PIN 5
#define ECHO_PIN 18
#define RELAY_PIN 4
#define PZEM_RX 16
#define PZEM_TX 17
float tankHeight = 100.0;
float lowLevel = 30;
float highLevel = 90;
float electricityRate = 6.0;
WiFiClient espClient;
PubSubClient client(espClient);
HardwareSerial pzemSerial(2);
PZEM004Tv30 pzem(pzemSerial, PZEM_RX, PZEM_TX);
void setup() {
Serial.begin(115200);
pinMode(TRIG_PIN, OUTPUT);
pinMode(ECHO_PIN, INPUT);
pinMode(RELAY_PIN, OUTPUT);
digitalWrite(RELAY_PIN, HIGH);
}
void loop() {
digitalWrite(TRIG_PIN, LOW);
delayMicroseconds(2);
digitalWrite(TRIG_PIN, HIGH);
delayMicroseconds(10);
digitalWrite(TRIG_PIN, LOW);
long duration = pulseIn(ECHO_PIN, HIGH);
float distance = duration * 0.034 / 2;
float levelPercent = ((tankHeight - distance) / tankHeight) * 100;
float energy = pzem.energy();
float bill = energy * electricityRate;
if(levelPercent < lowLevel){
digitalWrite(RELAY_PIN, LOW);
}
if(levelPercent > highLevel){
digitalWrite(RELAY_PIN, HIGH);
}
Serial.print("Water Level: ");
Serial.println(levelPercent);
Serial.print("Estimated Pump Bill: ");
Serial.println(bill);
delay(5000);
}
#include <WiFi.h>
#include <PubSubClient.h>
#include <PZEM004Tv30.h>
#define TRIG_PIN 5
#define ECHO_PIN 18
#define RELAY_PIN 4
#define PZEM_RX 16
#define PZEM_TX 17
float tankHeight = 100.0;
float lowLevel = 30;
float highLevel = 90;
float electricityRate = 6.0;
WiFiClient espClient;
PubSubClient client(espClient);
HardwareSerial pzemSerial(2);
PZEM004Tv30 pzem(pzemSerial, PZEM_RX, PZEM_TX);
void setup() {
Serial.begin(115200);
pinMode(TRIG_PIN, OUTPUT);
pinMode(ECHO_PIN, INPUT);
pinMode(RELAY_PIN, OUTPUT);
digitalWrite(RELAY_PIN, HIGH);
}
void loop() {
digitalWrite(TRIG_PIN, LOW);
delayMicroseconds(2);
digitalWrite(TRIG_PIN, HIGH);
delayMicroseconds(10);
digitalWrite(TRIG_PIN, LOW);
long duration = pulseIn(ECHO_PIN, HIGH);
float distance = duration * 0.034 / 2;
float levelPercent = ((tankHeight - distance) / tankHeight) * 100;
float energy = pzem.energy();
float bill = energy * electricityRate;
if(levelPercent < lowLevel){
digitalWrite(RELAY_PIN, LOW);
}
if(levelPercent > highLevel){
digitalWrite(RELAY_PIN, HIGH);
}
Serial.print("Water Level: ");
Serial.println(levelPercent);
Serial.print("Estimated Pump Bill: ");
Serial.println(bill);
delay(5000);
}
π° Bill Saving ConceptIf pump runs unnecessarily:
Extra 30β60 minutes daily
- Extra 30β60 minutes daily
1HP motor consumes approx 0.75 kW
- 1HP motor consumes approx 0.75 kW
Monthly waste β 20β30 units
- Monthly waste β 20β30 units
Extra bill β βΉ120ββΉ200
- Extra bill β βΉ120ββΉ200
This system prevents unnecessary runtime and saves electricity cost.
π Applicationsβ Homesβ Apartmentsβ Hostelsβ Farmsβ Commercial buildings
πΌ Business Opportunityβ Smart home productβ IoT water management systemβ Commercial building automationβ Scalable smart utility solution
π Project SupportFor:
β Complete Codeβ PCB Designβ Android Appβ Web Dashboardβ Commercial Deployment
π² WhatsApp: +91 9336183481
π ConclusionSmart Water Tank Overflow + Bill Saving System ensures:
β No water overflowβ Automatic pump controlβ Electricity bill savingβ Real-time monitoringβ IoT based automation
A practical and scalable smart utility solution.













Comments