Project showcase
Poseidon: The Water Saver

Poseidon: The Water Saver © GPL3+

Poseidon is a cheap wireless water level controller for overhead tanks made using Arduino UNO and HC-12 wireless communication module.

  • 2,837 views
  • 10 comments
  • 13 respects

Components and supplies

Apps and online services

About this project

Water is such an important resource in our life that a human being cannot even live a day without water. But still we humans cause so much wastage of this precious resource. We waste more than we save! Now its time we try to save the life giving resource.

Many times it happens that we forget to turn off the water pump after the water tank gets filled. This leads to wastage of a great amount of water. Poseidon is an easy to make wireless Water Overflow control system which automatically switches off the water pump when the water in the tank reaches a certain level and switches on the water pump when the tank gets empty. Controlling of the motor is done wirelessly using the HC-12 module which has a range of about 1km.

Not only this, it also gives you call as a notification after the work is done.

Code

Sender CodeArduino
This is the code for the arduino Uno board placed at the sender end near the tank. It uses an ultrasonic sensor to measure the level of water and then sends the message to the receiver end using the HC-12 module when the level reaches a certain point.
#include <SoftwareSerial.h>
SoftwareSerial myserial(2, 3); //RX and TX of HC-12 module
int trigPin = 5;
int echoPin = 6;
int tank_height; //place the height of the tank here 
int tankTop_level; //distance of the water in tank from the ultrasonic sensor after which you want to turn of the motor 
long duration;
int distance;
void setup() {
  Serial.begin(9600);
  myserial.begin(9600);
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);

}

void loop() {
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);
  duration = pulseIn(echoPin, HIGH);
  distance = duration*0.034/2;
  Serial.println("distance:");
  Serial.print(distance);
  delay(1000);
  if(distance == tank_height){ // send '3' to receiver end when the tank gets empty
    myserial.println("3");
    Serial.println("message sent");
  }
  if(distance == tankTop_level){ // send '1' when the water reaches topmost level in tank
    myserial.println("1");
    Serial.println("message sent");
  }
  if(Serial.available()>0){
    String input=Serial.readString();
    myserial.println(input);
  }
if(myserial.available()>1){
  String input=myserial.readString();
  Serial.println(input);
  }
delay(20);
}
Receiver CodeArduino
This is the code for the arduino UNO board at the receiver end near the water pump. It receives the data from the sender end and then accordingly controls the relay for switching on/off the water pump. It then gives missed call to the entered number.
#include <SoftwareSerial.h>
SoftwareSerial myserial(2, 3); //Rx and Tx for HC-12 module
SoftwareSerial myserial2(4, 5); //Rx and Tx for GSM Module 
int relayPin = 6, input;
int flag=0;
void setup() {
  Serial.begin(9600);
  pinMode(relayPin, OUTPUT);
  myserial.begin(9600);
}

void loop() {
 if(myserial.available()>1){
  input=myserial.read();
  delay(20);
}
  if(input=='3'){
    digitalWrite(relayPin, HIGH);
    while (input=='3' && flag==0){
    myserial.end();
    myserial2.begin(9600);
    myserial2.println("ATDXXXXXXXXXX;"); //enter the phone number in place of "XX..."
    Serial.println("callining1");
    delay(10000);
    myserial2.println("ATH");
    myserial2.end();
    flag=1;
    myserial.begin(9600);
    }
    }
  if(input=='1'){
    digitalWrite(relayPin, LOW);
    while(input=='1' && flag==1){
    myserial.end();
    myserial2.begin(9600);
    myserial2.println("ATDXXXXXXXXXX;"); //enter the phone number in place of "XX..."
    Serial.println("callining2");
    delay(10000);
    myserial2.println("ATH");  
    myserial2.end();
    flag=0;  
    myserial.begin(9600);
    }
  }
delay(20);
}

Schematics

Sender Schematic
Sender end s3fao5juwf
Receiver Schematics
Receiver end sa6koyrfdu

Comments

Similar projects you might like

Water Level Alerting System

Project tutorial by Vinayak Shantaram Joshi and Pranav Kundaikar

  • 1,947 views
  • 0 comments
  • 5 respects

Water Quality Monitoring and Notification System

Project showcase by emmanuel ani

  • 50,598 views
  • 38 comments
  • 112 respects

Automatic Water Level Controller

Project showcase by karthickcj0083

  • 13,048 views
  • 6 comments
  • 19 respects

Water Level Meter

Project showcase by Fanatic Series

  • 6,937 views
  • 6 comments
  • 22 respects

Water Plant System for Plants in Vases

Project tutorial by zioalex

  • 4,455 views
  • 4 comments
  • 10 respects

All About Water Systems: Ultrasonic/WaterFlow/Rain Sensor

Project showcase by willy

  • 2,675 views
  • 1 comment
  • 8 respects
Add projectSign up / Login