This sensor isn't intended to be completely submerged. So, when putting in it, Make certain that only the uncovered traces to the PCB arrive into contact with the water. Optical level sensors operate by changing light rays into electrical indicators. They measure a physical percentage of light-weight then translate it https://controltechme.com/ultrasonic-level-sensor/