Microcontroller At89c2051 (8051 family) Based Level Monitor
In This post we will learn to developed a simple level gauge or level meter by using 8051 family micro-controller say at89c2051.
The circuit diagram and example c program written in keil c51 is attached here in this post for student understanding and knowledge sharing.
List of components used in this project:
1. The heart of the project as obvious is the microcontroller at89c2051.
2. LED bar graph display
3. Buzzer (siren)
4. Level Input probes (Transducer for level sensing)
5. Nand gated Opto-couplers
6. Transistor 2N2222 (NPN) General purpose transistors. You can use any available NPN transistor like c828 or c1383 etc
7. Crystal 12 Mhz
8. capacitors 33pf
9 LM 7805 voltage regulator IC (three PIN)
10 Relay to control a Motor , ON/OFF
Project Concept:
The present concept implements controlling of pump which pumps water from the sump (under-ground tank) to the overhead tank, using 8951 microcontroller. The control panel, i.e. the main control unit of the system which consists of the primary control switches, pump indicator, siren and level indicators. The visual example of how switches And the indicators can be placed as shown the figure.
As you can see in the above diagram, port 1 (P1.0 to P1.4) is exclusively used as an input port which takes the information regarding the water level in the sump or overhead tank.
Port 3 is used as output port which is connected to the indicator that indicates the water level in both the tanks 10 LEDs are connected with port P3 via P3.2 to P3.7, look the PIN P3.6 in at89c2051 is missing by default .
The programed logic in microcontroller gives the output which is connected to pump indicator, siren and the relay which controls the switching of the pump.
When the system is active and running, it indicates the water levels through bar graph LED in the tanks and it controls the working of the pump.
Besides the program logic and its functions, one important thing regard the level monitoring is its sensor.
In this project a self made sensor is used which is consist of only six metallic strips of 3 cm length. One strip is for DC power and other five strips are for input. When water reaches and touches any of the strip, the circuit is completed and respective optocoupler is activated which gives signal to microcontroller and correspond LED is switched ON.
When all the strips are dipped in water (all probes are dipped in water) then siren or buzzer runs and motor is switched Off. This is simple level indicator logic and needs more modifications. I will post the updated logic after testing in real system.
The optocoupler is used to make the circuit safe from outside high signals. In this project a nand gated optocoupler is used. But you can use any general purpose optocoupler like L817 etc.
As circuit diagram tell us, we will need two different power supplies in this project. One power supply of 12v dc for the smooth running of microcontroller and peripheral components.
Second power supply of 12v Dc is used for input signal and optocouplers.
For this i can suggest, that you can use a 12-0-12 transformer, it means a step down transformer having two secondary windings. Or other separate power supplies can be used.
C-code of this project:
First line is to include the required file for registers of at89c2051. you can use reg51.h file.
//#include
sbit input1 = P1^0;
sbit input2 = P1^1;
sbit input3 = P1^2;
sbit input4 = P1^3;
sbit input5 = P1^4;
sbit indicator1 = P3^2;
sbit indicator2 = P3^3;
sbit indicator3 = P3^4;
sbit indicator4 = P3^5;
sbit indicator5 = P3^7;
sbit siron = P3^1;
sbit motor = P3^0;
main(){
P1 = 255;P3 = 255;motor = 0;siron = 0;
while (1) {
if(!input1) indicator1 = 0; else indicator1 = 1;
if(!input2) indicator2 = 0; else indicator2 = 1;
if(!input3) indicator3 = 0; else indicator3 = 1;
if(!input4) indicator4 = 0; else indicator4 = 1;
if(!input5) {indicator5 = 0; motor = 1; siron = 1;}
else {indicator5 = 1;motor = 0; siron = 0; } } }
TAGS:-
8051 Project, 8051 projects,ADC0804,adc0808,adc0809,microcontroller projects, at89c51 projects, 8051 serial port communication,Level Measurement Instruments for Continuous Level Measurement with microcontroller 8051,Liquid Level Monitor,Manufacturer and designer of groundwater monitoring instrumentation ,water level sensor, water level testing, well depth monitor, water level monitor,flow, volume and level monitoring in storage vessels ,Level Sensor, Level Indicator or Liquid Level Sensor, Tank Gauge,ultrasonic liquid level monitoring,level sensors, level switches, level transmitters, level indicators and speed monitoring systems for process control ,Capacitance Level Sensor and Control Instruments,LHe or capacitance-based liquid level sensors, Level Monitoring. Sensors monitor fill levels of liquids and solids in large and small containers,data acquisition and control project based on microcontroller 8051 to build level monitoring system.
The circuit diagram and example c program written in keil c51 is attached here in this post for student understanding and knowledge sharing.
List of components used in this project:
1. The heart of the project as obvious is the microcontroller at89c2051.
2. LED bar graph display
3. Buzzer (siren)
4. Level Input probes (Transducer for level sensing)
5. Nand gated Opto-couplers
6. Transistor 2N2222 (NPN) General purpose transistors. You can use any available NPN transistor like c828 or c1383 etc
7. Crystal 12 Mhz
8. capacitors 33pf
9 LM 7805 voltage regulator IC (three PIN)
10 Relay to control a Motor , ON/OFF
Project Concept:
The present concept implements controlling of pump which pumps water from the sump (under-ground tank) to the overhead tank, using 8951 microcontroller. The control panel, i.e. the main control unit of the system which consists of the primary control switches, pump indicator, siren and level indicators. The visual example of how switches And the indicators can be placed as shown the figure.
As you can see in the above diagram, port 1 (P1.0 to P1.4) is exclusively used as an input port which takes the information regarding the water level in the sump or overhead tank.
Port 3 is used as output port which is connected to the indicator that indicates the water level in both the tanks 10 LEDs are connected with port P3 via P3.2 to P3.7, look the PIN P3.6 in at89c2051 is missing by default .
The programed logic in microcontroller gives the output which is connected to pump indicator, siren and the relay which controls the switching of the pump.
When the system is active and running, it indicates the water levels through bar graph LED in the tanks and it controls the working of the pump.
Besides the program logic and its functions, one important thing regard the level monitoring is its sensor.
In this project a self made sensor is used which is consist of only six metallic strips of 3 cm length. One strip is for DC power and other five strips are for input. When water reaches and touches any of the strip, the circuit is completed and respective optocoupler is activated which gives signal to microcontroller and correspond LED is switched ON.
When all the strips are dipped in water (all probes are dipped in water) then siren or buzzer runs and motor is switched Off. This is simple level indicator logic and needs more modifications. I will post the updated logic after testing in real system.
The optocoupler is used to make the circuit safe from outside high signals. In this project a nand gated optocoupler is used. But you can use any general purpose optocoupler like L817 etc.
As circuit diagram tell us, we will need two different power supplies in this project. One power supply of 12v dc for the smooth running of microcontroller and peripheral components.
Second power supply of 12v Dc is used for input signal and optocouplers.
For this i can suggest, that you can use a 12-0-12 transformer, it means a step down transformer having two secondary windings. Or other separate power supplies can be used.
C-code of this project:
First line is to include the required file for registers of at89c2051. you can use reg51.h file.
//#include
sbit input1 = P1^0;
sbit input2 = P1^1;
sbit input3 = P1^2;
sbit input4 = P1^3;
sbit input5 = P1^4;
sbit indicator1 = P3^2;
sbit indicator2 = P3^3;
sbit indicator3 = P3^4;
sbit indicator4 = P3^5;
sbit indicator5 = P3^7;
sbit siron = P3^1;
sbit motor = P3^0;
main(){
P1 = 255;P3 = 255;motor = 0;siron = 0;
while (1) {
if(!input1) indicator1 = 0; else indicator1 = 1;
if(!input2) indicator2 = 0; else indicator2 = 1;
if(!input3) indicator3 = 0; else indicator3 = 1;
if(!input4) indicator4 = 0; else indicator4 = 1;
if(!input5) {indicator5 = 0; motor = 1; siron = 1;}
else {indicator5 = 1;motor = 0; siron = 0; } } }
TAGS:-
8051 Project, 8051 projects,ADC0804,adc0808,adc0809,microcontroller projects, at89c51 projects, 8051 serial port communication,Level Measurement Instruments for Continuous Level Measurement with microcontroller 8051,Liquid Level Monitor,Manufacturer and designer of groundwater monitoring instrumentation ,water level sensor, water level testing, well depth monitor, water level monitor,flow, volume and level monitoring in storage vessels ,Level Sensor, Level Indicator or Liquid Level Sensor, Tank Gauge,ultrasonic liquid level monitoring,level sensors, level switches, level transmitters, level indicators and speed monitoring systems for process control ,Capacitance Level Sensor and Control Instruments,LHe or capacitance-based liquid level sensors, Level Monitoring. Sensors monitor fill levels of liquids and solids in large and small containers,data acquisition and control project based on microcontroller 8051 to build level monitoring system.
1 comment:
Dear Sir,
Please send code for the display unit ,
How can i connect display unit to get reading.
Shaju
Post a Comment