# How much can water compress air?

So I was thinking of using a barometric sensor to measure the compression of air in a tube in order to measure water level in a tank (Basic diagram below).

So based on the equation $$\frac{P_1 V_1}{T_1} = \frac{P_2 V_2}{T_2}$$, I assumed that temperature remains constant (realistically it doesn't, but I will account for it), and given that the face area of the tube also remains constant, you can figure out the pressure via this equation: $$\frac{P_i h_i}{h_f} = P_f$$.

So lets assume that the tube is halfway in the water, so $$\frac{h_i}{h_f} = 2$$, which means that $$P_f = 2P_i$$. Does this mean that the water applies ~200kpa (2x mean sea level atmospheric pressure) of pressure on the air? And obviously we can't compress the air to infinity or even to extreme levels (otherwise expensive air compressors would never have been needed) just by forcing the tube below the water - so whats the limit on how much force (or pressure) water can apply on air in such an environment?

There is a better way to measure water level. Run a tube to the bottom of the water tank that you want to measure the level of. Put a pressure sensor at the top of the tube. Run a slow flow rate of air into the tube. The pressure required to force air out the bottom of the tube is directly related to the depth of water that the air is forced to go through, and that measured pressure follows the equation $$P=\rho g h$$. The density of fresh water is 1000 $$kg/m^3$$, so the only unknown in the pressure equation is $$h$$, which is the height of the water that the air is bubbling through.