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.

nitinpatil

Member level 1
Joined
Oct 29, 2012
Messages
41
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
Pune, Maharashtra, India
Activity points
1,557
I am not understanding the circuit that i attach to this,
actually the pin 24 and pin 25, what is the purpose of that pin I don't understand
what type of signal it gates and what is use of this i don't understand
plz help me to get the point..
Thank u
Nitin P
patilnitin1989@gmail.com
using 89c51.jpg
 

Hi nitinpatil,

It is a fairly straight forward circuit. To have a good understanding i suggest you build circuit in parts.

First Ignore the 89C51 and build the circuit around the Lm324. if you observe there are 4 transistors hooked up with four 10k resistors each. Simply replace the 10k resistors with 1k and LED.

Refer to diagram below.

after doing this, power up the circuit and pour in water to touch each of the conducting probes, you will see each LED lighting up showing level of water in reservoir.

When you do this I can help further.

Cheers

- - - Updated - - -

Diagram using 89c51-b.jpg

also here for datasheet of lm324 opamp http://www.ti.com/lit/ds/symlink/lm124-n.pdf
 
Thank you very much ultrabrain,

I got your point, and surly I do this, It will help me.

Actually I shoulder this whole ckt already on zero pcb, but after that i am confuse for this pins but after doing this experiment i will be surly clear

Because this make me problem with my programming

Thank you very much again.
 

The opamps are to detect Under Voltage UV and Over Voltage OV Conditions. If voltage is high or low the motor (Pump) will burn. The opamp gives signal to uC if there is any OV or UV Condition and there by turns OFF the pump.
 

Ohh it is that...!!!
Thank you jayanth

Means I have to check this pin programmatic and control the motor,

Will you plz suggest me which pin (24 or 25) give me OV or UV condition and how ?

Please help me for this.

Thank you again
 

Op-Amps are used as Comparators in the Circuit. Analyze the working of Op-Amps. See when the uC pins 24 and 25 will be high or low. Pin 24 is for UV and 25 for OV. The voltage at the inverting input changes and the voltage at the non-inverting inputs remain constant. If the voltage is between set UV and OV Conditions then the relay is operated depending upon the water level. If there is a UV or OV condition then relay (motor) is disabled and if motor was previously on then it will be turned OFF.
 

This point is clear that on UV and OV condition motor get OFF,
In ckt digrame Vin is to Negative of OPAMP, and Vref is to Positive of OPAMP is grounded,
Means it compare the Vref to Vin and produces the output,

So my Question is that, how it compare..... bcoz Vin is zero always then Vref compare to Vin, but in this condition Vref is always high, it always UV

Means I am confusing that who is compare to whom and what should be the required voltage(Vref or Vin) to trigger the UV nd OV condition, because their is lot of fluctuation in main supply then every time it should be low and high continuously and motor get ON and OFF simultaneously.
 

Programming the microcontroller is a simple task. The circuit from my own analysis is woeking but I will like you to modify the circuit by removing the second and third bridge used to sense under voltage and over voltage.
Look after the first bridge just before the filtering capacitor, insert a diode so that you can monitor the voltage ther for cases of low and high voltage.
Reducing the component count reduces cost and increases reliability of the system/circuit as well as reduces the areas to be trouleshooted in cases of fault.
Once you have done this let me know so that I can just direct you on how to program using c language.
 
Thank You Reginald
Really its wasting of time nd cost also for new 2 bridge,
But I already solder this all setup on zero PCB, so I can try this for new setup if this run successfully,
Also it's very helpful if u help me for progrmming in Embedded C,
Will u plz help me for my previous query, which is i posted at 10:45, because it confusing me lot.

Thanks again
 

Concerning your problem, are you sure that you soldered the feedback resistors? If they are working then the voltage fluctuation will not affect your circuit too much.
 

Last edited:
Will U please help me for programing... actually its easy but is any other easy method to do programming, I am just poling over the three pins 21, 22 ,23 and make this 2 pins 24 nd 25 as a interrupt.. so is their any other easy method for this...

Thank you in advance
 

When Op-Amp operates that is when there is UV or OV condition then pins 24 and 25 will become low otherwise it will be high due to pullup resistors. You have to poll pins 21, 22, 23 will be low and pins 24 and 25 high all the time. If pins 24 and 25 is high then only relay should be operated else relay should be disabled. Pins 21, 22, 23 gives low, mid, and high level of overhead tank.

if pin 24 or 25 = high and pin 21, 22, 23 is high then turn ON pump.
if pin 24 or 25 is low, turn OFF pump
if pin 24 or 25 is high and pin 23 is high turn OFF pump.
 

yes I understand for the pin voltage to do programming but tell me the calculation for OV and UV, that what voltage could required to trigger for OV and UV. actually its not concern for programing but I want to clear my concept, that how UV and OV it happens.
 

To accurately calibrate for OV an UV I recommend the use of a variac. If you follow my earlier post and use a variac to set the ac voltage btw 200ac - - - - 240ac . Such that if voltage drops below or is above the LED comes on and can thus be inputed into uC
 
Here I upload images of my project that I mounted on zero PCB

LED is not solder yet but can be complete.

I thinking of using LED's not LCD, it save cost
1016665_10201451762685164_429076890_n.jpg
971752_10201451896808517_639988687_n.jpg
 

The voltage depends upon preset position. Let us assume that Op-Amp Vref is 5V and the other voltage is set to 5V also i.e., it will be set when 230V = 5V scaled. If voltage becomes 280V then 5V becomes 6.08V. This will make the o/p of Op-Amp to go low. So, you have to adjust the preset when there is 230 V such that it is balanced.


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
sbit low  = P2^0
sbit mid  = P^2^1
sbit high = P2^2
sbit UV   = P2^3
sbit OV   = P2^4
sbit pump = P3^4
 
 
void main(){
 
 
    while(1){
 
        if((UV) && (OV){
            if(low)pump = 1;
            if(high)pump = 0;
        }
        elseif((UV == 0) || (OV == 0)pump = 0;
 
    }
}



For IC Sockets you could have used Machine Tooled IC Sockets. It is better.
 
Last edited:
Thank you jayanth,

Its very helpful to me, and your code is very good,
So I have to use variac(Auto-transformer) to set the value at preset ?
And what's the better in Machine Tooled IC Sockets, actually I didn't use before, that's why i ask, as their is better advantage over the socket I use ?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top