Concept:

Concept diagram for water tank when getting filled. 
  • This water level sensor will be used for water tank to check where the water level is.
  • Every time the water get poured, an LED light will blink to show  the status of the water in the tank.
  • Once the sensor is fully  filled,  it will ring a buzzer stating that the water tank is full and will not require  more water.
  • This will help stop the overflowing of the tank.

Working principal of water level sensor:

The working principle of the water level sensor is that when it is put into a certain depth in the liquid to be measured, the pressure on the sensor’s front surface is converted into the liquid level height.

COMPONENTS REQUIRED:

Schematic diagram:

Code:

Setup:

  • Set up the LED pin and connect them to digital pin numbers 2,3 and 4.
  • Connect the ground pin up arduino to breadboard.
  • Connect the positive buzzer to digital pin 5 and negative to the negative breadboard.
  • At last, we connect the water level sensor.
  • In water level sensor, the “S” i.e signal positive is connected to analog input A0.
  • The positive will connect to 5v and the negative to ground of arduino.
  • Plug in your arduino uno board into your PC and select the correct board and COM part.
  • Open up serial monitor and set your baud to 9600 baud.
  • Verify and upload your sketch.