You are on page 1of 21

Water Level Alarm Using P89V51 Microcontroller

Contents
Introduction Circuit Diagram

Working
P89V51 pin diagram Components Preset Transistor BC547 Piezo Buzzer P89V51 Microcontroller LCD Applications Conclusions

Introduction
In current scenario mostly High rise buildings Housing

complexes and societies suffer from over flooding of tanks.


By this circuit we can monitor the various levels of the tank

and can avoid spillage of water .


This module or circuit can be installed in big buildings where

manual monitor of tanks is difficult and its indicator can be placed at some centralized place.

Circuit Diagram

Working
Principle: This circuit works on the principle that water

conducts electricity. A wire connected to VCC and four other wires are dipped in tank at different levels namely quarter, half, three-fourth, full Their output are taken on pins P3.0, P3.1, P3.2, P3.3 via a transistor BC547. Port P2 is connected to data pins of LCD and P1.0, P1.1, P1.2 are respectively connected to RS, RW, and EN pins of LCD

Working(contd)
Initially when the tank is empty LCD will show the message

VACANT. As the tank starts filling up wire at different levels get some positive voltage, due to conducting nature of water. This voltage is then fed to their corresponding pins on controller. When level reaches to quarter level, LCD displays the message QUARTER.On further rise of level, HALF and 3/4 QUARTER are displayed on LCD. When tank gets full LCD shows the message FULL CLOSE TAP. A buzzer is also provided to produce a alert the user when the tank gets filled.

Components
The components present in this circuit are:

1. Preset 2. Transistor BC547 3.Piezo Buzzer 4. P89V51 Microcontroller 5.LCD

Preset
A preset is a three legged electronic component which can be

made to offer varying resistance in a circuit.


The resistance is varied by adjusting the rotary control over it. The variable resistance is obtained across the single terminal at

front and one of the two terminals.

The two legs at back offer fixed resistance which is divided by

the front leg.

Transistor BC547
BC547 is an NPN bi-polar junction transistor.
A small current at its base controls a larger current at collector

and emitter terminals.


BC547 is mainly used for amplification and switching

purposes.
For amplification applications, the transistor is biased such that

it is partly on for all input conditions.

For amplification applications, the transistor is biased such that

it is partly on for all input conditions.

Piezo Buzzer
The piezo buzzer produces sound based on reverse of the

piezoelectric effect.
These buzzers can be used to alert a user of an event

corresponding to a switching action.


It consists of piezo crystals between two conductors. When a

potential is applied across these crystals, they push on one conductor and pull the other. This, push and pull action, results in a sound wave.

The buzzer produces a same noisy sound irrespective of the

voltage variation applied to it. Most buzzers produce sound in the range of 2 to 4 kHz.

P89V51 Microcontroller
P89V51 is an 8-bit and belongs to 8051 family. It has 64 kB

flash and 1024 bytes of data RAM.


5V operating voltage and operating frequency is upto 40 MHz. In 40 pin P89V51, there are four ports designated as P1,P2,P3

and P0. All these ports are bi-directional ports.


These ports are bit addressable.

Pin diagram

Liquid Crystal Display(LCD)


LCD screen is an electronic display module. A 16x2 LCD

display is very basic module.


These modules are preferred over seven segments and other

multi segment LEDs.


A 16x2 LCD means it can display 16 characters per line and

there are 2 such lines.


The LCD has two registers namely command and data.

The command register stores the command instructions given

to LCD while the data register stores the data to be displayed on the LCD.

Applications
This circuit can be used for indoor or outdoor use, this alarm

system monitors liquid levels in holding tanks, sewage and other non-potable water applications.

Conclusions
Liquid level alarm can monitor various levels of tank and can

avoid the spillage of water.

References
www.engineersgarage.com/microcontroller/8051projects/liquid

-level-alarm-circuit en.wikipedia.org/wiki/Liquid_crystal_display http://en.wikipedia.org/wiki/Preset

Thank you

You might also like