Abstract:This study systematically optimized the sample preparation conditions for the detection of heavy metals in plants using Energy Dispersive X-ray Fluorescence Spectrometry (EDXRF). Three different types of plant samples were selected: wheat grains (starch type), soybean grains (oil type), and Sedum platyphyllum plants (fiber type). A single-factor experiment was conducted to investigate the effects of sample particle size, tablet pressing pressure, sample thickness, and measurement time on the detection accuracy of heavy metals such as Cd. The results showed that 100-mesh particle size significantly enhanced sample homogeneity and reduced the relative errors of Cd detection in wheat and soybean to <5%; The optimal pelletizing pressures for wheat, soybean and S. plumbizincicola samples were 2, 3 and 4 MPa, respectively. High pressure increased relative error in soybean due to oil seepage; Low-Cd samples (wheat, soybean) required a pellet thickness of 5 mm, while high-Cd of S. plumbizincicola required only 2.5 mm for minimum detection error; The required detection time was ≥300 s for low-Cd samples (error reduced from 30.1% at 60 s to 9.7% at 300 s) and only 60 s for S. plumbizincicola. Using the optimized detection parameters, Cd detection limit was 0.08 mg/kg for the certified reference material GBW08503c, with a recovery rate of 80.9%-119%.This study provides a set of universal sample preparation parameters for the rapid EDXRF detection of heavy metals in plant samples, which can effectively enhance the method's accuracy and applicability.