Research Article | Open Access
Shazmina Gull, Imran Sarwar Bajwa, Waheed Anwar, Rubina Rashid, "Smart eNose Food Waste Management System", Journal of Sensors, vol. 2021, Article ID 9931228, 13 pages, 2021. https://doi.org/10.1155/2021/9931228
Smart eNose Food Waste Management System
The modern age is an era of fast-growing technology, all thanks to the Internet of Things. The IoT becomes a prime factor of human life. As in this running world, no one cares about the wastage of food. However, this causes environment pollution as well as loss of many lives. A lot of researchers help in this era by introducing some great and beneficial projects. Our work is introducing a new approach by utilizing some low-cost sensors. In this work, Arduino UNO is used as a microcontroller. We use the eNose system that comprises MQ4 and MQ135 to detect gas emission from different food items, i.e., meat, rice, rice and meat, and bread. We collect our data from these food items. The MQ4 sensor detects the CH4 gas while the MQ135 sensor detects CO2 and NH3 in this system. We use a 5 kg strain gauge load cell sensor and HX711 A/D converter as a weight sensor to measure the weight of food being wasted. To ensure the accuracy and efficiency of our system, we first calibrate our sensors as per recommendations to run in the environment with the flow. We collect our data using cooked, uncooked, and rotten food items. To make this system a smart system, we use a machine learning algorithm to predict the food items on the basis of gas emission. The decision tree algorithm was used for training and testing purposes. We use 70 instances of each food item in the dataset. On the rule set, we implement this system working to measure the weight of food wastage and to predict the food item. The Arduino UNO board fetches the sensor data and sends it to the computer system for interpretation and analysis. Then, the machine learning algorithm works to predict the food item. At the end, we get our data of which food item is wasted in what amount in one day. We found 92.65% accuracy in our system. This system helps in reducing the amount of food wastage at home and restaurants as well by the daily report of food wastage in their computer system.
The IoT encompasses all fields of life and turns the world into a smart world. It works in hospitals, supermarkets, security areas, banks, business, offices, laboratories, restaurants, educational institutions, and home making the world smart and intellectual. As household and restaurant automation is discussed, the main unit of both areas is the kitchen where food is produced, cooked, and served to people to feed them and make them healthy. But the main problem is the wastage of food. Food wastage becomes a threatening problem nowadays. Around 1.3 billion tons of food is wasted each year that is enough to feed 3 billion hungry people each year at a cost of $990 billion . Just in Pakistan, around 36 million tons of food is wasted each year .
Greenhouse gases are emitted at food production time (which makes the 14.1% of emission) while methane gas is produced at the time of food decay . Food production consumes water as one apple growth consumes 125 litres of water and one-kilogram beef needs to consume 15,400 litres . And a huge amount of food waste contributes to water waste. According to , 3.3 billion tons of CO2 wasted each year, and 1 tons of food waste reduction can save approximately 4.2 tons of CO2 .
To overcome this problem, IoT can help in monitoring and reducing the waste of food. There is a noteworthy requirement to control, monitor, and management of food wastage. A system is a desideratum to cover the above-mentioned measures. This problem can be handled to IoT, as it bordered every field of life, by using some sensors, actuators, and modules. This research helps the chef as well as the home and restaurants to reduce the food wastage using IoT sensors and modules.
Electronic nose (eNose) concept comprises several heterogeneous electrochemical gas sensors that work according to the mechanism of human nose. eNose consists of sensing, detecting, and measuring the gas compounds, micro- and macromolecules, ion species, and volatile particles in samples and data processing and analysis systems.
A lot of food researches have been came in the IoT era for different FSC states, i.e., for production monitoring, quality monitoring, waste management using RFID, temperature, humidity, camera, and many other sensors and modules. Not any single research brings forward the idea of detecting food items using low-cost sensors and detecting the food items while measuring food wastage. For this context, this research is new in its architecture and methodology.
This research helped in detecting, monitoring, and managing the food wastage in context of eNose and weight sensor along with the Wi-Fi and Arduino modules. This research using gas sensors, i.e., MQ135 and MQ4, and a load cell enables the restaurants and households to monitor their food wastage and upon statistics to reduce the amount of wastage using some useful initiatives. Wastage of food can reduce if monitored properly, analyzed on daily basis, and reported to user. Detecting food items would help in attaining the amount of wastage of each food item and, after that, preparing specific food item as earlier as needed by comparing the analysis report. The main objectives of this research are as follows: (i)A system for real-time monitoring must have to be ensured for food wastage reduction(ii)A system must be capable of detecting food items (i.e., milk, meat, fruit, vegetable, or bread) to reduce food waste(iii)A smart system is mandatory for restaurants to detect and monitor food waste regularly to monitor how much amount is being wasted and which item is being wasted the most(iv)A smart cost-effective system is needed to assist in kitchen management against food wastage.
The proposed system is composed of three layers/nodes: sensor node, machine algorithm, and control unit. Sensor node worked with the eNose system (MQ4, MQ135) and weight sensor (HX711 and strain gauge load cell) to detect the food items and measure the weight of food waste. The machine algorithm is used here to analyze the food items. Decision tree is used as the machine algorithm in this system. The control unit analyzes and stores sensor values sent by the Arduino. The user can check the food wastage statistics through the system.
The rest of the paper discusses the proposed system in more detail. “State of the Art” is all about the related research work. “Architecture of IoT-Based Food Waste Management” tells about the architecture of the proposed system. “System Implementation” contains the specifications of hardware used in this research. It contains the calibration of sensors, implementation of machine algorithm, and the smart eNose food waste management system. “Results and Discussion” contains the results of this research after the experiments and implementation. “Conclusion” and “Future Work” contain the conclusion and future work of this research work, respectively.
2. State of the Art
This chapter discusses the related work in food department using the IoT technology. The work that is related to managing the food waste or casual wastage of any area using IoT technology, what researches have done on food quality in any phase of FSC (food supply chain), and IoT-based kitchen systems that used to manage buckets and stove system in kitchens are describe here in detail.
2.1. Food Waste Management
Jagtap and Rahimifard  reduces the wastage of meat 60.7% at the Chicken Tikka Masala restaurant within eight months. A bin carried the wastage where a load cell weighs the wasted meat and that figures are sent to the mobile app using a Bluetooth sensor. The data is then sent to the cloud server for analysis and storage purposes.
Hong et al. [6–10] designed a smart garbage system that collects food from houses, and users pay regularly according to their waste materials. They used RFID to track the garbage collectors and weight sensors to weight the waste material. The garbage collectors are synchronized with cloud.
The IoT-based smart garbage and waste collection bin  used IR for level detection, weight sensor, and Wi-Fi. Whenever IR detects the overweight, it alarmed the system and user to free up the smart bin.
A very efficient and smart restaurant waste management system monitored the generation (using RFID and weight sensor bin at each restaurant), collection (through smart wastage collection truck enabled with RFID, weight, video surveillance cameras, and GPS/GIS monitoring), transportation (using truck with real-time video monitoring), and disposal (by measuring the weight of wastage using RFID) of food waste at restaurants. This system worked well, efficiently, and with low error rate. 
Ostojić et al. [13, 14] measured the temperature and humidity of supplied food items and alert the user when the parameter values increased. RFID tag is used to detect each food item. They used Wi-Fi to sync with the server and cloud.
The food waste management system  for a university mess is designed using a sharp IR sensor to count people, using the mess-meal-cards in a box, weighting sensor, and Hx711-IC to measure the weight of wastage of the food. The sensed value is displayed on LED, and the LED sends data to IC every 3 seconds. The resultant data is also uploaded to web portal to monitor the food wastage.
Elhassan et al.  proposed a smart garbage bin for massive areas that contains five sections for different waste materials (paper, plastic, metal, glass, and food, respectively). The authors used a capacitive proximity sensor for detecting paper and plastic, metal sensor for metal detection, infrared sensor for glass detection, humidity sensor to validate whether the trash is wet or not, ultrasonic sensor to detect the trash bin level, and servomotor and solar cell for power consumption. The sensed values are sent to the control unit using radio frequency signals. As bin is filled with wastage or the humidity level increased, the system alerts the user.
Sofia et al. detect and analyze the presence of mycotoxins in different food items using UV, spectrometer, biosensors, and electrical nose and proved that the mycotoxins destroy food in any stage of food production, preservation, and harvesting .
A food waste management-recycling system  used RFID and weight and level sensor to detect the bin tag and location and to measure the waste weight and the level detection (3 levels) of trash in trash bin. The trash bin is collected by a smart truck, and all the collected food wastage is recycled in fertilizer for planting using FWDM (designed using motor vehicle parts and IOT modules). The overall result and data capture through sensors can be seen on LCDs.
A smart bin system is created for recycling and managing the wastage. The RFID and Wi-Fi module is used in this project. A user via a web service calls for a smart bin and places the wastage in to the bin by specifying the waste type. If the waste is recyclable, this wastage is sent to the company (waste-collector-vendor) for recycling; otherwise, it would be wasted/discarded. Each type of wastage is weighted by the wastage-based billing system. The user has to pay the bill using RFID .
2.2. IoT-Based Kitchen
Chatterjee et al. [20–22] worked on kitchen air quality by measuring temperature, humidity, gas leakage, and water flow using respective sensors. Whenever these parameters crossed the threshold, the system alerts the user.
Minaam et al.  designed a system that used a led indicator and AVR burning tool, for indicating the cooking time of a meal. The chef can set a timer for different cooking food items at the same time using a keypad.
An AI system for smart refrigerator worked with image processing to detect food items and their freshness status; after that, the NLP analysis helped to analyze which food is going to rot, and an alarming message is sent to the user via a mobile phone to prevent food spoilage and to manage the food wastage .
Chopade and Nighot [25–27] worked on kitchen pantry systems that detect the level of food stored on shelves and alert the user whenever it reduced and suggest the nearby stores from where the user can purchase that food item.
3. Architecture of IoT-Based Food Waste Management
This smart system consists of combination of different sensors and modules. The user has to put wasted food item on the acrylic disc of the weight sensor. The weight sensor measures the weight of the wasted food, and the eNose system detects the gas emission from food items. The sensed values are then sent to the control unit by digitizing the analog sensed values using Arduino. Arduino IDE is used to interpret the sensed information. The control unit analyzes the sensor information through the machine algorithm and comes up to a result which food item is being wasted and the weight of the wasted food item. The record is then saved into the database for further precautionary measures to reduce the food wastage. Architecture of smart eNose food waste management is shown in Figure 1, in which we depicted all components, their interaction, and working strategy.
3.1. Used Algorithm
We designed the detailed working algorithm of IoT-based smart eNose food waste management based on entropy and information from decision tree. The proposed algorithm steps are described in Algorithm 1, and flow chart is given in Figure 2.
3.2. Machine Algorithm for Smart eNose Food Waste Management
After sensing, retrieving, and constructing the dataset, classification and regression are done using the decision tree. We use RapidMiner for applying machine learning algorithm: decision tree.
The decision tree algorithm is a supervised learning algorithm that is used for classification and regression. The decision tree algorithm generates a training model (trained decision tree and rule set) to predict the desired attribute’s (class in our dataset) values. We used the C4.5 decision tree algorithm model (advanced ID3) in this project.
We used the information gain and gain ratio. We calculate the information gain and gain ratio using the RapidMiner tool before splitting the dataset. The highest information gain is chosen by the decision tree algorithm to construct/split the decision tree. We used the gain ratio for splitting our dataset to construct the decision tree. Gain ratio is used to remove the biasness over attributes.
4. System Implementation
4.1. Used Hardware
We designed the sensor node of the smart eNose food waste management by using multiple sensors MQ135, MQ4, and weight sensor. A microcontroller Arduino UNO is used for embedding these sensors. Detail of hardware components used in data collection is as follows:
MQ135 is an air-quality highly sensitive sensor/module. This sensor used to detect the smoke, NH3, alcohol, NOx, benzene, and CO2. In our proposed system, this sensor is used for detecting the NH3 and CO2 in food waste. MQ135 gas sensor is shown in Figure 3.
The MQ4 sensor is used to detect CH4, cigarette smoke, natural gas LNG, cooking fumes, and alcohol. It is highly sensitive to CH4 and LNG yet low sensitive to smoke and alcohol. In our system, it is used to detect CH4 in food waste. The MQ4 gas sensor is shown in Figure 4.
Weight sensor consists of HX711 (A/D converter) and 5 kg load cell (weight gauge) sensor that is used to measure the weight of food wasted. HX711 is a high-precision 24-bit analog-to-digital converter. HX711 is specially designed for industries and weighing scales. It can be directly interfaced with the bridge sensor. It supports two analog-input channels. Weight sensor is shown in Figure 5.
4.2. Sensor Calibration
In this proposed model, MQ135, MQ4, and load cell sensors are mainly used for detection and measurement purposes. These sensors are used in a prototype model after calibration. Before their actual usage, the gas sensors (MQ135, MQ4) are put to preheat for 24 hours for each gas detection and were made sure to use 10 kΩ or above with gas sensors (MQ135, MQ4) for . For calibration, has to be calculated firstly in fresh air, and after that, it never changes in fresh air. The calculated value of is used to calculate the that is changeable with the gas concentration or presence in specific gas.
The general formula to calculate PPM of a gas is
The gas concentration graph is on log-log scale/linear scale. So, the line formula is used to find the log-log scale gas concentration ratio.
Here, is the value, is value, is the slope of line, and is intercept.
For log-log scale, convert (2) into following:
Here, the log base is 10.
The value of found by the MQ4 and MQ135 sensors in our system is 4.78.
The weight sensor contains a strain gauge load cell and a HX711 A/D converter. For its calibration, the known weight has to be placed on the load cell, and the calibration factor to set the scale was found. After that, that calibration factor was used to measure the weight of an unknown object. In this research, the method used for calibration is taken from the HX711_ADC library. The calibration value of weight sensor found using our load cell is 456.0.
4.3. Implementation of Decision Tree Algorithm
The dataset is collected by two sensors, MQ4 (CH4 detection) and MQ135 (CO2 and NH3 detection), using Arduino IDE and PLX-DAQ. In this current system, four classes are used to discriminate between food items based on gas emission (see Figure 8).
The information gain for our dataset is given in Table 1.
As shown in Table 1, information gain for all of the attributes and the number of instances used for each class item are of equal size.
The calculated gain ratio for our dataset is given in Table 2.
We also calculate the gain ratio of the training dataset for accuracy (see Table 3).
The both calculated gain ratios give the highest ratio of CO2, so we choose the CO2 attribute as root or construction/split in the decision tree.
The rule model for this current system is as follows:
If , , and , then rice and meat is (52/0/0/0).
If , , and , then meat is (0/49/0/0).
If , , and , then bread is (1/0/1/53).
If , , and , then meat is (0/3/0/0).
If , then rice is (0/1/52/0).
5. Results and Discussion
The smart eNose food waste management System is operable in homes and restaurants as well. This proposed system is efficient, real-time, accurate, and cost-effective. The proposed system detects the food items with the collaboration of sensors and actuators and measures the weight of waste food. The sensed information is then analyzed using the decision tree. This system helps to reduce the food wastage by checking the previous records. A chef can also cook according to the need and likes of consumers. This system requires no human interception as the literature research work needs human to enter the food type or weight of food wastage.
We implement our system at home. The food wastage in one day at home can be found easily using graphs. These graphs are made by using RapidMiner. One of these graph records is given in Figure 11.
In Figure 11, the weight is measured in grams.
5.1. System Accuracy and Efficiency
The smart eNose food waste management system is accurate, efficient, and highly performed. These features are achieved after training and testing the dataset on different food items. The proposed system offers a class precision for meat, rice, rice and meat, and bread of 100%, 89.47%, 93.33%, and 88.24%, respectively; the class recall of meat, rice, rice and meat, and bread is 100%, 100%, 82.35%, and 88.24%, respectively, and 92.65% accuracy and weighted-mean recall. The accuracy and performance vectors description are given in Table 4:
The scatter plots, retrieved after making the decision tree of given dataset, are given in Figure 12.
To describe the frequency of different attributes over food items, color-histogram graph is used in this proposed system (see Figure 13).
The proposed system has also some negative points as there is a 7.35% classification error in implementing the decision tree using the dataset generated from the sensors (Table 5; classification error: 7.35%).
Food wastage becomes a renowned issue of these days. In this modern computer age, there is a need to control human chores using computers. To fulfill this purpose of IoT and to reduce the amount of food wastage, we designed a system that is suitable in this situation and do not need human collaboration to control and monitor it manually.
We proposed a smart eNose food waste management system that is capable of describing a food item and in which amount is wasted in a day. For this accomplishment, we use sensors and microcontroller collaboration with the great contribution of decision tree. We detect food items through their gas emission. The smart eNose system helps us to detect food items which contain MQ4 and MQ135 sensors. MQ4 is used to detect CH4 (emitted from rice). MQ135 is used to detect CO2 (emitted from bread and meat) and NH3 (emitted from meat). We collect data, 70 instances of each, of four food items, i.e., meat, rice, rice and meat, and bread. We use 5 kg strain gauge load cell and HX711 as the weight sensor to measure the weight of food wastage.
For ensuring the accuracy and performance of our system, we calibrate the sensors as per recommendations. We use the decision tree algorithm with contrast to the information gain and gain ratio to make this system an intelligent and smart system. The generated rule model is applied in actual implementation of the current system software. We implement our system in home and find out the food wastage in one day. The current system is accurate, efficient, cost-effective, and durable in its performance. This system appeals high accuracy of 92.65%. There is a least classification error found, 7.35%.
The proposed system is new in its technology and fills the gap in the food waste management industry with its high accuracy and cost-efficiency.
7. Future Work
In the future, we want to increase our accuracy and performance using more sensors, i.e., pH sensor for food items and ethylene sensor to work with fruits and vegetables. As this, the today world is incomplete without smart phones. So, we want to make our system mobilize for every user to interact with the system using their mobile phones at any place at any time. This would help in increasing the accuracy, durability, reliability, and efficiency of the proposed system.
Data related to this research will be available if needed.
Conflicts of Interest
The authors declare that they have no conflicts of interest.
- The World Bank, “What a WAste 2.0, a global snapshot of solid waste management to 2050,” May 2020, http://datatopics.worldbank.org/what-a-waste/global_food_loss_and_waste.html.
- F. H. Mughal, Food Waste and its Consequences, Dawn, 2018.
- trvst, “Why is food waste a global issue,” 2019, May 2020, https://www.trvst.world/inspiration/why-is-food-waste-a-global-issue/.
- The World Counts, “Global challenges,” May 2020, https://www.theworldcounts.com/challenges/consumption/foods-and-beverages/food-waste-facts.
- S. Jagtap and S. Rahimifard, “The digitisation of food manufacturing to reduce waste - case study of a ready meal factory,” Waste Management, vol. 87, pp. 387–397, 2019.
- I. Hong, S. Park, B. Lee, J. Lee, D. Jeong, and S. Park, “IoT-based smart garbage system for efficient food waste management,” The Scientific World Journal, vol. 2014, Article ID 646953, 13 pages, 2014.
- M. V. Patil and S. M. Gajbhiye, “A review on internet of things based garbage bins detection systems,” International Journal of Science and Research, vol. 6, no. 4, pp. 1699–1702, 2017.
- P. S. I. Shirke, S. Ithape, S. Lungase, and M. Mohare, “Automation of smart waste management using IoT,” International Research Journal of Engineering and Technology, vol. 6, no. 6, pp. 414–419, 2019.
- E. D. Likotiko, D. Nyambo, and J. Mwangoka, “Multi-agent based IoT smart waste monitoring and collection architecture,” International Journal of Computer Science, Engineering and Information Technology (IJCSEIT), vol. 7, no. 5, pp. 1–14, 2017.
- M. Giacobbe, C. Puliafito, and M. Scarpa, “The big bucket: an IoT cloud solution for smart waste management in smart cities,” in Advances in Service-Oriented and Cloud Computing. ESOCC 2016. Communications in Computer and Information Science, vol 707, A. Lazovik and S. Schulte, Eds., Springer, Cham, 2016.
- S. Navghane, M. Killedar, and V. Rohokale, “IoT based smart garbage and waste collection bin,” International Journal of Advanced Research in Electronics and Communication Engineering, vol. 5, no. 5, pp. 1576–1578, 2016.
- Z. Wen, S. Hu, D. De Clercq et al., “Design, implementation, and evaluation of an internet of things (IoT) network system for restaurant food waste management,” Waste Management, vol. 73, pp. 26–38, 2018.
- G. Ostojić, S. Stankovski, S. Tegeltija, N. Đukić, and B. Tejić, “Implementation of IoT for food wastage minimisation,” in XVII International Scientific Conference on Industrial Systems, Novi Sad, Serbia, October 2017.
- Z. Li, G. Liu, L. Liu, X. Lai, and G. Xu, “IoT-based tracking and tracing platform for prepackaged food supply chain,” Industrial Management & Data Systems, vol. 117, no. 9, pp. 1906–1916, 2017.
- V. Jain, “eBin: an automated food wastage tracking system for dormitory student's mess,” in 2016 International Conference on Internet of Things and Applications (IOTA), Pune, India, January 2016.
- R. Elhassan, M. A. Ahmed, and R. AbdAlhalem, “Smart waste management system for crowded area: Makkah and holy sites as a model,” in 2019 4th MEC International Conference on Big Data and Smart City (ICBDSC), Muscat, Oman, January 2019.
- S. Agriopoulou, E. Stamatelopoulou, and T. Varzakas, “Advances in analysis and detection of major mycotoxins in foods,” Foods, vol. 9, no. 4, p. 518, 2020.
- K. Jayalakshmi, S. Pavithra, and C. Aarthi, “Waste to wealth—a novel approach for food waste management,” in 2017 IEEE International Conference on Electrical, Instrumentation and Communication Engineering (ICEICE), Karur, India, April 2017.
- M. Kaur and K. S. Saini, “A framework for recyclable household waste management system in smart home using IoT,” in Computing and Network Sustainability, H. Vishwakarma and S. Akashe, Eds., vol. 12 of Lecture Notes in Networks and Systems, pp. 213–223, Springer, Singapore, 2017.
- J. M. Chatterjee, R. Kumar, M. Khari, D. T. Hung, and D.-N. Le, “Internet of Things based system for smart kitchen,” International Journal of Engineering and Manufacturing, Modern Education and Computer Science Press, vol. 8, no. 4, p. 29, 2019.
- M. Sundarapandiyan, S. Karthik, and M. J. A. Daniel, “IoT based smart kitchen,” International Journal of Computer Science Trends and Technology (IJCST), vol. 7, no. 2, 2019.
- F. Nugroho and A. Pantjawati, “Automation and monitoring smart kitchen based on Internet of Things (IoT),” in IOP Conference Series: Materials Science and Engineering, Volume 384, International Symposium on Materials and Electrical Engineering (ISMEE) 2017, Bandung, Indonesia, November 2017.
- D. S. A. Minaam, M. Abd-ELfattah, and M. A. Ali, “Design of an Internet of Things (IoT) network system for kitchen food waste management,” International Journal of Computer Science and Network Security, vol. 18, no. 5, pp. 130–138, 2018.
- T. Nagaraju and B. R. Shubhamangala, “Artificial intelligence powered smart refrigerator to arrest food wastage,” in 3rd International Conference on Innovative Computing and Communication (ICICC-2020), Delhi, India, April 2020.
- S. Dilip Chopade and M. K. Nighot, “Smart kitchen management using IOT technology,” International Journal of Advanced Research in Computer Engineering & Technology, vol. 8, no. 7, pp. 269–271, 2019.
- S. Rezwan, W. Ahmed, M. A. Mahia, and M. R. Islam, “IoT based smart inventory management system for kitchen using weight sensors, LDR, LED, Arduino Mega and NodeMCU (ESP8266) Wi-Fi module with website and app,” in 2018 Fourth International Conference on Advances in Computing, Communication & Automation (ICACCA), Subang Jaya, Malaysia, October 2018.
- N. Korde and A. Thakare, “Smart shelve management system using IoT-a novel approach,” in 2018 3rd International Conference for Convergence in Technology (I2CT), Pune, India, April 2018.
Copyright © 2021 Shazmina Gull et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.