I think an ultrasonic transducer strapped to the outside of the pipe as DrG's earlier post shows would work well.
The echo from the opposite wall of the pipe will take longer through air than through liquid.
Or two transducers, top & bottom, and measure the delay from transmit on one to receive on the other.
The speed of sound in air is around 350 M/Sec while in water it's near 1500 M/Sec. The same numeric values apply for millimetres per millisecond, so very easy to measure with any general microcontroller.
The echo from the opposite wall of the pipe will take longer through air than through liquid.
Or two transducers, top & bottom, and measure the delay from transmit on one to receive on the other.
The speed of sound in air is around 350 M/Sec while in water it's near 1500 M/Sec. The same numeric values apply for millimetres per millisecond, so very easy to measure with any general microcontroller.