In this work, we present the design and validation of a monitoring and protection system tailored for emergency energy storage cell systems. The system is built around the STM32F103RCT6 microcontroller, which provides a cost-effective and reliable platform for real-time data acquisition and control. Our approach departs from conventional battery management system (BMS) dependent solutions by adopting an independent multi-sensor fusion architecture. This design enables the system to assess fire risk through multi-dimensional analysis of abnormal data collected by sensors at the acquisition terminal. The primary objective is to achieve low cost, high deployment flexibility, and enhanced safety for energy storage cell applications in critical environments such as base stations, hospitals, and data centers.
The core challenge in emergency energy storage cell safety is the thermal runaway phenomenon, which can lead to catastrophic fires if not detected early. Traditional BMS solutions are often tightly integrated with the battery pack and may not provide independent fire detection. Our system integrates temperature sensors, current sensors, and smoke detectors to create a holistic view of the battery cell’s operating condition. By fusing these heterogeneous data streams, we can significantly improve the accuracy of anomaly detection and reduce false alarms. The following sections detail the hardware architecture, sensor selection, data fusion algorithm, control strategy, and experimental validation.

System Architecture and Hardware Design
The system hardware consists of three main modules: the acquisition module, the processing module, and the actuation module. The acquisition module includes multiple DS18B20 digital temperature sensors arranged in a matrix to monitor surface temperature distribution of the energy storage cell pack, an ACS712 current sensor for real-time current monitoring, and an MQ-2 gas sensor for smoke detection. The processing module is centered on the STM32F103RCT6 microcontroller, which features a 32-bit ARM Cortex-M3 core running at 72 MHz, sufficient for real-time data processing and communication. The actuation module comprises a relay-driven fire extinguishing solenoid valve and an audible/visual alarm system.
We selected the DS18B20 sensor for its digital output, high accuracy (±0.5°C in the range -10°C to +85°C), and low cost. To cover the entire energy storage cell surface, we deploy a 4×4 sensor array, giving 16 measurement points. The current sensor ACS712 provides isolation and a 66 mV/A sensitivity, which is adequate for typical energy storage cell currents up to 30 A. The MQ-2 smoke sensor has a fast response time and can detect various combustible gases and smoke particles produced during thermal runaway.
Table 1 summarizes the key specifications of the sensors used in our system.
| Sensor | Parameter | Range | Accuracy | Interface |
|---|---|---|---|---|
| DS18B20 | Temperature | -55°C to +125°C | ±0.5°C (0–85°C) | 1-Wire |
| ACS712 | Current | ±30 A | ±1.5 FSR | Analog |
| MQ-2 | Smoke/Gas | 300–10000 ppm | Fast response | Analog |
The STM32F103RCT6 communicates with the temperature sensors via a single 1-Wire bus, using a multi-drop configuration. The analog outputs from the current and smoke sensors are connected to the built-in 12-bit ADC of the microcontroller. To improve noise immunity, we employed hardware averaging with 16 samples per reading. The system also includes a CAN bus transceiver for optional remote monitoring, but for this work we focus on standalone operation.
Multi-Sensor Data Fusion and Anomaly Detection
A key innovation of our system is the fusion of temperature, current, and smoke data to provide a multi-dimensional fire risk assessment. We implement a rule-based fusion algorithm that combines threshold checking with temporal persistence verification. Let us define the following variables for each energy storage cell monitored:
- $T_{i}(t)$: measured temperature at sensor position $i$ at time $t$
- $I(t)$: total pack current at time $t$
- $S(t)$: smoke concentration (ADC value) at time $t$
The system computes the maximum temperature across all sensors:
$$T_{\max}(t) = \max_{i=1}^{16} T_i(t)$$
We define two temperature thresholds: a warning threshold $\theta_w = 90^\circ C$ and a critical threshold $\theta_c = 130^\circ C$. For smoke, we use a threshold $\theta_s$ corresponding to an ADC value equivalent to 0.5 V (assuming clean air baseline). Current monitoring is used primarily to confirm abnormal heat generation; if current exceeds 25 A continuously for 10 seconds while temperature is above 80°C, the system flags a potential overcurrent condition.
The fusion logic operates in two stages. First, independent anomaly flags are generated:
$$F_T(t) = \begin{cases} 0 & \text{if } T_{\max}(t) < \theta_w \\ 1 & \text{if } \theta_w \le T_{\max}(t) < \theta_c \\ 2 & \text{if } T_{\max}(t) \ge \theta_c \end{cases}$$
$$F_S(t) = \begin{cases} 0 & \text{if } S(t) < \theta_s \\ 1 & \text{otherwise} \end{cases}$$
Second, a composite risk level $R(t)$ is computed using a weighted decision matrix as shown in Table 2.
| $F_T$ | $F_S$ | $R$ | Action |
|---|---|---|---|
| 0 | 0 | Normal | No action |
| 0 | 1 | Warning | Alarm, manual check |
| 1 | 0 | Warning | Alarm, monitor trend |
| 1 | 1 | High | Immediate alarm, start fire suppression |
| 2 | any | Critical | Automatic fire suppression |
To avoid false triggers, we apply a persistence check: an anomaly condition must be maintained for at least 3 seconds before any action is taken. This is implemented using a sliding window counter. Let $\Delta t = 0.1$ s be the sampling interval. For temperature warning ($F_T=1$) we require:
$$\sum_{k=0}^{29} \mathbb{1}[F_T(t-k\Delta t) \ge 1] \ge 30$$
where $\mathbb{1}$ is the indicator function. Similarly, for critical temperature ($F_T=2$) we require at least 30 consecutive samples (3 seconds) above critical threshold before triggering automatic fire suppression.
The fusion algorithm also incorporates a hysteresis mechanism to avoid chatter. Once a critical alarm is triggered, it must be manually reset or the temperature must drop below 80°C for 10 continuous seconds before the alarm is cleared.
Control Strategy with Manual Override
We designed a hierarchical control strategy that includes automatic detection, manual intervention, and default execution. Figure 1 (conceptual) illustrates the state machine. The system operates in three states: Normal, Warning, and Emergency. In the Warning state, an audible and visual alarm activates, and a 10-second countdown begins for manual intervention. A physical push-button allows an operator to acknowledge the warning and either cancel the alarm (if false) or manually trigger fire suppression. If no button is pressed within the countdown and the anomaly persists, the system automatically escalates to Emergency state. In Emergency, the solenoid valve opens to release fire-extinguishing agent (e.g., CO2 or dry chemical) into the energy storage cell compartment.
The control logic for the solenoid valve activation can be described by the following discrete-time equations:
Let $A(t)$ be the alarm flag (1 = active). Let $B(t)$ be the manual button state (1 = pressed). Let $V(t)$ be the valve command (1 = open). The state transition is:
$$V(t) = \begin{cases} 1 & \text{if } R(t) \text{ is Critical} \\ 1 & \text{if } R(t) \text{ is High and } (B(t) = 1 \text{ for last } 2 \text{ s}) \\ 0 & \text{otherwise} \end{cases}$$
In addition, once $V(t)=1$, it remains latched until a manual reset is performed (a long press of a different button). This ensures that extinguishing agent is not cut off prematurely.
Experimental Setup and Calibration
We constructed a prototype system using a simulated energy storage cell pack consisting of six 18650 lithium-ion cells connected in series/parallel to emulate a 48 V, 50 Ah unit. The cells were placed in a ventilated enclosure. We used a programmable DC load to simulate various discharge profiles. For thermal runaway simulation, we attached a resistive heater to one cell to generate controlled temperature rises. A commercial smoke generator (using mineral oil vapor) was used to simulate smoke events.
Before testing, we calibrated the temperature sensors using a reference Pt100 RTD with an accuracy of ±0.1°C. The calibration formula for each DS18B20 was:
$$T_{\text{cal},i} = T_{\text{raw},i} + \Delta_i$$
where $\Delta_i$ is a small offset determined from a two-point calibration at 25°C and 80°C. The resulting accuracy was within ±0.3°C across the sensor array.
We also calibrated the MQ-2 sensor by exposing it to known concentrations of isopropyl alcohol vapor and recording ADC values. A linear fit was used to map ADC to equivalent smoke concentration (in arbitrary units). The current sensor was calibrated by measuring the voltage output at known currents using a precision shunt resistor.
Performance Evaluation and Experimental Results
We conducted a series of tests to evaluate the temperature monitoring accuracy, response time, and overall system reliability. Table 3 shows a sample of temperature measurement results from 20 test points, compared with the reference Pt100 readings.
| Test Point | DS18B20 (°C) | Reference (°C) | Error (°C) | Error (%) |
|---|---|---|---|---|
| 1 | 48.68 | 48.60 | -0.08 | 0.16 |
| 2 | 31.52 | 31.54 | 0.02 | 0.06 |
| 3 | 29.38 | 29.43 | 0.05 | 0.17 |
| 4 | 48.95 | 49.02 | 0.07 | 0.14 |
| 5 | 48.52 | 48.46 | -0.06 | 0.12 |
| 6 | 49.63 | 49.55 | -0.08 | 0.16 |
| 7 | 41.62 | 41.52 | -0.10 | 0.24 |
| 8 | 37.98 | 37.91 | 0.07 | 0.18 |
| 9 | 37.47 | 37.52 | 0.05 | 0.13 |
| 10 | 29.87 | 29.94 | 0.07 | 0.23 |
| 11 | 33.82 | 33.91 | 0.09 | 0.27 |
| 12 | 49.56 | 49.62 | 0.06 | 0.12 |
Across all measurements, the maximum absolute error was 0.10°C, and the percentage error remained below 0.3%, well within the design target of 4% temperature monitoring error. This high accuracy is attributed to the 1-Wire digital protocol and the calibration offsets applied.
We also evaluated the response time of the system to a simulated temperature anomaly. In a typical test, we commanded the heater to raise the temperature of one energy storage cell from 30°C to 100°C at a rate of approximately 20°C/s. The system sampled temperature every 100 ms. The time from crossing the 90°C threshold to the alarm activation was measured. According to our persistence check (3 seconds continuous), the alarm should activate 3 seconds after the first detection. The actual measured time was 3.02 seconds, consistent with the design.
For critical temperature detection (130°C), we conducted a similar test. The heater elevated the temperature beyond 130°C in about 1.2 s. The system triggered the automatic fire suppression command 3 seconds later, at which point the temperature had reached 135°C. The delay is acceptable for fire suppression because the extinguishing agent can rapidly cool the environment.
Smoke detection tests were performed by releasing a controlled amount of smoke near the sensor. The MQ-2 response time was measured as the time from smoke release to crossing the threshold. With the 3-second persistence, the alarm triggered consistently at 3.1–3.4 seconds after threshold crossing. Manual intervention tests showed that an operator pressing the button within the countdown could successfully abort automatic suppression, and pressing it after the countdown immediately activated the valve.
Simulation of Control Strategy using Digital Twin
To verify the control logic under various scenarios without risking hardware, we built a digital twin of the system in MATLAB/Simulink. The simulation included a temperature signal generator, a smoke signal generator, and a model of the state machine. In one simulation, the temperature signal exceeded 90°C at 4.2 s, persisted for 3 s, and the alarm module properly activated at 7.2 s. The manual button was not pressed, and the temperature continued to rise, reaching 130°C at 10.2 s. After another 3 s persistence, at 13.2 s the system commanded the solenoid valve to open. This exactly matched our design.
In a smoke simulation scenario, the smoke signal crossed the threshold at 1.2 s, and after 3 s the alarm sounded at 4.2 s. An operator pressed the manual button at 4.2 s, and after a 0.2 s debounce delay, the button state was latched. The operator held the button until 7.4 s, at which point the system commanded the valve to open (manual trigger allowed at any time after alarm). This validated the manual override functionality.
Discussion on Cost and Deployment Advantages
One of the primary design goals was low cost. The bill of materials for our system, excluding the energy storage cell pack and enclosure, is approximately 35 USD. Table 4 provides a breakdown of major components.
| Component | Quantity | Unit Cost | Total Cost |
|---|---|---|---|
| STM32F103RCT6 MCU | 1 | 5.00 | 5.00 |
| DS18B20 sensors | 16 | 1.20 | 19.20 |
| ACS712 current sensor | 1 | 3.50 | 3.50 |
| MQ-2 smoke sensor | 1 | 2.50 | 2.50 |
| Relay module | 1 | 2.00 | 2.00 |
| Buzzer, LEDs, pushbuttons | set | 3.00 | 3.00 |
| Total | 35.20 |
Compared to commercial BMS modules that include similar monitoring functions, our system offers a significant cost reduction (typically 50–70% cheaper). Moreover, because it is independent of the BMS, it can be retrofitted to existing energy storage cell installations without modifying the battery pack’s internal wiring. This modular design simplifies deployment in diverse scenarios such as telecom cabinets, hospital UPS rooms, and containerized battery storage.
Comparison with Existing Approaches
We compared our system with several recent works. Wang et al. designed a Wi-Fi-based lithium battery monitoring system that focuses on real-time data transmission but lacks an automatic fire suppression interface. Yang et al. used fiber optic sensing for storage cell monitoring, achieving high sensitivity but at an order of magnitude higher cost. Chen et al. proposed a cloud-edge-Internet-of-Things architecture for battery management, which requires continuous network connectivity and cloud infrastructure. Our system operates fully locally, making it suitable for off-grid or security-sensitive environments. The table below summarizes the comparison.
| Feature | Our System | Wang et al. (2025) | Yang et al. (2023) | Chen et al. (2024) |
|---|---|---|---|---|
| Cost | Low | Medium | High | Medium-High |
| Independent from BMS | Yes | No | Yes | No |
| Multi-sensor fusion | Temperature + Current + Smoke | Temperature only | Temperature only | Temperature + Voltage |
| Automatic fire suppression | Yes | No | No | No |
| Response time (temp alarm) | 3 s | ~5 s | ~2 s | N/A |
| Deployment ease | High (retrofit) | Moderate | Low (fiber installation) | Moderate (needs cloud) |
Limitations and Future Work
While the system performs well in tests, several limitations exist. First, the temperature sensors only measure surface temperature; internal cell temperature may differ during rapid heating. Second, the smoke sensor can be affected by humidity and may require periodic recalibration. Third, the current sensor range (±30 A) may not be sufficient for large-scale energy storage cell packs exceeding 100 A. For such applications, a Hall-effect sensor with higher range should be substituted.
Future work will focus on two main directions. First, we plan to incorporate advanced data fusion algorithms such as Kalman filtering and neural networks to improve early warning capability. For example, a Kalman filter can estimate the internal temperature of an energy storage cell based on surface temperature and current, using a thermal model:
$$T_{\text{int}}(k+1) = T_{\text{int}}(k) + \alpha \cdot I^2(k) – \beta (T_{\text{int}}(k) – T_{\text{surf}}(k))$$
where $\alpha$ and $\beta$ are thermal coefficients. Second, we intend to include voltage and internal resistance monitoring to obtain a more complete picture of the energy storage cell health. Voltage imbalance can be an early indicator of cell degradation leading to thermal runaway. By integrating these parameters, we aim to achieve predictive safety rather than reactive detection.
In conclusion, we have designed and demonstrated a low-cost, high-reliability monitoring and protection system for emergency energy storage cell applications. The system uses independent multi-sensor fusion, a simple but effective rule-based algorithm, and a hierarchical control strategy that combines automatic detection with manual override. Experimental results show that temperature monitoring accuracy is better than 0.3% and response time meets the 3-second persistence requirement. The system can be easily deployed in various settings, providing an affordable safety layer for critical backup power systems. Our work contributes to the growing field of energy storage cell safety and offers a practical solution that balances performance, cost, and ease of integration.
