Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Water Level Control using Micro control 89C51

Status
Not open for further replies.
Hi Jayant,

I run this code in Keil but get the errors, I resolve them, but I think to tell u
Error on OV its not take this variable so I change this to HV, error solve,
again got error on
Code:
elseif((UV == 0) || (OV == 0)pump = 0;
so I change it to
Code:
else pump = 0;
Here I corrected this code and got the hex file
Code:
#include<stdio.h>
#include<reg51.h>
sbit low  = P2^0;
sbit mid  = P2^1;
sbit high = P2^2;
sbit UV   = P2^3;
sbit HV   = P2^4;
sbit pump = P3^4;
 
 
void main()
{
 
    while(1)
	{
 
        if((UV) && (HV))
		{
            if(low)
							pump = 1;
            if(high)
							pump = 0;
     }
		
        else	pump = 0;

   }
}
 

Yes. Use Auto-Transformer to adjust the preset. Adjust the voltage to be 280V (upper limit) and then adjust the OV preset so that pump (relay) turns OFF. Then set voltage to 180V and then adjust UV preset so that relay turns OFF. After this you can give any voltage > 180 and < 280 and test. The Machine Tooled Socket quality is better compared to ordinary sockets.
 
Hey guys,
I getting problem in proteus, actually i want to run on proteus, because I want to do lot of changes in it, but first of all need to be run this ckt successfully,
In 1st image in the cut part their is AC main power supply (230V,50hz) connected to step down transformer, to the bridge
page2.jpg page1.jpg
And code is here
Code:
#include<reg51.h>
sbit I_A = P2^0;
sbit I_B = P2^1;
sbit I_C = P2^2;
sbit RLY = P3^4;
sbit LED_MTR = P1^0;
sbit LED_C = P1^1;
sbit LED_B = P1^2;
sbit I_L = P2^3;
sbit I_H = P2^4;
void main()
{
    while(1)
    {
        if((I_B&I_C)==1)
        {
            if((I_L&I_H)==1)
            {
                RLY=1;
                LED_MTR=1;
                LED_B=1;
                LED_C=0;
            }
            else
            {
                RLY=0;
                LED_MTR=0;
                LED_B=1;
                LED_C=0;
            }
        }
        else
        {
                RLY=0;
                LED_MTR=0;
                LED_B=1;
                LED_C=1;    
        }
    }
}
 

Attachments

  • page2.jpg
    page2.jpg
    515.6 KB · Views: 57
  • page1.jpg
    page1.jpg
    327.2 KB · Views: 58
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top