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

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
    515.6 KB · Views: 83
  • page1.jpg
    327.2 KB · Views: 83
Last edited:

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…