Experiencing a chemical and/or gas leak can be potentially life-threatening to both people and the surrounding environment, which is why detecting them as quickly as possible is vital. But instead of relying on simple thresholds, Roni Bandini was able to come up with a system that can spot custom leaks by recognizing subtle changes in gas level values through machine learning.
To accomplish this, Bandini took a single MiCS-4514 and connected it to an Arduino Nano 33 BLE Sense, along with an OLED screen, fan, and buzzer for sending out alerts. The MiCS-4514 is a multi-gas sensor that is able to detect methane, ethanol, hydrogen, ammonia, carbon monoxide, and nitrogen dioxide. This capability means that explosive and/or poisonous gas can be identified well before it builds up to a critical level indoors.
Once several samples had been collected that ranged from typical to dangerous levels, Bandini fed the dataset into the Edge Impulse Studio in order to train a neural network classifier on the time-series samples. Whenever the device starts up, the sensor is calibrated for a preset amount of time and can be used to distinguish harmful air quality within 1.5 seconds. The display shows any high sensor readings and what if a leak has been detected.
To see more about this project, you can read Bandini’s tutorial or watch this demonstration video below.