Water level indicator using Nodemcu and ultrasonic sensor – Step by step instructions
Water level indicator using Nodemcu and ultrasonic sensor
Hello, welcome back to the IoT-based tutorial from SriTu Hobby. Today we are going to talk about how to make a water level indicator using Nodemcu and the ultrasonic sensor. This project can be used mainly for the water tank in our house. It is also designed to monitor the water level online and turn the water pump ON / OFF even when we are not at home. Also, the Nodemcu ESP8266 board and the Blynk application are mainly used for this project. An ultrasonic sensor is used to measure the amount of water and a relay module is used to turn the water pump ON / OFF.
This project can be made more effective by using a waterproof ultrasonic sensor instead of the HC-05 ultrasonic sensor used in this project.
The process of this tutorial
When the project is running, the Nodemcu board is connected to the Blynk cloud via WIFI. The ultrasonic sensor also calculates the distance to the surface of the water. That is, the water level is calculated. These values are then displayed on the Blynk app and LCD display. You can also turn the relay module ON / OFF with the button created in this Blynk app. That is, if a water pump is connected to the relay module, it can be turned ON / OFF.
So, let’s do this project step by step. The required components are given below.
Disclosure: These Amazon links are Affiliate links. As an Amazon Associate, I earn from qualifying purchases.
Firstly, identify these components.
Secondly, connect these components. To do this, use the circuit diagram below.
Thirdly, let’s set up the Blynk application. For that, download and install the Blynk app using the play store or apps store. After, run the Blynk app. Other steps are as follows.
First, click the “New Project” button. After, enter the project name as you like. Then select the device and connection type. Finally, click the “Confirm” button.
Next, click the “+” button and includes a “Button” and “Level V” widget. OK, let’s set up this button. For that, click this “Button”. Now, enter the button name as you like. After, select “Virtual V0” for the PIN and drag the button below it to the “Switch” side.
OK, let’s set up the “level V” widget. For that, click this widget. Now, enter the widget name as you like. Then, select “Virtual V1” for the PIN and enter your water tank level. Then turns ON the flip axis button.
Lastly, arrange these widgets as you like.
OK, now the Blynk app interface is done. Then, let’s create the program for this project. It is as follows.