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.

Simple diy water level

Status
Not open for further replies.
Hello,

I made a simple DIY water level sensor. I set D5, D6 and D7 to INPUT. I connected all those pins to ground by 10K resistor to pull them down and connected them to metal plates that will detect the water level (red squares on the right, 3 of them). I connected a big metal plate to 3.3V pin (big red square on left). So when water level is high enough, the D5, D6 and D7 pins will detect "high" on them. I just tested it and it works the way i wanted it to work. If i short the plates on left and right with a wire, i detect a 0.3 mA gcurrent. Obviously with water it would be less. So my questions are two:

1) Is this setup ok in a way that it won't harm my ESP8266 board.
2) Is electrolysis going to be a problem at such low current ? The metal plates aren't copper but the wire is. It is mostly covered with solder but about 1mm of it is exposed. Should i cover it all with solder and cover with epoxy resin to protect it completely ?



water_level.png
 
Hello,

I made a simple DIY water level sensor. I set D5, D6 and D7 to INPUT. I connected all those pins to ground by 10K resistor to pull them down and connected them to metal plates that will detect the water level (red squares on the right, 3 of them). I connected a big metal plate to 3.3V pin (big red square on left). So when water level is high enough, the D5, D6 and D7 pins will detect "high" on them. I just tested it and it works the way i wanted it to work. If i short the plates on left and right with a wire, i detect a 0.3 mA gcurrent. Obviously with water it would be less. So my questions are two:

1) Is this setup ok in a way that it won't harm my ESP8266 board.
2) Is electrolysis going to be a problem at such low current ? The metal plates aren't copper but the wire is. It is mostly covered with solder but about 1mm of it is exposed. Should i cover it all with solder and cover with epoxy resin to protect it completely ?



View attachment 127260

are you measuring water on a dry basement floor, looking for flooding? Or in a surge tank (looking to turn on/off a pump at high/low thresholds) or something else?
 
If you use another GPIO pin to switch the 3v3 just before reading the other pins, and then switch it low again, you'll reduce electrolysis; e.g. if you take 10us to check the level, and do that every 10 seconds, you have reduced the rate of electrolysis by a million-fold.

As far as protecting the inputs from the outside world, you might consider a series resistor for each wire connecting to an electrode. If you suspect ESD might be an issue, you can use some small-valued capacitors between each electrode and GND.
 
If you reverse your logic then you can use the internal pullups. These can also be turned off to further reduce electrolysis.

Mike.
 
Is electrolysis going to be a problem at such low current ? The metal plates aren't copper but the wire is.
Yes, eventually if not immediately.

Use stainless steel wires for the electrodes that will get wet; you can get it easily on ebay.

I'd use two outputs as well rather than the 3.3V power; one connected to the common (deepest) electrode and the other connected to high value resistors to the sensor inputs.

That way, everything can be set low between measurements and the polarity between the common and sense electrodes can be set by the program.

eg. Set the common output high, resistor output low and look for any high inputs after eg. 1mS, then reverse it to common low and resistor high, looking for low inputs after another 1mS.
 
Thank you for your replies,

I am measuring the level in a container. The copper wire exposed on each electrode is about 1mm. Yesterday i covered them with epoxy to protect them. I decided i will test it the way it is now because i am running out of time and also i am just interested in what will happen.

But i took all your advices for future projects. I already read yesterday online that a good way is to test every 5 or 10 seconds and turn on the GPIO, get a read and turn it off again. Another solution is to use analog read but i would like to leave that free for future uses. I also thought about using internal pull-ups to save me some resistor soldering.

When i finish the project i will show you how it came out :)
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top