Smart Water Tank Control System

Overflow issue is a common problem in installing water tank especially if there’s no overflow control installed. There are factors that might be a cause of overflow issues in a water tank like the incoming water in a water tank is not in ratio with the water being used. the best way in solving overflowing water tank by installing automatic water level controller because this helps in regulating the flow of water in your water tank and it optimizes the performance of the rainwater harvesting system. Automatic water level controller is efficient to use because this device controls the pump motor automatically. When the water level in your water tank is low then it will switch the motor on while if the water level is higher than the fixed level then it will switch the motor off. There are advantages in installing the automatic water level controller in your water tank like it minimizes the usage of the water in your water tank because it maintains the water level that provides you water to use anytime when only it is needed. For enclose water tank, installing this is very convenient because there’s no need for a manual monitoring of the water level in your tank because the device can perform the task automatically which is favorable for a busy homeowner. On top of that, overflow issues in your water tank will be solved since it allows the appropriate level of your water at all times. Smart Water Tank Control System is designed to help people save and manage water without any human intervention and can always keep your Water tank filled for use without any tension. It can happily solve any water overflowing issues.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: STEP 1:- Collect All the Components As Mentioned Below

1. WIZnet Ethernet Shield [x1]

2. Arduino Mega 2600 / UNO [x1]

3. RJ45 [x3]

4. Ethernet Hub [x1]

5. Jumper Cables

6. Breadboard [x1]

7. Potentiometer [x1]

8. 16x2 LCD [x1]

9. Resistors 10K [x5]

10. Mini Water pump (5V) [x1]

11.5V 2A Power Supply (for Pump) [x1]

12. 12V Power Supply (for Arduino and WIZnet Ethernet Shield) [x1]

13. Customised Tank [x1]

14. Customised Water Supply [x1]

Step 2: STEP 2:- Make Connections As Shown in the Attached Images

Make the connections asd shown here.

Step 3: STEP 3:- Push the Code to Arduino [Side Load the Code From PC/ MAC Via Adruino IDE to Check the System Is Working

//Automatic Water Level control system by Team 3 WIZnet IoT contest

#include

int level1=A1; int level2=A2; int level3=A3; int level4=A4; int level5=A5; int motor=9;

int a; int b; int c; int d; int e; int r=0;

int z=111; // Adjust this value from 100 to 1023 if your circuit do not show correct value.

void motor1(int);

LiquidCrystal lcd(7,6,2,3,4,5);

void setup() { pinMode(level1,INPUT); pinMode(level2,INPUT); pinMode(level3,INPUT); pinMode(level4,INPUT); pinMode(level5,INPUT); pinMode(motor,OUTPUT);

Serial.begin(9600);

lcd.begin(16, 2); // if you are using 16x2 line LCD, then replace these values and also adjust all LCD text for 1st and 2nd line in the loop below. }

void loop() { a=analogRead(level1); b=analogRead(level2); c=analogRead(level3); d=analogRead(level4); e=analogRead(level5); lcd.clear(); lcd.setCursor(0,0); lcd.print("TEAM3 Project"); lcd.setCursor(0,1); lcd.print("H20 Flow monitor");

if(e>z && d>z && c>z && b>z && a>z ) { Serial.print("Full tank----"); Serial.println("motor off"); motor1(0); digitalWrite(motor,HIGH); lcd.clear(); lcd.setCursor(1,2); lcd.print("Tank: 100% FULL");delay(150); }

else { if(ez && c>z && b>z && a>z ){ lcd.clear(); lcd.setCursor(1,2); lcd.print("Tank: 80% FULL");delay(250); motor1(1); }

if(ez && b>z && a>z ) { lcd.clear(); lcd.setCursor(1,2); lcd.print("Tank: 60% FULL");delay(250); motor1(1); } if(ez && a>z ) { lcd.clear(); lcd.setCursor(1,2); lcd.print("Tank: 40% FULL");delay(250); motor1(1); } if(ez ) { lcd.clear(); lcd.setCursor(1,2); lcd.print("Tank: 20% FULL");delay(250); motor1(1); }

if(e

void motor1( int t){ Serial.println("Entering motor loop"); Serial.print("value of t: "); Serial.println(t);

if(t==0) { Serial.print("motor off"); digitalWrite(motor,HIGH); lcd.clear(); lcd.setCursor(0,3); lcd.print("Pump (OFF)");

} else { lcd.clear(); lcd.setCursor(0,3); digitalWrite(motor,LOW); delay(200); Serial.print("motor on"); lcd.print("Pump (ON)");

} }

Step 4: STEP 4:- If It Is Working Setup the Web Server As Shown in My Youtube Video to Control the System Remotely!!

Smart Water Tank Control System

FINAL CODE

------------------------------------------------------------------------------

//Automatic Water Level control system by Team 3 WIZnet IoT contest
/*Arduino with WIZnet Ethernet Shield */

#include #include #include

int level1=A1; int level2=A2; int level3=A3; int level4=A4; int level5=A5; int motor=9;

int a; int b; int c; int d; int e; int r=0;

int z=111; // Adjust this value from 100 to 1023 if your circuit do not show correct value.

void motor1(int);

LiquidCrystal lcd(7,6,2,3,4,5);

void setup() { pinMode(level1,INPUT); pinMode(level2,INPUT); pinMode(level3,INPUT); pinMode(level4,INPUT); pinMode(level5,INPUT); pinMode(motor,OUTPUT);

Serial.begin(9600);

lcd.begin(16, 2); // if you are using 16x2 line LCD, then replace these values and also adjust all LCD text for 1st and 2nd line in the loop below. }

void loop() { a=analogRead(level1); b=analogRead(level2); c=analogRead(level3); d=analogRead(level4); e=analogRead(level5); lcd.clear(); lcd.setCursor(0,0); lcd.print("TEAM3 Project"); lcd.setCursor(0,1); lcd.print("H20 Flow monitor");

if(e>z && d>z && c>z && b>z && a>z ) { Serial.print("Full tank----"); Serial.println("motor off"); motor1(0); digitalWrite(motor,HIGH); lcd.clear(); lcd.setCursor(1,2); lcd.print("Tank: 100% FULL");delay(150); }

else { if(ez && c>z && b>z && a>z ){ lcd.clear(); lcd.setCursor(1,2); lcd.print("Tank: 80% FULL");delay(250); motor1(1); }

if(ez && b>z && a>z ) { lcd.clear(); lcd.setCursor(1,2); lcd.print("Tank: 60% FULL");delay(250); motor1(1); } if(ez && a>z ) { lcd.clear(); lcd.setCursor(1,2); lcd.print("Tank: 40% FULL");delay(250); motor1(1); } if(ez ) { lcd.clear(); lcd.setCursor(1,2); lcd.print("Tank: 20% FULL");delay(250); motor1(1); }

if(e

void motor1( int t){ Serial.println("Entering motor loop"); Serial.print("value of t: "); Serial.println(t);

if(t==0) { Serial.print("motor off"); digitalWrite(motor,HIGH); lcd.clear(); lcd.setCursor(0,3); lcd.print("Pump (OFF)");

} else { lcd.clear(); lcd.setCursor(0,3); digitalWrite(motor,LOW); delay(200); Serial.print("motor on"); lcd.print("Pump (ON)");

} }

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; //physical mac address byte ip[] = { 192, 168, 1, 178 }; // ip in lan (that's what you need to use in your browser. ("192.168.1.178") byte gateway[] = { 192, 168, 1, 1 }; // internet access via router byte subnet[] = { 255, 255, 255, 0 }; //subnet mask EthernetServer server(80); //server port String readString;

void setup() { // Open serial communications and wait for port to open: Serial.begin(9600); while (!Serial) { ; // wait for serial port to connect. Needed for Leonardo only } pinMode(led, OUTPUT); microservo.attach(7); // start the Ethernet connection and the server: Ethernet.begin(mac, ip, gateway, subnet); server.begin(); Serial.print("server is at "); Serial.println(Ethernet.localIP()); }

void loop() { // Create a client connection EthernetClient client = server.available(); if (client) { while (client.connected()) { if (client.available()) { char c = client.read(); //read char by char HTTP request if (readString.length() < 100) { //store characters to string readString += c; //Serial.print(c); }

//if HTTP request has ended if (c == '\n') { Serial.println(readString); //print to serial monitor for debuging client.println("HTTP/1.1 200 OK"); //send new page client.println("Content-Type: text/html"); client.println(); client.println(" "); client.println(" "); client.println(" "); client.println(" "); client.println(" "); client.println("

"); client.println("

"); client.println(" "); client.println("

Team 3

"); client.println("

"); client.println("
"); client.println(" Arduino with Ethernet Shield

"); client.println("
"); client.println("Turn On moter"); client.println("Turn Off moter
"); client.println("
"); client.println("
"); client.println("
"); client.println("

"); client.println("

"); delay(1); //stopping client client.stop(); //controls the Arduino if you press the buttons if (readString.indexOf("?button1on") >0){ digitalWrite(motor, HIGH); } if (readString.indexOf("?button1off") >0){ digitalWrite(motor, LOW); } } } } } }

Be the First to Share

    Recommendations

    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    2 Discussions