# Multi-Sensor Photoelectric Fire Alarm Device Implementation for Early Fire Detection in Campsites
## 3 Multi-Sensor Photoelectric Fire Detection System
### Multi Sensor Photoelectric Fire Detection System Design
#### 3.2.2 Prototype Design and Implementation of the Proposed Multi-Sensor Photoelectric Fire Alarm  
In this study, a prototype of a multi-sensor photoelectric fire alarm was developed using components commonly found in commercial fire alarms, as illustrated in Figures 11 and 12. A key element of the design was to ensure that the chamber remained devoid of external light while allowing adequate smoke entry. To achieve this, the internal plastic components of the existing fire alarm models were designed with a curved structure, as shown in Figure 13, and were externally covered with a light-obstructing gray film to enhance the efficacy of the detection mechanism.  
Figure 11: Circuit diagram of the proposed multi-sensor photoelectric fire detector.  
Figure 10: Structure of the photoelectric fire detector of Taesanfire–Circuitry, Darkroom.  
The primary components used in this study for fire detection included a light-emitting diode (LED) and a light sensor (specifically, an Arduino-light-photocell-Cds-light sensor (SZH-SSBH-011), SMG-A, Gwangju, South Korea), as shown in Figure 14. These components are essential for detecting changes in light transmission due to the presence of smoke, thereby indicating the potential occurrence of a fire. Furthermore, a combined temperature and humidity sensor (DHT11 [32]) was integrated into the system, as shown in Figure 15, and it was positioned at the rear of the fire alarm device to continuously monitor the temperature and humidity. An analog-to-digital converter (ADC) (MCP3008 [33]) was connected to the light sensor to enable the real-time collection of analog values. All components were integrated with a Raspberry PI 4 to form the core of the fire detection experimental setup, as outlined in the schematic in Figure 11. The experiment simulated dry summer conditions with an external temperature of approximately 27 \({}^{\circ}\)C and humidity of approximately 23%.  
Figure 14: Arduino-light-photocell-CDS-light sensor.  
Figure 12: Circuit configuration of the proposed multi-sensor photoelectric fire detector.  
Figure 13: Darkroom components for smoke detection by the proposed multi-sensor photoelectric fire detector.  
Moreover, based on the findings in Section 3.1.2, Equation (1) was employed to recalculate threshold values whenever fluctuations in temperature and humidity occurred, as illustrated by the code and schematic in Figure 16. In this framework, \"current_temp\" and \"current_humidity\" represent the present temperature and humidity measurements, and \"previous_temp\" and \"previous_humidity\" refer to the preceding recorded values. The variable \"current_val\" was calculated using the regression equation, Equation (1), and \"bright\" indicates the light intensity measured by the light sensor. This approach enabled the dynamic updating of threshold values \"update_bright\" for the fire alarm in real-time.  
As highlighted in the Related Studies section, traditional photoelectric smoke detectors detect a fire when the light received by the photodetector falls below a certain threshold. In contrast, the proposed fire detector detects fires when the received light intensity drops below an adaptive threshold, referred to as update_bright. This threshold is not static; it adjusts dynamically based on variables that influence fire conditions, such as temperature and humidity. This adaptive approach allows the detector to respond more swiftly to potential fire incidents.  
Figure 16: Fire alarm threshold update algorithm.  
Figure 15: Temperature and humidity sensor, DHT11 and its inner structure.