Measuring water level in a well with good reliability and accuracy

Hello,

I am currently trying to measure the water level in a well. The depth of the well is 15 meters, and the water level can vary from a few centimeters (when almost empty) to 11 meters (when the well is full). I expect a minimum accuracy of 5 cm.

I know this subject has already been discussed here, but the solutions I saw do not look good to me.

I am currently trying to do this measurement with a ms5540c sensor.

The communication with this sensor is pseudo-SPI. In my experience, it is not possible to communicate with SPI over long cables. Thats why I chose this architecture for my project:

|444x500

I am reading the pressure at the bottom of the well with a ms5540c sensor, and comparing it with the air pressure at the top of the well (taken with a BMP280 sensor) to compute the water level.

In my tests I got an accuracy of 2 cm. This seems really not bad!

The problem I have is that this system worked for 2 days. After these two days, I could not communicate with the ESP8266. I took a look at the board and saw that the voltage regulator was fried. I believe there was a short circuit somewhere underwater: (Arduino pro mini or MS5540C, or the ethernet cable).

The arduino pro mini and the MS5540C were made waterproof with a bi-component epoxy glue.

So now I have a few questions: -What is the right way to make this kind of sensors waterproof? -Can I use ethernet cable underwater? If not, what should I use? -What am I doing wrong?

Capacitive Liquid Level Sensors

Water will get inside the cable jacket and run along the spaces between the wires. For proper waterproofing, you need to split out the wires so they can be individually waterproofed.

I would try very hard to remove all electronics from the underwater unit. Instead of putting the pressure sensor at the bottom, put it at the top with a tube going to the bottom. Then use a tiny air pump (like from a fish aquarium) to pump air down the tube. The air pressure will equal the water pressure at the bottom. This also keeps the open end of the tube clear from dirt and growths. Then you can use a differential sensor and you don't need the BMP280.

With a little effort and a slow clock speed, you can run SPI over this kind of distance. 15m is not all that long.

Why don't you use a compressed air buffer in a closed pipe? That way, all your gear is at the top of the well, the SPI distance will not be an issue, and nothing gets wet.

Why don't you use a compressed air buffer in a closed pipe?

That only works for a while, until the air dissolves in the water.

How often do you want to measure. Did you consider a bubbler. Leo..

jremington: That only works for a while, until the air dissolves in the water.

If the well regularly gets to zero (like once per year) the closed pipe will reset itself automatically.

I've tried the air-dissolving-in-water experiment a long time ago. It went for about 7 months with no detectable change until the water in the bucket at the bottom evaporated completely. (I was actually looking for the opposite thing - air coming out of the water.)

Wow thank you for all these answers. Capacitive level sensing seems hard over such a range, and it might get really expensive. Is there really no way to get my system really waterproof?

I need a measurement at least each 30 sec. I studied the idea with the tube and the air pump before posting here. I only have a 5v 1A power supply at the well, I belive it will be hard to find an air pump which is powerful enough at 5v. The maximum air pressure in the hose would be 1.2bar. Anyway, do you have any advice for an air pump working with these requirements?

Ps: the well is never totally empty.

A 12volt mini airbrush compressor will do that pressure. Can be powered by a small 12volt SLA battery, and constantly charged by the 5volt supply and a boost converter. Do you really have to measure that level every 30sec. You might need a buffer tank and some slow release air valve, to stop the pump from starting every 30sec.

The electronics/pump of a bubbler does not have to be near the well. Only a thin air hose is needed between the bottom of that well and the setup (can be very long). You don't need to compensate for barometric pressure with a bubbler if you use a differential pressure sensor. Leo..

I can't believe you have to measure every 30 seconds. Every day is probably enough to keep track of the water level in a well, they don't change that fast.

Waterproofing wires can be difficult, especially at those pressures. Use epoxy to pot the sensor properly, and if anyhow possible underwater rated cables.

Bubblers are an option but I've found it hard enough to find a 5V air pump before, and the ones that I have produce nowhere near the 1.2 bar you need. For proper measurements, add a one-way valve between the air pump and the pipe, then switch off the pump as you want to take the measurement or it's going to be very unstable due to the pump action and the escaping bubbles.

SPI should be possible at those distances (a quick search on the topic gave me many results - and suggestions to use twisted pairs, terminating resistors and Schmidt triggers to enhance the signal).

And how often would the bubbler need to run? Once a week? Once a month? Our well pump filled a tank and used compressed air on top to keep the system pressurized between pump runs. About once a year my dad would hook up an air compressor to add air to replace what had dissolved.

vinceherman: And how often would the bubbler need to run? Once a week? Once a month? Our well pump filled a tank and used compressed air on top to keep the system pressurized between pump runs. About once a year my dad would hook up an air compressor to add air to replace what had dissolved.

That must have been a REALLY old system, or home made. Today the pressure tanks use a rubber seal to keep the air and water separated. Only have to add air if the rubber seal is leaking.

Paul

Paul_KD7HB: That must have been a REALLY old system, or home made. Today the pressure tanks use a rubber seal to keep the air and water separated. Only have to add air if the rubber seal is leaking.

Paul

House was built in the early 60's and this is probably original equipment. Every time my dad would top it off, he would talk about today's tanks having a bladder for the air.

wvmarle: I can't believe you have to measure every 30 seconds. Every day is probably enough to keep track of the water level in a well, they don't change that fast.

Waterproofing wires can be difficult, especially at those pressures. Use epoxy to pot the sensor properly, and if anyhow possible underwater rated cables.

Bubblers are an option but I've found it hard enough to find a 5V air pump before, and the ones that I have produce nowhere near the 1.2 bar you need. For proper measurements, add a one-way valve between the air pump and the pipe, then switch off the pump as you want to take the measurement or it's going to be very unstable due to the pump action and the escaping bubbles.

SPI should be possible at those distances (a quick search on the topic gave me many results - and suggestions to use twisted pairs, terminating resistors and Schmidt triggers to enhance the signal).

The well has a diameter of 30 cm. That's why the water level can change a lot in short time. With the MS5540C I took a measurement each 5 seconds. I don't see why this would be an issue.

Wawa: A 12volt mini airbrush compressor will do that pressure. Can be powered by a small 12volt SLA battery, and constantly charged by the 5volt supply and a boost converter. Do you really have to measure that level every 30sec. You might need a buffer tank and some slow release air valve, to stop the pump from starting every 30sec.

The electronics/pump of a bubbler does not have to be near the well. Only a thin air hose is needed between the bottom of that well and the setup (can be very long). You don't need to compensate for barometric pressure with a bubbler if you use a differential pressure sensor. Leo..

Do you have any example for a cheap 12v compressor? If I choose this method, I would like to use a 4/6mm hose. Would this be good? Which differential pressure sensor should I use? Are there sensors which work particularly well with Arduino?

wvmarle: I can't believe you have to measure every 30 seconds. Every day is probably enough to keep track of the water level in a well, they don't change that fast.

Waterproofing wires can be difficult, especially at those pressures. Use epoxy to pot the sensor properly, and if anyhow possible underwater rated cables.

Bubblers are an option but I've found it hard enough to find a 5V air pump before, and the ones that I have produce nowhere near the 1.2 bar you need. For proper measurements, add a one-way valve between the air pump and the pipe, then switch off the pump as you want to take the measurement or it's going to be very unstable due to the pump action and the escaping bubbles.

SPI should be possible at those distances (a quick search on the topic gave me many results - and suggestions to use twisted pairs, terminating resistors and Schmidt triggers to enhance the signal).

SPI seems hard, because you cannot configure it for this sensor. You just have to follow the specifications.

Paul_KD7HB: That must have been a REALLY old system, or home made. Today the pressure tanks use a rubber seal to keep the air and water separated. Only have to add air if the rubber seal is leaking.

Paul

Do you have an example of such a system without compressor?

ludovic815: ...I took a measurement each 5 seconds. I don't see why this would be an issue.

Do you have any example for a cheap 12v compressor? If I choose this method.

Which differential pressure sensor should I use? Are there sensors which work particularly well with Arduino?

Could be an issue with a bubbler setup. The compressor would have to run often, and might not last.

Did you look on ebay for "mini 12volt airbrush compressor". Didn't say they were cheap.

Google MPX5200. There are many variations in that family. I think... you need the MPX5200D (gauge with one port). Leo..

You mentioned SPI, and there are quite a few sensors in the MS range that have SPI interface available.

Oddly the MS5540C doesn't have either mentioned in its data sheet. Its effective range is also no more than 1100 mBar absolute pressure, making this an atmospheric pressure sensor, unsuitable to measure more than about a meter of water (depending on the ambient pressure). So it was the wrong type for your application in the first place.

Anyway, for air pressure, you'll indeed have to look for small compressors, maybe used for airbrushing or so. The normal aquarium pumps don't produce anything near that kind of pressure. You need one specced for at least 2 bar, preferably 2.5 bar. You'll also need a strong enough hose, not a regular silicone air hose. It's going to need some form of reinforcement.

The well being so narrow will make installation tricky, as you must ensure the hose goes all the way to the bottom, as you're measuring the water pressure at the end of the hose. For measurements every 30 seconds you have to make sure you have the ends sealed very well, or keep the compressor running all the time. I see such compressors listed on E-bay at around USD 20 a piece so not expensive, but can't find power ratings. Not likely you can do it at just 5W.

I have drip irrigation hoses (4/6mm) rated for 4 bar, they should work!

I don't understand why the compressor needs to run so often. As I understand the differential pressure sensor will not consume air for each measurement and the water will not dissolve the air so fast in the hose.

What about this kind of pump? https://www.sparkfun.com/datasheets/Robotics/Other/spec%20sheet.jpeg

It would be easier to connect the hose than with an airbrush compressor.

The airbrush compressors I have seen have a buildin pressure cutoff switch. Leo..

How about a float tied to an encoder wheel at the top.

the proper way is to use an actual submersable water pressure sensor. I was surprized at how expensive they are. how REALLY expensive.

as for the bubbler type of pressure sensor, the reason they call it a 'bubbbler' is the constant air being pushed into the tube.

I do not like creating an aerobic environment from an anaerobic one. also, I would use a copper tube. you can buy 1/4" dia ID , HARD copper pipe from any refrigeration supply. HARD copper, not a coil of soft copper. water is incompressabe, so the air in the tube will compress. it will compress to half of it's volume at about 16 meters of submerged line.

so, as the well fills, the volume inside of the tube will change, as will the air pressure.

if accuracy to half a meter is good enough, then pretty much any option you pick will work.

The air inside of the bubbler tube will be filled with nearly saturated air, so any membrane would experience 100% humidity. make sure your pressure sensor is rated for a wet, 100% humidity environment.

if you can figure out how to make a membrane in such a device, then the air in the sensor will experience 100% humidity when under pressure, unless you charge with nitrogen. check the triple point of water at ground temperature.

We occasional toss out the XY problem. the simple point is the OP discards and idea that they know little or nothing about , and assigns special or magical powers to it, then creates dreadful consequences if it is discussed.

a capacitve sensor is two metal tubes, isolated, and coated to prevent oxidation. separated by some small distance. nylon washers ? nylon screws ? this makes a capacitor. submerge the capacitor and you created a varaible capaccitor with the amount of water being the varialbe.

the capacitor is charged, and you can watch the time to charge, or the time to decay or some other variable, time this, and then as the time changes due to the altering water level, or fuel level if used in a gas tank, like they do on ships and aircraft, you can calculate the level of the fluid.

you would need a microcontroller, two copper tubes, some paint or other coating, something to hold them together, and apart.

you can use hard copper pipe from the refrigeration supply house. to get 10 foot lengths (not sure what a common length is in counties that use the metric system)

capacitive fuel gauge