Story

Data Collection
To make this project a reality, we are using an Arduino Nano 33 BLE Sense with Edge Impulse. For data collection, there are two ways to get data samples into the Edge Impulse platform: either through the Edge Impulse CLI, or through a web browser logged into the Edge Impulse Studio. To ensure your Arduino Nano 33 is properly connected to Edge Impulse, you can follow the Getting Started Guide that shows how to connect the Nano 33 and reach a point where you are ready to upload your data. Collecting data through the web browser is simple and straightforward. To do this, connect the device to your computer and open the Edge Impulse Studio. Press the Connect Using WebUSB button, and select your development board. The limitation of using the web serial integration is that it only works with development boards that have full Edge Impulse support. The data collection settings for our project are shown below. Using temperature, humidity and pressure as environmental sensors is a good choice, as they are the parameters that change the most in case of fire events. Also, the sampling rate of 12.5 Hz is appropriate as these parameters are slow-moving.


Impulse Design
This is our machine learning pipeline, known as an Impulse


Model Training
After successfully extracting the features from the DSP block, it’s time to train the machine learning model. Here are our Neural Network settings and architecture, which work very well for our data.



Model Testing
When collecting data, some data is set aside and not used in the Training process. This is called Test data, and we can use it now to check how our model performs on unseen data.
Live Classification
Now let’s test the model with some real-world data. For that we need to move onto the Live Classification tab and connect our Arduino using WebUSB once again.

Deployment
We deployed our model to the Arduino Nano 33 BLE Sense as an Arduino library. More information on the various deployment options are located here, but as we wanted to build some additional capabilities for alerting and notifications, we decided on using the Arduino library download option.
Push Notification
As mentioned, we built a feature that will send a notification to a user if a Fire event detection (Classification) is detected. For sending a push notification to a user, we used the IFTTT service. Please refer this tutorial to build your own version.
Hardware
The complete hardware unit consists of the Arduino Nano 33 BLE Sense, power adapter, and an ESP-01. The ESP-01 is used to add WiFi connectivity to the Arduino. This component handles sending email alerts over a designated WiFi connection. This occurs via serial communication between the Arduino and ESP-01. In order to establish this communication, we first need to upload the necessary code to both the ESP-01 and the Arduino, which can be found in the GitHub repository linked below. Afterwards, we connected the components according to this schematic:
