Abstract:The corn production is high in China, the high efficiency, portable and low cost corn component detection technology and its devices are very important for the detection of corn quality. A portable-corn quality detection device was designed based on visible/near infrared spectroscopy technology. In order to explore the feasibility of the designed solution, a visible/near infrared spectrum acquisition system was built, and the spectra of 72 corn samples of different varieties were collected. The partial least squares prediction model of protein, fat and starch contents in corn grains and the CARS-PLS prediction model combined with competitive adaptive reweighted sampling were established respectively. The results showed that CARS method could effectively screen out the correlation variables of each component and improve the model effect. The root mean square error of prediction set (RMSEP) was decreased, and the RMSEP of protein was from 0.4866% to 0.4068%. The RMSEP of fat was decreased from 0.1549% to 0.0989%;and the RMSEP of starch was decreased from 0.4714% to 0.4675%. The correlation coefficient Rp of prediction set was improved. The Rp of protein was increased from 0.9309 to 0.9603. The Rp of fat was increased from 0.9497 to 0.9770. The Rp of starch was increased from 0.9520 to 0.9605. According to the characteristic variables of each component screened by CARS method, a suitable near infrared spectroscopy sensor was selected. On this basis, the spectral acquisition unit, control unit, display unit, power supply unit and heat dissipation unit of the detection device were designed. Based on NodeMCU development board and Arduino IDE development tool, the device control program was developed with Arduino language to achieve “one-click” rapid detection. The detection accuracy and stability of the device were verified by experiments. The results showed that the correlation coefficients of protein, fat and starch contents were 0.8431, 0.8243 and 0.8154, respectively, and the root mean square error of prediction were 0.3576%, 0.2318% and 0.2333%, respectively, and the relative analysis errors were 1.8577, 1.7761 and 1.5735, respectively. When the same sample was repeatedly predicted, the coefficient of variation of each component was 0.235%, 0.241% and 0.028%, respectively.