## Introduction: Ultrasonic Sensor Based Water Level Indicator

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.

## Step 1: Watch the Video.

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.

## Step 2: Test the CD4511.

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.

## Step 3: Editing the Program.

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.

## Step 4: Check the Circuit.

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.

## Step 5: Get the Components and Solder.

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.

## Step 6: Get a CAT5 Cable.

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.

## Step 7: Done.

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.

StudentP (author)2017-10-28

Great can we make it wireless for long range

Tesalex (author)2017-10-29

Sure, you can use the widely used 433 MHz RF Wireless module or the NRF24L01. Can't say anything about Bluetooth though. Keep in mind you will need a microcontroller to get values from ultrasonic sensor and then transmit the data collected using the microcontroller and receive it and then display. If you want to use seven segment display, 433 MHz ones will be the best option.