Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 3, No. 2, 2022 167 The Design and Implementation of a Subway Monitoring System Rui Guo1 and Xiaoting Zhou2 1Shenyang Institute of Technology, Fushun, Liaoning 113122, China 2Tieling Haihuan Technology Co., Ltd. of Liaoning Environmental Protection Group, Tieling, Liaoning 112607, China Abstract: This design takes STM32 single chip microcomputer as the core, and uses keil as the compiling environment of single chip microcomputer program in the software. The circuit schematic diagram of subway monitoring system is drawn on Altium designer.STM32 single chip microcomputer, infrared monitoring, temperature and humidity sensor, pressure sensor, LCD display, voice broadcasting system, alarm system Switches and other hardware are connected together by hand welding tools according to the schematic diagram and the functional requirements. Keywords: Infrared Sensor, Alarm System, Display System, MCU. 1. Design of Subway Monitoring System The main control chip of the subway monitoring system adopts the microchip minimum system as the core hardware circuit of the system, while the subway monitoring system also has peripheral circuits, infrared module, pressure module, temperature and humidity module, display module, etc. This system uses STM32 microcontroller as the core controller for the design and implementation of a subway monitoring system. The hardware functions of the metro monitoring system are as follows. 1. The core control chip of the subway monitoring system adopts STM32 MCU and realizes the data analysis and processing; 2. Data communication between microCM through wireless transmission modules; 3. The Temperature and humidity module monitors the temperature and humidity situation in the subway compartment; 4. The Infrared detection module monitors the subway passenger flow; 5. The pressure monitoring module detects the load of the carriage in real time; 6. The key input system can change the data monitoring range; 7. The L C D display module is used to display the subway monitoring data and parameters in real time; 8. The voice broadcast system prompts the passenger flow size; 9. The acoustic and optical alarm system indicates abnormal data conditions. Overall framework diagram of the system, as shown in Fig. Figure 1. General block diagram of the Metro Monitoring System 2. Minimum System of the SCM Module This design uses STM32F103C8T6 microchip chip, its chip function is very powerful. As the core of the minimum system, the MCU is connected to other circuits to form the minimum system. The internal structure design of the MCU is very complex, but there are certain rules in the same series. Only through a detailed analysis of its laws and specific patterns can we draw conclusions. Due to the wide application of SCM in today's society, there are application examples in the design of various fields, and the data needed in the analysis process is extremely rich. The maximum processor speed of 72MHZ, this high speed operation is based on internal devices can be high speed operation, while AT90S series single chip machine will edit line and I / O line reuse, without adding single chip machine additional pin mode is different, STM32 series is the largest feature of input and output interfaces. The design of subway monitoring system is the main chip, reset circuit, clock circuit and STM32F103C8T6 minimum system, as shown in the figure. 168 Figure 2. Circuit diagram of MCCM minimum system 3. General Flow Diagram Design of The Software System Initialization is divided into system initialization and sensor initialization and peripheral initialization. It mainly shows the display of temperature, humidity, pressure and passenger flow on the LCD, and sets the corresponding parameters. When the set value is exceeded, the sound and light alarm will be conducted. Main flow chart of the system, as shown in Fig. Figure 3. Overall work flow chart of the software system 169 int main(void) { u32 cnt=0; u8 key; char str[]="0123456789abcdef"; Stm32_Clock_Init(9); delay_Init(72); MY_NVIC_PriorityGroupConfig(2); uart_init(72,9600); Adc_Init(); LED_Init(); KEY_Init(); Buzzer_Init(); LCD_Init(); DHT11_Init(); HX711_Init(); nRF24L01P_Init(); } In the above program, after the main program, set the system clock for the function, and finally initialize the temperature and humidity, pressure, and display and alarm modules. The time-lapse function is also initialized. 4. Summary The design and implementation of a subway monitoring system in this project have basically completed the expected functions, and completed all the hardware schematic diagram drawing and the welding part, as well as the debugging work between the software and hardware of the system. Summing up with the following points. Design and implementation of the subway monitoring system. By designing the SCM as the main control core, the overall design has the characteristics of comprehensive functions and relatively complex wireless information transmission circuit between the two motherboards; (2) The hardware part of the subway monitoring system transmits the passenger flow information to the microcontroller through the infrared sensor acquisition module, and then sends it to another microcontroller through the wireless transmission module to realize the data transmission between the upper computer and the lower computer. Through the temperature and humidity monitoring system, pressure monitoring system, key input system, respectively collect temperature and humidity and vehicle load situation, the monitoring data through analog conversion, and then the digital signal to SCM, and the key input system can change the system to monitor the passenger flow, temperature and humidity and pressure data alarm upper and lower limits. Display the temperature, humidity, pressure, and passenger capacity in the LCD12864 display system. When the collected data exceeds the upper and lower limits set by the system, the acoustic and optical alarm system alarm prompts, and the voice broadcast system outputs the passenger carrying data; The system software design includes program initialization, infrared reception detection, infrared reception of the set value comparison and control, timing, function processing and machine, and other modules, the software is easy to operate and easy to modify. References [1] Yin Wutao. Design of Temperature and humidity idity Technology based on SCM [J]. Value Engineering, 2019,35 (29): 135-136. [2] Wang Ni. Research on Digital Pressure Measurement Based on MicroCM [D]. Xi'an University of Science and Technology, 2021. [3] Zhang. Research on IR Detection Based on SCM [J]. Electronic World, 2019 (18): 40. [4] Zhang Lin. Research on Subway Passenger Flow Forecasting System Based on Deep Neural Network [D]. Beijing Jiaotong University, 2019.