| Spectral analysis detector is an optical analysis instrument for qualitative and quantitative analysis of material composition and content,and is widely used in geological exploration,marine development,sanitation and epidemic prevention,environmental protection,etc..However,the traditional optical spectrum analyzer is bulky,expensive,and slow in measurement,which cannot meet the requirements of real-time online testing.The miniaturized portable spectrum analyzer has become an inevitable trend in the development of spectrum analyzers.Based on the STM32F103ZET6 chip,this paper designs a portable spectrum analyzer that can be used to detect colored solutions.The main research contents are as follows:(1)The detection system is based on the 32-bit enhanced series microprocessor STM32F103.It uses a high-brightness LED as the system light source and uses a silicon photocell as the photoelectric sensor.For the weak current signal generated by the silicon photocell,the hardware part uses the low noise amplifier LT6231 to design the current-voltage(I-V)conversion and voltage(V)secondary amplification-filter circuit to realize the amplification-filtering processing of the weak current signal.The obtained effective voltage signal is subjected to analog-to-digital conversion by a 24-bit high-precision AD conversion circuit for system acquisition.(2)The software section includes configuring the AD7190,selecting the AD71 90 sampling mode,and controlling the AD7190 sampling.In order to further reduce the interference of weak signal noise and improve the accuracy of the measurement system,the median value average filtering algorithm is used for filtering and noise reduction processing on the A/D converted data.The processed data is displayed in real time through the LCD,and the display parameters include output voltage value,transmittance,absorbance,concentration,etc.,and the data is saved in the SD card.(3)The system performance test was carried out on the designed portable spectrum analyzer.The sensitivity of the system was tested by CuSO4 solution,the measurement accuracy,repeatability and stability of the FeCl3 solution test system.The Chemical Oxygen Demand(COD)of common water quality detection parameters was determined by least squares method performs a linear fit and draws a standard curve.The test results show that the concentration of FeCl3 solution has a good linear relationship with the absorbance.The correlation coefficient of linear fitting is R2=0.9907,the relative standard deviation(RSD)is 1.31%,and the correlation coefficient between linear concentration of COD solution and absorbance is up to 0.9996. |