IOT Water level monitoring using Ultrasonic Sensor

(Last Updated On: July 17, 2019)

iot water level

Description:

IoT water level monitoring system-

In today’s tutorial, you will learn how to make an IOT water level monitoring system using the HC-SR04 ultrasonic sensor, Nodemcu esp8266 wifi module, and Blynk application. This project is based on two-way communication, you can monitor the Water level in real-time and you can also control the water pump. The lamp indicator represents the water pump.

 This is the 2nd version of the water level monitoring system. While in version 1 of the water level monitoring system I used only the LEDs to show the percentage of water available in the Water tank. As today’s episode is based on the version 1,  so I highly recommend you should watch my previous tutorial on the water level monitoring system using led’s click here”, because in this episode I will only explain the modifications.  This Tutorial covers

  1. Complete circuit diagram explanation.
  2. Blynk Application designing
  3. Arduino and Nodemcu programming and finally
  4. Testing Watch video Click Here


The components and tools used in this project can be purchased from Amazon, the components Purchase links are given below:

Arduino Uno: https://amzn.to/2tVz1vu
Mega 2560: https://amzn.to/2ze1kdu
HC-SR04 Ultrasonic Sensor: https://amzn.to/2GJrjgP
Nodemcu esp8266 wifi module: Best price: https://amzn.to/2NAvmiB
12v 10A SPDT relay: https://amzn.to/2MThQBK
2n2222 NPN transistors: https://amzn.to/2EmXsIb
10k Resistor: https://amzn.to/2KTd6OW
lm7805 Voltage Regulator: https://amzn.to/2IZEl5x
330-ohm resistors pack: https://amzn.to/2NtlAeh
female DC power jack socket: https://amzn.to/2KEo1gt
470 UF capacitors: https://amzn.to/2xDCOzf
5×7 cm Vero board: https://amzn.to/2OHGbvn
female headers: https://amzn.to/2zqmtiJ
connection wires: https://amzn.to/2DpBuW7
Super Starter kit for Beginners: https://amzn.to/2KJvmKG
Jumper Wires: https://amzn.to/2KMoVXs
Bread Board: https://amzn.to/2MS4q8X
12v Adaptor: https://amzn.to/2Ntr6h1
PCB plate: https://amzn.to/2IUwpCt
Variable Supply: https://amzn.to/2MT4Qfj
Digital Multimeter: https://amzn.to/2Nvft9i
Vero Board / stripboard: https://amzn.to/2MTf9jD
Soldering iron kit: “best” You guys should definitely purchase this: https://amzn.to/2zfoNuJ
Solder wire: https://amzn.to/2ufUMWf
Wire Stripper: https://amzn.to/2KOqxfU
wirecutter: https://amzn.to/2ucIq14
PCB small portable drill machine: https://amzn.to/2Nu62XF


Circuit Diagram:

iot water level

Circuit Diagram of the IoT water leveling monitoring system

This circuit is designed in Cadsoft eagle 9.1.0 version. if you want to learn how to make a schematic and PCB then watch my tutorial Click Here”. As you can see the circuit diagram of the water level monitoring system is really simple. The trigger pin of the ultrasonic sensor is connected with pin number 7 of the Arduino. While the echo pin of the ultrasonic sensor is connected with pin number 6 of the Arduino. The VCC and GND pins of the ultrasonic sensor are connected with the Arduino’s 5v and ground pins. LED3 to LED7, These are the 5 led’s which will be used to display the percentage of water available in the water tank. The first led will show 20 %, the second led will show 40% and so on. So the last led will show 100%.  These are the current limiting resistors which are connected in series with these 2.5v LEDs. These LEDs are connected with the Arduino’s analog pins A0 to A4…

The circuit in the upper left corner is the 5v regulated power supply based on the lm7805 voltage regulator. This 5v power supply will be used to power up the Nodemcu esp8266 wifi module. Two 470 UF capacitors are connected at the input and output of the 7805 voltage regulator. A 330-ohm resistor is connected in series with the led. This is a current limiting resistor.  J1 is the dc female power jack where you can connect a 12v adaptor or battery. A wire from the output of the voltage regulator is connected with the Vin pin of the Nodemcu module.

The tx and Rx pin’s of the Nodemcu are connected with pin2 and pin3 of the Arduino. So the Nodemcu will communicate serially with the Arduino through pin2 and pin3. Pin2 is the Rx and pin3 is the tx, which will be defined in the programming using the software serial library.

This is a 12v SPDT type relay which will be used to control the water pump. But for the demonstration purposes, I will connect an indicator lamp. This relay will be controlled using pin number 13 of the Arduino.


Blynk application:

IoT water level monitoring system, Blynk application designing

First of all, open the Blynk application…..

iot water level

set the project name as Water tank…..

iot water level

Click on the choose device and select nodemcu….

iot water level

make sure you set the connection type to wifi….

iot water level

then click on the create button…

iot water level

an authentication token will be sent on your email id, which will be then used in the programming, simply copy and paste it in programming …

iot water level

iot water level

iot water level

Now click on the screen and search for the level v widget and add it…..

iot water level

Click on the level v widget set the title as water level.

iot water level

now click on the pin and select virtual pin v2…

set the minimum value to 60 and maximum value to 0…

iot water level

then click on the push and select 1 second….

now again click on the screen and this time add the numeric input…

Click on the numeric input and set the title as water pump…

now click on the pin and select virtual pin v10…

iot water level

you can change the font size if you want, let’s select the large type…

set the minimum value to 10 and the maximum value to 11…

iot water level

so now our Blynk application is ready.

Programming:

For the step by step program explanation watch video Tutorial Click Here

Arduino Programming:


Nodemcu Programming for the IOT water level monitoring system:

Watch Video Tutorial:

Recommended For You

About the Author: Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

Leave a Reply