This year the Arm DevSummit Developer Competition challenged entrants to use technology to tackle real-life sustainability issues. Here, Pratyush Mallick, the brains behind the winning entry, explains how he created his wildfire detection solution.
Wildfires are bad news for both the economy and the environment. They cause billions of dollars of damage each year. In the summer of 2021, wildfires caused record carbon emissions, releasing over 1200 megatonnes of CO2 into the northern hemisphere in the month of July alone¹.
Early detection is vital to limiting the fire’s spread. However, most detection systems rely on satellite and optical thermal monitoring, typically generating alerts 1-3 hours after the point of ignition.
Wireless sensor nodes are commonly used, but may lack reliable systems to power them. What is more, they are typically just a data collection device, mindlessly sending data to detection algorithms running on servers far from the point of data generation. This increases both energy consumption and response time.
To tackle these issues, I designed a solution that can harvest, store, and run on solar energy. It also detects fires at the endpoint, to reduce latency and power.
The resultant prototype stores energy in a hybrid battery. A nano power timer wakes a microcontroller at set intervals. This then starts sampling environmental data – feeding into a trained model to get immediate results at the endpoint. If a fire is detected, the device sends an immediate text alert, inviting the recipient to visit an online dashboard for further information. If no fire is detected, the device returns to a sleep state.
Aside from ensuring accurate wildfire detection, a key consideration of the design was keeping the power consumption low. This meant selecting hardware that allows precise control of the way power is consumed by the device.
The starting point was the main processor board. I chose the Analog Devices EV-COG-4050LZ – a low-power microcontroller, based on an Arm Cortex-M4F, with onboard power management and a floating-point unit. The power management lets you control which onboard devices are active, so reducing the power budget for the system. The floating-point unit reduces power consumption by minimizing the computation time for the models.
Next, I must choose the sensing equipment that would detect the wildfire. The Bosch BME688 met all the requirements. It is a single package consisting of sensors for gas, air pressure, humidity, and temperature, and is specifically designed for mobile applications where low power consumption is critical. It replaces the need for four independent sensors and keeps power consumption below 12mA.
Sensing a wildfire is only one aspect of the solution. It also must send a warning when an event is detected. Low-power mesh networks allow this. I chose the XBee-2SC, which consumes less than 40mA when transmitting data.
The SparkFun Nano Power Timer (TPL5110) and Xidas Energy Harvesting Educational/Development Kit (EH-EDU-1) complete the solution. The timer is an ultra-low-power device that turns the main microcontroller on or off at set intervals. The development kit contains a hybrid RHB-1530 battery, power management circuitry, a vibrational energy generator, and a solar panel.
Utilizing low-power hardware is only part of the solution; optimizing how it is used also plays a significant role. The Nano Power Timer switches on the device for 10 seconds at a time, during which it samples environmental data via the gas sensor. It then feeds this data into a trained model, created using Edge Impulse, to get immediate results at the endpoint. By keeping the processing local, it avoids both the latency and power implications of sending data to the cloud, making for quicker results, within a smaller power envelope.
Using Arm Mbed-OS low-power APIs, I was able to place the device into sleep whenever required, and disable unused, built-in peripherals to further minimize power consumption.
During testing, the final solution measured an average of 7mA during the 10-second sensing window, peaking at under 260mA during maximum load. It averaged just 35nA in sleep state.
Current trace during detection, inferencing, and transmission
Current detection methods – such as thermal satellite imagery or optical and infra-red cameras – can take as long as 24 hours to detect a forest fire. Unfortunately, this means there is very little quantified data on carbonaceous gas emissions or ambient environment data at the point of ignition. So, I had to generate my own training data.
The prototype in action
Fortunately, the EV-COG-4050LZ board comes with microSD support. Using the Mbed file system libraries, I was able to collect data from the sensors by creating fires under controlled conditions. I used different types of wood and combustible organic matter to collect data for three main classes:
This data was used in an Edge Impulse project to enable training of the machine learning model. The model achieved a 97% accuracy rate in the confusion matrix.
Inferencing training performance
If a fire is detected, the device powers on the XBee module and sends data to the gateway node. A text alert is immediately issued, inviting the recipient to visit an online dashboard for further information.
Naturally, early detection depends on having enough sensors, in optimal locations. In testing, the Xbee nodes could communicate up to 800m in direct line of sight. However, in forest environments this range is reduced to 300-400 meters. A recent study by the National Park Service in the USA shows that nearly 85% of wildfires are caused by humans. Placing sensors at the juncture of human/forest interactions can keep them within the reduced range while still providing optimal coverage.
The sensors store the data they capture and, when a fire is detected, they send it to the online dashboard. This enables the viewer to see the location of the sensor that raised the alarm. They can also view the recorded changes in temperature, humidity, air quality, and VOCs to determine the severity of the fire.
I plan to upgrade the communication system to use a LoRaWAN network, which will increase coverage to an estimated 10-20 km. A typical LoRaWAN device consumes less than 50mA when transmitting, so this helps keep power consumption low. I will also work on getting a greater range of training data to improve the detection capability. I am confident that my solution can play a small, but important, role in combating wildfires and their devastating effects.
¹ Copernicus Atmosphere Monitoring Service
[CTAToken URL = "https://www.arm.com/sustainability" target="_blank" text="Learn more about Sustainability at Arm" class ="green"]