Thanks @Mahko_Mahko for asking the question about barometric pressure affecting the pressure readings of water level in an open tank. I was on my list of items to research in any case. Here is what I figured out from my research.
TLDR; It depends on if you have the correct type of pressure sensor. Hint: a barometer is not the correct type. A gauge or differential pressure sensor will give correct readings, or one can correct the measurement of their in-tank barometer by subtracting the reading of a second barometer reading local air pressure from it in Home Assistant leaving only the pressure of the water column.
There are three types of pressure sensors: absolute, gauge, and differential. The difference is their reference pressure
- Absolute - absolute zero pressure (a vacuum on the sensor)
- Gauge - atmospheric pressure (has two ports but one is normally just a hole)
- Differential - has two ports and gives the difference in the pressure between the two.
More information: Absolute Pressure vs Gauge Pressure vs Differential Pressure Measurements
To make this a bit confusing a barometer is reading local air pressure relative to absolute zero pressure. So a barometer is an absolute pressure sensor.
More Information: What is absolute pressure?
To measure the volume of water in an open container and not have barometric pressure affect it you would need to use a gauge pressure sensor. Why is this?
With an absolute pressure sensor it is comparing the pressure to a vacuum on the chip, 0. The pressure from the water in the tank plus the air in the atmosphere on top of it exert pressure on the sensor that gets measured relative to 0.
With a gauge pressure sensor and the differential sensors, you have two ports on the sensor. On the gauge sensor one is just a hole while on the differential sensor both will have ports to attach to the containers with pressure to be compared.
The gauge sensor measures relative to the current barometric pressure, thus eliminating the influence of the atmospheric pressure on the sensors reading and in our application of measuring water in an open tank only reads the pressure that the water exerts on the sensor.
However you cannot seal a gauge or differential sensor in a bag, rubber glove, etc and put it at the bottom of your tank. The second port has to be exposed to the atmosphere to get the correct reading. You would get no or weird reading doing this. (I actually found a Youtube video of someone that did this not realizing how they work.) The reason it works with your barometer is because it is comparing the pressure to an internal vacuum on the pressure sensor.
@Mahko_Mahko The other solution to the issue of barometric pressure affecting your readings, by possibly around up to ~ 30 cm, is to have a second barometer reading the local air pressure then subtract this from your barometer’s reading at the bottom of the water tank in Home Assistant. But I see from this forum thread that you have already surmised this to be the case.
As to water proofing the barometers you have, in the past I have seen cases of various sizes to take to the beach or lake made of plastic that have a rubber seal and snap latches to put items in that you do not want to get wet. I have to wonder if these would work and make it easier to change the battery when need be. I have to wonder if condensation could also be an issue too. Maybe save the silica gel packs that come with stuff to keep it dry and add one to the case before submerging.
AdaFruit makes a ported absolute pressure sensor on a breakout board with I2C but this is an absolute pressure sensor. I want to find a gauge pressure sensor that has I2C and pair it with an ePaper display that has a ESP32 chip. ESPHome list this display on its Waveshare E-Paper Display (esphome .io / components/display/waveshare_epaper.html) page in the first paragraph as the 2.13” TTGO module. However my application is for a large rainwater storage tank. I understand that with the ultrasonic sensor that over 2 meters the reading tend to be unreliable, which in this use case is where you most need them to be reliable as you get closer to the bottom of the tank.