The Artificial Nose experiment is a smart device trained to recognize a variety of smells. With a simple gas sensor and a micro-controller, you can build an AI nose that can identify the smell of bread, coffee, and more.Try the Artificial Nose demo
Benjamin Cabé, a program manager at Microsoft, sought to improve his breadmaking skills during the COVID-19 pandemic. He particularly wanted to find a better way to determine when his sourdough bread starter was ready to bake.
He decided to build a device that uses AI to tell him when his bread had properly risen. Using a readily available gas sensor and microcontroller, he believed he could collect the gas makeup of a smell and use this data to train an AI model.
The Artificial Nose uses a neural network to correlate the concentration of gases in the air to categories of smell. When connected to an IoT platform, this nose could be used for a variety of scenarios: it could help to craft a real-time alert system for when foods have spoiled, or for detecting specific gases in the air.
From gas to smell
Benjamin Cabé demonstrates how to build an Artificial Nose using affordable hardware and combining it with an open-sourced AI model. Whether you connect it to the cloud or not, the device could learn to characterize a large variety of smells.
Artificial Nose architecture
Gas sensors measure the concentration of various gases emanating from a substance. An AI model extract the key characteristics of these gases and uses them to infer the corresponding smell. The inferred result is shown to the user and can also be sent to Azure IoT to be further analyzed (ex. send alerts), or to contribute to updating and improving the model.
Technical details for Artificial Nose
There are a variety of industries that can benefit from intelligent devices that can smell. An Artificial Nose can, for example, be used in the building maintenance industry to determine when an office or bathroom needs to be cleaned or in the cosmetics industry to substitute ingredients in a perfume with more sustainable ones while keeping a scent the same. Or you can simply use it at home to bake.
Building this Artificial Nose starts with the hardware, an off-the-self gas sensor and a microcontroller. The sensors can detect the concentration of gases—like Carbon monoxide (CO), Nitrogen dioxide (NO2), Ethyl alcohol(C2H5OH), and Volatile Organic Compounds (VOC)—found in the surrounding air. The sensor is connected to a microcontroller, which is used to read and collect gas sensor data and feed it into the AI model.
The Artificial Nose “smells” by using a neural network to correlate the concentration of gases (CO, NO2, etc.) in the air—data inputs received from the gas sensor— to certain categories of smell (coffee, whiskey, bread). The smell category is then displayed on the microcontroller screen along with a visual cue indicating the model’s degree of certainty in its correlation.
To train the model, a few minutes of gas sensor readings were captured for each category of smell. The “olfactory fingerprint” of each smell was then extracted by looking at, for example, the minimum, maximum, and average concentration of each of its constituting gases in short time windows (1.5s). These characteristics were then used as the inputs to a fully connected neural network tasked with establishing the correlation between the olfactory fingerprints and the various categories of smells.
The developed and trained neural network was then deployed back to the microcontroller, and so an Artificial Nose was built.
Additional, and optional, modifications can be made to the Nose. A 3D nose enclosure can be printed to house the gas sensor and microcontroller. Leveraging the microcontroller’s Wi-Fi module, the Artificial Nose can also be turned into an IoT Plug and Play device that is able to connect to an IoT platform, such as Azure IoT. Sensor readings as well as detected smells can then be sent to the IoT platform, enabling real-time alerting and reporting. For example, a maintenance operator can automatically be notified when a gas leak is detected on a factory floor, or a consumer be alerted about spoiled food in their fridge.
- Get the code to build a nose at GitHub.
- More info about the hardware components shown in this demo: Artificial Nose kit at Seeed Studio.
- Wio Terminal is the TinyML processor shown in the Artificial Nose demo, which can be used for more machine learning inferencing on edge devices. Learn more about Wio Terminal at Seeed Studio.
Machine Reading Comprehension (MRC) answers questions about written text. Using a neural network, MRC mimics the process of human readers. Ask a question and MRC reads a document until an answer is formed.
Sketch2Code converts hand-written drawings to HTML prototypes. Designers share ideas on a whiteboard, then changes are shown instantly in the browser—helping improve collaboration between the designer, developer, and customer.
Innovation Developer Hub
Explore insights and behind-the-scenes technology for breakthrough AI innovations. From Tech Minutes videos to Technology Deep Dives, learn about the engineering that powers the future of AI.
Learn to create your own AI experiences with courses in AI technology. Engage with learning paths in conversational AI, machine learning, AI for devices, cognitive services, autonomous systems, AI business strategies, and responsible AI.
Start building AI solutions with powerful tools and services. Microsoft AI is a robust framework for developing AI solutions in conversational AI, machine learning, data sciences, robotics, IoT, and more.