An Intelligent IoT-Based Food Quality Monitoring Approach Using Low-Cost Sensors

: The evolution of multipurpose sensors over the last decades has been investigated with the aim of developing innovative devices with applications in several ﬁelds of technology, including in the food industry. The integration of such sensors in food packaging technology has paved the way for intelligent food packaging. These integrated systems are capable of providing reliable information about the quality of the packed products during their storage period. To accomplish this goal, intelligent packs use a variety of sensors suited for monitoring the quality and safety of food products by recording the evolution of parameters like the quantity of pathogen agents, gases, temperature, humidity and storage period. This technology, when combined with IoT, is able to provide a lot more information than conventional food inspection technologies, which are limited to weight, volume, color and aspect inspection. The original system described in this work relies on a simple but effective method of integrated food monitoring, right at the client home, suitable for user prepared vacuum-packed foods. It builds upon the IoT concept and is able to create a network of interconnected devices. By using this approach, we are able to combine actuators and sensing devices also providing a common operating picture (COP) by sharing information over the platforms. More precisely, our system consists of gas, temperature and humidity sensors, which provide the essential information needed for evaluating the quality of the packed product. This information is transmitted wirelessly to a computer system providing an interface where the user can observe the evolution of the product quality over time.


Introduction
It is expected that by 2020, the Internet of Things (IoT) will have grown faster than any other category of connected devices, according to [1].Also, about 34 billion USD will be spent on IoT devices, according to the same study.On the global level, services offered by the IoT and Machine-to-Machine Communication (M2M) connections will increase by almost three times, from 4.9 billion in 2015 to 12.2 billion until 2020, representing almost half (46%) of the total number of connected devices.
IoT medical services will increase by five times, showing the fastest evolution, from 144 million connections in 2015, to 729 million in 2020, according to the studies of [2,3].The IoT is also expected to make a significant contribution in the related fields of food and consumer safety.The electronic gas sensor, a typical application in intelligent and IoT systems, is receiving continually increasing attention from both the industrial and the academic environment.Gas detection technology is rapidly evolving because of its broad range of applications.Gas sensors can be classified by the detecting materials employed in their fabrication process [4][5][6][7][8], by their electrical parameters [9,10], by the detected gases, or by their costs.
Mobile olfaction and odor source localization, technologies with high impact on intelligent food feature extraction, have become important fields of research in recent years.Recent progress in mobile robotics and the dynamic nature of the operating environments the robots are operating in have increased the processing power of the robots.Furthermore, several cartographic techniques have been developed for individual or multiple robots capable of localizing odor sources.Finally, a simple approach based on a behavioral model has been implemented on a robot fitted with electronic smell and sight in dynamic conditions in order to avoid the high time consumption and rigidity of the algorithm-based approach [11,12].
A wireless electronic nose (WEN) developed for fruit quality control and classification was demonstrated in [13].The electronic nose system was based on wireless data transmission using ZigBee, a series of gas sensors, and a LabVIEW Graphic User Interface, and it was tested with green and yellow mango samples.
The integration of sensors in food packaging provides the consumer with smart packaging solutions.These advances have led to improved food quality, safety, longer shelf-life and usability.While most packaging innovations have been the result of global trends and consumer preferences, a few innovations have stemmed from rather unexpected sources, such as the emergence of nano-sensors and the technology of material sensing in nm size range.Undoubtedly, future smart packaging developments will focus on food safety (detecting microbial growth, oxidation, and improved tamper visibility), food quality (sensing volatile flavors and aromas), shelf-life tracking, authentication, convenience, and sustainability of food products [14].
It is proving extremely important to develop devices equipped with low cost commercial sensors capable of detecting and measuring the concentrations of the atmospheric gases.CO 2 and methane (CH 4 ), due to their greenhouse effects and the potential gas leakages in water wells, can severely endanger human and animal health [15].
The system we propose is intended for food quality monitoring.It continuously monitors the gas level, the humidity level and the temperature of vacuum-packed foods.
The paper is structured in 4 major sections.The first section presents the state of the art in IoT and Food Packaging Technology.The second section of the article contains the description of the experimental sensors platform which reads and transmits the data to the central controller for analyses.The article continues with the description of the controller employed for collecting and storing the data and the instruments provided for analyzing data in order to extract useful information regarding the packed product.The experimental results, conclusions and future development perspectives are discussed in the last two sections of the article.

Literature Review
In recent years, computing systems have shown a rapid growth, with their explosive evolution benefiting almost all sectors of human activity.Nowadays, mobility has become a highly prized quality.As "smartphone"-type mobile phones are becoming more and more affordable in terms of price, quality and performance, applications developed on the Android platform have the potential to become extremely useful in conjunction with database management systems.The internet of things (IoT) is a concept and, implicitly, a model built on the assumption of the omnipresence of a multitude of objects which, through wireless or cabled connections and unique addressing schemes, can interact and collaborate with other objects, creating new services and applications aimed at reaching a common goal.In this light, the promise of an intelligent environment is extremely seductive, envisioning a world where reality and the artificial digital virtual components of the world interact in order to create a better environment.Being a new Internet revolution, IoT's goal is to allow things and objects to be connected anytime and anywhere with anyone, using any network, path and service.Because devices can provide information about themselves, objects are recognized and learned by making contextual decisions.They can access information that has been used in a connection with other things, or they can be parts of complex services.
The developing pace of this technology in Europe by demonstrating, testing and implementing products by 2020, shows that the implementation of intelligent environments will be very rapid.
In the near future, computing, storage and communication services will be highly available and distributed.People, intelligent objects, cars, platforms and the surrounding space-for example, wired sensors, machine-to-machine devices, and radio-frequency identification (RFID) tags-will create a shared decentralized pool of interconnected resources through a dynamic network of networks.IoT in this context is a generic term, and all objects can play an active role through the Internet connection, composing an intelligent environment where the role of the Internet has changed.This very impressive way of communicating is going to provide unprecedented access to information, media and services with the help of wired and wireless broadband links.
IoT uses simultaneous actions that are generated by Internet, consumer, business and industrial convergence.This convergence to the same point uses cloud technology to connect intelligent things and deliver a wide range of data, helping to create services that cannot be implemented without this level of connectivity and analytical intelligence.The result is a globally accessible network of things, users and consumers capable of creating businesses, generating and purchasing new services.
These platforms also rely on the power of network effects, allowing more things, and becoming more precious for other things and for users who use the generated services.The success of the platform strategy for IoT can be determined on the basis of connectivity, attractiveness and knowledge, information, and data flow.
The activation of IoT technologies such as sensor networks, RFID (Radio Frequency Identification), M2M, mobile Internet, semantic search, data integration, and Internet Protocol version 6 (IPv6) can be classified into three main categories, enabling technologies for contextual information, technology that allows things to access contextual information and technologies which improve security and confidentiality.
The IoT development means that environments, cities, buildings, vehicles, clothes, portable devices and other objects have much more information associated with them or the ability to feel, communicate and produce new information.
All computers connected to the Internet can interact with each other, and with the connection of mobile phones, everything has become mobile.With the Internet of Things (IoT), communication spreads through the Internet to all the things that surround us.The Internet of objects is more than Machine-to-Machine (M2M) communication, 2G/3G/4G wireless sensor networks, and RFID-these technologies being considered the building blocks of IoT applications.
To ensure the neutrality of the network, no information is prioritized.To meet this criterion, Internet service providers and governments need to debate so as not to discriminate or tax users based on content, site, platform, application, data transmitted, type of attachment, and communication modes.
As a result of this convergence, IoT applications required by classical industries are flexible, and technology will create opportunities for new emerging industries and will offer new enriched services including Intelligent Food Packing [16].In [17], authors present an IoT platform for acquiring, storing and analyzing nutrient food data.The experimental results are based on the analysis of 8172 items for 1000 types of foods, with 98.6% classification accuracy.In [18] IoT is described as a concept in which Symmetry 2019, 11, 374 4 of 18 many new things are connected and operated like street lighting, and things such as built-in sensors, image recognition functionality, enhanced reality, and near field communication are integrated into decision support, active management and new services, including medicine and food consumption.
In [19], IoT is presented as a platform that provides information technology integration solutions that refer to the hardware and software used for storing, retrieving and processing biomedical data and communication technologies that include electronic systems used to communicate between individuals or groups, with the same pathologies.
Intelligent Mattress is a remote-controlled system used to identify the behavior of subjects during the sleep [20].Medical staff have done several studies regarding the body position and its motion on the bed and in the room [21][22][23][24].
WSN (Wireless Sensor Networks) and M2M can be considered to be other examples of IoT.In the WSN case, measured data from a sensor is sent to a server or the information held by the server is sent to an actuator.On the other hand, M2M is bilateral while the process is in progress, through autonomous communication between each device [25,26].
In Figure 1, the conceptual model of the Internet of Things paradigm is illustrated.In [19], IoT is presented as a platform that provides information technology integration solutions that refer to the hardware and software used for storing, retrieving and processing biomedical data and communication technologies that include electronic systems used to communicate between individuals or groups, with the same pathologies.
Intelligent Mattress is a remote-controlled system used to identify the behavior of subjects during the sleep [20].Medical staff have done several studies regarding the body position and its motion on the bed and in the room [21][22][23][24].
WSN (Wireless Sensor Networks) and M2M can be considered to be other examples of IoT.In the WSN case, measured data from a sensor is sent to a server or the information held by the server is sent to an actuator.On the other hand, M2M is bilateral while the process is in progress, through autonomous communication between each device [25,26].
In Figure 1, the conceptual model of the Internet of Things paradigm is illustrated.In [27,28], intelligent packaging is conventionally defined as a method by which the package, product and its environment combine to increase shelf life, improve food safety or organoleptic quality, and simultaneously preserve the overall quality of food.It prevents undesired processes inside the package, like respiration of fruits and vegetables, lipid oxidation, and spoilage from microorganisms.The main objectives of active packaging are: The future trend in intelligent packaging is a global expansion in food distribution systems (Figure 2).The quality and safety of vacuum foods are strongly influenced by temperature, making the monitoring of time-temperature history throughout the entire distribution chain compulsory.Commercially available monitoring devices include temperature data loggers, time-temperature integrators (TTIs), smart radio frequency identification (smart-RFID), and others [29].In [27,28], intelligent packaging is conventionally defined as a method by which the package, product and its environment combine to increase shelf life, improve food safety or organoleptic quality, and simultaneously preserve the overall quality of food.It prevents undesired processes inside the package, like respiration of fruits and vegetables, lipid oxidation, and spoilage from micro-organisms.The future trend in intelligent packaging is a global expansion in food distribution systems (Figure 2).The quality and safety of vacuum foods are strongly influenced by temperature, making the monitoring of time-temperature history throughout the entire distribution chain compulsory.Commercially available monitoring devices include temperature data loggers, time-temperature integrators (TTIs), smart radio frequency identification (smart-RFID), and others [29].
The future trend in intelligent packaging is a global expansion in food distribution systems (Figure 2).The quality and safety of vacuum foods are strongly influenced by temperature, making the monitoring of time-temperature history throughout the entire distribution chain compulsory.Commercially available monitoring devices include temperature data loggers, time-temperature integrators (TTIs), smart radio frequency identification (smart-RFID), and others [29].

Materials and Methods
In the present paper, the behavior of food in vacuum packs is investigated using our original electronic system, described herein.We use the Wireless Sensor Networks (WSNs) approach for implementing the communication between the acquisition board and the computer.The power consumption is a constraint in WSNs.The system proposed by us is divided into two modules of low cost and low power consumption.
The first module consists of a data acquisition board while the second one implements the user interface, data storage, analysis and remote transmission of the results.The acquired data provide information about the status of the food, the degree of degradation and the storage conditions.The block diagram of the two modules of our system is depicted in Figure 3.

Materials and Methods
In the present paper, the behavior of food in vacuum packs is investigated using our original electronic system, described herein.We use the Wireless Sensor Networks (WSNs) approach for implementing the communication between the acquisition board and the computer.The power consumption is a constraint in WSNs.The system proposed by us is divided into two modules of low cost and low power consumption.
The first module consists of a data acquisition board while the second one implements the user interface, data storage, analysis and remote transmission of the results.The acquired data provide information about the status of the food, the degree of degradation and the storage conditions.The block diagram of the two modules of our system is depicted in Figure 3.The data acquisition module includes analog and digital sensors for temperature, humidity, gas concentration and pressure.The sensors communicate with the Arduino board through the serial interfaces I2C and SPI.The Arduino board is connected to an XBee wireless communication modem which implements the ZigBee protocol for transmitting the data from the sensors to the computer.The second module implements the recording and processing of acquired data and provides a human-machine interface developed in the LabVIEW programming environment running on a PC.The interface can be viewed by multiple users using a web-server.The computer is connected to the second XBee modem in order to communicate with the data acquisition module.
The measurements collected from the sensors are stored in an Excel spreadsheet in order to be analyzed in MATLAB.If the measurements lie outside the normal range of prescribed values, an alarm message is programmed in the LabVIEW interface.

Data Acquisition Module. Components Description
The data acquisition module consists of an Arduino board fitted with temperature and humidity The data acquisition module includes analog and digital sensors for temperature, humidity, gas concentration and pressure.The sensors communicate with the Arduino board through the serial interfaces I2C and SPI.The Arduino board is connected to an XBee wireless communication modem which implements the ZigBee protocol for transmitting the data from the sensors to the computer.The second module implements the recording and processing of acquired data and provides a human-machine interface developed in the LabVIEW programming environment running on a PC.The interface can be viewed by multiple users using a web-server.The computer is connected to the second XBee modem in order to communicate with the data acquisition module.The measurements collected from the sensors are stored in an Excel spreadsheet in order to be analyzed in MATLAB.If the measurements lie outside the normal range of prescribed values, an alarm message is programmed in the LabVIEW interface.

Data Acquisition Module. Components Description
The data acquisition module consists of an Arduino board fitted with temperature and humidity sensors used for monitoring the health of the electronic system itself, protected in a thermo-insulated enclosure and a separate section with gas, pressure, temperature and humidity sensors which are going to be exposed to the analyzed product.
The sensors used in the proposed system are low-cost, easy to use, and are available worldwide.The whole system is user-friendly and low-cost, as it can be constructed by a hobbyist for less than 100 Euros.This sum is reasonable, because the system is reusable and the price can drop significantly in case of mass production.
The box containing the sensors together with the food is inserted in a plastic bag and the air is removed and the bag is vacuum-sealed using a vacuum sealer.The user seals the food themselves, at home.Because the container is a rigid box and provides enough space that the sensors are not in direct contact with the food, the technique is rendered non-destructive.The sensors analyze the contents of the atmosphere inside the sealed box, detecting emissions of water and gas vapors related with the degradation of the stored food.
According to the electric diagram in Figure 4, the acquisition module components are: -The Bosch Sensortec integrated environmental unit The circuit was divided into two dosing boxes, the one containing the acquisition board being thermally insulated in order to protect the microcontroller if the module is used in cold places such as a refrigerator (Figure 5).This multi-parameter monitoring system can also be configured to send the measured results to a mobile phone or a tablet PC.The DHT22 sensor is intended to monitor the temperature and humidity inside the microcontroller's protection box in order to alarm the user in case of malfunction.The whole module is powered with 9 V DC from a battery pack.The circuit was divided into two dosing boxes, the one containing the acquisition board being thermally insulated in order to protect the microcontroller if the module is used in cold places such as a refrigerator (Figure 5).This multi-parameter monitoring system can also be configured to send the measured results to a mobile phone or a tablet PC.The DHT22 sensor is intended to monitor the

The Data Processing, Storage and User-Interface Module
The data acquisition process consists of two stages: the calibration of the sensors and the actual acquisition stage.In the calibration stage, the mathematical model of the MQ gas sensors must be introduced.Each type of sensor has its own behavior, based on the measured gas, identified in [30].For research purposes, a rapid prototype data acquisition interface was developed on a PC in LabVIEW 2013.In a future version, because of the widespread use of mobile phones and tablet PCs, the interface will be extended to Android devices.The data acquired from the temperature, humidity and pressure sensors are represented in graphics on the User Interface (Figure 6).The analyzed gas and the specific gas sensor type have to be selected in the interface.

The Data Processing, Storage and User-Interface Module
The data acquisition process consists of two stages: the calibration of the sensors and the actual acquisition stage.In the calibration stage, the mathematical model of the MQ gas sensors must be introduced.Each type of sensor has its own behavior, based on the measured gas, identified in [30].For research purposes, a rapid prototype data acquisition interface was developed on a PC in LabVIEW 2013.In a future version, because of the widespread use of mobile phones and tablet PCs, the interface will be extended to Android devices.The data acquired from the temperature, humidity and pressure sensors are represented in graphics on the User Interface (Figure 6).The analyzed gas and the specific gas sensor type have to be selected in the interface.
introduced.Each type of sensor has its own behavior, based on the measured gas, identified in [30].For research purposes, a rapid prototype data acquisition interface was developed on a PC in LabVIEW 2013.In a future version, because of the widespread use of mobile phones and tablet PCs, the interface will be extended to Android devices.The data acquired from the temperature, humidity and pressure sensors are represented in graphics on the User Interface (Figure 6).The analyzed gas and the specific gas sensor type have to be selected in the interface.

The Calibration Procedure of the MQ5 Sensor
Calibration is the process of obtaining the most accurate sensor data.One of the inherent problems associated with MQ series sensors is that each of these sensors is produced to measure multiple types of gases at the same time.If a sample emits two or more of the gases that the sensor can measure, the results will be inconclusive.To solve this problem, the only thing to do is to know what substance is measured or to use a better, and more expensive, sensor.However, these sensors are sufficient for measuring changes in the concentration of certain gases and to give a useful approximation of the concentration.
The graphs provided by the sensor manufacturer were determined in a controlled atmosphere and calibrated with a few known concentrations of gases.Since it is impossible to have the same conditions in the field calibration as in the laboratory where they were tested, the results will vary from those provided by the manufacturer.

The Calibration Procedure of the MQ5 Sensor
Calibration is the process of obtaining the most accurate sensor data.One of the inherent problems associated with MQ series sensors is that each of these sensors is produced to measure multiple types of gases at the same time.If a sample emits two or more of the gases that the sensor can measure, the results will be inconclusive.To solve this problem, the only thing to do is to know what substance is measured or to use a better, and more expensive, sensor.However, these sensors are sufficient for measuring changes in the concentration of certain gases and to give a useful approximation of the concentration.
The graphs provided by the sensor manufacturer were determined in a controlled atmosphere and calibrated with a few known concentrations of gases.Since it is impossible to have the same conditions in the field calibration as in the laboratory where they were tested, the results will vary from those provided by the manufacturer.
According to [30], by placing the sensor in fresh air and knowing the sensor supply voltage V s , the load resistance R L = 20 kΩ and by measuring the voltage V out developed across the load resistance, the clean air sensor resistance parameter R SCA , can be computed using the formula (1): Then the value of the reference sensor resistance, R 0 , corresponding to a concentration of 1000 ppm H 2 in fresh air, can be determined using the following formula (2): where RatioAir is a parameter of each MQ sensor.For MQ5, the RatioAir parameter is (3): We solve the sensor output equation using the nonlinear regression [30]: Symmetry 2019, 11, 374 where R s is the measured internal sensor resistance and ppm is the gas concentration in parts-per-million.R s is computed from the measured output sensor voltage using (7).
For the MQ5 sensor used in the experimental system presented in this article, we obtained the formulas in Table 1.These formulas are introduced into the LabVIEW processing program.
Table 1.The formula obtained for the MQ5 sensor for measuring different gases.

The Automatic Calibration Algorithm
After start-up, the MQ gas sensors require a warm-up period to reach their nominal parameters.During this period the indication of the sensor is incorrect and cannot be used to carry out measurements.For this reason, the program implemented in the experimental system begins with a sensor calibration loop.More exactly, at the start-up of the system, the user must place the circuit in fresh air, and then the program starts sampling the sensor output in a loop, with a sampling period of 60 s, and calculates the difference ∆R 0 between the reference resistance values of the sensor for two successive samples.The calculated difference is then compared with a threshold value of 0.5 Ω.When it meets Condition (8), the program considers the calibration completed and exits the calibration loop.
where n is the index of the current sample value.When the calibration is completed, a virtual LED in the user interface lights up and warns the user to begin the measurements.
The program continues with the execution of the sensor data acquisition and the storage loop.To compute the measured gas concentration, the sensor's reference resistance value, R 0 , obtained in the last iteration of the calibration loop, is replaced in the equations of Table 1 (Figure 7).
The evolution of the sensor's reference resistance value R 0 during the calibration procedure is depicted in Figure 8.
In many practical cases, the degree of accuracy required is not critical, so the calibration procedure described above can be simplified and reduced to a warm-up wait period.In this scenario, the clean air calibration measurement can be eliminated, and the sensor can be inserted from the beginning in the sealed food box.The program will work in the same manner, waiting until the stationary sensor regimen is detected, the only difference being that the value of the reference resistance R 0 in the rest of the program will be a fixed, factory-prescribed value, which will not take into account for the parameter dispersion or ageing of the sensors, thus degrading the accuracy.
where n is the index of the current sample value.
When the calibration is completed, a virtual LED in the user interface lights up and warns the user to begin the measurements.
The program continues with the execution of the sensor data acquisition and the storage loop.To compute the measured gas concentration, the sensor's reference resistance value, R0, obtained in the last iteration of the calibration loop, is replaced in the equations of Table 1 (Figure 7).The evolution of the sensor's reference resistance value R0 during the calibration procedure is depicted in Figure 8.To compute the measured gas concentration, the sensor's reference resistance value, R0, obtained in the last iteration of the calibration loop, is replaced in the equations of Table 1 (Figure 7).The evolution of the sensor's reference resistance value R0 during the calibration procedure is depicted in Figure 8.

Results
This section evaluates the performance of the proposed system for analyzing the selected parameters in a vacuum container.The results obtained with an onion placed in the container are compared against the reference measurement performed with an empty container.The results have been processed in MATLAB.

Reference Measurement: Empty Vacuum Container
After calibration, the sensor module was inserted into the sealed container (Figure 9).The vacuum was obtained using a universal food vacuum pump.Initially, the sensor behavior was tested without any product inside the container.The gas sensor MQ5 was used in the experiment to detect the gases presented in Table 1.Significant changes in the sensor output voltage were observed during the experiment.

Reference Measurement: Empty Vacuum Container
After calibration, the sensor module was inserted into the sealed container (Figure 9).The vacuum was obtained using a universal food vacuum pump.Initially, the sensor behavior was tested without any product inside the container.The gas sensor MQ5 was used in the experiment to detect the gases presented in Table 1.Significant changes in the sensor output voltage were observed during the experiment.When exposed to vacuum, the gas sensor is the most affected, exhibiting a behavior similar to that of the pressure sensor (Figures 10 and 11).The experiment was conducted in a room with an ambient temperature of 29 °C and relative air moisture of 55%.
The following figures show the evolution of the sensor readings in the empty vacuum-sealed container.During the low-pressure period (approx.600 hPa), a significant variation of the temperature can be observed.When exposed to vacuum, the gas sensor is the most affected, exhibiting a behavior similar to that of the pressure sensor (Figures 10 and 11).The experiment was conducted in a room with an ambient temperature of 29 • C and relative air moisture of 55%.
The following figures show the evolution of the sensor readings in the empty vacuum-sealed container.During the low-pressure period (approx.600 hPa), a significant variation of the temperature can be observed.The minimum value of the vacuum pressure inside the container is 610 hPa, a value that falls in the range of low vacuum.
It can be observed that the gas sensor output voltage stays at full scale, 3 V, for the entire vacuum exposure period (Figure 11).This behavior is in accordance with the sensor's operating principle and is determined by the absence of oxygen.The minimum value of the vacuum pressure inside the container is 610 hPa, a value that falls in the range of low vacuum.
It can be observed that the gas sensor output voltage stays at full scale, 3 V, for the entire vacuum exposure period (Figure 11).This behavior is in accordance with the sensor's operating principle and is determined by the absence of oxygen.The minimum value of the vacuum pressure inside the container is 610 hPa, a value that falls in the range of low vacuum.
It can be observed that the gas sensor output voltage stays at full scale, 3 V, for the entire vacuum exposure period (Figure 11).This behavior is in accordance with the sensor's operating principle and is determined by the absence of oxygen.All the data acquired from the sensors is recorded in an Excel spreadsheet structured like the fragment in Table 2.

Onion Sample in the Vacuum Container
The choice for onion (Allium cepa) as a test sample was determined by the fact that many of the foods intended for vacuum preservation contain this vegetable.Also, onion slices can be dried under vacuum for increasing the product storage quality [31,32].
Several factors affect the quality of the stored onions: the type of onion, the temperature of the treatment, storage conditions (e.g., the relative humidity, temperature and gas composition) and the storage time.Vacuum dehydration of food is a common method applied in the food preservation industry.The onion slices used in our experiment had a width of 3 cm.
It is known that cutting the onion produces an irritating gas, because it contains a volatile sulfuric compound called "lachrymator" (syn-Propanethial-S-oxide).This compound is formed by the action of the enzyme alliinase.
In the case of the onion-filled container, the behavior of the product in normal temperature conditions was tested in order to observe and compare the behavior of the sensors with the reference measurements presented above.The signals presented in the figures below show the monitored values during the process of air extraction which takes 6600 s, and after it for about 3.5 h.
Symmetry 2019, 11, 374 13 of 18 Also, in order to accelerate the decaying process, the slices used for the vacuum drying experiments suffered no additional pretreatment.
Significant differences between this experiment and the reference measurement have been observed.In the onion experiment the MQ5 gas sensor output presented large fluctuations during the first 2 h after being introduced in the vacuum container.After this transitory period, its output stabilized at around 1 V (Figure 12).In the reference experiment, the gas sensor output quickly jumped to the full scale value of 3 V.By comparing the sensor voltage output with the datasheet graphs for the particular temperature, humidity and pressure conditions indicated in the experiment, the MQ5 sensor seems to be measuring CO and alcohol, both volatile organic compounds specific to onion decay.The kinetics of gases and flavor concentration variation during food drying has been an important area of research.It should be noted that the voltage remains nearly constant during the conservation of the onions, after the end of the transitory period, the output voltage exhibiting a standard deviation of only 0.1391 V.The sensor measures the concentration of the gases emitted from the decaying onion.After the first 6600 s corresponding to the air extraction process the behavior of the onion gas vapors in the vacuum sealed box can be observed.The voltage output of the sensor is 2 V less than the empty container reference value, indicating the presence of volatile compounds.
The gas sensor reacts with the VOCs (Volatile Organic Compounds) on the basis of specific compounds response and outputs a voltage signal, which could be further processed and analyzed to generate information.
VOCs are produced and released from plants during the enzymatic and non-enzymatic processes after maturing, injury to the plant tissues, respiration or anaerobic microbial infections.Injuries inflicted on the plants by animals or humans increase the emissions of VOCs (in the case of onions, VOCs are emitted in the cutting process).
Several post-harvest factors, like temperature, storage time, injuries and pathogen infections, influence the VOC emissions from plants in terms of composition and emission rate.
VOCs may be produced from fatty acids, amino acids, carbohydrates and several secondary metabolites.The smell of onions is produced by typical VOCs released after the degradation of the enzymatic precursors S-alk(en)yl-L-cysteine sulphoxides like 1-propanethiol, thiosulfinates, thiosulfonates, mono-, di-, tri-, and tetra-sulfides; and the lachrymatory factor, thiopropanal-S-oxide.
The aldehydes contained in the onion, such as hexanal, are produced by the degradation of αlinolenic acid, which is likely to be released from the onion cell membranes.The literature states that the 1-propanethiol is a typical volatile alcohol delivered from the onion and the acetone emissions from a healthy onion decrease during storage [33,34].
In our situation, during the vacuum exposure, the plant tissue constituents of the onion slices were consumed steadily through breathing, resulting in smaller quantities of undercoats available for VOC emissions.This is the reason the gas sensor produced a value 2 V lower than the reference case with an empty container.It should be noted that the voltage remains nearly constant during the conservation of the onions, after the end of the transitory period, the output voltage exhibiting a standard deviation of only 0.1391 V.The sensor measures the concentration of the gases emitted from the decaying onion.After the first 6600 s corresponding to the air extraction process the behavior of the onion gas vapors in the vacuum sealed box can be observed.The voltage output of the sensor is 2 V less than the empty container reference value, indicating the presence of volatile compounds.
The gas sensor reacts with the VOCs (Volatile Organic Compounds) on the basis of specific compounds response and outputs a voltage signal, which could be further processed and analyzed to generate information.
VOCs are produced and released from plants during the enzymatic and non-enzymatic processes after maturing, injury to the plant tissues, respiration or anaerobic microbial infections.Injuries inflicted on the plants by animals or humans increase the emissions of VOCs (in the case of onions, VOCs are emitted in the cutting process).
Several post-harvest factors, like temperature, storage time, injuries and pathogen infections, influence the VOC emissions from plants in terms of composition and emission rate.
VOCs may be produced from fatty acids, amino acids, carbohydrates and several secondary metabolites.The smell of onions is produced by typical VOCs released after the degradation of the enzymatic precursors S-alk(en)yl-L-cysteine sulphoxides like 1-propanethiol, thiosulfinates, thiosulfonates, mono-, di-, tri-, and tetra-sulfides; and the lachrymatory factor, thiopropanal-S-oxide.
The aldehydes contained in the onion, such as hexanal, are produced by the degradation of α-linolenic acid, which is likely to be released from the onion cell membranes.The literature states that the 1-propanethiol is a typical volatile alcohol delivered from the onion and the acetone emissions from a healthy onion decrease during storage [33,34].In our situation, during the vacuum exposure, the plant tissue constituents of the onion slices were consumed steadily through breathing, resulting in smaller quantities of undercoats available for VOC emissions.This is the reason the gas sensor produced a value 2 V lower than the reference case with an empty container.
Respiration rate is linked to metabolic activity, and therefore, to the onion storage conditions.Through the process of air suction, the respiration rate of the onion gradually decreased due to the reduction of metabolic activity of the onion and the exhaustion of oxygen in the container.
The literature mentions that temperature and humidity factors have a major impact on the development of onion diseases during the storage period [31].It is recommended that the storage temperature be close to or even slightly lower than freezing point in order to reduce the metabolic activities of the onion and the proliferation of pathogens [33].
The low pressure from the vacuum enclosure makes it possible to maintain a temperature lower than the optimum required by the alliinase enzyme to work, helping to reduce the metabolic activity of the onion.
The standard deviation of the measured pressure value after pressure stabilization is 5.4790 hPa, indicating the absence of the onion's metabolic processes (Figure 13).The low pressure from the vacuum enclosure makes it possible to maintain a temperature lower than the optimum required by the alliinase enzyme to work, helping to reduce the metabolic activity of the onion.
The standard deviation of the measured pressure value after pressure stabilization is 5.4790 hPa, indicating the absence of the onion's metabolic processes (Figure 13).From the pressure graph depicted in Figure 13, it can be stated that the lowest pressure in the reference empty vacuum container was approximately equal to the lowest pressure in the onion-filled vacuum container (between 500 hPa and 600 hPa).Similar to the gas sensor measurements, the pressure has steep fluctuations during the air removal process, which taxes 6600 s.Afterwards, the pressure evolution inside the sealed onion filled box is depicted (Figure 13b).
The production and release of VOCs from plant tissue are also affected by the temperature.The production rate of VOCs from the onion is linked to the enzymatic activity, which in turn depends on the temperature.The enzymes usually have a suitable temperature range, in which the enzymatic activity increases up to an optimum level.
The alliinase enzyme activity increases with the temperature up to an optimal value of 40 °C, and then decreases.At the same time, the enzymatic activities depend according to the biological status of the plant tissue.
Our experimental study maintained the onion samples at an ambient temperature of approximately 27 °C.In this situation, the activities of the onion enzymatic compounds tend to reach the optimal condition; as such, there is an observable increase in the thermal state of the container (Figure 14a).
Considering that the voltage output of the MQ5 sensor stabilizes, it can be said that the vacuum in the food container slows down the degradation of the onion (Figure 14b).Although the temperature is greater than the usual food storage value, the onion reached a "point of equilibrium".From the pressure graph depicted in Figure 13, it can be stated that the lowest pressure in the reference empty vacuum container was approximately equal to the lowest pressure in the onion-filled vacuum container (between 500 hPa and 600 hPa).Similar to the gas sensor measurements, the pressure has steep fluctuations during the air removal process, which taxes 6600 s.Afterwards, the pressure evolution inside the sealed onion filled box is depicted (Figure 13b).
The production and release of VOCs from plant tissue are also affected by the temperature.The production rate of VOCs from the onion is linked to the enzymatic activity, which in turn depends on the temperature.The enzymes usually have a suitable temperature range, in which the enzymatic activity increases up to an optimum level.
The alliinase enzyme activity increases with the temperature up to an optimal value of 40 • C, and then decreases.At the same time, the enzymatic activities depend according to the biological status of the plant tissue.
Our experimental study maintained the onion samples at an ambient temperature of approximately 27 • C. In this situation, the activities of the onion enzymatic compounds tend to reach the optimal condition; as such, there is an observable increase in the thermal state of the container (Figure 14a).
Considering that the voltage output of the MQ5 sensor stabilizes, it can be said that the vacuum in the food container slows down the degradation of the onion (Figure 14b).Although the temperature is greater than the usual food storage value, the onion reached a "point of equilibrium".approximately 27 °C.In this situation, the activities of the onion enzymatic compounds tend to reach the optimal condition; as such, there is an observable increase in the thermal state of the container (Figure 14a).
Considering that the voltage output of the MQ5 sensor stabilizes, it can be said that the vacuum in the food container slows down the degradation of the onion (Figure 14b).Although the temperature is greater than the usual food storage value, the onion reached a "point of equilibrium".The temperature difference relative to the reference experiment is approximately 5 • C. The standard deviation of the container temperature after stabilization is 0.4969 • C.
The relative humidity in the empty container is approximately constant (Figure 13a).The humidity increases by approx.30% of the initial value in the onion filled container, which shows that the onion produces vapors.The standard deviation of the relative humidity after the stabilization of the onion is 5.6596%, indicating a continuation of the production of vapors.The humidity presents a fast increase rate at the beginning of the stable period determined by the emission of water vapors from the onion tissues, followed by a saturation period indicating that an equilibrium state has been reached (Figure 15b).The temperature difference relative to the reference experiment is approximately 5 °C.The standard deviation of the container temperature after stabilization is 0.4969 °C.
The relative humidity in the empty container is approximately constant (Figure 13a).The humidity increases by approx.30% of the initial value in the onion filled container, which shows that the onion produces vapors.The standard deviation of the relative humidity after the stabilization of the onion is 5.6596%, indicating a continuation of the production of vapors.The humidity presents a fast increase rate at the beginning of the stable period determined by the emission of water vapors from the onion tissues, followed by a saturation period indicating that an equilibrium state has been reached (Figure 15b).The values given by the sensors vary due to the reactions of the onion in the vacuum pump.It should be noted that all values stabilized at the same time, indicating that the food had entered into the preservation state.

Conclusions
The aging population is a phenomenon occurring not only in Europe, but also on the other continents [35].Also, according to the World Health Organization, from a medical point of view, age is associated with many diseases for which there are no effective treatments.However, the same study, showing that the aging population is associated with the increase in the prevalence of the diseases and specific related symptoms, indicates that all these could be delayed by the adoption of a healthy lifestyle.In this context, our study contributes to increase the quality of life, through the use of intelligent sensor networks to warn the aged individuals when a food expires, or when certain properties of the food packaging are altered.In this article, we presented a portable system for monitoring vacuum packed foods.The reference parameters measured in the empty container were almost constant.Then we analyzed the behavior of 3 cm width onion slices in vacuum during 5 h, at The values given by the sensors vary due to the reactions of the onion in the vacuum pump.It should be noted that all values stabilized at the same time, indicating that the food had entered into the preservation state.

Conclusions
The aging population is a phenomenon occurring not only in Europe, but also on the other continents [35].Also, according to the World Health Organization, from a medical point of view, age is associated with many diseases for which there are no effective treatments.However, the same study, showing that the aging population is associated with the increase in the prevalence of the diseases and specific related symptoms, indicates that all these could be delayed by the adoption of a healthy lifestyle.In this context, our study contributes to increase the quality of life, through the use of intelligent sensor networks to warn the aged individuals when a food expires, or when certain properties of the food packaging are altered.In this article, we presented a portable system for monitoring vacuum packed foods.The reference parameters measured in the empty container were almost constant.Then we analyzed the behavior of 3 cm width onion slices in vacuum during 5 h, at room temperature.We chose to test the onion because it is a very common food ingredient and is very sensitive to storage conditions.
The results indicated that the low-cost MQ5gas sensors were strongly influenced by the onion's emissions.Through vacuum processing, the onion's respiration rate gradually decreased due to the reduction of its metabolic activities and the depletion of oxygen in the enclosure.The most important compound detected in the onion emissions is alcohol.The vacuum pressure in the container, after a transient period, stabilized (5.48 hPa standard deviation at 600 hPa mean).Moisture initially showed an increase due to the emission of water from the plant tissue, followed by a steady state (5.66% standard deviation at 75% mean).In the literature, the most studied parameter in food package monitoring is the temperature [35,36].In our experiment, in the case of onion, alliinase enzyme activity increases with the temperature and shows an optimum at 40 • C. Our experimental study was based on maintaining the samples at an ambient temperature of about 27 • C. In this situation, the enzyme activity of the onions tends to reach the optimum state; as such a gradual thermal growth can be detected in the container due to the exothermic reaction of alliinase.
The experimental results showed that by maintaining very low moisture content and limiting the injuries that accelerate oxidative degradation, the onion slices dried under vacuum can be kept for a longer period of time compared with conventional drying.The chances of contamination of the product are minimized, because the whole process takes place in a closed chamber.In future works, additional experimental data must be collected in order to improve the system performance, and the detection system under development will be tested for refrigerated vacuum-packed foods.This system will be miniaturized and will help elderly and disabled persons by alarming them if the food starts deteriorating.An option for connecting the smartphone with the monitoring system will further simplify the process of monitoring the state of stored food.

Figure 1 .
Figure 1.Model of the Internet of Things and its functionalities.

-
To remove unwanted compounds -To add desired component(s) -To prevent micro-organisms proliferation -To create good conditions for conservation -To increase the productivity

Figure 1 .
Figure 1.Model of the Internet of Things and its functionalities.
The main objectives of active packaging are: -To remove unwanted compounds -To add desired component(s) -To prevent micro-organisms proliferation -To create good conditions for conservation -To increase the productivity

Figure 3 .
Figure 3. Block diagram of the vacuum-packed product monitoring system consisting of two modules: the data acquisition module and the man-machine interface.

Figure 3 .
Figure 3. Block diagram of the vacuum-packed product monitoring system consisting of two modules: the data acquisition module and the man-machine interface.

-
Interfacing the Arduino board with the Xbee wireless module is done through an Xbee Shield adapter.With XBee, the Arduino can transmit data to remote devices hundreds of meters away.Digi XBee 802.15.4 RF modules are ideal for applications requiring low latency and predictable communication time.-Thesensor data acquisition card is an ARDUINO Mega 2560, easily programmable within an open-source environment.

Figure 5 .
Figure 5.The acquisition system with the controller section inserted in an insulated protective box.

Figure 5 .
Figure 5.The acquisition system with the controller section inserted in an insulated protective box.

Figure 6 .
Figure 6.User interface for the proposed system.

Figure 6 .
Figure 6.User interface for the proposed system.

Figure 8 .
Figure 8. Evolution of the calculated reference sensor resistance during calibration.

Figure 8 .
Figure 8. Evolution of the calculated reference sensor resistance during calibration.Figure 8. Evolution of the calculated reference sensor resistance during calibration.

Figure 8 .
Figure 8. Evolution of the calculated reference sensor resistance during calibration.Figure 8. Evolution of the calculated reference sensor resistance during calibration.

17 Figure 10 .
Figure 10.Humidity and pressure in the empty vacuum container.

Figure 10 .
Figure 10.Humidity and pressure in the empty vacuum container.

Figure 10 .
Figure 10.Humidity and pressure in the empty vacuum container.

Figure 11 .
Figure 11.variation of the MQ5 gas sensor's output voltage in vacuum.Figure 11.Variation of the MQ5 gas sensor's output voltage in vacuum.

Figure 11 .
Figure 11.variation of the MQ5 gas sensor's output voltage in vacuum.Figure 11.Variation of the MQ5 gas sensor's output voltage in vacuum.

Figure 12 .
Figure 12.Sensor output voltage for the onion-filled vacuum container.

Figure 13 .
Figure 13.The pressure in the sealed box, during and after the process of air removal (a); after the air removal only (b).

Figure 13 .
Figure 13.The pressure in the sealed box, during and after the process of air removal (a); after the air removal only (b).

Figure 14 .
Figure 14.The temperature inside the sealed box, during and after the process of air removal (a); only after the air removal (b).

Symmetry 2019 , 17 Figure 14 .
Figure 14.The temperature inside the sealed box, during and after the process of air removal (a); only after the air removal (b).

Figure 15 .
Figure 15.The humidity inside the sealed box, during and after the process of air removal (a); after the air removal only (b).

Figure 15 .
Figure 15.The humidity inside the sealed box, during and after the process of air removal (a); after the air removal only (b).

Table 2 .
Example of the Excel spreadsheet containing the values recorded by the sensors.