Project tutorial
Easy IOT Water Leakage Indicator

Easy IOT Water Leakage Indicator © GPL3+

IOT-based project to know about water leakage on your server.

  • 12,149 views
  • 2 comments
  • 15 respects

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)

Apps and online services

About this project

This project will keep you aware about leakage of water from pipe or tank. Leaks from pipes, plumbing fixtures and fittings are a significant source of water waste for many households. Research has shown that the typical home can lose 2,000 to 20,000 gallons of water per year due to leaks. Some leaks are obvious, such as dripping faucets and leaking water heaters. Unfortunately, many leaks go undetected for years because the source of the leak is not visible.

Step 1: Power Supply

Here we will use 9v battery for power supply. We will need 7805 voltage regulator IC to get 9V. Then from 7805 IC, feed it to Arduino.

Step 2: Connecting ESP266 and powering it

Connect the Arduino’s 3v3 (3.3V) output to ESP8266. The ESP8266 works with 3.3V and not 5V, so this is necessary.

Step 3: Connect RX and TX

Connect the RXD pin of the Arduino to the RX pin of the ESP8266.Connect the TXD pin of the Arduino to the TX pin of the ESP. When we want two things to talk to each other over serial, we connect the TX pin of one to the RX of the other (send goes to receive and the opposite). Here we do not have the Arduino talk to the ESP8266 though, our computer is talking to it via the Arduino.

Step 4: GND and RST

Connect the RES or RESET pin, When you ground the reset pin, the Arduino works as a dumb USB to serial connector, which is what we want to talk to the ESP8266.

Step 5: Connecting Water Leak Sensor

Next we connect Ardino and water sensor. We connect Arduino VCC and GND to water sensor VCC and GND. Arduino digital Pin 2 is connected to digital out pin of water sensor.

Now Upload Code.

Step 6: EasyIOT Server

We have To make Our IOT Server which Can be found on link here: https://iot-playground.com/download

Code

Untitled fileC/C++
#include <Esp8266EasyIoT.h>
#include <SoftwareSerial.h> 

Esp8266EasyIoT esp; 

SoftwareSerial serialEsp(10, 11);

#define LEAK_PIN  2  // Arduino Digital I/O pin number
#define CHILD_ID_LEAK 0

Esp8266EasyIoTMsg msgLeak(CHILD_ID_LEAK, V_DIGITAL_VALUE);
//Esp8266EasyIoTMsg msgHum(CHILD_ID_LEAK, V_LEAK); // supported in esp >= V1.1 lib

int lastLeakValue = -1;

void setup()
{
  serialEsp.begin(9600);
  Serial.begin(115200);  

  Serial.println("EasyIoTEsp init");
  esp.begin(NULL, 3, &serialEsp, &Serial);

  pinMode(LEAK_PIN, INPUT);

  esp.present(CHILD_ID_LEAK, S_LEAK);
}

void loop()
{
  esp.process();
  
  // Read digital pin value
  int leakValue = digitalRead(LEAK_PIN); 
  // send if changed
  if (leakValue != lastLeakValue) {    
    Serial.println(leakValue);
    esp.send(msgLeak.set(leakValue==0?0:1));
    lastLeakValue = leakValue;
  }  
}

Schematics

uno_esp_connection_hWNKzevLuM.png
Uno esp connection hwnkzevlum

Comments

Similar projects you might like

IoT Made Easy w/ UNO, ESP-01, ThingSpeak & MIT App Inventor

Project tutorial by MJRoBot

  • 17,869 views
  • 15 comments
  • 35 respects

IOT Humidity And Temperature Display

Project tutorial by Patel Darshil

  • 5,871 views
  • 0 comments
  • 16 respects

IoT arduino ESP Garage Door opener (UD)

Project in progress by David Smerkous

  • 10,854 views
  • 6 comments
  • 16 respects

Safe City: A Device to Keep You Safe

Project tutorial by Patel Darshil

  • 6,678 views
  • 0 comments
  • 24 respects

Water Quality Monitoring System

Project tutorial by Hao Jie Chan

  • 28,793 views
  • 35 comments
  • 59 respects
Add projectSign up / Login