Automatic Water Level Controller

DISCRIPTION:-

This circuit works on the principle that water conducts electricity. Two wires connected to VCC and two other wires are dipped in tank at different levels namely top & bottom and their output are taken on pins P2.6, P2.7 via  transistor BC547. Port P1 is connected to data pins of LCD and P3.2, P3.3, P3.4 are respectively connected to RS, RW, and EN pins of LCD.

Initially when the tank is empty,motor will be on automatically & LCD will show the message Motor on. 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 tank gets full,motor will be on automatically & LCD shows the message Motor Off.

CODE:-

#include<reg52.h>
sbit q=P2^6;
sbit r=P2^7;
sbit t=P2^0;
sbit rs=P3^2;
sbit rw=P3^3;
sbit en=P3^4;
sfr lcddata=0x90;
void delay(unsigned char a)
{
unsigned char i,j;
for(i=0;i

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s