Abstract:In daily life and work, in order to effectively monitor the harmful gas in real time and avoid being in the environment of harmful gas for a long time, which is harmful to people's health, aiming at the problems of too high minimum detection concentration, too long response time and large detection error of domestic gas detector, a handheld gas detector based on STM32 is designed; The design of handheld gas detector is mainly completed from two aspects: internal hardware design and software design. STM32F103 chip is selected as the main control chip in hardware. In software, the measurement, display, data storage and data analysis of VOC gas, temperature and atmospheric pressure are developed based on embedded system, and its functions are mainly realized by C language; Through the debugging of the whole detector system, it is proved that the system can respond to the gas concentration below 100ppb, the response time can be less than 20s, and the detection error can be less than 5% FS; In addition to the gas concentration monitoring of ordinary environment, the gas detector can also be used in chemical, industrial, agricultural, animal and plant cultivation and other scenes with gas leakage or air quality requirements.