Abstract:A metal contaminants detection system based on FPGA is proposed. The system solves the problem of low sensitivity and high false positive rate under the influence of product effects. In this paper, the principle of the balanced coil sensor is analyzed, and a balanced compensation algorithm is proposed to achieve the automatic balancing of the sensor. The metal signal is modulated by high-frequency excitation, and a lock amplifier is implemented in the FPGA to demodulate the received signal, which improves the signal-to-noise ratio. The output signal of the sensor is processed by cross-correlation algorithm, the characteristic phase of the product is obtained by fitting the product learning data, and the product signal and metal signal are distinguished. The test results show that the system has high sensitivity and can detect metal contaminants effectively under strong product effects.