Contact Less and Corrosion Free Water Level Indicator and Motor Control.



HI, In this instructable we going to see how to get status of Water tank based on water levels ( High,Medium,Low) of overhead tank using three different colored leds in a Non contact way with the help of ultrasonic sensor and Arduino uno board.


1. As we're going by Non contact method in which ultrasonic sensor gets the distance of object ( even it can be water) by transmitting a signal and calculating how much time it takes to bounce back,there is no problem of corrosion of wires.

2.We can increase or decrease levels without any extra hardware at any point of time.

3. Less maintenance.

4. Works even with small solar panel.


1. Not completely water proof,Ultrasonic sensor should not come in contact with water.

We need

1. Ultrasonic Sensor- HC SR04 -1

2. Arduino uno board- 1

3. Led s of different colors -3

4. 100 ohm resistors-3

5. usb cable to program arduino.

6. some connecting wires.

7.Solar panel 10 v, 5w or 9v adaptor or 5v adaptor to power the board.

Entire project is divided into two parts,

Part-1:led s interfacing for different water levels

Part2: Relay interfacing. for AC(220V/110V) motor control.


Step 1: Testing Arduino Uno Board

All new boards come with on board led blinking pre programmed ,but if we use old uno which was used for other projects can be tested with simple on board led blinking program .

Step 2: Code

Program the uno with this code.

You can modify the code that suits your needs ,here maximum height of the tank is 110 cm

Red led glows when water level is >60 cm && <= 70 cm.

Blue led blinks when water level is >40 && <

Blue led glows when water level is >25 && <=40 cm.

Green led glows when water level is <25 cm.

Step 3: Circuit Diagram

1. Install the Ultrasonic sensor few centimetres above the maximum water level & secure it with water proof container.

2. Bring out four wires from sensor viz vcc,gnd,trig,echo to arduino board using extension wires.

3. Connect 1.Vcc wire of sensor to 5v of arduino

2. gnd wire of sensor to gnd of arduino

3. Trig wire of sensor to pin #8 of arduino

4. Echo wire of sensor to pin #10 of arduino

Now we need to connect LEDs to indicate water level.

1. Connect Red from pin #2 to gnd via 100 ohms resistor,this indicates low level

2. Connect green from pin #4 to gnd via 100 ohms resistor,this indicates high level

3. Connect white from pin #3 to gnd via 100 ohms resistor,this indicates medium level.

Step 4: Power Supply to Arduino

1.You can use 9v adapter.


2. you can 10v solar panel .

or can use 5v directly to arduino v in pin.

I'll update part 2 soon.

Thank you for reading my Instructable. If you have any questions,
concerns, or suggestions please post them in the comments and I will do my best to answer them. Also, for those of you who build this light please post pictures as well.



    • Classroom Science Contest

      Classroom Science Contest
    • Arduino Contest 2019

      Arduino Contest 2019
    • Colors of the Rainbow Contest

      Colors of the Rainbow Contest

    2 Discussions