SUGISAKAMASANORI

Journal of Advances in Artificial Life Robotics
Vol. 4(3); December (2023), pp. 128–132
ON LINE ISSN 2435-8061; ISSN-L 2435-8061
https://alife-robotics.org/jallr.html

Research Article

Automated Food Quality Checking System
Ashraf Ali Jamal Deen1, Thivagar Chettiar Sarawanan1, Heshalini Rajagopal2, Madam Devika Sethu1,
Norrima Binti Mokhtar3, Neesha Jothi2
Department of Electrical and Electronic Engineering, Manipal International University, Malaysia
Institute of Computer Science and Digital Innovation, UCSI University, 56000 Kuala Lumpur, Malaysia
3
Department of Electrical Engineering, Faculty of Engineering, University of Malaya, 50603 Kuala Lumpur, Malaysia
12ARTICLE INFO
Article History
Received 06 August 2022
Accepted 25 August 2023
Keywords
Food quality
Quality checking
Internet of things (IoT)
Sensors

ABSTRACT

Ensuring food safety, hygiene, and health is crucial in tackling the issue of food wastage.
Preserving the high quality of food necessitates vigilant checking and safeguarding against
deterioration caused by environmental factors such as temperature, humidity, and light. This
research aims to develop a comparable tool for checking food quality, specifically focusing onenvironmental aspects like temperature, humidity, alcohol content, and light exposure for
perishable items like fruits and vegetables. The system is constructed using an Arduino UNO
microcontroller, which interfaces with various sensors like DHT-22 to track temperature andhumidity, MQ3 to detect alcohol levels, and LDR to measure light exposure. The collected sensor
data is transmitted to an IoT platform through an ESP8266 Wi-Fi Module. This IoT system serves
to log and monitor the sensor data, enabling remote and real-time oversight of food storage
conditions from any location and at any time.

© 2022 The Author. Published by Sugisaka Masanori at ALife Robotics Corporation Ltd.
This is an open access article distributed under the CC BY-NC 4.0 license(http://creativecommons.org/licenses/by-nc/4.0/).

aids consumers in determining the freshness and qualityof food. This study presents a proposed food quality
checking system. Previous research in this domain has
been conducted. B. Yu et al. (2020) introduced achecking system that integrated smart contracts andevaluation models for automatically assessing the qualityof fruit juice samples at each production stage [4]. A.
Popa et al. (2019) proposed a food quality checking
system for vegetables stored in vacuum-packed
containers [5]. Young et al. (2018) has proposed two
CNNs based models for different tasks: visibility
estimation and recognizing Korean dishes from camera
images in real-time [6]. However, this work only
recognized various Korean dishes and not the quality of
the food. Nonetheless, as far as our knowledge extends,
a comprehensive food quality checking system for fruits,
vegetables, and prepared foods such as curry and milk,
encompassing all these aspects in a single framework,
has yet to be developed.

1. Introduction
From both economic and social perspectives, ensuring
food safety holds immense importance. A company's
failure to meet food safety standards can have various
consequences. Neglecting adequate food safety measuresthroughout the production process can profoundly affectthe lives of individuals impacted by such lapses [1].
Without proper adherence to food safety and healthprotocols, contaminated foods might infiltrate the foodsupply chain. The discovery of faulty products can leadto substantial disruptions in the operations of the foodservice industry, as they grapple with managing thequality and recall of these items. The significance of foodsafety in today's society cannot be underestimated [2].
Global instances of over 200 preventable illnesses arelargely attributed to issues with food safety and security.
In the United States, one out of every ten individuals
experience foodborne illnesses or injuries annually. Of
the approximately 420,000 annual deaths resulting fromconsuming tainted food, over a quarter are children [3].
Hence, it becomes imperative to establish a system that

Corresponding author’s E-mail: heshalini@ucsiuniversity.edu.my, norrimamokhtar@um.edu.my URL: www.ucsiuniversity.edu.my128

Table 1 List of components with its functions

2. Methodology
The configuration diagram is illustrated in Fig. 1,
portraying the structural elements of the design. Thesystem comprises power supply units, an Arduino UNO,a WIFI module, a Gas sensor (MQ3), an LDR, a pH
sensor, a DHT22 sensor, and an LCD display. The lines
connecting these components denote the system's inputoutput interactions. Central to the system's control is theArduino Uno [7], which draws power from a 12V battery.
The Arduino board, in conjunction with the DHT-22 [8],MQ3, LDR, and pH sensors, oversees parameters such astemperature, humidity, alcohol content, light exposure,and moisture. Thanks to its heightened sensitivity andrapid response time, measurements can be swiftlyexecuted. The ESP8266 Wi-Fi Modem [9] establishes aninternet connection through a Wi-Fi router, facilitated bythe Arduino. Sensor data is concurrently displayed on acharacter LCD linked to the Arduino UNO. This IoT
platform plays the dual role of logging and monitoring
the sensor data. For more comprehensive monitoring andenhanced quality control, multiple devices can be
strategically deployed on-site. Executing a spectrum oftasks, the Arduino Sketch software on the device
manages tasks like obtaining sensor data, converting it
into strings, displaying it on the character LCD, andtransmitting it to the designated IoT platform, the Blynk
Application. The list of components with its explanationis shown in Table 1.

The system flowchart for this project is illustrated in Fig.
2. It establishes a dedicated connection among the sensor
units, the Wi-Fi component, and the microcontroller. The
microcontroller preprocesses data from the three sensors
before transmitting it to the web server. AT commands
are employed to facilitate interaction between the Wi-Fi
module and preprocessed data, sending it to the web
server for further processing and visualization. Regularchecks on the Wi-Fi module's status ensure a reliablenetwork connection schedule. In case of disconnection inthe Wi-Fi and web server connections, a link reset isexecuted. The web server analyzes and considers datafrom the Wi-Fi module. Upon device activation, themicrocontroller initiates data processing over the Internet.
Leveraging the Blynk Application, the Arduino can becontrolled remotely via the Internet. A visual userinterface is constructed through a digital dashboard tosimplify the monitoring of sensor readings.

Fig. 1 Configuration diagram of the system

129

Sensor detects gases emitted by ripening fruits,
particularly ethylene gas, which aids in determining thespoilage status of fruits and vegetables. Substantial
exposure to direct sunlight and limited airflow exhibits a
uniform effect of hastening ripening and decay.
Consequently, the LDR sensor is employed to gauge lightintensity within the storage environment. Observations
are thus conducted within the storage compartments forfruits and vegetables. The findings suggest that healthy
fruit possesses resilient cell walls, maintaining optimal
humidity levels and retarding rapid decay. Exposing
fruits to high temperatures or direct sunlight can lead toa swift loss of natural moisture from their cell walls,
resulting in a state of desiccation. To address this, anLDR sensor gauges the lux value of direct sunlight. If thisvalue surpasses 450, users are alerted via both the Blynk
App and the LCD screen. Furthermore, warmer days
create conditions favorable for fungal growth and elevatethe susceptibility of harmlessly feeding insects on thesofter portions. Sunlight, due to its ability to cause
cellular damage at a microscopic level throughphotodynamic degradation, also fosters fungal growth.
This study involves the use of two fruit types, Apples andBananas, alongside a vegetable, Tomatoes. As depicted
in Fig. 3, the parts per million (ppm) values for the fruits
and vegetables progressively rise each day. Bananas andTomatoes exhibited spoilage on the 4th and 6th days,
respectively, with recorded ppm values of 10 and 9.
Similarly, Apples began to spoil on the 6th day,exceeding 10ppm. These results underscore that therelease of Ethylene gas accompanies the decay of fruits
and vegetables.

Fig. 2 Flowchart of the proposed system
3. Findings
3.1. Fruit Quality Detection
Each variety of fruit and vegetable possesses distinct
attributes, encompassing varying expiration dates,
fragrances, and colors. Furthermore, diverse foods
exhibit specific parameters such as humidity,temperature, and pH values. Alterations in temperature
can also exert an influence on the process of food decay.
Particularly for fruits and vegetables, maintaining thecorrect storage temperature is pivotal in prolonging their
shelf life. Extreme temperature conditions have thepotential to expedite the deterioration process. Duringfreezing, water within plant cells transforms into ice
crystals, leading to ruptured cell walls, discoloration, anda slimy texture. The DHT22 sensor proves useful inmeasuring both temperature and humidity. It operates
effectively within a temperature range of -40 to +125°C,boasting an accuracy of ±0.5°C. Additionally, theDHT22 sensor can assess humidity across a range of 0 to
100 percent, demonstrating an accuracy level of 2 to 5percent. This sensor's utilization highlights the possibilityof preserving produce at lower temperatures to enhance
freshness and flavor. Moreover, low temperatures
impede the growth of pathogenic fungi that contribute tothe spoilage of stored fruits and vegetables.

Fig. 3 PPM values for Apple, Banana, and Tomato
3.2. IoT based Checking System
With the progress of associated software and hardware
technologies, the utilization of the Internet of Things(IoT) has found extensive integration into our daily
existence [10], [11]. An Internet of Things (IoT)

Continuing with the MQ3 Sensor, pivotal in detecting
alcohol concentration in parts per million, thiscomponent serves a critical role in the system. The MQ3130

application was employed to oversee the condition offood within the storage box of this system. To effectively
monitor factors such as temperature, humidity, lightintensity, ethylene gas concentration, and pH, five gaugetype widgets were incorporated (refer to Fig. 4). The
significance of the gauge widget's measurement is
especially pronounced when evaluated as an averagevalue compared to the maximum value. Nonetheless, a
range of multiple values has been established, with thehighest value displayed on Blynk's widget application,
while the lowest value has been utilized. Thisconfiguration serves to present the data in the form of agauge. The widget consistently showcases the most upto-date information gathered. It's important to note thatwhen the widget is set to "gauge" mode, the configuration
field for the data series (which indicates maximum,minimum, or mean values of collected data) does not
influence the presentation of the data.

Fig. 4 Blynk Interface

3.3. Cooked Food Quality Detection
Detecting the humidity and temperature of cooked foodis a straightforward process that aids in evaluating itsquality. The assessment of cooked food quality can befacilitated through pH value analysis. A food's pH value
provides insightful information: ranging from 0 to 6
signifies acidity, while values from 8 to 14 indicate
alkalinity; a pH of 7 signifies neutrality. Distinct foods
possess varying surface textures, with some being hardand others smooth. For instance, vegetables with resilient
surfaces exhibit prolonged durability, while those withsmoother surfaces tend to spoil earlier. Spoiled milk,
stemming from an overgrowth of bacteria thatcompromises its quality, flavor, and texture, is a primeexample. Once a milk carton is opened, environmental
bacteria contribute to its microbial community, leading topotential spoilage. Over time, these microbial
populations proliferate, eventually causing milk spoilage.
Indications of spoilage manifest as an unpleasant, acidic
odor, which can be pinpointed using a pH meter. As
illustrated in Fig. 5, the pH values of both milk and curry
exhibit a declining trend over successive days. Curry, forinstance, experiences spoilage on the 2nd day, with its pH
value falling below 6. In the case of milk, its pH value
dips below 4 upon spoilage on the 3rd day. This
underscores the increased acidity accompanying thedecay of these foods. The proposed system offers thecapability to measure and monitor real-time values, withthe Blynk app serving as a tool for overseeing foodconditions.

Fig. 5 pH Value for Milk and Curry
4.

Conclusion

To sum up, the system exhibits the ability to oversee thetemperature, humidity, alcohol levels, and light exposure
within storage units containing fruits and vegetables. Thisis accomplished through the utilization of DHT22, MQ3,and LDR sensors. Moreover, the proposed system extends
its functionality to detecting the spoilage of cooked foods,
such as curry and milk, employing a pH sensor. By
seamlessly transmitting data from the sensors to the IoT
platform, namely the Blynk App, users gain the capability
to remotely monitor the food's condition at theirconvenience, regardless of location and time. This systemholds significant value for the food industry, as it
facilitates continuous automated monitoring of foodconditions. Further enhancement of the system'seffectiveness can be achieved by incorporating image
processing techniques.

131References

Mr. Thivagar Chettiar Sarawanan
He is currently pursuing his Bachelor’s
Degree from the Department ofElectrical and Electronic Engineering,Manipal
InternationalUniversity,Malaysia.

1. Srivastava A, Gulati A. iTrack: IoT framework for Smart
Food Monitoring System[J]. International Journal ofComputer Applications, 2016, 148(12): 1–4.
2. Tort Ö Ö, Vayvay Ö, Çobanoğlu E. A Systematic Review
of Sustainable Fresh Fruit and Vegetable SupplyChains[J]. Sustainability (Switzerland), 2022, 14(3): 1–38.
3. Schlein L. Un: Contaminated Food Sickens 600 Million,Kills 420,000 Every Year[J]. VOA News: Science &Health, 2021.
4. Yu B, Zhan P, Lei M. Food Quality Monitoring System
Based on Smart Contracts and Evaluation Models[J/OL].
IEEE Access, 2020, 8: 12479–12490.
5. Popa A, Hnatiuc M, Paun M. An intelligent IoT-based foodquality monitoring approach using low-cost sensors[J].
Symmetry, 2019, 11(3).
6. Im Cho, Y., & Palvanov, A. (2019). A New Machine
Learning Algorithm for Weather Visibility and Food
Recognition. J. Robotics Netw. Artif. Life, 6(1), 12-17.
7. Dai, F., Wen, H., Zhao, J., Hao, H., & Zhang, Q. (2021).
Design of an Instrument for Measuring Heart Rate andBlood Oxygen Based on Arduino. Journal of Robotics,
Networking and Artificial Life, 7(4), 275-278.
8. Bogdan M. How to Use the DHT22 Sensor for Measuring
Temperature and Humidity with the Arduino Board[J/OL].
ACTA Universitatis Cibiniensis, 2016, 68(1): 22–25.
9. Yan, Y. (2022). Design of an Intelligent Vehicle
Environment Monitoring System based on WiFi. Journalof Robotics, Networking and Artificial Life, 8(4), 249-252.
10. Guo, H., Magid, E., Hsia, K. H., & Su, K. L. (2021).
Development of IoT module with AI function using
STM32 chip. Journal of Robotics, Networking andArtificial Life, 7(4), 253-257.
11. Lee, T. L., Liu, I. H., Li, C. F., & Li, J. S. (2021). Threats
Hidden in Office Network: Mechanism of Credential
Harvesting for Lateral Movement. Journal of Robotics,
Networking and Artificial Life, 8(3), 193-196.

Dr. Heshalini Rajagopal
She received her PhD and Master's degree from theDepartment of Electrical Engineering,
University of Malaya, Malaysia in 2021
and 2016, respectively. She received theB.E (Electrical) in 2013 Currently, she isan Assistant Professor in UCSI
University, Kuala Lumpur, Malaysia.
Her research interest includes image
processing, artificial intelligence and machine learning.
Ms. Madam Devika Sethu
She received her Master's degree fromthe Liverpool John Moores University(LJMU), UK in 2006. She received theB.Tech in 1991 from
College ofEngineering
Trivandrum(CET),
University of Kerala, India. Currently,
she is an Assistant Professor in ManipalUniversity(MIU),International
Malaysia. Her research interest includes robotic &automation, HVAC, AI , IoT, image processing and energymanagement.
Dr. Norrima Binti Mokhtar
Dr. Norrima is working as a SeniorLecturer at Department of ElectricalEngineering, UM, Malaysia. Herinterests include Human MachineInteraction, Machine Learning &Robotics, Digital Image Processing

Authors Introduction

Researcher ID Link:

Mr. Ashraf Ali Jamal Deen
He is currently pursuing his Bachelor’s
Degree from the Department ofElectrical and Electronic Engineering,

Dr. Neesha Jothi

Manipal International University, Malaysia.

132

She received her PhD from the School ofComputer Sciences, Universiti Sains
Malaysia in 2020. She is currently anAssistant Professor in UCSI University,Malaysia. Her research interest areas are
Data Mining in Healthcare and Health
Informatics.