The method comprises the steps of: first, providing a sensor, the sensor consisting of a group of PCB copper foils; second, providing a depth detection signal Ftest which can change the detection frequency along with the change in detection depth, and applying the depth detection signal Ftest to the big and small polar plates of the sensor in the step S01 to form an electromagnetic field between the big polar plate and the small polar plates; third, providing a self-calibration signal Fcal acting on the big polar plate, to adjust a phase difference between the big polar plate and the small polar plates, thereby improving the detection sensitivity; and finally, performing shaping and phase comparison on signals output from the big and small polar plates driven by the depth detection signal Ftest, and processing signals output after filtering the phase-compared signals to judge the condition of a medium at the current detection depth.