top of page

IoT Cloud and Web Server Based Water Level Controller

Updated: Dec 29, 2022

Here to build a water level monitoring and controller based on Internet of things. In this Water level monitoring using myDevices Cayenne(IOT cloud), Fusion chart(Web Server) in HTML page and 4 line LCD display. The real time Liquid level and Motor ON/OFF Status can be monitored via internet and data stored in Cloud. The IOT system uses non-contact method (ultrasonic sensor based) for measuring liquid level up to 400cm.

Measuring water level is same as measuring distance of liquid surfaces, the ultrasonic transducer outputs a train of ultrasonic bursts at 40 KHz which will hit the water surface and reflect back to the sensor. The time taken between sent and received ultrasonic waves are calculated by a micro controller such as ESP8266 12E. The measured distance in cm is converted in to percentage.

Components Required

  • HC SR04- Ultrasonic sensor - 1 no

  • 20x4-I2C- LCD display - 1 no

  • ESP8266 12e- NodeMCU - 1 no

  • Push Button Switch - 1 no

  • Relay 5V,1 channel - 1 no

  • Transistor SL100 - 1 no

  • Resistor 2K, 1K - 1 no

Circuit diagram

Refer Previous Post for More details:

Subscribe and Download code.

Configure Wifi setting:

Follow the Steps.

  • Open wifi setting in mobile

  • Select "Smart level" device

  • After Connected device without internet, open Webpage

  • Enter IP, after loading Select Wifi Configure.

  • Confirm Switch On Your router, Select Your router

  • Enter your Wifi credentials SSID, Password.

  • After entered your credentials, the ESP8266 connected to the router.

  • now ESP 8266 IP address displayed in LCD display.

Tank height:

How change to Tank height?. first Restart ESP8266 Board using "rst" button. after restarting Press Push button connected in NodeMCU pin D0 and Hold for 5 seconds. Now Tank Height is set in cm and displayed in LCD display. Tank height value stored in EEPROM, so After Power off condition the value is retained.Note: When setting the Tank height, tank shall be empty otherwise reading goes wrongly.

Web server:

Open Browser and Enter IP address displayed in the LCD. Example:

IoT Cloud (My devices .com)

Login Credential and select device "smart Level" and get result and customize your self.

IoT Cloud (My devices .com)

Data stored in Cloud server, the real time data available in graph format.

LCD Display.

4 line 20 chracter LCD display used in this project.

Line 1. Tank height in cm

Line 2. IP address for Web Server- ESP8266

Line 3. Water Level in %..

Line 4. Pump Motor ON/OFF status.

Installing the Arduino_Library

LiquidCrystal_I2C.h : you need to Download and install the LiquidCrystal_I2C library.

In your Arduino IDE, to install the libraries go to Sketch > Include Library > Add .ZIP library… and select the library you’ve just downloaded.

After installing the required libraries, copy the following code to your Arduino IDE.

1,924 views0 comments


bottom of page