| Using non-destructive testing technology to assess the internal quality and health condition of breeding eggs can effectively improve the breeding efficiency and save production costs.In the field of non-destructive testing of eggs,spectral inspection techniques have been widely used for their advantages of fast analysis and high identification accuracy.Spectrometer is the core instrument for implementing spectral detection technology.While conventional spectrometers offer high performance and resolution,they are bulky,expensive,and only suitable for specific fields,which cannot achieve online rapid detection.Furthermore,due to the presence of the eggshell,conventional spectrometers often struggle to acquire accurate spectral information from breeding eggs.Therefore,it is essential to develop a portable,low-cost microspectrometer suitable for breeding egg spectral information acquisition.This paper focuses on breeding eggs as the research object and determines,through a comparison test on characteristic bands,that the characteristic band of 700nm-900 nm reflects the spectral information of breeding eggs.Based on this foundation,the development of a miniaturized spectrometer suitable for acquiring spectral information from fertilized eggs was completed:The spectral data of the breeding duck eggs before incubation were collected through experiments,and spectral data were analyzed,processed,and modeled in Matlab.The preliminary research found that there were differences in the spectral curves between unfertilized eggs and fertilized eggs in the wavelength range of 700nm-900 nm.Based on this conclusion,the wavelength range of 400nm-1000 nm with less noise was selected for further research and divided into different intervals.The competitive adaptive reweighted sampling(CARS)algorithm was used to select characteristic wavelength points in different intervals,which were then input into the discriminant model established by the BP neural network for testing.The test results showed that the wavelength range of 700nm-900 nm is the characteristic spectral range that reflects the fertilization information of breeding duck eggs,with the best discrimination effect and an accuracy rate of 90.20%.Combining the characteristic wavelength band and the characteristics of the optical Components obtained from the test,the working wavelength range and resolution of the spectrometer were determined,and the functional design of the optical part of the spectrometer was completed.The optical part adopts the crossed asymmetric Czerny-Turner optical system,combining the design requirements with the influence of aberrations in the optical system(such as coma,spherical aberration,etc.),calculating the parameters of each optical element and the initial structural parameters of the optical system,and importing them into the Zemax software for simulation and parameter optimization.The function of focusing incident light on the CCD detector photosensitive surface in order of wavelength has been achieved.The functional design of the control part of the spectrometer was completed using FPGA microcontroller to realize the function of converting the optical signal received by the CCD detector into spectral data,and storing and transmitting it.The code of CCD detector driver,AD module driver,FIFO data storage and UART serial communication was written in Quartus II software,and the instantiation of each molecule module was completed in the top-level module to realize the complete functions of photoelectric conversion,AD conversion,data storage and data communication.In order to receive and display the spectral data sent by the FPGA,an upper computer software for breeding egg spectral acquisition was designed and developed.In order to receive and display the spectral data sent by the FPGA,an upper computer software for breeding egg spectral acquisition was designed.The basic function of serial communication was realized by using VISA function in Lab VIEW software,and the block diagram design of the upper computer software was completed by using the logic of state machine,which enabled the functions of data sending,data receiving,spectral acquisition of fertilized eggs,and spectral data saving.The structural design and wavelength calibration of the spectrometer prototype were completed,and the performance test and function test of the spectrometer prototype were realized.The structural design of the prototype was completed based on component size and structural parameters.The wavelength calibration and performance testing of the prototype were completed by using the Maya2000 Pro spectrometer and the prototype to collect data from a standard light source,and comparing the characteristic wavelength distribution of the standard light source.On this basis,the functional testing of the prototype was completed by comparing the spectral curves of fertilized eggs collected by both the prototype and the Maya2000 Pro spectrometer.The test results show that the working wavelength range of the prototype includes 400nm-900 nm and the resolution reaches 5nm,which can realize the acquisition of breeding egg spectral data and meet the design requirements. |