| Ammonia is a colorless toxic gas with irritating odor at room temperature,easily liquefied and prone to explosion,commonly used in industry as fuel and refrigerant,and also produced in poultry farming,which may affect the health of humans and livestock.With the development of society,there is an increasing demand for gas sensors in various industries.To meet this demand,an infrared gas sensor system based on Fabry-Perot tunable detector is designed and used to detect ammonia in this paper,and the hardware circuit,software program,signal processing and ammonia concentration measurement method are studied.The details of the study and the results are as follows:The Fabry-Pérot Interferometer(FPI)principle and infrared gas absorption principle are explained and the algorithmic model of gas concentration in fixed frequency mode is proposed,and the infrared absorption spectra of different center wavelengths can be detected by FPI from mathematical theory,and in order to suppress noise the STM32-based digital quadrature In order to suppress the noise,the STM32-based digital orthogonal lock-in amplifier is proposed to amplify the weak signal detected by the FPI detector to improve the signal-to-noise ratio.The principle,role,and implementation of each module are elaborated and the hardware models are reasonably selected,including power supply circuit,IR light source selection,long-range gas chamber,IR light source driver,band-pass filter amplifier circuit,DC bias circuit,high-voltage adjustable circuit,STM32 microcontroller,and FPI detector.The software program was designed,which mainly includes part of the program design of STM32 lower computer and Qt upper computer.In the STM32 lower computer program,the overall framework design of the lower computer is elaborated,and the implementation of each function is described separately,including PWM wave generation 3Hz program,ADC sampling program,UART serial communication and phase-locked amplification program.In the Qt upper computer program design,the flow of each program of the upper computer is described,the mechanism of Qt signal and slot is described,and two modes of FM analysis and fixed frequency analysis are also designed for the characteristics of FPI infrared gas sensor system.The experimental platform was built,and the performance of the infrared driver circuit,filter amplifier circuit and DC bias circuit of the hardware circuit was tested.Data acquisition and analysis were carried out using the FPI infrared gas sensor system,including FM analysis and fixed frequency analysis of the gas,and after the absorption spectrum curve obtained by FM,the central wavelength was selected for fixed frequency data acquisition and the parameters were fitted to the gas concentration algorithm model.The fitting degree is above 0.97,and the gas concentration algorithm model design is completed.Finally,the performance test and analysis of the FPI infrared gas sensor system are completed,and the detection accuracy of ammonia is around 40 ppm,with low error,high stability and high repeatability,meeting the design requirements. |