Tunnel lighting control systems that do not accurately sense changes in the tunnel's external lighting environment not only increase tunnel operating costs, but also may exacerbate the "black hole" and "white hole" effects that cause traffic safety accidents. In this paper, we use STM32F103RCT6 chip to design an illuminance detection device consisting of a light level acquisition module, STM32 development board and upper computer software to accurately detect the illuminance outside the tunnel, and it can be successfully applied to the tunnel lighting control system to send data to the control system. Based on the accurate acquisition of illuminance data outside the tunnel, the software designs an accurate processing algorithm to reject abnormal data and a multi-sensor data fitting algorithm, and finally verifies through experimental testing that the hardware system designed in this paper with the data processing algorithm can accurately reject the abnormal values of illuminance data outside the tunnel and provide accurate external light data for the tunnel lighting control system.