Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

an 89c51 project

Status
Not open for further replies.

confusedwreck

New Member
hi...will be really grateful if sumone would giv me a solution to this..

the project's really simple...der are 6 copper rods of six diff lengths to sense diff levels of water in a tank..the other end of each rod is connected to a 22k resistor, which then goes to a 680K resisitor(pull up resistor) and then goes to a port 0 pin.

the output: initially a red led is on, buzzer is on, and relay is on.
1st level: wen d water touches d first level, red led and buzzer are turned off, green led is turned on
2nd level: wen water touches d next rod, green led is turned off .
3rd level: blue led on
4th level: blue led off
5th level: red led on
6th buzzer on, relay off

the problem: the project doesn't work wen i put the rods in water..(i tried putting salt in the water as well so as to make it conducting but it makes no diff)..but it works wen i touch the rods with some steel object..like a steel glass or something..but since it doesn't work with water..it defeats the purpose of the project rite?..what do u think shud b the reason for this?

do u think if i reduce the no of levels to 3..with each led for each level..thus reducing the length of the source code, will it help?..or shud i change d value of d resistors?

Thanx a ton!!:)
 
urgent help reqd!!

hi...will be really grateful if sumone would giv me a solution to this..

the project's really simple...der are 6 copper rods of six diff lengths to sense diff levels of water in a tank..the other end of each rod is connected to a 22k resistor, which then goes to a 680K resisitor(pull up resistor) and then goes to a port 0 pin.

the output: initially a red led is on, buzzer is on, and relay is on.
1st level: wen d water touches d first level, red led and buzzer are turned off, green led is turned on
2nd level: wen water touches d next rod, green led is turned off .
3rd level: blue led on
4th level: blue led off
5th level: red led on
6th buzzer on, relay off

the problem: the project doesn't work wen i put the rods in water..(i tried putting salt in the water as well so as to make it conducting but it makes no diff)..but it works wen i touch the rods with some steel object..like a steel glass or something..but since it doesn't work with water..it defeats the purpose of the project rite?..what do u think shud b the reason for this?

do u think reducing the length of the source code, will help?..or is 22k too large a value..?

need a really fast reply...
Thanx a ton!!
 
Last edited:
I was tempted to ignore this post because of your chatspeak. Most of us here are of the same mind.
You need another rod, going all the way to the bottom, and connected to circuit ground. Otherwise, there is no return current path for the voltage dividers created by the other probes. You could instead use a conductive container which is connected to circuit ground.
Using DC will probably cause the device to ultimately fail due to corrosion of the rods. Look at the datasheet for LM1830.
 
Last edited:
Most of the inputs on an 8051 have pull up sufficient to overwhelm what you are trying to do. Try moving the inputs to P0 which has no pullups on the inputs...otherwise put HC buffers between the pull ups and the 8051.
 
Ubergeek63 said:
Most of the inputs on an 8051 have pull up sufficient to overwhelm what you are trying to do. Try moving the inputs to P0 which has no pullups on the inputs...otherwise put HC buffers between the pull ups and the 8051.

In point of fact he is using PORT 0, so I don't understand your suggestion.

To the OP:
I don't see any obvious reason why this should work. Who told you that it would?
 
Papabravo said:
In point of fact he is using PORT 0, so I don't understand your suggestion.

To the OP:
I don't see any obvious reason why this should work. Who told you that it would?

first of all i wud like to sincerely thank all who have taken time to read and find a solution to my problem. :)

i forgot to mention that i did connect the ground to the steel tank, and since water is conducting, the water would also be ground.. so as the water level rises each pin gets connected to ground one by one..and the corresponding output port pins(in this case port 2) would be set or reset by d source code..so y do u think the project wouldn't work?
 
Well I don't know if it will or it won't, but you did leave out a key detail from the original post. What is your estimate for the resistance of the water to the ground conncetion? Will that impedance actually pull the 680K pullup to a defined low level? If not, what level does it go to?
 
Papabravo said:
In point of fact he is using PORT 0, so I don't understand your suggestion.
My mistake, I read his post to quickly.

It could be noise pickup at 680K. It is hard to say...as you said it could easily be that it is not making a good low logic level.
 
Last edited:
I had a similar problem with water probes.
After a lot of messing about i finally found it was due to me using dissimilar metals.
The unwanted and unexpected voltage created was enough to interfere with the circuitry.
After i made sure that both contacts were the same metal (on my test setup it was copper) then i had no more problem.

I mention this because i thought it was unusual, and it may catch you out.

Regards, John :)
 
Hello,

Tap water has a resistance of about 100k ohms a little less if you add salt. I was thinking that you should be able to connect transistors to your probes as amplifiers? I am a noob, but I would think that the low current produced through the water can activate the transitor.

fiveten
 
schematic?

Why don't you draw a schematic of what you are doing? It would make it a lot easier to see where the problem lies, or if it would even work.

here is a link to a water level alarm (if that is what you are trying to achieve)
**broken link removed**

Although it does not use a microcontroller, it may/may not give you some ideas with respect to the circuit you are trying to build.

Good Luck
 
fiveten said:
Hello,

Tap water has a resistance of about 100k ohms a little less if you add salt. I was thinking that you should be able to connect transistors to your probes as amplifiers? I am a noob, but I would think that the low current produced through the water can activate the transitor.

fiveten
I filled a 2 quart measuring cup with tap water, and got some strange results. If I short the probes together under water, and then move them apart, the resistance measures around 50k. If I then remove them, and then put them back in, the resistance is around 2Megs. I think the difference is because I had my Fluke set up to autorange. This implies that the resistance is a function of current.:confused: Perhaps bubbles (or something) form on the probes, with their density being a function of current?
Another possible advantage of using AC, other than avoiding the plating issue: If the electrode spacing is fairly small, capacitance can help lower the impedance, because the dielectric constant of water is around 80. It makes the interface to the microcontoller more complicated, though.
 
my project finally worked!!

Firstly a BIG THANK YOU to all who have taken time to find a solution...my project miraculously worked today which btw happened to be the D-day of my project submission..i dissolved a huge amount of salt in water , and put each rod in the bottle and check the level detection..and it worked!!:D ..it worked even when the bottle was plastic..n the circuit schematic given by johnsmith123 was pretty close to what i was trying to achieve..i knew i ws on the right track once i saw it..so i guessed it was all about the conductivity in water ..so finally...THANX 2 ALL ONCE AGAIN!!
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top