0% found this document useful (0 votes)
56 views30 pages

FINAL Report

The document discusses the importance of healthy food and the issue of food spoilage, highlighting its negative impacts on health, economy, and the environment. It proposes an innovative IoT-based food spoilage detection system that utilizes various sensors for real-time monitoring of spoilage indicators. The methodology and components for implementing this system, including Arduino and specific sensors, are detailed to enhance food safety and reduce waste.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views30 pages

FINAL Report

The document discusses the importance of healthy food and the issue of food spoilage, highlighting its negative impacts on health, economy, and the environment. It proposes an innovative IoT-based food spoilage detection system that utilizes various sensors for real-time monitoring of spoilage indicators. The methodology and components for implementing this system, including Arduino and specific sensors, are detailed to enhance food safety and reduce waste.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

Mini Project BEC586 2024-25

CHAPTER 1

INTRODUCTION

Food plays a vital role in human life , hence having healthy food is of utmost importance for
several reasons. Firstly, a nutritious diet is essential for maintaining good overall health. It provides
the necessary nutrients, vitamins, and minerals that our bodies need to function properly, enhance
the immune system, and prevent various chronic diseases such as obesity, diabetes, heart disease,
and certain cancers. Secondly, healthy food plays a significant role in supporting brain function
and mental well-being. Studies have shown that a diet rich in fruits, vegetables, whole grains, and
lean proteins can improve cognitive function, boost mood, and reduce the risk of depression and
anxiety. Furthermore, healthy eating habits contribute to maintaining a healthy weight. A balanced
diet, coupled with regular physical activity, can help prevent obesity, which is a growing global
health concern. Being overweight or obese increases the risk of several health problems, including
diabetes, high blood pressure, and cardiovascular diseases. Having healthy food also promotes
sustainable agriculture and the preservation of natural resources. A diet that focuses on plant-based
foods, locally sourced and organic products, reduces the environmental impact associated with
intensive livestock farming, excessive use of pesticides, and deforestation. It supports a more
sustainable and ecofriendly food system that works towards mitigating climate change and
preserving biodiversity. Food spoilage is a global concern that impacts the environment, economy,
and public health. According to the Food and Agriculture 1 Organization (FAO), roughly one-third
of the food produced for human consumption every year is lost or wasted. This amounts to
approximately 1.3 billion tonnes of food, valued at over 1trillion. Food spoilage occurs due to
various reasons, including microbial growth, enzymatic reactions, physical damage, and exposure
to heat, light, and oxygen. It not only leads to financial losses for food producers and businesses
but also contributes to greenhouse gas emissions and biodiversity loss. Moreover, consuming
spoiled or contaminated food can cause foodborne illnesses in humans, leading to sickness,
hospitalization, or even death. Implementing a food spoilage detector becomes imperative to
address these issues and minimize the impact of food spoilage. Such a system utilizes advanced
technologies like sensors, data analysis, and AI to monitor and detect signs of spoilage in real-
time. By accurately assessing the freshness and quality of food product.

Department of ECE, AIEMS Page 1


Mini Project BEC586 2024-25

1.1 PROBLEM STATEMENT

The issue at hand is the pervasive problem of food spoilage and wastage, which has significant
negative impacts on the economy, environment, and public health. Despite existing food safety
regulations and quality control measures, effectively detecting and preventing food spoilage
remains a considerable challenge throughout the food supply chain. Traditional methods such as
visual inspection, smelling, and relying solely on expiration dates are subjective, time-consuming,
and prone to human error. Therefore, there is a pressing need for an innovative solution that
leverages the Internet of Things (IoT) technology to develop a food spoilage detector capable of
real-time monitoring and early detection of spoilage indicators.

Department of ECE, AIEMS Page 2


Mini Project BEC586 2024-25

CHAPTER 2

2.LITERATURE SURVEY

1. Ravi Chander, P.A. Lovina, and G. Shiva Kumari (April 2020) conducted research on a Food
Quality Monitoring System that utilizes Arduino technology. This system is highly beneficial for
food stores as it allows for the deployment of quality monitoring devices. These devices are
designed to keep a close watch on the various environmental factors that can contribute to the
decay of food. By monitoring factors such as temperature, humidity, alcohol content, and exposure
to light, the system can detect potential issues with food quality. The Food Spoilage Detection
system is based on the Arduino UNO prototyping board, which is widely recognized and used for
its versatility. To monitor temperature and humidity, the system utilizes the DHT-11 sensor.
Additionally, the system detects alcohol content using the MQ4 sensor and measures exposure to
light with the LDR sensor. By connecting the Arduino board to an ESP8266 Wi-Fi Modem, the
system can transmit the measured sensor data to an IoT platform via Wi-Fi. To provide immediate
feedback and visibility of the sensor data, the system also displays the information on a character
LCD connected to the Arduino UNO. The logged and monitored sensor data is sent to an embedded
spot IoT platform, which offers a comprehensive solution for data management and analysis.

2. Suruchi Parmar, Tejaswini k Manke, Neha badhan, Prasad Borase, Prof. N.S. Ujgare Studied
on the topic “An efficient system to detect freshness and quality of food”. They mainly focused on
two specific aspects. Firstly, they investigated the ethanol levels in banana samples as an indicator
of ripeness and decay. They found that as bananas ripened, the amount of ethanol produced
increased over time. By utilizing an MQ3 sensor, they were able to accurately detect the decay
process in the fruit. Additionally, the team explored a real-time milk monitoring system. They
analyzed the pH level of milk samples to determine whether they were spoiled or still suitable for
consumption. By monitoring the pH level, they were able to detect any changes that would indicate
milk spoilage, ensuring the freshness and safety of the product. Overall, their research provides
valuable insights into developing efficient systems for monitoring food freshness and quality. By
utilizing sensors and analyzing specific indicators such as ethanol levels and pH, these systems

Department of ECE, AIEMS Page 3


Mini Project BEC586 2024-25

can help prevent the consumption of spoiled or unsafe food, enhancing food safety and consumer
satisfaction.

3. The study titled "E Fresh - A Device to Detect Food Freshness," conducted by Naveed Shahzad
and Usman Khalid, explores the use of biosensors and electrical sensors to determine the freshness
of various food items. The researchers developed a smart system capable of detecting the freshness
of farm produce, meat, and fruits. To accomplish this, they incorporated a hydrogen ion
concentration device, a moisture sensor, and a gas sensor into the device. By utilizing these
sensors, the device can accurately assess the freshness of food items, providing users with clear
indications on whether the food is still suitable for consumption or should be discarded. To
enhance the usability of the system, the researchers also developed an Android application that
allows users to select the type of food they want to test. This innovative approach to food freshness
detection offers a practical solution for individuals looking to ensure the quality of their food
before consumption. With the ability to detect freshness indicators such as hydrogen ion
concentration, moisture levels, and gas emissions, this device empowers users to make informed
decisions about the safety and quality of the food they consume. Ultimately, this technology has
the potential to reduce food wastage and enhance overall food safety in households and other
food-related settings.

4. In their study titled "The Vegetable Freshness Monitoring System Using RFID with Oxygen and
Carbon Dioxide Sensor," Ki Hwan Eom and Min Chul Kim (2012) propose a system that utilizes
radio frequency identification (RFID) technology in conjunction with oxygen and carbon dioxide
sensors to monitor the freshness of vegetables. The authors demonstrate that freshness can be
determined by considering various factors such as wetness, temperature, oxygen, and carbon
dioxide. Specifically, their focus lies on the concentrations of oxygen and carbon dioxide, as these
gases are closely related to freshness and significantly impact the quality of food. To implement
the system, a gas observation device is employed to measure the levels of oxygen and carbon
dioxide. This device is then connected to an RFID tag, enabling easy management and tracking.
By using this combined system, the freshness of vegetables can be precisely calculated. The RFID
technology enhances efficiency and convenience in monitoring and managing the freshness of
vegetables, allowing for timely intervention and appropriate handling to maintain product quality.
The proposed freshness monitoring system offers a valuable solution for ensuring the quality and

Department of ECE, AIEMS Page 4


Mini Project BEC586 2024-25

longevity of vegetables, reducing food waste, and enhancing consumer satisfaction. By accurately
assessing the concentrations of oxygen and carbon dioxide, this system provides valuable
information regarding the freshness of vegetables, enabling informed decisions on their usage and
disposal. Overall, this technology contributes to the improvement of food freshness management
in various settings, promoting food safety and reducing economic losses associated with food
spoilage

Department of ECE, AIEMS Page 5


Mini Project BEC586 2024-25

CHAPTER 3

3.METHODOLOGY

Arduino requires a power source, which can be provided by a variety of means, including a
barrel adapter, the USB connector by connecting it to a computer or laptop, batteries with a voltage
higher than 5 volts, a battery shield, etc. The Arduino to PC USB link was utilized. The MQ4
methane sensor, the ESP8266 WIFI wireless module, the green led, the red led, and a few
additional parts like a breadboard, connectors, resistors, batteries for other power sources needed,
a buzzer, etc. are all necessary components. Utilizing a breadboard, all of these are connected to
the Arduino. A network can be established using a mobile hotspot sensed by an ESP8266 wifi
module, and our Arduino can exchange the data sensed by the sensors connected to it with an IOT
portal or other cloud so that users can learn the range of methane created by rotting food in ppm
(parts per million). A buzzer and a red LED are activated when the MQ4 methane sensor detects
food spoiling. For the user to be aware of food spoiling. In our example, the IoT-based application
(Blynk app) also generates and sends an email to the FSD system user.

3.1. COMPONENT USED

1. Arduino unoR3
2. Mq-4 gas sensor
3. Bread board
4. Green LED
5. Red LED
6. Jumpers (Connecting wires)
7. Buzzer
8. USB (Universal Serial Bus)

Department of ECE, AIEMS Page 6


Mini Project BEC586 2024-25

3.1.1. ARDUINO UNO R3

Figure : Pin Specification of Arduino UNO

Department of ECE, AIEMS Page 7


Mini Project BEC586 2024-25

Type Specification
Microcontroller A Tmega328P
Operating Voltage 5V
Input Voltage 7-12 V
Input Voltage Limit 6-20V
Digital I/O pins 6
Analog input pins 6
DC current per I/0 pins 20mA
DC current for 3.3V pins 50mA
Flash memory 0.5KB is used
SRAM 2KB
EEPROM 1KB
Clock speed 16MHz
Length 68.6mm
Width 53.4nm
Weight 25g

Table 3.1: Arduino Specifications

Department of ECE, AIEMS Page 8


Mini Project BEC586 2024-25

3.1.2. MQ-4 GAS SENSOR

Here are some specifications for the MQ4 gas sensor:

1. Operating temperature: 14°C to 122°C (-10°C to 50°C)


2. Detecting range: 300 ppm to 10,000 ppm
3. Required voltage: 5V
4. Load resistance: 20KΩ
5. Detecting resistance: 10KΩ to 60KΩ
6. DO output: 0.1 to 5V
7. AO output: 0.1 to 0.3V
8. Preheat time: More than 24 hours
9. Sensitivity: Good for combustible gas, but small for smoke and alcohol
10. Response: Quick
11. Life: Long
12. Stability: Stable
13. Drive circuit: Simple
14. Interface: TTL compatible input and output
15. Heater utilization: Less than 750m

Department of ECE, AIEMS Page 9


Mini Project BEC586 2024-25

3.1.3. BREAD BOARD

Here are some specifications for the Bread Board:

1. Terminal strip, tie-point 630


2. Distribution strips, tie-point 200
3. Solderless breadboard (MB-102)
4. Wire size: Suitable for 20-29 AWG wires, jumper wire of 0.8 mm diameter
5. Material: ABS. Transparent material
6. Size: 16.5 x 5.3 x 0.85 cm
7. Brand new and high quality
8. They allow electronic components to be interconnected in an almost endless number of
ways to produce working circuits
9. Because no soldering is required, modifying or revising the circuits can be done quite easily
10. The breadboard consists of a set of formed metal sockets inserted into a durable plastic
housing

Department of ECE, AIEMS Page 10


Mini Project BEC586 2024-25

11. Phosphor bronze nickel plated spring clips


12. Adhesive sheet on the bottom of the board

3.1.4. JUMPING WIRES

A jump wire (also known as jumper, jumper wire, DuPont wire) is an electrical wire, or group of
them in a cable, with a connector or pin at each end (or sometimes without them – simply "tinned"),
which is normally used to interconnect the components of a breadboard or other prototype or test
circuit, internally or with other equipment or components, without soldering. Individual jump
wires are fitted by inserting their "end connectors" into the slots provided in a breadboard, the
header connector of a circuit board, or a piece of test equipment.

Department of ECE, AIEMS Page 11


Mini Project BEC586 2024-25

3.1.5. OBJECTIVES

1. Early Spoilage Detection:

• To identify food spoilage at an early stage, ensuring that food remains safe for
consumption and reducing health risks.

2. Cost-Effective Solution:

• To develop a low-cost, affordable solution for detecting food spoilage that can be easily
integrated into households, storage facilities, or commercial setups.

3. Real-Time Monitoring:

• To provide continuous, real-time monitoring of food quality through sensors and


Arduino-based systems.

4. Environmental Monitoring:

• To measure environmental parameters like temperature, humidity, and gas levels (e.g.,
ammonia, methane, or carbon dioxide) that influence food spoilage.

5. Reduction of Food Wastage:

• To minimize food waste by detecting spoilage early and allowing timely intervention
to preserve or consume the food.

6. User-Friendly Design:

Department of ECE, AIEMS Page 12


Mini Project BEC586 2024-25

• To create an easy-to-use system that provides clear indications (e.g., LEDs, alarms, or
a mobile app interface) of food spoilage.

7. Portability and Flexibility:

• To develop a portable and adaptable system that can be used in various environments,
such as refrigerators, warehouses, and supermarkets.

8. Improved Food Safety Standards:

• To support compliance with food safety regulations by providing a reliable tool for
monitoring and ensuring the quality of stored food.

9. Research and Development:

• To facilitate further studies on food spoilage patterns and enhance the accuracy of
spoilage detection methods using sensor data and machine learning.

Department of ECE, AIEMS Page 13


Mini Project BEC586 2024-25

CHAPTER 4

4.DESIGN AND IMPLEMENTATION

4.1. BLOCK DIAGRAM

4.1.1. PROPOSED METHODOLOGY

The proposed methodology for detecting food spoilage using Arduino involves integrating sensors
with the microcontroller to monitor various parameters indicative of spoilage. The approach
focuses on real-time data collection and analysis to ensure food quality and safety. Initially, the
system employs specific sensors to measure key spoilage indicators, such as temperature,
humidity, gas emissions, and pH levels. For example, gas sensors like MQ-3 or MQ-4 detect
volatile organic compounds (VOCs) emitted during the decomposition of food. Similarly,
Department of ECE, AIEMS Page 14
Mini Project BEC586 2024-25

temperature and humidity sensors (e.g., DHT11 or DHT22) monitor environmental conditions
conducive to spoilage. pH sensors are used for liquid foods to measure acidity levels, which change
as spoilage progresses. These sensors are interfaced with an Arduino board, which serves as the
central processing unit.

The data from these sensors are collected continuously and transmitted to the Arduino for
processing. The Arduino is programmed to analyze this data against predefined thresholds or
patterns indicative of spoilage. For instance, abnormal increases in gas levels, a sharp drop in pH,
or prolonged exposure to high temperatures can trigger alerts. The system is designed to identify
these deviations quickly and provide a warning.

To enhance usability, the setup may include a display module, such as an LCD or OLED screen,
to show real-time data. For remote monitoring, the system can be integrated with wireless
communication modules like Wi-Fi (ESP8266 or ESP32) or Bluetooth. This connectivity allows
the data to be sent to a smartphone application or a cloud platform for further analysis,
visualization, and storage. Additionally, machine learning algorithms can be employed to improve
spoilage detection accuracy by analyzing historical data and identifying complex patterns.

The proposed methodology emphasizes affordability and scalability, making it suitable for small-
scale food vendors and large industries alike. The use of Arduino ensures that the system is cost-
effective and accessible, while the modular design allows for customization based on specific food
types or storage conditions. For example, meat storage might require more emphasis on gas
detection, whereas dairy products may need pH monitoring.

Furthermore, the system can be powered using a portable battery or a solar panel, enhancing its
applicability in remote areas or during transportation. Calibration of sensors is also considered,
ensuring accuracy and reliability over time. Regular calibration and maintenance schedules are
integrated into the design to maintain consistent performance.

In conclusion, the Arduino-based food spoilage detection system provides an innovative, low-cost,
and real-time solution for monitoring food quality. By leveraging sensor technology and wireless
communication, it ensures timely detection of spoilage, minimizing food waste and enhancing

Department of ECE, AIEMS Page 15


Mini Project BEC586 2024-25

consumer safety. The modularity and scalability of the system make it adaptable to various
applications, from household use to industrial food processing.

4.2. CIRCUIT DIAGRAM

4.3. WORKING PRINCIPLE

The food spoilage detection system using Arduino UNO R3, an MQ-4 gas sensor, and a buzzer
operates by monitoring gas emissions associated with food deterioration and providing alerts when
spoilage is detected. The MQ-4 gas sensor is sensitive to methane (CH₄) and other natural gases,
which are often released during the decomposition of food. The system utilizes the Arduino UNO
R3 microcontroller as the central processing unit to read sensor data and trigger alerts.

The working principle begins with the MQ-4 gas sensor detecting the concentration of gases in its
vicinity. As food begins to spoil, gases such as methane and other volatile organic compounds

Department of ECE, AIEMS Page 16


Mini Project BEC586 2024-25

(VOCs) are emitted. The MQ-4 sensor measures the gas concentration and converts it into an
analog signal. This signal is sent to the Arduino UNO R3, which processes the data using pre-
defined thresholds. These thresholds are set based on the levels of gas emissions expected during
food spoilage, ensuring the system accurately identifies spoilage conditions.

When the gas concentration exceeds the specified threshold, the Arduino activates the buzzer as
an audible alert to indicate potential food spoilage. The buzzer serves as a simple yet effective
warning mechanism, making it easy for users to identify when food needs attention. Additionally,
the system can be enhanced with an LED indicator or a display module for a visual representation
of the spoilage status, adding convenience for the user.

This detection system is designed to be compact, affordable, and user-friendly. The MQ-4 gas
sensor is highly sensitive and reliable, capable of detecting minute changes in gas concentrations.
Combined with the Arduino UNO R3, which is known for its flexibility and ease of programming,
the system ensures accurate real-time monitoring. The simplicity of the buzzer as an output device
makes the system accessible even for non-technical users.

In practical applications, the system can be used in household kitchens, supermarkets, or storage
facilities to monitor the freshness of perishable goods. By providing early detection of food
spoilage, it helps reduce food waste and ensures food safety. Furthermore, the system's modular
nature allows it to be expanded or customized to include additional sensors, such as temperature
or humidity sensors, to monitor other spoilage-related parameters.

In summary, the food spoilage detection system using Arduino UNO R3, an MQ-4 gas sensor, and
a buzzer works by detecting gas emissions from decomposing food, processing the data using
Arduino, and alerting users through an audible buzzer. Its simplicity, cost-effectiveness, and
adaptability make it an effective tool for minimizing food waste and maintaining food quality.

Department of ECE, AIEMS Page 17


Mini Project BEC586 2024-25

CHAPTER 5

5.RESULTS AND DISCUSSION

Department of ECE, AIEMS Page 18


Mini Project BEC586 2024-25

5.1. RESULT AND DISCUSSION

The quality of the food can be continuously monitored using sensors, and the results can be
conveniently displayed on an LED display. In the event that abnormal readings are detected by
any of the sensors, such as the MQ4 sensor, a food spoiling message will be displayed on the LED
screen. This immediate notification allows for prompt action to be taken to prevent the
consumption of spoiled food. Furthermore, users have the ability to view the sensor values on the
serial monitor of the Arduino IDE. This additional feature provides real-time data and enables
users to closely monitor the freshness of the food. They can easily track any variations in readings
and identify potential spoilage issues. By implementing this system, users can ensure the quality
and safety of their food, as well as minimize the risk of consuming spoiled items. graph on the
serial plotter of Arduino IDE.

Department of ECE, AIEMS Page 19


Mini Project BEC586 2024-25

CHAPTER 6

6.APPLICATION AND ADVANTAGES

6.1. APPLICATION

1. Cold Chain Management: IoT-based systems can monitor temperature, humidity, and gas levels
during transportation and storage, ensuring that perishable foods remain safe and fresh.

2. Food Storage and Warehousing: IoT-based systems can monitor environmental conditions in
storage facilities, detecting early signs of spoilage and enabling prompt action.

3. Retail and Supermarkets: IoT-based systems can monitor food quality in retail stores, enabling
staff to identify and remove spoiled products, reducing waste and improving customer satisfaction.

4. Food Processing and Manufacturing: IoT-based systems can monitor food quality during
processing and manufacturing, detecting contaminants and enabling prompt action to prevent
spoilage.

5. Supply Chain Optimization: IoT-based systems can provide real-time data on food quality,
enabling suppliers, manufacturers, and retailers to optimize their supply chains, reducing waste
and improving efficiency.

6. Food Safety and Quality Control: IoT-based systems can enable food safety and quality control
professionals to monitor food quality in real-time, enabling prompt action to prevent spoilage and
ensure compliance with regulations.

Department of ECE, AIEMS Page 20


Mini Project BEC586 2024-25

7. Smart Farming and Agriculture: IoT-based systems can monitor environmental conditions, soil
moisture, and crop health, enabling farmers to optimize their farming practices, reduce waste, and
improve crop yields.

8. Pharmaceutical and Healthcare: IoT-based systems can monitor the quality and integrity of
pharmaceuticals and medical supplies, ensuring that they remain safe and effective.

9. Restaurant and Food Service: IoT-based systems can monitor food quality in restaurants and
food service establishments, enabling staff to identify and remove spoiled products, reducing waste
and improving customer satisfaction.

10. Home and Consumer: IoT-based systems can monitor food quality in home refrigerators and
freezers, enabling consumers to identify and remove spoiled products, reducing waste and
improving food safety.

6.2. ADVANTAGES

1. Real-Time Monitoring: IoT-based systems provide real-time data on temperature, humidity, and
gas levels, enabling quick detection of spoilage.

2. Improved Accuracy: Automated sensors and machine learning algorithms reduce the likelihood
of human error, improving the accuracy of spoilage detection.

3. Increased Efficiency: IoT-based systems automate the monitoring process, freeing up staff to
focus on other tasks.

4. Reduced Food Waste: Early detection of spoilage enables prompt action, reducing the amount
of food wasted.

5. Enhanced Food Safety: IoT-based systems help ensure food is stored and handled safely,
reducing the risk of foodborne illnesses.

Department of ECE, AIEMS Page 21


Mini Project BEC586 2024-25

6. Cost Savings: Reducing food waste and improving supply chain efficiency can lead to
significant cost savings.

7. Scalability: IoT-based systems can be easily scaled up or down to accommodate changing


business needs.

8. Data-Driven Decision Making: IoT-based systems provide valuable insights into food storage
and handling practices, enabling data-driven decision making.

9. Remote Monitoring: IoT-based systems enable remote monitoring, allowing stakeholders to


track food quality from anywhere.

10. Alerts and Notifications: Automated alerts and notifications ensure that stakeholders are
promptly informed of any issues, enabling swift action.

11. Improved Supply Chain Management: IoT-based systems provide real-time data on food
quality, enabling more efficient supply chain management.

12. Regulatory Compliance: IoT-based systems can help ensure compliance with food safety
regulations and standards.

Department of ECE, AIEMS Page 22


Mini Project BEC586 2024-25

CHAPTER 7

7.CONCLUSION AND FUTURE SCOPE

7.1. CONCLUTION

Many illnesses have been linked to food poisoning, so in order to limit and prevent illness, we use
sensors to assess the freshness of common household foods like fruits. Gas emissions can be
detected by the Arduino sensors. Food rotting can be detected early and prevented from being
consumed by using sensors to look for certain values in foods. To improve the sensitivity of such
detection technologies, these techniques can be improved to incorporate additional types of gas
sensors and meals. The hardware component of this system, the Mq4 methane sensor, measures
the food's quality and freshness.

7.2. FUTURE SCOPE

Increasing the detection area with high-precision sensors: • The project can be modified by adding
more than two sensors, which will show two parameters on the screen. • This FSD system can also
be used by anyone who owns a refrigerator or may not have a refrigerator, as sometimes people
may forget to consume any food item before its expiry date, so it gets spoiled and is overlooked,
so it can be useful to detect the freshness of each item present in the fridge or else at home. Other
sensors can be utilized in it as well.

Department of ECE, AIEMS Page 23


Mini Project BEC586 2024-25

SOFTWARE USED: ARDUINO IDE

Department of ECE, AIEMS Page 24


Mini Project BEC586 2024-25

Figure: Images of Arduino IDE App

Introduction to Arduino IDE, where IDE stands for Integrated Development Environment - An
official software introduced by Arduino.cc, that is mainly used for writing, compiling and
uploading the code in almost all Arduino modules/boards. Arduino IDE is open-source software
and is easily available to download & install from Arduino's Official Site. It is available for all
operating systems i.e. MAC, Windows, Linux and runs on the Java Platform that comes with
inbuilt functions and commands that play a vital role in debugging, editing and compiling the code.

APPLICATION INSTRUCTION

1. Pair the HC-05 Bluetooth module with the mobile and enter the password.

Department of ECE, AIEMS Page 25


Mini Project BEC586 2024-25

2. Select the device

3. Upon giving command the "F" in the terminal, the data "F" is sent to car moves FORWARD.

4. Upon giving command the "B" in the terminal, the data "B" is sent to the connected Bluetooth
Module and the car moves BACKWARD.

5. Upon giving command the "L" in the terminal, the data "L" is sent to the connected Bluetooth
Module and the car turns LEFT.

6. Upon giving command, the "R" in the terminal, the data "R" is sent to the connected Bluetooth
Module and the car moves RIGHT.

7. Upon giving command the "S" in the terminal, the data "S" is sent to the connected Bluetooth
Module and the car moves STOP.

CODE

#include <SoftwareSerial.h>

SoftwareSerial nodemcu(8, 9);

int pinRedLed = 12;

int pinGreenLed = 11;

int pinSensor = A5;

Department of ECE, AIEMS Page 26


Mini Project BEC586 2024-25

int THRESHOLD = 250;

int buzzer = 10;

int rdata = 0;

String mystring;

void setup()

Serial.begin(9600);

nodemcu.begin(9600);

pinMode(buzzer, OUTPUT);

pinMode(pinRedLed, OUTPUT);

pinMode(pinGreenLed, OUTPUT);

pinMode(pinSensor, INPUT);

void loop()

// put your main code here, to run repeatedly:

int rdata = analogRead(pinSensor);

Serial.print("Methane Range: ");

Department of ECE, AIEMS Page 27


Mini Project BEC586 2024-25

Serial.println(rdata);

if(rdata >= THRESHOLD){

digitalWrite(pinRedLed, HIGH);

digitalWrite(pinGreenLed, LOW);

digitalWrite(buzzer, HIGH);

delay(50);

}else

digitalWrite(pinRedLed, LOW);

digitalWrite(pinGreenLed, HIGH);

digitalWrite(buzzer, LOW);

if (nodemcu.available() > 0)

char data;

data = nodemcu.read();

Serial.println(data);

if(rdata < 250){

Department of ECE, AIEMS Page 28


Mini Project BEC586 2024-25

mystring = mystring + "Methane Range: " + rdata;

nodemcu.println(mystring);

Serial.println(mystring);

}else

mystring = "Food Spoiled";

nodemcu.println(mystring);

Serial.println(mystring);

mystring = "";

delay(1000);

CONCLUSION

Many illnesses have been linked to food poisoning, so in order to limit and prevent illness, we use
sensors to assess the freshness of common household foods like fruits. Gas emissions can be
detected by the Arduino sensors. Food rotting can be detected early and prevented from being
consumed by using sensors to look for certain values in foods. To improve the sensitivity of such
detection technologies, these techniques can be improved to incorporate additional types of gas
sensors and meals. The hardware component of this system, the Mq4 methane sensor, measures
the food's quality and freshness.

REFERENCES
Department of ECE, AIEMS Page 29
Mini Project BEC586 2024-25

[1] REFERENCES e Fresh – A Device to Detect Food Freshness: International Journal of Soft
Computing and Engineering (IJSCE) ISSN: 2231-2307, Volume-8 Issue-3, September 2018.

[2] “FOOD QUALITY MONITORING SYSTEM BY USING ARDUINO“B.Ravi Chander ,


P.A.Lovina ,G.Shiva Kumari Assistant Professors, Dept. of ECE, St.Martin’s Engineering college,
Dhulapally(v), kompally,Secunderabad 500100 Telangana state, India. Journal of Engineering
Sciences (JES) Vol 11, Issue 4 , April/ 2020.

[3] “An Intelligent IoT-Based Food Quality Monitoring Approach Using Low-Cost Sensors”
Alexandru Popa, Mihaela Hnatiuc , Mirel Paun , Oana Geman , D. Jude Hemanth , Daniel Dorcea
, Le Hoang Son and Simona Ghita .Symmery EISSN 2073-8994, published by MDPI.

[4] “Aurdino Based Smart IoT Food Quality Monitoring System”, March 21, 2018.By Hai
Prasaath K. Engineers Garage –An EE world online resource.

[5] Food Spoilage: Microorganisms and their prevention by Seema Rawat. Pelagia Research
Library-Asian Journal of Plant and Science and Research ,2015.

Department of ECE, AIEMS Page 30

You might also like