Arduino Based Smart IoT Food Quality Monitoring System
Ashraf Ali Jamal Deen, Thivagar Chettiar Sarawanan
Department of Electrical and Electronic Engineering, Manipal International University, Malaysia
Heshalini Rajagopal
Institute of Computer Science and Digital Innovation, UCSI University, 56000 Kuala Lumpur, Malaysia
Devika Sethu
Department of Electrical and Electronic Engineering, Manipal International University, Malaysia
Neesha Jothi, Raenu Kolandaisamy
Institute of Computer Science and Digital Innovation, UCSI University, 56000 Kuala Lumpur, Malaysia
E-mail:
[email protected] www.ucsiuniversity.edu.my
Abstract
Food safety and hygienic as well as health are significant issues to stop food wastage. The high quality of the food
requires to be kept track of and it should be also protected against deteriorating and decaying by the climatic variables
like temperature level, humidity, and dark. In this paper, a comparable food quality monitoring tool will be created
that will keep watch of ecological factors like temperature level, moisture, alcohol web content as well as exposure
to light for fruits and vegetables. The system is built on Arduino UNO where it is interfaced with various sensors like
DHT-22 to keep track of temperature level and humidity, MQ3 to identify alcohol material as well as LDR to gauge
direct exposure to light. It sends the measured sensor data to an IoT system via ESP8266 Wi-Fi Module. The IoT
system will certainly be made use of for logging and checking sensing unit data and this is beneficial in monitoring
the food storage from anywhere and anytime.
Keywords: Food Quality, Monitoring System, Internet of Things (IoT), Arduino
of food safety in today's society cannot be overlooked [2].
1. Introduction
Problems with food safety and security are a major cause
In terms of both economic and social considerations, food of more than 200 avoidable illnesses throughout the globe.
safety is very essential. Many implications might result In the United States, one in ten persons suffers from
from a company's failure to meet food safety and security foodborne illness or injury each year. More than a quarter
standards. Failure to provide adequate food safety of the estimated 420,000 individuals who die each year as
throughout the production process may have a significant a consequence of eating poisoned food are kids [3].
impact on the lives of those who are affected by the lack Therefore, it is necessary to create a system that can assist
of food safety measures [1] Contaminated foods may consumers in determining whether or not food is fresh and
enter the food supply chain if proper food safety and also of high quality. In this paper, a food quality
health protocols are not followed. When a faulty product monitoring system is proposed. Several studies were done
is discovered, the food service industry is vulnerable to on this area. B.Yu, et al. (2020) proposed a monitoring
major disruptions in their operations as they attempt to system which integrated smart contracts and evaluation
handle and remember the item's quality. The importance models for the automatic evaluation of the quality of fruit
©The 2023 International Conference on Artificial Life and Robotics (ICAROB2023), Feb. 9 to 12, on line, Oita, Japan
23
Ashraf Ali Jamal Deen, Thivagar Chettiar Sarawanan, Heshalini Rajagopal, Devika Sethu, Neesha Jothi, Raenu Kolandaisamy
juice samples generated in each production stage[4]. programmed AT instruction set software. The ESP-01
A.Popa, et al. (2019) proposed a food quality monitoring and ESP-12 variants of the module are available. The
system for vegetables stored in vacuum-packed foods[5]. ESP-12 has 16 pins accessible for the interface, whereas
However, to the best of our knowledge, there is no food the ESP-01 only has 8 pins.
quality monitoring system developed for fruits, vegetable pH is the measurement unit that we use to determine the
and cooked food such as curry and milk in a single system. acidity of a chemical. The undesirable log of the hydrogen
ion concentration is defined as "H." The pH values range
from 0 to 14 on a scale of one to fourteen. A pH of 7 is
2. Hardware structure measured neutral since distilled water has an exact pH of
7. Essential or alkaline levels are more than 7, whereas
The block diagram of the design is shown in Fig.1. The acidic values are less than 7. The pH scale is used to
system consists of power supply units, Arduino UNO assess the amount of acidity and basicity in a fluid. It can
microcontroller, WIFI module, Gas sensor (MQ3), LDR, have results ranging from 1 to 14, with 1 indicating the
Ph value sensor, DHT22 sensor, and LCD display. The most acidic fluid and 14 indicating the most standard fluid.
flow line shows the inputs and outputs of the system. The The pH of 7 refers to things that are neither acidic nor
main controlling unit of the system is Arduino Uno and it basic.
will be powered by a 12V battery. Temperature, humidity, The purpose of an analog pH sensing device is to
alcohol, light exposure and moisture are monitored using determine the pH value of a substance as well as the
the Arduino board, DHT-22, MQ3, LDR and pH sensors. acidity or alkalinity of the substance. It is commonly used
Measurements can be conducted as quickly as feasible in a variety of applications such as farming, wastewater
because to its high sensitivity and quick reaction time. treatment, industry, environmental monitoring, and so on.
The ESP8266 Wi-Fi Modem is connected to the internet The component contains an on-board voltage controller
via a Wi-Fi router via the Arduino. The sensor data is also authority chip that supply a wide voltage range of 3.3-
shown on an Arduino UNO-connected character LCD. 5.5V DC, making it well-matched with both 5V and 3.3
Sensor data is logged and monitored using this IoT V control boards such as Arduino.
platform. Several of these devices can be put at a site for The system flowchart for this project is shown in Fig. 2.
better monitoring and quality control. The Arduino A dedicated link is established between the sensing units,
Sketch that runs on the device does a variety of tasks for the Wi-Fi component, and the microcontroller. The
the project, including receiving sensor data, converting it information from the three sensing devices is pre-
to strings, displaying it on a character LCD, and processed by the microcontroller before being sent to the
transmitting it to the IoT platform, Blynk Application. web server. AT commands will be given to the Wi-Fi
component to interact with the pre-processed data and
send it to the web server for further processing and
2.1. Flowchart of the system visualization.
The DHT-22 sensor measures temperature and
humidity[6]. The Humidity detecting component and the
NTC temperature sensor are the two major components of
the DHT-22 sensor (or Thermistor). Thermistors are
variable resistors that change resistance in response to
temperature changes. They both sense the surrounding
region's temperature and humidity and communicate the
information to the IC.
The LDR is used to detect light intensity. The LDR
creates an analogue voltage, which is converted to a
digital readout by the built-in ADC. The 16X2 LCD
display is connected to the Arduino board by linking its Fig. 1. Block diagram of the system
data pins to the Arduino board.
The ESP8266 Wi-Fi Module is an (SOC) self-contained
system on chip with that can connect to a Wi- Fi network
and has an integrated TCP/IP protocol stack. The
ESP8266 may either install apps or representative all Wi-
Fi networking functions to a separate application
processor. Each ESP8266 module comes with pre-
©The 2023 International Conference on Artificial Life and Robotics (ICAROB2023), Feb. 9 to 12, on line, Oita, Japan
24
Food Quality Monitoring System
freezes into ice crystals when frozen, causing cell wall
ruptures and discoloration as well as a slimy appearance.
Temperature and humidity can be measured using the
DHT22 sensor. -40 to +1250C, with a +-0.50C accuracy,
is its temperature range. With a range of 0 to 100 percent,
the DHT22 sensor can measure humidity with a 2 to 5
percent accuracy. It is discovered with the help of the
DHT 22 sensor, it is possible to keep produce fresher and
more flavorful by storing it at lower temperatures. The
growing of pathogenic fungi that cause spoilage of fruits
and vegetables in storage is also slowed by low
temperatures.
Continues with MQ3 Sensor which has been used to
detect alcohol parts per million. This sensor plays an
important role in this system where this sensor has been
used to detect fruit and vegetable whether the fruit or
vegetables is spoiled or not by detecting the gas of
ripening fruit emitting which is ethylene gas. Heavy
exposure to direct sunlight and light air flow shows a
uniform effect of accelerating ripening and decay so LDR
sensor has been used to sense the light intensity in the
storage box. Therefore, observation is done from the
storage box of the fruit and vegetables. The results have
found that the healthy fruit has strong cell walls that must
Fig.2. Flowchart of the system contain the humidity level, preventing the fruit from
decaying faster. When fruits are exposed to either high
The Wi-Fi module's status will be checked on a regular temperature or direct sunlight, its cell walls can lose their
basis to ensure network connectivity schedule and natural moisture quickly which could then lead them into
dependability. A link reset should be performed if the a condition of dry storage. For this, we have placed an
status of the Wi-Fi and web server connections is LDR sensor to measure the lux value of direct sunlight.
discovered to be disconnected at any time. The From the LDR sensor that has been used, it has been
information from the Wi- Fi module will undoubtedly be found that in direct sunlight the value is shown 450 when
analyzed and considered by the web server. As soon as it reaches 450 or more than that, it will notify the user in
the device is turned on, the microcontroller will begin both Blynk App and LCD screen to alert the users. In
refining data over the Internet. addition, warm days will create an environment that is
With the help of the Blynk Application, Arduino can be perfect for fungi growth as well as increase susceptibility
controlled via the Internet. A visual user interface is to insects harmlessly feeding on the fleshy areas. Sunlight
created using a digital dashboard to ease the monitoring will also promote fungal growth due to its ability to
of the sensors’ readings. damage cells at a cellular level through a process known
as photodynamic degradation.
In this study, two types of fruits, Apple and Banana and a
3. Results and Discussion vegetable, tomato were used. Based on Fig.3, the ppm
values for the fruits and vegetables kept increasing every
3.1. Detecting the Quality of Fruits day. The banana and tomato spoilt on the 4th day and 6th
Each fruit and vegetable have a different expiration date, day, respectively. The ppm value for banana and tomato
fragrance, and color. Also, different food has different were recorded as 10 ppm and 9 ppm, respectively. The
parameters such as humidity, temperature, and pH value. apple also started to spoil with the value above 10ppm on
Food rotting may also be influenced by changes in the 6th day. This shows that the fruit and vegetables
temperature. When it comes to fruits and vegetables, release Ethylene gas as they decay.
storing them at the correct temperature is critical to
extending their shelf life. It is possible for rotting to be
accelerated by extreme temperatures. Water in plant cells
©The 2023 International Conference on Artificial Life and Robotics (ICAROB2023), Feb. 9 to 12, on line, Oita, Japan
25
Ashraf Ali Jamal Deen, Thivagar Chettiar Sarawanan, Heshalini Rajagopal, Devika Sethu, Neesha Jothi, Raenu Kolandaisamy
milk, the pH value dropped to below 4 when it is spoiled
on the 3rd day. This shows that the acidity of milk and
curry increases as the food is spoiled. The proposed
system could measure and monitor the real time values
using Blynk app for monitoring the condition of the food.
Fig.3: PPM values for Apple, Banana, and Tomato
3.2. Monitoring System
We used an IoT app to monitor the food in this system (in
the storage box). In order to monitor temperature,
humidity, light intensity, ethylene gas concentration, and
pH, there are five gauge- typewidgets (see Fig.4). The
gauge widget's measure has the greatest importance when
seen as an average value against a maximum value.
However, multiple values have been set and ranged and Fig. 4. Blynk Application
some to the highest value has been shown on blynk's
widget app and the lowest value has been used. This will
show data in the form of a gauge. The widget will show
the most current data that has been gathered. When the
widget is set to "gauge" mode, the data series
configuration field (which displays the gathered data's
maximum, minimum, or mean) has no effect on how the
data is shown.
3.3. Quality of Cooked Food
The humidity and temperature of cooked food are
effortless to detect in order to determine the quality of it. Fig. 5. pH Value for Milk and Curry
The quality of cooked food can be determined with pH
value. When the food’s pH value is detected from 0 to 6, 4. Conclusion
the foods are acidic, if from 8 to 14 the foods are alkaline
In conclusion, the system is capable to monitor the of
and if the pH is 7 the foods are neutral. Several foods have
temperature, humidity, alcohol, and light exposure in fruits
hard surfaces while the rest have smooth surfaces. For
and vegetables storage using DHT 22, MQ3 and LDR
example, the vegetables with hard surfaces will be long-
sensors. In addition, the proposed system could also detect
lasting whereas the vegetables with smooth surfaces will
if the cooked food such as curry and milk has spoilt using
expire early. The spoiled milk, result of an over-growth
pH sensor. The proposed system is capable to send the data
of bacteria that compromises the quality, flavor, and
from the sensors to the IoT platform, Blynk Application.
texture of milk. Once you open a carton of milk, it’s
This enables the users to monitor the condition of the food
exposed to extra bacteria from the environment. Over
from anywhere and at any time. This system is beneficial
time, these small microbial communities can reproduce
in food industries as the system could monitor the
and eventually cause the milk to spoil. Signs the milk has
condition of the food can be monitored all the time
spoiled, it develops an unpleasant, acid odor where it can
automatically. This system can be further improved by
be found using the pH meter. Based on Fig. 5, the pH
using image processing to enhance the efficiency of the
value of milk and curry decreases every day. The curry
detection.
spoiled on the 2nd day and its pH value was below 6. For
©The 2023 International Conference on Artificial Life and Robotics (ICAROB2023), Feb. 9 to 12, on line, Oita, Japan
26
Food Quality Monitoring System
Dr. Heshalini Rajagopal
References She received her PhD and Master's
degree from the Department of
1. Srivastava A, Gulati A. iTrack: IoT framework for Smart Electrical Engineering, University of
Food Monitoring System[J]. International Journal of Malaya, Malaysia in 2021 and 2016,
Computer Applications, 2016, 148(12): 1–4. respectively. She received the B.E
2. Tort Ö Ö, Vayvay Ö, Çobanoğlu E. A Systematic Review (Electrical) in 2013 Currently, she is
of Sustainable Fresh Fruit and Vegetable Supply Chains[J]. an Assistant Professor in UCSI
Sustainability (Switzerland), 2022, 14(3): 1–38. University, Kuala Lumpur, Malaysia.
3. Schlein L. Un: Contaminated Food Sickens 600 Million, Her research interest includes image
Kills 420,000 Every Year[J]. VOA News: Science & processing, artificial intelligence and machine learning.
Health, 2021.
4. Yu B, Zhan P, Lei M. Food Quality Monitoring System
Madam Devika Sethu
Based on Smart Contracts and Evaluation Models[J/OL].
IEEE Access, 2020, 8: 12479–12490.
She received her Master's degree from
5. Popa A, Hnatiuc M, Paun M. An intelligent IoT-based food
the Liverpool John Moores University
quality monitoring approach using low-cost sensors[J].
(LJMU), UK in 2006. She received the
Symmetry, 2019, 11(3).
B.Tech in 1991 from College of
6. Bogdan M. How to Use the DHT22 Sensor for Measuring
Engineering Trivandrum (CET),
Temperature and Humidity with the Arduino Board[J/OL].
University of Kerala, India. Currently,
ACTA Universitatis Cibiniensis, 2016, 68(1): 22–25.
she is an Assistant Professor in
Manipal International University
(MIU), Malaysia. Her research interest
Authors Introduction includes robotic & automation, HVAC , AI , IoT, image
processing and energy management.
Mr. Ashraf Ali Jamal Deen
Dr. Neesha Jothi
He is currently pursuing his Bachelor’s
Degree from the Department of She received her PhD from the School
Electrical and Electronic Engineering, of Computer Sciences, Universiti Sains
Manipal International University, Malaysia in 2020. She is currently an
Malaysia. Assistant Professor in UCSI University,
Malaysia. Her research interest areas are
Data Mining in Healthcare and Health
Informatics.
Mr. Thivagar Chettiar Sarawanan
Dr. Raenu Kolandaisamy
He is currently pursuing his Bachelor’s He received his PhD from the Faculty
Degree from the Department of Electrical of Computer Science & Information
and Electronic Engineering, Manipal Technology, University Malaya in
International University, Malaysia. 2020. He is currently an Assistant
Professor in UCSI University,
Malaysia. His research interest areas
are Wireless Networking, Security,
VANET and IoT.
©The 2023 International Conference on Artificial Life and Robotics (ICAROB2023), Feb. 9 to 12, on line, Oita, Japan
27