Wildfires, along with the devastating effects they have had on our ecosystem, need no introduction. These events are becoming increasingly intense and catastrophic with each passing year due to extreme climate change. To put things into perspective, here are some metrics:
- Damages cause due to wildfires, which can account up to $16.5 billion a year. (Source: NOAA National Centers for Environmental Information)
- Wildfires burn more than 5.7 million acres of terrestrial ecosystems. (Source: Insurance Information Institute)
- More than 66 mega tones of CO2 emissions into the atmosphere. (Source: Copernicus Atmosphere Monitoring Service)
Early detection is vital in controlling the spread of these fires. However, most detection systems rely on satellite and optical thermal monitoring, typically generating alerts one to three hours after the point of ignition. Deploying wireless sensor nodes throughout forests is one of the most proposed solutions to combat wildfire, though the field deployment has been gated due to the power hungry nature of existing devices. Moreover, until now, these sensor nodes have been just a data collection device, mindlessly collecting and sending data to detection algorithms running on servers far from the point of data generation. This increases both energy consumption and response time.
With the advent of edge ML, it has opened doors to opportunities like never before. Moving the compute onto the endpoint device from where data is generated has a major influence on battery life and response time of the system. Pratyush Mallick, an embedded enthusiast, set out to overcome traditional detection challenges by integrating machine learning.
The system consists of a main processor board from Analog Devices EV-COG-4050LZ – a low-power Arm Cortex-M4F microcontroller with onboard power management and a floating-point unit. Sensing the environmental parameters is accomplished through a BME688 from Bosch. It is a single package comprised 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.
Discerning a wildfire is only one aspect of the solution. It must also send a warning when an event is detected. Low-power mesh networks make this achievable. An XBee-2SC module, which consumes less than 40mA when transmitting data, was selected. A SparkFun Nano Power Timer (TPL5110) and Xidas Energy Harvesting Educational/Development Kit (EH-EDU-1) complete the setup. 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 solar panel to power up the whole system.
The nano power timer wakes up the microcontroller on regular intervals. Upon waking up, environmental data is collected from the surroundings and fed into the edge ML model. The model predicts the possibility of a wildfire and if detected, the RF module is triggered and data is sent to the gateway node. Otherwise, the unit puts itself back into sleep mode in which the whole system consumes on 35nA.
The software is based on Arm’s mbed OS, which allows porting of code to different MCUs hassle free. For model training and deployment, Edge Impulse is employed due to its simplified yet functional model building process and compatibility with mbed-enabled boards for model deployment.
Collection of data is a key parameter for reliable classification. A distinguisher here is that Edge Impulse supports data logging even from third-party boards either through its data forwarder or directly upload the timestamped .csv files. Since the EV-COG-4050LZ board comes with a microSD slot, the data was first gathered onto an SD card and then uploaded to the Edge Impulse portal. Different types of wood and combustible organic matter were used collect data for two main classes:
- Normal: the forest exhibits normal temperature, humidity, and air quality.
- Open fire: fully fledged wildfire with low humidity, high temperatures, and large amounts of volatile organic compounds (VOCs).
Once the data is cumulated, the remaining process of designing a total model pipeline is seamless thanks to Edge Impulse. The tool has simplified GUI for setting up the different blocks of the pipeline such preprocessing or learning block with a plethora of opportunities to tweak various parameters of individual blocks. Even the EON Tuner can effortlessly find the most optimal architecture for your embedded target. The feature explorer helps to visualize the overlapping region between different classes and enables the user to configure feature parameters accordingly.
For embedded engineers, a key parameter for algorithm and model selection is the memory usage and computation time required for inferencing. Edge Impulse offers this information in each step of the model pipeline and lets developers make informed decisions in building their model.
Currently, the data collected was for two classes to be classified by the neural network and the resulting model performance is shown below:
The model was deployed using Edge Impulse’s C++ library, which is platform agnostic and can be built on any IDE for any target device. For this project, the mbed platform and tutorial can be found here.
The model is a key enabler in projects such as this, as without the intelligence being baked into the MCU, the sensor data needs to be transmitted back to server for inferencing. Transmitting data back and forth is an energy intensive task, drains the battery significantly. To provide some perspective here’s what current consumption of the device looks like when in operation:
To sustainably operate the device on solar power, it needs to consume less than what’s being generated. In a use case where every milliwatt of power is of essence, edge ML has a profound impact on further shrinking down the power consumption and hardware BOM cost.
Want to see Edge Impulse in action? Schedule a demo today.