0% found this document useful (0 votes)
130 views23 pages

2021CPE005 Marasigan Mercado Rivera

This document describes a capstone project that developed an electronic food nose system using IoT to monitor food quality, specifically for tilapia fish. Tilapia is a popular fish in the Philippines but can spoil quickly, releasing harmful gases. The system uses MQ series sensors to detect gases indicating spoilage from temperature, humidity, and other factors. This allows determining which tilapia is freshest to prevent consumption of rotten fish and reduce food waste and greenhouse gas emissions. The goal is to help cafeteria owners serve only high-quality, fresh tilapia to customers.

Uploaded by

thanatos mercado
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
130 views23 pages

2021CPE005 Marasigan Mercado Rivera

This document describes a capstone project that developed an electronic food nose system using IoT to monitor food quality, specifically for tilapia fish. Tilapia is a popular fish in the Philippines but can spoil quickly, releasing harmful gases. The system uses MQ series sensors to detect gases indicating spoilage from temperature, humidity, and other factors. This allows determining which tilapia is freshest to prevent consumption of rotten fish and reduce food waste and greenhouse gas emissions. The goal is to help cafeteria owners serve only high-quality, fresh tilapia to customers.

Uploaded by

thanatos mercado
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 23

MAPÚA INSTITUTE OF TECHNOLOGY AT LAGUNA

Academic Year 2021 - 2022

ELECTRONIC FOOD NOSE: AN IOT-BASED FOOD

QUALITY MONITORING SYSTEM

Jose Antonio Cruzada MARASIGAN


Nathaniel Paulo Pesigan MERCADO
Laurence Gangay RIVERA

Capstone Project Adviser: Engr. Maribelle D. Pabiania

Submitted to the Faculty of Malayan Colleges Laguna


in partial fulfilment of the requirements for the degree of

Bachelor of Science in Computer Engineering


Introduction

Food products are an essential component that living beings need to gain enough

energy for their day-to-day activities and responsibilities. The human body uses energy

which is needed for all of the functions it needs to accomplish and food is the primary

source of energy (Fortis, A., 2018). When physical activity is required, the body utilizes

the calories that are obtained from food products through a three-part energy system.

Activities that require high-intensity energy access the anaerobic systems and mainly

gather energy from carbohydrates. Aerobic activities on the other hand utilizes fat with

moderate use of protein and carbohydrate energy (Lo, P., n.d.).

Fishes are one of the healthiest foods a human being can consume. It is filled

with the necessary nutrients that a person needs such as vitamin D, protein, iodine, and

omega-3 acids which are all important in maintaining a healthy and well-functioning

brain and body. Vitamin D controls the absorption of phosphorus, calcium, and it also

helps in facilitating the immune system functions (Wilson, D., 2020). In addition, protein

is a nutrient that aids the body in building and repairing tissues and cells. It takes part in

every cell inside the human body such as the bone, hair, skin, nails, and muscle (Brazier,

Y., 2020). Furthermore, iodine is a type of mineral that is essential in making sure that

the thyroid functions appropriately. Thyroid hormones greatly affect the body activities

such as immune response, bone health, metabolism, and the further development of the

central nervous system (Ware, M., 2017). Another health benefit that can be obtained

from eating fishes is that it can help lower the risk of having strokes and heart attacks due

to the omega-3 acid content which is a common nutrient especially for the fatty types of

fishes (Leech, J., 2019).


As the Philippines is known for being an archipelago, it is indeed a fact that

there are many food products that can be obtained from the bodies of water around it. As

stated by the Philippine Statistics Authority (“Fisheries Statistics of the Philippines”,

2020), the production of fisheries in the country reached 4,415,001.68 metric tons during

the year 2019. Among the said number of metric tons obtained from the total fish

production, 279,385.87 metric tons were from aquaculture production of the tilapia fish

while 41,801.92 metric tons came from inland municipal fisheries. This equates to almost

7.27% of tilapia fish procured from the total fish production within the country.

According to the Food and Agriculture Organization of the United Nations (“Improving

Productivity of Tilapia Farmers in the Philippines”, 2017), the tilapia fish is the most

consumed type of fish in the Philippines. The statistical data of tilapia consumption per

person is around 4.6 kilograms.


Background of the Study

Checking the odor is one of the best ways to tell whether the food has gone bad.

Having an odor in the food usually means the spoilage of microbes such as bacteria, mold

and yeasts. Odors can come from two sources: chemicals that are released from the food as

microbes decompose it, or chemicals produced directly by the microbes themselves

(Bendabdellah et al., 2016).

The smell of the food we intake is also something that we must consider in the food

monitoring system. Having a sensor that can detect the methane, isobutane, hydrogen gas,

carbon monoxide, ammonia and other harmful gases that are present in food that is subpar

in quality is important. Having these chemicals present can lead to the indication that the

food is beginning to rot or already rotten. Since odor is one of the ways we enjoy food,

being able to eat fruits, vegetables, meat and fish when it smells pleasant is important in

monitoring food quality.

Temperature is also an indicator in relation to food spoilage. Having temperature

fluctuations and extremities provide a very strong impact on storability of food. With

temperature fluctuations occurring during home transport, refrigeration, and factory

packaging. A particular threat in major food product types is also present during

refrigeration, since the relevant temperature range is between 4 and 12 °C, which is an

ideal range for growing some bacteria and fungi (Yousefi et al., 2019).

Humidity is a factor that is important when storing, preserving the condition and

texture of the food. The influence of the humidity level is highly important in diverse areas

of the food industry, from dairy, meat, fish, to dried food (Yousefi et al., 2019). This

correlates to temperature, as extreme fluctuations of temperature happen, humidity can


then accumulate inside the food or the packaging. Humidity is a key indicator that should

always be measured when talking about food monitoring as this provides an excellent

growing environment for the microbes and bacteria. With the increase in humidity, a

shorter shelf life of the food is expected to occur.

Microcontrollers are a very popular tool for projects, they can be attached to the

main board, there are well documented tutorials, a very large community and a huge code

library. Creating the system using a microcontroller can offer cheaper means for consumers

to reduce their food spoilage and have a better way of determining whether the food is safe

for consumption or not. The functions of a microcontroller takes care of all the

implementation and configuration details that are required to run a program and translate

all these tasks to a simple program command (Martinez-Santos et al., 2017).

Statement of the Problem


According to Karen Hill (2020, May) fish are faster to decompose than terrestrial

animals, because they are built to function in cold water and cold seas. Cold water also

provides fish with highly unsaturated fats. Because of their irregular structure, such fats are

fluid and physiologically beneficial at low temperatures, but they are also more vulnerable

to oxygen attack, which accelerates spoilage. Fishes that are dead for a very long time and

consumed are very dangerous to human health. They can attract bacteria, parasites and

disease that can make a human extremely sick and it can even cause death. A decomposing

fish releases large volumes of ammonia.

According to an article entitled, Food Loss and Waste in Fish Value Chains (FAO,

2021) the food waste and loss contributed to the greenhouse gas (GHG) emissions that are

man-made by approximately 8%. Fish waste that is left to rot and abandon in the landfill

will cause methane gas that contributes to GHG emissions. Methane is a gas that is 25

times more powerful than CO2 in terms of contributing to global warming. According to

an article entitled, Development of Machine Learning & Edge IoT Based Non-destructive

Food Quality Monitoring System using Raspberry Pi (Sahu, B.; Tiwari, A.; Raheja, J.L.;

Kumar, S., 2020) Food rotting is one of the world's most serious problems. It not only has

an impact on every country's economy, but it also has an impact on the environment and is

possibly accountable for the greenhouse effect. Fish that rottens releases Ammonia and

methane, ammonia is colorless, and highly irritating gas with a suffocating odor while

methane is colorless and odorless but flammable. Certain gases like ammonia, and methane

from spoiled or decaying fish can lead to greenhouse effect. Fish that is consumed fresh

has so many benefits like omega fatty acids and minerals.

According to the Washington State Depart of Health (Health Benefits of Fish, n.d),
almost all of Fish contains omega-3 fatty acids and vitamins like D and B2. They are rich

in calcium and phosphorus, and have a great source of minerals such as iron, iodine, zinc,

magnesium and potassium. According to Health Benefits of Tilapia (WebMD, 2005),

Tilapia is famous for its sweet, mild flavor and flaky texture. The flavor of tilapia varies

significantly depending on the quality of the water and diet. Tilapia is a popular food

source because of its low cost and many health advantages. Tilapia contains vitamins and

minerals such as choline, niacin, selenium, phosphorus, vitamin B12 and D. It is also high

in omega-3 fatty acids, which are essential lipids for your body to operate. In this study,

tilapia fish is our main focus of fish rather than meat.

In order to check whether the tilapia fish is still fresh or not and which tilapia fish

are needed to cook or store first, an IoT monitoring system for food quality should be

implemented so that the tilapia that will be consumed can be checked whether it is still

fresh or not. Freshness and quality of tilapia can be monitored by using MQ series sensors

that inspect humidity, temperature, alcohol gas, methane, isobutane, propane, hydrogen

gas, carbon monoxide, ammonia, and benzene. By using MQ series sensors that can inspect

the freshness and quality of tilapia, it will prevent the consumption of double dead fish and

from getting sick. This study aims to check whether the tilapia that the cafeteria owners

will serve to their customers is fresh and of high quality, not double dead, which tilapia fish

to cook or store first and if the tilapia is edible and not.

This paper aims to answer the following research questions:

1. Are the tilapia fish safe for consumption after monitoring the parameters of humidity,

temperature, alcohol gas, methane, isobutane, propane, hydrogen gas, carbon monoxide,

ammonia, and benzene?


2. Does the electric food nose successfully monitor the quality of tilapia fish and receive

the data through IoT?

3. Does the program successfully measure all the variables needed to know whether which

tilapia fish is fresh or not?

Rationale for the research project

This study will benefit individual cafeteria owners who do not want to serve spoiled

tilapia fish and food waste. Fish plays a major role in our body. It gives nutrients that

most people need. It contains high-quality protein, minerals (iron, iodine, zinc,

magnesium and potassium), and omega-3 fatty acids. These are the nutrients that allow

the human body and brain to function properly, it also helps to reduce the risk of getting

diseases.Food waste may contribute to greenhouse gases.

This study will use MQ gas, temperature, and humidity sensors, as well as

microcontroller-based data gathering to output the temperature and humidity readings as

serial data using the WIFI module that may help the society and academic institution in

creating and developing other applications similar to our study.

The importance of the study will show the cafeteria owners the datas that will be

collected from the specific parameters such as humidity, temperature, alcohol gas,

methane, isobutane, propane, hydrogen gas, carbon monoxide, ammonia, and benzene.

Definition of terms
1. Food Monitoring System - A system that enables the user to monitor food

products with a given set of parameters to determine if the food is consumable

or not.

2. Sensor - A device that measures a set of criteria coming from its environment

and translates the data received to a computer device for data analysis.

3. Internet of Things - A network of physical devices interconnected to the digital

world through the use of sensors, programs, and other similar technologies used

in data transmission.

4. Microcontroller - An integrated circuit designed to operate a specific task of an

embedded application.

5. Arduino IDE - A type of software wherein the user inputs the computer

program for the functionality of the device.

Significance of the Study

The study will help the cafeteria owners to prevent the spoilage of the tilapia fish, it

will help them to determine which tilapia fish to cook or store first.

The benefit of the system is to help cafeteria owners to prevent them from serving
spoiled fish. The design may also inspire households to use its gas sensors for checking

whether the tilapia fish is spoiled or not after storing or buying from the market.

The future user can help to prevent the consumption of tilapia fish spoilage, food

waste and contributing to greenhouse gases.

The market can also benefit from the study if their customers want to know whether

the tilapia fish that they want to buy are fresh or not.
Objectives of the Study

The study focuses on developing an IoT monitoring system for food quality using

a 6 sensor array and a microcontroller. The monitoring system is used to prevent food

spoilage. Specifically, The study aims to:

1. To determine whether the fish is safe for consumption using the parameters of

humidity, temperature, methane, isobutane, hydrogen gas, carbon monoxide,

and ammonia

2. To create a design that monitors the food quality of the fish and sends its data

through the IoT.

3. To develop a program that is capable of measuring all the required variables

for the system.


Theoretical/Conceptual Framework

The figure below shows the details of the conceptual framework from the study

using input, process and output diagrams that will help in determining whether the tilapia

fish is safe for consumption. People tend to be more observant and careful about the food

they intake.

Following Figure 1.1, Using the food monitoring system, we can therefore reduce

the health risk by monitoring all the parameters to determine whether the tilapia fish is

safe for consumption.

Figure 1.1. Conceptual Framework


Gantt Chart
Scope and Limitation of the Study

The capstone project is centered on the idea of monitoring the quality of tilapia

fish as a food product. The proposed design of the electronic food nose will be used for

tilapia which is bought only in the market. The system would be embedded to an Arduino

UNO R3 board which is then connected with a NodeMCU ESP8266 module that will

serve as the IoT platform of the system. The system would then be used to determine the

Hydrogen gas (H), Carbon Monoxide (CO), Ammonia (NH3), temperature and humidity,

Methane level (CH4), and isobutane HC(CH3)3. This will be done by using a MQ8,

MQ7, MQ137, DHT11, MQ2, and MQ5 sensors respectively. The system will be limited

to obtaining the said parameters to maintain a low-cost yet effective device as cafeteria

owners are the target consumer of the proposed device. The study is limited to testing a

single tilapia fish one at a time to completely process the data obtained which will be

used for the analysis.


Review of Related Literature

Electronic noses (ENs) are instruments based on an array of semi selective gas

sensors and pattern-recognition methods (Falasconi et al., 2012). Electronic food noses

are currently an emerging technology when looking at food quality control, whether for

detecting bacteria, microbes, or overall safety of the food it is becoming an essential

technology for everyone.

Food spoilage has been happening ever since cafeterias, restaurants and

households tend to have leftover food, scraps and spoiled food. The main focus of an

electronic food nose is determining the quality and how fresh the food to be prepared is.

The study done by Falasconi (2012) states that aroma is one of the most significant

factors among the sensory properties of food. The study pointed out that unwanted odor

coming out of uncooked food may include substances originating from the metabolism of

spoilage microorganisms.

Microbial contamination will affect most food consumed. This in turn will affect

the health of the consumer once they begin cooking the spoiled material. Spoiled food

would also have a different taste from a fish that has been caught fresh. Electrical noses

are said to remedy the need for consumers to manually check the fishes they buy from the

market. Current methods of testing that uses different analytical techniques, mass

spectrometry, gas and liquid chromatography, optical spectroscopic techniques and

microbiological cell counting are effective and accurate, but more often than not are

expensive, time consuming and also requires the workers who are proficient in their

respective fields (Zambotti et al., 2019).


Monitoring the quality of food products is a great way to determine if the food is

still consumable or not. Keeping track of the quality of foods can greatly increase the

chance of avoiding food waste cases. The quality of food products that are being

consumed is an important matter for both the food processing industry and the consumers

as well. The factors that can determine the shelf life of food products can be identified

through microorganism count, texture, color, and odor. The environmental factors that

can influence the condition of food products can either be mechanical stress, light,

pressure, humidity, and temperature. The common indicators that are used in determining

the quality of foods involve time-temperature sensors, integrity sensors for leak detection,

and freshness sensors. Among the available parameters that can be utilized, the pH level,

temperature, and humidity have been recognized as the most significant factors that can

affect the quality of foods. These three parameters, when observed and controlled

consistently for a specific food product have evidently shown an increase in shelf life

(Raju et al., 2020).

For humans, some of the foodborne illnesses that can be obtained from eating

toxic, contaminated, and spoiled foods are vomiting, diarrhea, and nausea (Selner, M.,

2019). The duration of the effects of these foodborne illnesses when contaminated food is

consumed can be experienced from a range of one hour to approximately three weeks. It

is dependent on the type of contaminant that caused the illness. However, the average

time it takes for the symptoms to begin is within two to six hours after the contaminated

food is ingested (Morris, S., 2019).

According to the World Wildlife Fund (WWF), there is an estimated amount that
one-third of the food products throughout the entire world are being sent to waste. That

equates to roughly 1.3 billion tons of grains, vegetables, dairy, fruits, meats, and seafoods

that either get spoiled during distribution, unable to leave the farm or the production

area, or are thrown away in schools, restaurants, home kitchens, hotels, and market stores.

The factors that can be taken into consideration when food products are being wasted are

mainly because of managerial, monetary, and technical limitations in storage, packaging,

varying weather conditions, infrastructure, cooling facilities, marketing system, and lack

of proper monitoring (Sahu, Tiwari, Raheja, Kumar, 2020).

Apart from these potential diseases that human beings can obtain from consuming

bad quality of foods, food spoilage can also affect a country’s economic status and also

the environment which can later on be a more serious complication because of the

greenhouse effect. Additionally, the World Wildlife Fund indicated that food wastes are

not just a humanitarian concern but also an environmental one. When food products are

being sent to waste, not only the food itself is being wasted but also the energy and the

resources that were used in the process of production. When food products get rotten, it

can produce methane which is a greenhouse gas that is more potent than carbon dioxide.
In monitoring the necessary parameters of the quality of food products, a device

that can be used in doing so are sensors. Gas sensors offer segregation along with

conciseness, small consumption of power, less response time, a large range of operational

temperature, and high proficiency. MQ series sensors are very good gas sensors having

excellent sensitivity to combustible gas in a wide range (Deepak, G.; Ayush; Ashish;

Aryan; Arpit, 2021).

MQ sensors, such as the MQ-2 It can detect H2, LPG, CH4, CO, Alcohol, Smoke,

and Propane. A measurement may be performed as quickly as necessary because of its

high sensitivity and fast response time. The potentiometer may be used to alter the

sensor's sensitivity (Macfos, 2021).

MQ-5 gas sensors are helpful for detecting gas leaks (in home and industry). It is

appropriate for detecting H2, LPG, CH4, CO, alcohol and natural gasses like isobutane,

propane and butane. Measurements may be performed as quickly as feasible because of

their high sensitivity and quick reaction time. The potentiometer may be used to alter the

sensor's sensitivity (Macfos, 2021).

MQ-7 It detects CO when the temperature is low by using a cycle of high and low

temperatures (heated by 1.5V). The MQ-7 gas sensor is very sensitive to carbon

monoxide. The sensor may be used to detect various gases that include CO; it is

inexpensive and appropriate for a variety of applications (Macfos, 2021).

MQ-8 gas sensors are for determining the concentration of Hydrogen (H2) in the

atmosphere. Capable of measuring concentrations ranging from 100 to 10,000 ppm.

Heater drive and measurement circuits are simple to construct. This sensor is built for
extended life and consistent output. MQ-8 Hydrogen Gas Sensor is excellent for

detecting gas leaks in a Gas Leakage Circuit (Macfos, 2021).

The MQ-137 Gas sensor detects and measures gases such as ammonia (NH3) and

carbon monoxide (CO). The module version of this sensor has a Digital Pin, which

allows it to function without a microcontroller, which is useful when just attempting to

detect a single gas (Macfos, 2021). The DHT11 is a popular temperature and humidity

sensor that includes a dedicated NTC to detect temperature and an 8-bit microprocessor

to output temperature and humidity readings as serial data. The sensor is factory

calibrated as well, making it simple to connect with other microcontrollers. The sensor

can detect temperature from 0°C to 50°C and humidity from 20% to 90% with an

accuracy of 1°C and 1%, respectively.

The MQ sensors, temperature, and humidity mentioned will help this paper to

measure the following: MQ-2 gas sensor for monitoring methane. MQ-5 gas sensor is

good for monitoring isobutane. It also has a fast response time so its measurement can be

taken as fast as possible. MQ-7 gas sensors will help this study to monitor Carbon

Monoxide that tilapia fish release when it starts to spoil. MQ-8 gas sensor is good for

monitoring hydrogen gas in the air, its benefits is it has long life and its outputs are

stable. The MQ-137 gas sensor mainly focused on ammonia, fish that rottens and releases

ammonia so it will be a great addition of gas sensors in this study. The DHT11 is good

for monitoring and getting the output of temperature and humidity.


In the case of programming languages, C++ programming is a general purpose

language that is very flexible on what it can and cannot do. It is a language that gives

programmers the ability to have a high level of control over system resources and

memory. Stated by (Kormanyos, 2018) C++ programming depends on how complicated

and how easy it was written to influence the compiler on how it generates the assembly

code and, ultimately, which machine-level opcodes are placed in the executable.

The use of C++ class libraries will provide a framework for the system modelling

and enhancement in implementation. Since the C++ language is a cross platform

language that is used in creating high-performance applications and is also used in

modern technology. Understanding more about the programming language that will be

utilized in the study will provide ideas in completing the programming required. The

study also states that the usage of STL is recommended since its authors have optimized

it for specific characteristics into its utmost potential. One can be certain that the library

the developers created is using naming conventions that is recognized by the compiler

easily. Comments are also mentioned in the study and not in the way we are all thinking.

It stated that comments should be used sparingly since a program is always evolving

when being developed by the programmer. Long comments tend to get in the way of

coding efficiently and can also obscure the clarity of the programmer. A quote stated by

the study says “if the code and the comment disagree, then they are probably both

wrong” Norm Schryer (attributed, Bentley, 1988). Of course, it did not really say that

writing any kind of comment is bad for the program, but using comments sparingly and

efficiently should be done. Explaining details about how the loop goes or how a complex

section works is acceptable.


In order to integrate the programming concept to an embedded system, the use of

microcontrollers in the current generation have been very influential especially in cases

of projects with relation to programming and electronics. A microcontroller is a type of

integrated circuit which has a purpose of having the authority to control sections of an

electronic system through the use of serial communication controllers, digital to analog

converters (DAC), analog to digital converters (ADC), microprocessor unit (MPU),

clock, system bus, and memory (Keim, R., 2019). These peripherals are what completes

the structure of a microcontroller. The process of how microcontrollers work is that it is

embedded to a system in order to execute an exclusive task of the device. This process is

done by interpreting the data that has been received from the input and output peripherals

through the use of the Central Processing Unit (Lutkevich, B., 2019).

In relation to microcontrollers, Arduino specifies a platform that is publicly

accessible which can be utilized by everyone for creating and programming electronic

devices. It has the capability to send and receive information to and from electronic

devices and can also execute this process by using the internet (Badamasi, Y., 2014). The

software that is being used throughout the Arduino projects is known as the Integrated

Development Environment (IDE) is free and can be obtained from the website

www.arduino.cc. This Integrated Development Environment is based on the Processing

language and it uses a simplified version of the C++ language (Banzi et al., 2014).

An Arduino UNO board uses a minimum of five (5) volts to operate and can

withstand a maximum of twenty (20) volts. In cases where a higher value of voltage has

been supplied to the board, a voltage regulator can be used which is positioned between
the Universal Serial Bus (USB) connector and the power port. This Arduino UNO board

uses an Atmega328P microcontroller and the components that make up the Atmega328P

are the flash memory which has a storage of 32 Kilobytes wherein the program that is

received from the Arduino IDE is being stored, Random Access Memory which is used

for being a runtime memory, and the Central Processing Unit which takes the authority in

controlling all the activities that goes on throughout the entire device (Badami, V., 2016).

The internet of things, or IoT, is a network of interconnected computing devices,

mechanical and digital machinery, items, animals, or people that have unique identities

(UIDs) and the capacity to transmit data over a network without the need for human-to-

human or human-to-computer contact. According to an article entitled IoT-Based Mobile

Applications and Their Impact on User Experience (2019, November), IoT is an object

that is assigned an IP address and has the ability to fetch, and send data over a network

without any human intervention. It does not need any human intervention because it

enables devices to observe, understand and analyze situations or surroundings.

According to Gillis, A. S. (2020, February 11) in an article entitled “What is

IOT(internet of things) and how does it work?”, An IoT ecosystem is made up of web-

enabled smart devices that utilize embedded systems including processors, sensors, and

communication hardware to gather, transmit, and act on data from their surroundings. IoT

devices exchange sensor data by connecting to an IoT gateway or other edge device,

where data is either transmitted to the cloud for analysis or processed locally. These

gadgets sometimes interact with other related devices and act on the information they

receive from one another. The gadgets perform the majority of the work without human

involvement, but humans may engage with them to set them up, give them instructions,
or retrieve the data.

You might also like