FOOD MONITORING SYSTEM by using Arduino


FOOD MONITORING SYSTEM by using Arduino

The main purpose of this project is to provide a combination of manual supervision and partial automation in order to optimize and achieve maximum food growth and yield. The purpose of the food monitoring system for large or small scale and make it smarter and more effective.

Different sensors (MQ3 Sensor, LDR Sensor, DHT-11 Sensor, Arduino Uno) with different another components (ESP8266 Wi-Fi, 16.2 LCD Screen, Connecting Wires) have been used to make this project.

Using Arduino proved profitable, it is able to serve numbers of different sensors, at the same time and the markets offer various type and sizes of sensors. 


INTRODUCTION

One of the many reasons that cause approximately a billion tons of food wastage yearly in the world is due to the poor management of food storage warehouses. In Pakistan the problem is not food availability but massive food wastage. As per FAO it was estimated that nearly 40% of the food commodities is wasted in Pakistan due to spoilage. It was already estimated that by 2050 the world would need 70% more food. However, the pandemic effect seems to be making the situation much more difficult in the coming years.

There are various factors that cause food decay, like humidity, moisture, pests, hygiene, light intensity and temperature. It’s shown that if the temperature of the storage is between 4.44°C to 60°C, then bacteria double their number in every 20 minutes. Similarly, the humidity has to be maintained approximately 50-55% to keep the quality intact. Hence, food security needs to be treated as an extremely urgent issue.

Food safety and hygiene is a major concern in order to prevent the food wastage. The Quality of the food needs to be monitored and it must be prevented from rotting and decaying by the atmospheric factors like temperature, humidity and dark. Therefore, it is useful to deploy quality monitoring devices at food stores. These quality monitoring devices keep a watch on the environmental factor that cause or pace up decay of the food. Later, the environmental factors can be controlled like by refrigeration, vacuum storage etc.

In this project, a similar food quality monitoring device will be designed that will keep watch of environmental factors like temperature, humidity, alcohol content and exposure to light. The device is built on Arduino UNO which is a popular prototyping board. The Arduino board is interfaced with various sensors like DHT-11 to monitor temperature and humidity, MQ3 to detect alcohol content and LDR to measure exposure to light. This is an IoT device and sends the measured sensor data to an IoT platform. The ESP8266 Wi-Fi Modem is interfaced with the Arduino to connect it to the internet via Wi-Fi router. The sensor data is also displayed on a character LCD interfaced with the Arduino UNO. The IoT platform used for logging and monitoring of sensor data is Freeboard.io. With the power of Internet of Things, the environmental factors affecting the food storage can be monitored from anywhere, anytime and from any device.

Many such devices can be installed at a location for better monitoring and quality control. The Arduino Sketch running over the device implements the various functionalities of the project like reading sensor data, converting them into strings, displaying them on character LCD and passing them to the IoT platform. The Sketch is written, compiled and loaded using the Arduino IDE.


Research Objectives

The objectives to consider are:

Ø  Food safety and hygiene is a major concern in order to prevent the food wastage.

Ø  The Quality of the food needs to be monitored and it must be prevented from rotting and decaying by the atmospheric factors like temperature, humidity and dark. Therefore, it is useful to deploy quality monitoring devices at food stores.

Ø  These quality monitoring devices keep a watch on the environmental factor that cause or pace up decay of the food.

Ø  Automated system fully.


METHODOLOGY                        

The IoT based FQMS for fruits and vegetables warehouses has three basic functions and the block diagram of FMS is shown in Fig.

Monitoring

The physical parameters like light intensity, humidity and temperature are constantly monitored in real time using sensors.

Controlling

The real time value from the sensor is compared to the threshold values and brought back to the required value. List of fruits and vegetable with their ambient requirements is given in table.

Tracking

The above two functions can be tracked using an app, which will also notify the user when the food gets spoiled, then the alarm will be alerted.  


    


                                                        Block diagram of FMS
Table: Fruits and Vegetables with their ambient values of temperature, humidity and light intensity


SYSTEM REQUIREMENTS

To implement the Food Monitoring System following are the requirements:

·      Hardware Needed

              Arduino Uno board:

This board has ATmega328P microcontroller which has 14 GPIO pins, 6 PWM pins, 6 analog input pins and is programmable with the Arduino IDE. It can run on USB power. This board allows many different external peripheral connections like Wi-Fi, Bluetooth and Ethernet.


            DHT11 Sensor:

This sensor mainly consists of two parts a capacitive humidity sensor and thermistor. It converts the analog data to digital signal.



          LDR Sensor:

It is a light intensity sensing sensor. The resistance of the sensing material changes based on the light intensity. The change of resistance causes change in voltage, which is used to determine the light intensity.


                            MQ3 Sensor:

It is used to sense the presence of alcohol using SnO2 as the sensitive material. The concentration of alcohol gas in the environment increases the conductivity of the sensing material, using which the alcohol presence in the environment can be determined. 



      Connecting Wires

Connecting Wires means those wires that connect the leg wire of one electric blasting cap with the leading wires, when blasting in ser






         

Piezo Buzzer 

An Arduino buzzer is also called a piezo buzzer. It is basically a tiny speaker that you can connect directly to an Arduino. You can make it sound a tone at a frequency you set. The buzzer produces sound based on reverse of the piezoelectric effect.


LCD

The LCD (Liquid Crystal Display) is a type of display that uses the liquid crystals for its operation. Here, we will accept the serial input from the computer and upload the sketch to the Arduino. The characters will be displayed on the LCD.



·      Software Needed

Arduino IDE (SOFTWARE):

It is free source Arduino software that helps to write codes and program Arduino board. This software is compatible with any type of Arduino board.

The Arduino Integrated Development Environment (IDE) is a cross-platform application (for Windows, macOS, Linux) that is written in functions from C and C++. ... The Arduino IDE supplies a software library from the Wiring project, which provides many common input and output procedures.

·      Web Platforms Needed

1) Thing-speak: It is a free source that uses HTTP protocol to store or retrieve data from things. The information can be used for further analysis in IoT application.

2) MIT app inventor: It is a web application that allows the developer to create application software for operating systems. It is easy to build fully functional apps as it uses block- based programming.





        Programming Guide –

The Arduino sketch manages to collect data from the DHT-11, MQ3 and LDR sensor, convert sensor values to string, display them on character LCD and pass data to the Thing-Speak server. First the standard open-source library of Arduino for interfacing DHT11 is imported and software Serial library for serial communication with the Wi-Fi module is imported. The variables representing pin connections to read the sensor data are initialized.

 

Code of the Program:

 

#include <Wire.h>

 

#include <DHT.h>

#include <DHT_U.h>

 

#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd=LiquidCrystal_I2C(0x27,16,2);

 

 

 

#define DHTPIN 2

#define DHTTYPE DHT11

 

DHT dht(DHTPIN,DHTTYPE);

#define SPOILAGE 120   // Define max value that we consider sPOILAGE

#define FRESH 400   // Define min value that we consider FRESH

 

#define MQ3pin 0

 

 

Void setup() {

  // put your setup code here, to run once:

  Serial.begin(9600);

  Lcd.init();

  Lcd.backlight();

  Dht.begin();

   Serial.println(“MQ3 warming up!”);

  Delay(20000); // allow the MQ3 to warm up

}

 

Void loop() {

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

  Float h = dht.readHumidity();

  // READ TEMPERATURE IN CELCIUS

  Float t = dht.readTemperature();

  // READ TEMPERATURE IN FAHRENHEIT

  Float f = dht.readTemperature(true);

 

  String output= “Temperature “+ String(t) +”C or “+ String(f) +”F and Humidity “+ String(h) +”%”;

  Serial.println(output);

 

  Float sensorValue;  //variable to store sensor value

  sensorValue = analogRead(MQ3pin); // read analog input pin 0

 

  Serial.print(“Sensor Value: “);

  Serial.print(sensorValue);

 

  // Determine the status

  If (sensorValue < SPOILAGE) {

    Serial.println(“  |  Status: Stone SPOILAGE”);

    Lcd.setCursor(0,0);

    Lcd.print(“  |  Status: Stone SPOILAGE”);

  } else if (sensorValue >= SPOILAGE && sensorValue < FRESH) {

    Serial.println(“  |  Status: EAT but within legal limits”);

  } else {

    Serial.println(“  |  Status: FRESH”);

    Lcd.setCursor(0,0);

    Lcd.print(“  |  Status: FRESH”);

  

  }

 

 




Future Scope

Ø  This application is used by farmers to detect how much time their food stay fresh.

Ø  With the use of this application users can also determine the test of food.

Ø  The user can also get output in the form of voice by attaching speaker with circuit.

Ø  User can also detect inhabitant food.



CONCLUSION

Food wastage is one of the crucial crises in the world. One of the main reasons of food wastage is improper warehouse management and this is a solvable problem to an extent with the current technological advancement. Over referring to different researches and solutions to this problem, we have come to a realization that the field of IoT can provide a very efficient solution to this problem. Therefore, we have discussed a food quality monitoring system based on IoT that will control different environmental factors such as light intensity, humidity and temperature that are necessary to be maintained at a threshold value to prevent the food from spoilage. It also provides a user interface through an app where they can monitor the light intensity se parameters and at the same time get alerts when the food is spoiled or if there is a fire hazard.





ACKNOWLEDEGEMENT

    I would like to express my gratitude and appreciation to all those who gave me the possibility to complete this report. Special thanks is due to my supervisor Mr. Ubaid  and Mrs. Muddasira Riaz whose help, stimulating suggestions and encouragement helped me in all time of fabrication process and in writing this report. I also sincerely thanks for the time spent proofreading and correcting my many mistakes.

I would also like to acknowledge with much appreciation the crucial role of the all my group members, who helped me in completing this project.





REFERENCES

 

·        Rohan Wagle, Mayur Shah, Aditya Kadam & Ramgopal Sahu, “A Survey on Monitoring and Control System for Food Storage using IoT”, International Journal of Innovative Research in Computer and Communication Engineering, May 2017, Vol. 5, Issue 5.

·        B. Ravi Chander, P.A. Lovina & G. Shiva Kumari, “Food Quality Monitoring System by using Arduino”, Journal of engineering sciences, Apr 2020, Vol. 11 Issue 4.

·        Arduino.cc. (2018). Arduino – Introduction:

https://www.arduino.cc/en/Guide/Introduction.

·        Naveed Shahzad, Usman Khalid, Atif Iqbal, Meezan-UrRahman, “eFresh – a Device to Detect Food Freshness”, International Journal of Soft Computing and Engineering (IJSCE), September 2018, Vol. 8 Issue 3.

·        SSRG, S. (2017). Engineering Science and Technology Journals, SSRG International Journal. [online] Internationaljournalssrg.org. Available at: http://www.internationaljournalssrg.org

·        Fu Ying, Li Fengquan, “Application of internet of things to the Monitoring System for Food Quality safety”,

·        Arresearchpublication.com. (2017). Cite a Website - Cite This For Me. [online] Available at: http://www.arresearchpublication.com/images/shortpdf/1478954748_161_ijeee .pdf

·        Amrita Srivastava, Ankita Gulati, “ITrack: IoT framework for Smart Food Monitoring System”, International Journal of Computer Applications, August 2016, Vol. 148 - No.12. 

Comments