Water Level Indicator Using Arduino - LBM4

Recent Post

Wednesday 14 August 2019

Water Level Indicator Using Arduino

Water Level Indicator Using Arduino

A water level indicator is a system that relays information back to a control panel to indicate whether a body of water has a high or low water leve

overal setup for water level indicator


Today we are going to learn about water level indicator using Arduino in the simplest way. This is very beginner level project for electronics and robotics student. Here we are going to explain in simple 5 steps so that even school kids can understand easily.

Components Required

  1. Arduino
  2. Bread board
  3. 3 LED (RED, GREEN, YELLOW)
  4. Buzzer
  5. Jumper wire
  6. Water level sensor
  7. 220 ohm Resistor (3 )

Step 1: Assemble and connect LED on Bread board

led and board


  1. Connect cathode of each 3 LEDs to power rail on breadboard which would be grounded.
  2. Connect anode to different nodes.
  3. Connect 220 ohm resistor in series with each LEDs

                   RED – indicate low level of water
                  YELLOW – indicate half water level

                  GREEN – indicate full water level

Step 2: Connection with Arduino

arduino connection
Connect pins of LEDs as follows:

RED= Digital pin 1
YELLOW=Digital pin 12
GREEN=Digital pin 11

Step 3: Connection of water sensor

connection with water sensor

                        Connect water sensor to Arduino as follows:


Water sensor                 
Arduino pin
               -
GND
              +
VCC
              s
A0

Step 4: Connection of Buzzer

connection with buzzer
                         
                                   Make connections of Buzzer to digital pin 8 of Arduino

Step 5: Upload the sketch:

program

Code:


int level;
const int analog_0=0;
int l1=13;
int l2=12;
int l3=11;
int l4=10;
void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  pinMode(l1,OUTPUT);
  pinMode(l2,OUTPUT);
  pinMode(l3,OUTPUT);
  pinMode(l4,OUTPUT);
 pinMode(8,OUTPUT);
}

void loop() {
  
  // put your main code here, to run repeatedly:
level=analogRead(analog_0);
Serial.println(level);
if(level>500&&level<550)
{ digitalWrite(l1, HIGH);
  digitalWrite(l2, LOW);
   digitalWrite(l3, LOW);
    digitalWrite(l4, LOW);
  
  }
else if(level>600&&level<620)
 {
  digitalWrite(l1, LOW);
  digitalWrite(l2, HIGH);
   digitalWrite(l3, LOW);
    digitalWrite(l4, LOW);
  
  }

else if(level>620&&level<630)
 {
  digitalWrite(l1, LOW);
  digitalWrite(l2, LOW);
   digitalWrite(l3, HIGH);
    digitalWrite(l4, LOW);
  
  }

else if(level>630&&level<650)
 {
  digitalWrite(l1, LOW);
  digitalWrite(l2, LOW);
   digitalWrite(l3, LOW);
    digitalWrite(l4, HIGH);
    digitalWrite(8, HIGH);
  }

}



         

11 comments:

  1. Water heaters with larger tanks are suitable for households with higher hot water demands.
    water heater replacement parkville

    ReplyDelete
  2. Turning down the water heater temperature saves energy and prevents scalding.
    water heater replacement melbourne

    ReplyDelete
  3. The lifespan of a water heater can vary depending on the type and maintenance.
    water heater surprise az

    ReplyDelete
  4. On-demand water heaters are energy-efficient and only heat water when needed.
    water heater replacement rancho cucamonga

    ReplyDelete
  5. Tankless water heaters have a longer warranty period compared to storage tank models.
    water heater repair

    ReplyDelete
  6. Heat pump water heaters use electricity to move heat from the air or ground to heat water efficiently.
    water heater repair nh

    ReplyDelete
  7. Flushing the tank of a water heater can remove sediment buildup.
    water heater replacement west columbia

    ReplyDelete
  8. Again a good collection with superb explanation. Kindly explain about maxi dress, I’m in love with it

    ReplyDelete
  9. Water heaters can have a lifespan of 10-15 years with proper maintenance.
    water heater replacement chandler arizona

    ReplyDelete