Introduction: WATER LEVEL INDICATOR USING ARDUINO

Picture of WATER LEVEL INDICATOR USING ARDUINO

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 .

Step 1: HARDWARE SETUP

Picture of HARDWARE SETUP

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.

Step 2: PROJECT CODE

Picture of PROJECT CODE

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);

}

Step 3: OUTPUT

Comments

ijulh (author)2017-06-10

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

can you explain function of this code???

SadmanH (author)ijulh2017-06-15

it's a loop

Devika 1125 (author)2017-03-25

can u explain the working process?

ankesh4040 (author)2017-02-13

Does with require water with salt or pure water will work?

josephmartin (author)2016-12-04

is the water still safe for drinking?

ankesh4040 (author)josephmartin2017-02-13

Is it safe for drinking?

VipinG2 (author)2017-02-05

Can you please explain the purpose of R1/R2/R3. TIA.

NishantT11 (author)2016-12-21

what is the use of the below line here ? confusing...

const byte sensors = 3;

shibil (author)2016-09-20

how can we download this????

ArifSae (author)shibil2016-10-07

download what, copy the code. rightclick save mage

JonasK3 (author)2016-07-13

What changes to the schematic needs to be made if i have a 3.3 V micro controller and a 55 gallon tank?

ArifSae (author)JonasK32016-10-07

only supply voltage and test resistor values if they work

Sufyan1234 (author)2016-04-12

I implemented this circuit but all three pins are showing HIGH LEVEL .. not average , not low level.. plz help me.

ArifSae (author)Sufyan12342016-10-07

always give full details when asking question, and images of your setup, there can be a million thing wrong.

ArifSae (author)2016-10-07

It will cause electrolysis and the + will disintegrate.

(done it) i have this idea to periodically scan sensors for change in level. like after 10 20 sec

HabiburO (author)2016-08-23

I didn't get any output . I didn't use any Register . Is it mandatory to use Register ..

KlausM5 (author)2016-04-30

additional comment. You can add a 1 kilo-ohm resistor in series with the 5V 'common' wire to protect the transistor against damage from accidently touching the wire ends directly.

KlausM5 (author)2016-04-30

Hi, I think the values for the resistors R1, R2 and R3 are specified too low. They should be at least 220Kohm. I used 470Kohm since the water 'resistance' is about 1-2Mohm. Also omit unspecified resistor in the 5V line that goes into water. Resistors R4, R5 and R6 will adjust the collector current, so choose higher than 470ohm if you want less than 10mA, like 1Kokm ->5mA. Logic levels with this circuit are 'high' for no water contact and 'low' for water contact. I used a 2SC945 standard bipolar NPN transistor and it works reliably. Good luck.

nelson jeffrey (author)2015-11-26

hi. what software do you used to compile the circuit?

sameers31 (author)nelson jeffrey2016-01-19

The arduino IDE (integrated development environment).Which is available to download in the official arduino website.(arduino.cc)

SinC (author)2015-09-30

hi..can you send me the complete list of components that we need to use to complete this project?

santhosh santee (author)2015-05-29

wow super

About This Instructable

78,262views

63favorites

More by sathishk12:interface relay with arduinointerface lcd with arduinointerface keypad with arduino
Add instructable to: