Ultrasonic Sensor Based Water Level Indicator

by Tesalex in Circuits > Arduino

15658 Views, 69 Favorites, 0 Comments

Ultrasonic Sensor Based Water Level Indicator

proposal.jpg

When I started learning electronics, a water level indicator was the first project I made using some transistors, leds and a copper wire completely dipped in the water tank. But due to obvious reasons, it got rusted. Then I made the same project with aluminium wire, and again same thing happened. So I forgot about this project as there was no way I could get a stainless steel wire near me.

But recently, an idea came to my mind, of using ultrasonic sensor for the same project of using an ultrasonic sensor for the same project.

So, in this instructable I'll show you how you can make a water level indicator using an ultrasonic sensor.

Let's get started.

Watch the Video.

Ultrasonic Sensor based Water Level Indicator

The video contains all the steps in detail for building the project. Watch it before moving on to the next step so that it will be more easy to understand the steps.

Test the CD4511.

WP_20171007_13_03_00_Pro.jpg
WP_20171007_13_03_15_Pro.jpg
WP_20171007_13_03_29_Pro.jpg
Schematic-with-ATTiny85 (1).png
WP_20171011_12_14_44_Pro.jpg

Test your CD4511 by making this circuit diagram on a breadboard but after removing the microcontroller and ultrasonic sensor. Manually connect the four input pins to either 5V or ground randomly to check its working. Use the decimal to BCD table for verifying.

Editing the Program.

WP_20171027_16_36_41_Pro.jpg
Main Program.JPG

Follow the steps below to edit the program I have attached, according to your requirements.:

1. Measure the maximum height of water from bottom of the tank (in cm).

2. Equally divide that into your desired number of levels, I have divided it into seven parts.

3. Change the numbers of the "else-if" condition in the program.

If any error occurs, or the distance if out of range, the seven segment will display zero.

Refer images for proper understanding.

Check the Circuit.

WP_20171007_13_08_52_Pro.jpg
WP_20171007_13_09_15_Pro.jpg
WP_20171007_13_08_31_Pro.jpg
WP_20171007_13_08_44_Pro.jpg

After uploading the sketch, make the complete circuit in step 2 on a breadboard.
The number displayed should vary according to the distance between the ultrasonic sensor and the obstacle.

If required, first check the working using an Arduino Uno and then switch to DigiSpark board.

Get the Components and Solder.

WP_20171011_13_02_49_Pro.jpg
WP_20171012_09_04_05_Pro.jpg
WP_20171012_09_04_13_Pro.jpg
WP_20171012_08_57_36_Pro.jpg

Solder all of them in a perfboard, again according to the circuit in step 2.

I'll recommend to use headers for DigiSpark board, instead of soldering it directly, so that it is possible to remove it and upload another sketch later on.

Get a CAT5 Cable.

WP_20171027_14_01_50_Pro.jpg
WP_20171027_14_02_07_Pro.jpg
WP_20171027_14_02_34_Pro.jpg
WP_20171027_14_01_43_Pro.jpg

Get a CAT5 A.K.A. Ethernet cable of length according to your need and solder ultrasonic sensor to one end and a male header to the other end.

Refer the video to understand how to solder it as only visual demo can explain it properly.

Done.

WP_20171016_14_21_28_Pro.jpg
WP_20171016_14_21_42_Pro.jpg
WP_20171016_14_22_10_Pro.jpg

Put the sensor in a box before installing it in the tank to portect it from moisture and humidity inside the tank.

And that is all.

Feel free to ask questions, if any.

Thank you reading :).