Skip to main content

Automatic Water Level Control And Real Time Monitoring







Automatic Water Level Control And Real Time Monitoring


Description

This project will control the water level and keep the level between two predefined upper and lower positions. Any sensors can be used for this project, condition is only that it should give an active low output when activated by water. Sensors are simply water activated switches which is connected to ground.

I personally prefer read switch-magnet arrangement. Read switches are fixed on water tank wall at desired positions, and magnet is fixed on a thermocol sheet which floats in water. Modify this idea by experimenting, for an accurate result.

The designing of sensor arrangement is shown above. Sensors are read switches connected between PORT pins and ground. There is a magnet fixed on a thermocol which floats on water. Thermocol is free to move up and down through the string with the water level. When the thermocol reaches predefined water-levels the magnet and read switch come in contact and the read switch is activated and water level is detected. This is not an ultimate design, but just a design idea.












Code

/**********************************************/
/*

 http://www.facebook.com/EmbeddedProjects

 http://microcontrollerprojects00.blogspot.in/

 Author: Vishal K M

 uC:AT89S52
 Compiler: mikroC
 Crystal freq: 12MHz


                                                                                            */
/**********************************************/

extern sfr sbit motor;
sbit LCD_RS at P1_0_bit;
sbit LCD_EN at P1_1_bit;

sbit LCD_D4 at P1_2_bit;
sbit LCD_D5 at P1_3_bit;
sbit LCD_D6 at P1_4_bit;
sbit LCD_D7 at P1_5_bit;
sbit motor at P0_0_bit;

char txt1[] = "Water Level";
char txt2[] = "FULL";
char txt3[] = "MEDIUM";
char txt4[] = "LOW";
char txt5[] = "EMPTY";
 //unsigned int data;


void main() {

P2=0XFF;
P1=0x00;
//P0=0x00;
  Lcd_Init();




while(1)
{
while(P2.F2==1)
{
Lcd_Cmd(_LCD_CLEAR);
Lcd_Out(1,1,txt1);

motor=1;                             //motor off
switch(~P2)
{
case 0: Lcd_Out(2,6,txt5); break;
case 1:Lcd_Out(2,6,txt4); break;
case 3: Lcd_Out(2,6,txt3); break ;

default: ;

}
Delay_ms(500);
                           //motor on

}   motor=0;

 }

}

Comments

  1. your code is not working well please make it usefull

    ReplyDelete
  2. @govardhana
    The code is ok, please double check the circuit and your logic. This project is already done.

    ReplyDelete
  3. if water is not come to tank,then pump on forever. its a great problem, please solve it.

    ReplyDelete

Post a Comment

Popular posts from this blog

PIC 16F877A Microcontroller Based Electronic Lock 16x2LCD 4x3 Keypad

 Circuit Diagram Security is a prime concern in our day-today life. Everyone wants to be as much secure as possible. An access control for doors forms a vital link in a security chain. The microcontroller based digital lock for Doors is an access control system that allows only authorized persons to access a restricted area. An electronic lock or digital lock is a device which has an electronic control assembly attached to it. They are provided with an access control system. This system allows the user to unlock the device with a password. The password is entered by making use of a keypad. The user can also set his password to ensure better protection. The major components include a Keypad, LCD and the controller PIC16F877A. This article describes the making of an electronic code lock using the 16F877A microcontroller. The system is fully controlled by the 8 bit microcontroller 16F877A which has a 8Kbytes of ROM for the program memory. The password is stored in the

Electronic Voting Machine Using 8051 Microcontroller (AT89C51)

  Circuit Electronic voting machine has now replaced the traditional mechanism of voting due to several advantages like security, automatic counting etc. This project presents a way to develop an electronic voting machine which displays the count of votes on a 16x2 LCD interface. A user can get his/her vote register through a set of switches (one for each candidate). After every cast of vote, the subsequent count can be seen on LCD. The circuit uses AT89C51 microcontroller and the code for the project has been written in C. This LCD based electronic voting machine is designed for four candidates. The input part consists of a set of six tactile switches. The switches and 16x2 LCD are interfaced to microcontroller AT89C51 for various operations and displays. The provision of casting votes for the candidates has been provided through four of these switches. These switches are made active high and connected to pins 2-5 (P1^1 – P1^4) of the controller. The remaining two

89C51 Based Digital Thermometer Using DS1820

Introduction The hardware configuration when using multiple 1-Wire temperature sensors like the DS1820 is very simple, as illustrated in the block diagram below. A single-wire bus is used for communication between the microcontroller and the temperature sensor. It is also possible to power the devices direclty via this 1-Wire bus. An almost unlimited number of 1-WireTM devices can be connected to the bus because each device has a unique 64-bit ROM code identifier which is used to address each sensor   Temperature measurement using DS1820 sensor. Use of ‘1-wire’ protocol... Temperature measurement is one of the most common tasks performed by the microcontroller. A DS1820 sensor is used for measurement here. It is capable of measuring temperature in the range of -55 °C to 125 °C with 0.5 °C accuracy. For the purpose of transferring data to the microcontroller, a special type of serial communication called 1-wire is used. Due to a simple and wide use of these sensors, commands us