Water Level Sensor with Arduino

water level sensor with Arduino | Water level

Arduino Tutorial

Hey guys, Now we are with another tutorial Water level sensor with Arduino. As we have covered many sensors with Arduino and today we will cover another sensor known as a soil sensor. There is 50+ article in our Arduino tutorial. We are sharing all the detail of this activity. if you are a learner then you should bookmark this website. Water level sensors can be used in any project as a smart irrigation system that can be used on crops as well as in the garden. So if you have plants in the garden you can make this awesome project. and if you want to learn how the soil sensor is working and where can we used this sensor. to learn this activity you need to know some basic electronic and Arduino programming. Let’s start the Article.


What is a Water level sensor? 

In this activity, we will learn water level sensor. it is the same as our recent activity on soil moisture sensor interfacing. both sensors work almost the same so, today we are going to interface the water level sensor with Arduino. because it may help us many places like water tank, swimming pools, and ir cooler. where we need to measure the water level. we can use this sensor. this is made up of the conducting material which covers the almost full sensor. so, this conducting material help to find out the water level here. the more water touches the sensor the less reading will get. it is like a variable resistor. which have the resistivity inversely proportion to the water. so, this is an Arduino water level sensor. we have used this sensor in our air cooler we have integrated this sensor with some LEDs. The led’s associated with the level of water there we are using 3 LEDs. so the sensor may give the analog value. so, we can make more condition and more accurate.


How does the water sensor Arduino system work?

The water level sensor showing changes comes near to water. this sensor has both output digital either analog. it depends on your code. write your code for analog for better results. so, here we are giving all the detail here.  when the water sensor dipped into the water then it will change the value of resistance which is monitoring by the Arduino. and there we have made a database here in which we insert a threshold value if the sensor value comes near the threshold value the Arduino compare that value with the pre-exists value. and if the condition is right Arduino sends an instruction to the connected devices like a motor. for example, if we are using this water level sensor with Arduino system in an air cooler. and wh we are filling water to it. there we need to dip the sensor in the air cooler so. it can send the data to the Arduino and when the water is filled at a certain level the system stops working.

Components Required to make the project. 

  • Arduino Uno
  • Breadboard
  • Jumper wire
  • RGB Led Module
  • Water Level Sensor sensor
  • Arduino cable
S.No Component Required Quantity Buy Link
1. Arduino UNO 1 https://amzn.to/3ue2vmh
2. Arduino UNO Cable 1 https://amzn.to/3obXjht
3 Water Level Sensor 1 https://amzn.to/3iHpYrl
4. RGB LED Module 1 https://amzn.to/3FAuHVI
5. Jumper Wire 40 https://amzn.to/39q43jr
6. Breadboard 1 https://amzn.to/39vsRX2
7. 9 Volt Battery 1 https://amzn.to/3zUDj5l

Water level sensor with Arduino Circuit Diagram


Water Level Sensor with Arduino


Arduino UNO Water Level Sensor
D5 Pin ( S )  (  Signal  )
( +5V ) VCC ( + ) (  positive  )
GND ( Ground ) ( – )  ( Negative  )
Arduino UNO RGB Led Module
D8 Pin R Pin
D9 Pin G  Pin
D10 Pin B  Pin
GND (  –  ) ( GND )


Arduino Water level sensor Code


 // Techatronic.com
void setup()
   pinMode(8,OUTPUT);  // Red led pin
   pinMode(9,OUTPUT);  // Green led pin
   pinMode(10,OUTPUT); // Blue led pin
void loop() 
  int s1=analogRead(A0);  
  if(s1>600 && s1<650 )
     digitalWrite(8,HIGH);     // Red led ON 
   digitalWrite(8,LOW);        // Red led OFF

  if(s1>650 && s1<690 ) 
    digitalWrite(9,HIGH);     // Green led ON 
    digitalWrite(9,LOW);     // Green led OFF 

   if(s1>690 ) 
    digitalWrite(10,HIGH);   // Blue led ON 
    digitalWrite(10,LOW);   // Blue led OFF 


at above we have shared both the code for digital output as well as the analog output. upload the given code into the Arduino and make this project.

Spread the love, Share this post with friends