Convert a generic gas sensor into a customizable electronic "nose" through AI and machine learning.
Often, it’s the big-system applications of artificial intelligence (AI) that get all the press: autonomous vehicles, image recognition, building management, and the like. But AI is also finding its way into compact systems where they can replace what might be a complicated programming effort with relatively simple training. A case in point is the recent conversion of a somewhat generic gas sensor into a customizable electronic “nose” through machine learning.
It all starts with the Bosch Sensortec BME-688 environmental sensor. This MEMS device is capable of measuring temperature, air pressure, humidity, and the concentration of the air-quality gases CO2, hydrogen, volatile organic compounds (VOCs), and volatile sulfur compounds (VSCs). The presence of such gases in relatively high levels can indicate the outgassing of paint, rotting garbage, food cooking, and even the odors of human sweat or bad breath. The sensor supports several standard configurations for its gas sensor, including a measure of total concentration of CO2 +VOC + VSC as a measure of air quality, and a scanning function to detect the relative concentration of each.
Figure 1 This small gas sensor can detect a range of gas types along with humidity and temperature. Source: Bosch Sensortec
Simply measuring the concentration of such gases is one thing, however, discriminating among the possible causes is something else. Typically, analyzing the sensor’s output data to determine a specific cause for an odor can require considerable signal analysis, programming, and testing to develop a reliable algorithm. This is where the AI comes in.
Bosch has supported the BME-688 so that users can customize its operation for specific use cases. The Bosch Software Environmental Cluster (BSEC) features intelligent algorithms that enable application-specific gas scanning. This includes an ability to handle humidity compensation, developing a baseline, and adjusting for long-term sensor drift. The software comes as closed-source binary for a variety of microcontrollers.
On top of that, Bosch has developed the BME AI-Studio, a machine-learning system optimized for training the sensor to detect the unique gas-mixture fingerprint of a particular odor’s cause. Developers do not need to be trained data scientists or AI specialists to use AI-Studio, however. The system allows developers to simply capture sensor data and specify the desired recognition outcome for each sample to build their application program.
The company released a video (see below) that outlines one potential application: configuring the sensor to distinguish among several varieties of coffee. But the potential is far greater. The sensor can be programmed to distinguish between fresh or rotting food, for instance, or to detect if a diaper has become soiled. It can keep a lookout for forest fires or let a user know if they have bad breath or body odor. The key takeaway here is that the sensor itself is fairly generic. Turning the sensor into an electronic nose that can sniff out a specific odor is the result of pairing the sensor with AI.
This growing ability of bringing AI into the operation of small, embedded sensor systems creates a significant opportunity for developers. Now, rather than creating a traditional algorithm to discriminate among sensor readings, you can use machine learning to train the system for that task. Further, you can create an otherwise generic system and customize it for specific use cases, or even specific customers, without needing to create individual designs for each, in less development time than with traditional algorithmic programming.
The use of AI adds a flexibility to embedded system designs comparable to how the use of microprocessors expanded control logic. With traditional programming now becoming such a substantial fraction of design time, the added benefit of rapid development can have a substantial payback, as well.
This article was originally published on EDN.
Rich Quinnell is a retired engineer and writer, and former Editor-in-Chief at EDN.
Related articles: