Artificial Olfaction Measurement using VOC, Gas, and Temperature Sensors

Journal for High Schoolers, Journal for High Schoolers 2019


Alexandra Chin and Alan Yu


The sense of smell is vital for humans and animals to execute everyday functions. We are in the process of building an electronic nose, referred to as an “e-nose,” that has the ability to perform artificial olfaction. By following the electronics layout from the article ​A Compact and Low Cost Electronic Nose for Aroma Detection,​ authored by faculty of the University of Extremadura, as the basis for our “e-nose,” we plan to create a machine that accurately ingests and differentiates between different odors. Through alterations such as linking our microcontroller to multiple new sensors like a volatile organic compound (VOC) sensor, ethylene sensor, and temperature and pressure sensors, we hope to gather a large enough data set to train it using principal component analysis (PCA), Machine Learning, and Arduino C algorithms so that our “e-nose” will successfully recognize and classify odors.

1. Background

Olfaction, the process in which microscopic particles trigger olfactory receptors, has been adapted to mechanical use through a variety of sensors. The VOC (volatile organic compound) sensor, has been utilized to detect trace amounts of propane, butane, methyl chloride, formaldehyde, d-Limonene, toluene, acetone, ethanol (ethyl alcohol) 2-propanol (isopropyl alcohol), hexanal, pesticides (DDT, chlordane, plasticizers (phthalates), fire retardants (PCBs, PBB))​. ​These VOC sensors works in concert with the humidity, temperature, and pressure sensors to create a library of what certain substances emit.

2. Methods and Materials

● Smell container or “smell box”
● Stanford University equivalent of Arduino Uno from lab64

In order for our e-nose to fully “sniff,” we let the odorant’s smell saturate the container by placing it inside to rest for one minute before gathering data. Afterwards, we would calibrate both parts of the nose and encapsulate it, along with the odorant, inside the plastic tupperware container.

● Temperature and Pressure Sensor
● Temperature and Humidity sensor

To retrieve accurate and comparable data from each of our sensors, we made sure to firstly run a data collection test with only the air inside the smell container. This ensured that we had a standard, dependent variable to compare the rest of our tests with.

● VOC (Volatile Organic Compound) sensors
● LCD (Liquid Crystal Display) screen

Our e-nose utilizes 5 different MQ-VOC sensors that detect a combination of over 15 gasses. Each of these specific gas-sensitive sensors output a voltage that fluctuates depending on the measured detection of different gasses. In the Arduino C code, we have calibrated each sensor with a respective sensor-specific algorithm so that instead of reading the returned voltage, we are easily able to watch the change in the measure of ppm, or “parts per million.”

3. Results

Figure 1: An example of the sample data returned from the sensors during a trial.
Figure 2: Processing our data using Microsoft Excel and creating easily readable box and whisker plots from it.
Figure 3: Both parts of the electronic nose placed in the smell box.

There was room for error in various parts of our process. One example is our design of the “smell box” shown in figure 3. In order to gather data from the sensors, we needed to use a physical cable to connect the arduino to the computer. This prevented us from closing the container completely, leaving a sizeable gap for airflow, altering our results. A solution for this issue would be to drill a hole through the plastic tupperware, feed the cable through, and add an airtight seal with hot glue. Another issue we faced was that the box trapped strong odors from odorants such as garlic and onion. Although we tried to air out the box with natural air from the window, the strong smell would not disperse. These lingering VOCs may have affected our results, and in hindsight, testing these items at the very end of our testing process would have prevented the contamination of our data.

In figure 1, the raw data is shown in a text file copied over from the arduino IDE. To process this data, this project utilizes Excel to import the text file shown in figure 2. From there, visual representations through box plots are used and compared with other substances to determine if there is any quantifiable difference.

4. Conclusion

We have successfully created a prototype for our electronic nose. Although at this point the nose does not specifically report what the odorant is, the code to display this information on the LCD is simple to integrate. Our e-nose is able to send data back to our database where it is manually processed in Microsoft Excel and averaged. Then the averages of the data are compared with previous averages in the database to check for similarities and possible odorant matches. One a match within margins is determined, that is what the odorant is classified as. Ultimately, our electronic nose serves as an artificial olfactory receptor and available for a multitude of applications.

5. Future Directions

In the future, we plan to continue developing our e-nose so that it includes a bluetooth module on the board that sends the data directly from the arduino to the computer instead of using a physical cord. This way, our smell container will become completely airtight, increasing the concentration of the odor, as well as preventing external, airborne contaminants from disrupting our results. We also plan to move from a wireless breadboard to a perf board with either a wire wrapping or soldering method to increase portability and for a more professional professional aesthetic. Lastly, we hope to utilize our LCD (Liquid Crystal Display) screen so that it displays the detected odorant and easily read by the user.

Other possible applications of our electronic nose includes detecting if fruit is fresh or if it has spoiled by targeting the data from one of the MQ-VOC sensors sensitive to ethylene. After finding the threshold of ethylene gas emission from ripened fruits, we could easily use the nose for freshness evaluation. Another direction would be to use this nose as a medical device to help those with chronic sinus infections to sense the odors around them through visual output (LCD).

6. Acknowledgements

We would like to acknowledge Professor Tsachy Weissman, Professor of Electrical Engineering, for his guidance and assistance to access the resources available in the David Packard Electrical Engineering building. We would also like to thank Steve Clark, head of lab64, for his willingness to teach us soldering, wire wrapping, and advice regarding our e-nose. Special thanks to Chris Metzler, our postdoctoral mentor, for his time, support and effort to guide us through the entire process of creating this product. Another special thank you to Devon Baur for connecting us with the other olfactory-related project groups and organizing the informative field trip to Aromyx. Last but not least, thank you to Cindy Nguyen for running the Stanford Compression Internship and giving us the opportunity to explore new subjects and invent this summer.

7. References

Macías, M., Agudo, E., Manso, A., García Orellana, C. and Gallardo Caballero, R. (2013). ​A Compact and Low Cost Electronic Nose for Aroma Detection​. [online] Available at: [Accessed 3 Jul. 2019].

Webster, J., Shakya, P., Kennedy, E., Caplan, M., Rose, C. and Rosenstein, J. (2018). ​TruffleBot: Low-Cost Multi-Parametric Machine Olfaction – IEEE Conference Publication​. [online] Available at: [Accessed 3 Jul. 2019].

Leave a Reply