water level sensor with Arduino | Water level

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
  • Led
  • Soil moisture sensor
  • Arduino cable

 

Water level sensor with Arduino Circuit Diagram

 

Water Level Sensor with Arduino

 

 

 

Arduino Water level sensor Code

 

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

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

   if(s1>690 ) 
   {
    digitalWrite(10,HIGH);   // Blue led ON 
   }
    else
   {
    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.