WATER LEVEL INDICATOR USING ARDUINO

by sathishk12 in Circuits > Microcontrollers

113923 Views, 75 Favorites, 0 Comments

WATER LEVEL INDICATOR USING ARDUINO

WATERLEVEL.jpg

Water-level indicator is used to indicate the level of water in over head tank,by using this we can avoid the overflow of water ,and at any time we can know the level of water in tank, it has a simple circuit .

HARDWARE SETUP

IMG_20150526_141324952.jpg
DSCN1041.JPG
DSCN1040.JPG
DSCN1039.JPG
DSCN1038.JPG
DSCN1046.JPG
DSCN1045.JPG
DSCN1042.JPG
waterlevelcircuit.jpg

HARDWARE REQUIRED :

ARDUINO UNO:

BC548: BC548 is a general purpose NPN bipolar junction transistor,it is used for amplification and switching purposes,it has three terminals collector-base-emitter.

RESISTORS:Resistor is a current limiting passive two terminal electrical component-resistor act to reduce current flow to led.

RESISTOR VALUES

470OHMS220 OHMS22K

INTERFACING CIRCUIT:

the above circuit have three level low,average,high and when level of water increase transistor base get conducted and due to conduction switching process occurs and micro-controller get interrupted and it shows the level based on the respective transistor conduction.

PROJECT CODE

CODE.jpg

byte sensorPin[] = {8, 9, 10};

byte ledPin[] = {11, 12, 13}; // number of leds = numbers of sensors

const byte sensors = 3;

int level = 0;

void setup()

{

Serial.begin(9600);

for(int i = 0; i < sensors; i++)

{

pinMode(sensorPin[i], INPUT);

pinMode(ledPin[i], OUTPUT);

}

}

void loop()

{

level = 0;

for(int i = 0; i < sensors; i++)

{

if(digitalRead(sensorPin[i]) == LOW)

{

digitalWrite(ledPin[i], HIGH);

level = sensors - i;

}

else

{

digitalWrite(ledPin[i], LOW);

}

}

Serial.println("Water level");

switch(level)

{

case 1:

Serial.println("HIGH");

break;

case 2:

Serial.println("AVERAGE");

break;

case 3:

Serial.println("LOW");

break;

default:

Serial.println("NO WATER");

break;

}

delay(50);

}

OUTPUT

waterlevel indicator using arduino