Addressing the issue of high cleaning loss rates in practical operations, this study designed adevice for detecting cleaning losses. Three-dimensional models of wheat kernels were constructed using Blender software. Subsequently, the discrete element method software EDEM was employed to simulate the impact process of wheat kernels and straw dropped from varying heights onto a sensing plate, obtaining the contact force history and particle trajectories. The results revealed a significant difference in the impact force between the two material types on the sensing plate, enabling material identification and loss rate calculation through signal acquisition.Based on this, a detection device comprising mechanical structures and a control system was designed. An ESP32 microcontroller was used to read data from a piezoelectric ceramic vibration sensor. After processing with a Kalman filter, material classification thresholds were determined based on the normal distribution pattern of the signals. Experimental parameters were initially identified through a three-factor, three-level experiment and subsequently optimized using response surface methodology. The experimental results indicated that the threshold discriminability and loss rate calculation accuracy were optimal when the sensing plate was installed at a height of 550mm with a tilt angle of 40°, and the conveyor belt speed was 8 meters per minute.Bench test verification demonstrated that the device achieved an overall error of less than 3%, with recognition rates for both wheat kernels and straw exceeding 97%.