IoT-Based Food Tracking and Management System Employing NodeMCU and the Blynk App

Page 1

IoT-Based Food Tracking and Management System Employing NodeMCU and the Blynk App

1Student, Dept. of Electronics and Communication Engineering, BVM college, Gujarat, India

2 Student, Dept. of Electronics and Communication Engineering, BVM College, Gujarat, India

3 Assistant Professor, Dept. of Electronics and Communication Engineering, BVM College, Gujarat, India ***

Abstract – This work is aiming at ensuring the safety of food by monitoring and controlling the temperature and gas levels in a storage unit. The system utilizes a DHT11 sensor to measure temperature and humidity levels, an MQ4 gas sensor to detect the presence of harmful gases, an exhaust fan that turns on when the temperature exceeds a certain threshold, and a NodeMCU controller to manage the sensors and fan. All data is transmitted to a Blynk server, where it can be monitored remotely using a mobile application. Through the provision of real-time monitoring andmanagement of storage conditions, the initiative highlights the potential for the Internet of Things technology to enhance food safety and cut down on food waste.

Key Words: IoT,NodeMCU,DHT-11,Temperature,Storage, Mobileapplication,Humidity.

1. INTRODUCTION

Thesafetyandqualityoffoodproductsarecriticalconcerns for consumers, producers, and regulatory bodies. Temperature and gas levels are two critical factors that affect the safety and quality of food during storage. Traditional methods of monitoring temperature and gas levels in storage units are time-consuming and prone to errors. The emergence of IoT technologies has opened up new possibilities for real-time monitoring and control of environmentalconditionsinstorageunits.Inthiswork,the authorsutilizeaDHT11sensortomeasuretemperatureand humiditylevels,anMQ4gassensortodetectthepresenceof harmful gases, an exhaust fan that turns on when the temperature exceeds a certain threshold, and a NodeMCU controller to manage the sensors and fan. All data is transmitted to a Blynk server, where it can be monitored remotely using a mobile application. The project demonstratesthepotentialofIoTtechnologiestoimprove food safety and reduce waste by providing real-time monitoring and control of storage conditions. The report provides a detailed description of the system's design, implementation,andtesting,andevaluatesitseffectiveness inmaintainingsafestorageconditionsforfoodproducts.

1.1 PROBLEM STATEMENT

Thestorageandtransportationoffoodproductsare criticalstagesinthesegmentofthesupplychainoffood,and

the safety and quality of food during these stages are of utmost importance. Temperature and gas levels are two importantparametersthatareusefulforthesafetyoffood during storage. Traditional methods of monitoring temperature and gas levels in storage units are timeconsumingandpronetoerrors.Moreover,thesemethodsdo notprovidereal-timemonitoringandcontrol,whichcanlead tospoilage,wastage,andcompromisedfoodsafety.

1.2 METHODOLOGY

Themethodologyfortheproposedhardwaredesign consistsof thefollowingsteps:Circuitdiagram:

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 04 | Apr 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page1455
Fig -1:CircuitImplementationonsoftware BLOCKDIAGRAM: Fig -2:BlockDiagramoftheSystem

HardwareSelection:Thefirststepistoselectthehardware componentsrequiredforthesystem,includingtheDHT11 sensor,MQ4gassensor,NodeMCUcontroller,andexhaust fan.Theselectionofhardwarecomponentswilldependon the specific requirements of the food storage unit and the environmentalconditionstobemonitored.

CircuitDesign:Thesecondstepistodesignthecircuitthat will connect the hardware components to the NodeMCU controller.Thecircuitshouldbedesignedtoensureproper connectivity and compatibility between the hardware componentsandtheNodeMCUcontroller.

Programming: The third step is to program the NodeMCU controllertomanagethesensorsandcontroltheexhaustfan basedontemperatureandgaslevels. TheArduinoIDE,an open-source platform for programming microcontrollers, shouldbeusedfortheprogramming.

BlynkServerConfiguration:Thefourthstepistoconfigure theBlynkserver,whichwillreceivedatafromtheNodeMCU controller and provide a user-friendly interface for monitoring and controlling the system. The Blynk server should be configured to receive data from the NodeMCU controllerandprovidereal-timemonitoringoftemperature andgaslevels.

MobileApplicationDevelopment:Thefifthstepistodevelop amobileapplicationusingtheBlynkplatform.Themobile application should provide a user-friendly interface for monitoringandcontrollingthesystem,allowingtheuserto monitortemperatureandgaslevelsandcontroltheexhaust fanremotely.

SystemIntegrationandTesting:Thefinalstepistointegrate allcomponentsofthesystemandtestitsfunctionality.The system should be tested to ensure that it is functioning properly, including testing the sensors, the NodeMCU controller,andtheBlynkserver.Thesystemshouldalsobe testedforreliabilityandaccuracy.

The technique for the proposed model entails choosing hardwareparts,circuitdesign,programming,configuringa Blynk server, developing mobile applications, system integration, and testing. The suggested system intends to offeradependable,economical,anduser-friendlysolutionto theissueofmonitoringandmanagingfoodproductstorage conditions.

2. Related Work

2.1 Internet of Things (IoT)

TheInternetofThings(IoT)isthenamegiventoanetwork ofinterconnecteddevicesthatcanspeakwithoneanother and share data with one another.. IoT technology is being used in many sectors, including the food sector, to boost operational effectiveness, cut costs, and improve product

quality. Temperature, humidity, and position may all be tracked using IoT devices like sensors, smart labels, and RFIDtags.

2.2 IoT Applications in the Food Industry

Inrecentyears,therehasbeenasubstantialincreaseinthe amountofattentionpaidtotheapplicationofIoTtechnology inthefoodbusiness.IoTdevicescanbeusedtomonitorfood productsthroughoutthesupplychain,from farmtotable. IoTtechnologycanhelptooptimizetheproductionprocess, improveproductquality,andreducefoodwaste.Examples of IoT applications in the food industry include precision agriculture,supplychainmanagement,andfoodsafetyand qualitycontrol.

2.3 Food Spoilage and Foodborne Illnesses

Foodspoilageandfoodborneillnessesaremajorconcernsin thefoodindustry.Spoilageoccurswhenfoodproductsare exposedtounfavorableconditionssuchashightemperature, humidity,andoxygen.Foodborneillnessesarecausedbythe consumptionofcontaminatedfoodproducts.TheuseofIoT technologycanhelptomonitorfoodproductsandidentify potential hazards that may lead to spoilage and contamination.

2.4 Food Monitoring Systems

Systemsformonitoringfoodarecreatedtokeepaneyeon severalfactorsthatinfluencethesafetyandcaliberoffood goods. Traditional techniques of inspecting food goods requirealotofworkandarepronetomistakes.IoT-based foodmonitoringsystemscantrackfoodgoodsinreal-time acrossthewholesupplychain.Temperature,humidity,and position may all be tracked using IoT devices like sensors andsmartlabels.

2.5 Existing IoT-Based Food Monitoring Systems

Several IoT-based food monitoring systems have been developedtoimprovefoodsafetyandqualitycontrol.These systems use IoT devices such as sensors, RFID tags, and smartlabelstomonitorfoodproductsthroughoutthesupply chain. Examples of existing IoT-based food monitoring systemsincludeFreshSurety,ColdChainTechnologies,and FoodLogiQ. These systems have been shown to improve operational efficiency, reduce costs, and enhance product quality.However,thereisstillaneedforfurtherresearchto develop more advanced and effective IoT-based food monitoringsystems.

3. SYSTEM DESIGN

3.1

System Architecture:

HardwareComponents:TheDHT11sensorwillbeusedby thesystemtogaugethehumidityandtemperaturewithin the food storage container. To identify the presence of

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 04 | Apr 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page1456

dangerousgasesincludingcarbonmonoxideandmethane, theMQ4gassensorwillbeemployed.

to provide real-time monitoring and control of the food storageunit.

3.2 Hardware Design

The following elements are part of the hardware architecturefortheplannedInternetofThings-basedFood MonitoringSystem:

SensingoftemperatureandHumiditywithDHT11:ADHT11 sensor, a popular and inexpensive option for IoT applications, will be utilized to monitor the container's insidetemperatureandhumidity.

The proposed IoT-based Food Monitoring System has the followingsystemarchitecture:

TheNodeMCUcontrollerwillbeattachedtoanexhaustfan toregulatetheairflowwithinthestorageunit.

NodeMCU Controller: The NodeMCU controller, which managesthesensorsandcontrolstheexhaustfandepending onthetemperatureandgaslevelsmeasuredbythesensors, will be the system's brain The Arduino Integrated DevelopmentEnvironment(IDE)willbeusedtowritethe codefortheNodeMCUcontroller,whichwillthenbeusedto collectdatafromthesensorsandsendittotheBlynkserver sothatitcanbemonitored.

BlynkServer:TheNodeMCUcontrollerwillsenddatatothe Blynk server, which will then provide an easy-to-use interface for monitoring and managing the system. The NodeMCUcontroller'sreal-timedatawillbereceivedbythe Blynkserverandshownonthemobileapplication.

Mobile Application: The Blynk platform will be used to construct the mobile application, which will offer a userfriendlyinterfaceformonitoringandmanagingthesystem. Theuserwillbeabletoremotelyoperatetheexhaustfanand monitortemperatureandgaslevelsinreal-timeusingthe mobileapplication.

Cloud Server: The cloud server will be used to store data collectedbythesystemforfurtheranalysisandreporting. The cloud server will also provide backup and recovery servicesforthesystem.

Theproposedsystemarchitectureaimstoprovideareliable, cost-effective,anduser-friendlysolutiontotheproblemof monitoring and controlling storage conditions for food products. The system will use state-of-the-art IoT technologiessuchassensors,controllers,andcloudservers

The amount of water vapor in the air is measured as humidity.Theamountofhumidityintheairhasanimpact on several chemical, biological, and physical processes. Humidity can have an impact on staff health and safety, companycostsassociatedwiththeproducts,andemployee safety. So, measuring humidity is crucial in the semiconductorandcontrolsystemsectors. Thequantityof moistureinagas whichmightbeacombinationofwater vapor, nitrogen, argon, or pure gas, for example is determined by its relative humidity. Based on their measuringunits,humiditysensorsmaybedividedintotwo categories. A relative humidity sensor and an absolute humiditysensorarewhattheyare.Adigitaltemperatureand humiditysensoristheDHT11.

Thehardwaredesignoftheproposedmodeliscomprisedof thefollowingcomponents:TheDHT11isareasonablypriced digital sensor that can detect both temperature and humidity. To instantly detect humidity and temperature, this sensor may be simply interfaced with any microcontroller,includingArduino,RaspberryPi,etc.

TheDHT11humidityandtemperaturesensorisaccessible asbothasensorandamodule.Thissensorisdistinguished from the module by a pull-up resistor and an LED power indicator.Thissensoremploysacapacitivehumiditysensor andathermistortodetectambientair.

The DHT11 sensor consists of a temperature-measuring thermistorandacapacitivehumidity-detectingdevice. Two electrodes are separated by a substrate that can contain moistureasadielectricinthehumidity-detectingcapacitor. Ashumiditylevelsvacillate,thecapacitancevaluefluctuates. Theintegratedcircuitcalculates,interprets,andconvertsthe modifiedresistancevaluestodigitalformat.

Thissensormeasurestemperatureusingathermistorwitha negativetemperaturecoefficient,resultinginadecreasein resistance as the temperature increases. This sensor is typically constructed from polymers or semiconducting ceramics to achieve higher resistance values for even the smallesttemperaturechanges.

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 04 | Apr 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page1457
Fig -3:IOTbasedfoodmonitoringsystem

The DHT11 has a temperature range of 0 to 50 degrees Celsiuswitha2-degreeprecision.Thissensoroffersa20to 80%humidityrangewitha5%accuracy.Thissensorhasa sampling rate of 1Hz, indicating one reading each second. The DHT11 is a small device with a 3 to 5-volt working range.2.5mAisthemaximumcurrentthatmaybeapplied formeasurement.

DHT11 sensors have Data, VCC, GND, and Not Connected pins. 5k to 10k ohm pull-up resistors allow the sensormicrocontrollerconnection.

3.3 Applications

This sensor is used in various applications such as measuring humidity and temperature values in heating, ventilation,andairconditioningsystems.Weatherstations alsousethesesensorstopredictweatherconditions. The humiditysensorisusedasapreventivemeasureinhomes where people are affected by humidity. Offices, cars, museums, greenhouses,and industriesuse thissensorfor measuringhumidityvaluesandasasafetymeasure.

MQ4GasSensor:TheMQ4gassensorwillbeusedtodetect thepresenceofharmfulgasessuchascarbonmonoxideand methaneinsidethefoodstorageunit.Itisalow-costsensor thatcandetectawiderangeofgases.

TheMQ4methanegassensorisextremelyusedfordetecting gasleakageathomeorinindustrieslikeMethane(CH4)& CNGGas.Thisgassensorishighlyresponsiveinverylittle time, so based on the sensitivity requirements; it can be adjustedthroughapotentiometer.Thisisananalogoutput sensor, used like a CNG (compressed natural gas) sensor withintheseriesofMQsensors.

Sothissensorissuitablefordetectingtheconcentrationof naturalgaslikemethaneintheair.Forthissensor,ifthegas concentration increases then the output voltage will be increased.Thissensorworkswith5VDCanddraws750mW around. This article discusses an overview of the MQ4 methanegassensoranditsworkingwithapplications.

MQ4 methane gas sensor is a MOS (metal oxide semiconductor)typesensor,usedtodetectthemethanegas concentrationwithintheairateitherhomeorindustries& generatesoutputlikeanalogvoltagebyreadingit.Here,the range of concentration for sensing ranges from 300 pm –10,000ppmwhichisappropriateforthedetectionofaleak.

This gas sensor mainly includes a detecting element like ceramicbasedonaluminum-oxide(Al₂O₃),coatedwithTin dioxide(SnO2)andarrangedwithinastainless-steelmesh.

MQ4MeMQ4MethaneGasSensor

When methane gas and detecting elements get in contact witheachotherthentheresistivityofthedetectingelement willbechanged.Afterthat,thechangeismeasuredtogetthe methanegasconcentration.TheignitionofMethanegasis extremely exothermal which means it generates a huge amountofheatonceignited.

3.4 PIN CONFIGURATION

The pin configuration of the MQ4 methane gas sensor is shown below. This sensor includes three pins which are discussedbelow.

Pin1(HPins):Thesepinsaretwowhereoneofthemis usedtoconnectthesupplyandtheremainingpinis connectedtoground

Pin2(APins):BothpinslikeA&Bareinterchangeableand willbeconnectedtothesupplyvoltage.

Pin3(BPins):A&Bpinsareexchangeablewhereonepin actslikeoutputandanotherpinwillbepulledtotheGND terminal.

ThepinconfigurationoftheMQ-4methanegassensor moduleincludesfourpinswhicharediscussedbelow.

VCCPin:Thispinprovidesvoltagetothemoduleandthe typicaloperatingvoltageis+5V

GNDPin:Thispinisusedtoconnectthesensormoduleto theGNDterminalofthesystem

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 04 | Apr 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page1458
Fig -4:DHT11Sensor[19] Fig -4:MQ4Sensor[18]

DO(DigitalOut)Pin:Thispinprovidesdigitaloutputby settingathresholdvaluewiththehelpofthe potentiometer

AO(AnalogOut):Thispinprovidesoutputanalogvoltage whichrangesfrom0to5Vdependingontheintensityof thegas.

3.5 FEATURES & SPECIFICATIONS

ThefeaturesandspecificationsoftheMQ4methanegas sensorincludethefollowing.

● Sensitivityisgoodforcombustiblegasinan extensiverange

● Sighsensitivityfornaturalgas,methanegas

● Smallsensitivitytosmokeandalcohol

● Quickresponsive,longlife,andstable

● Thedrivecircuitissimple

● Loadresistanceis20KΩ

● Detectingresistancerangesfrom10KΩto60KΩ

● Preheattimeisabove24Hrs

● Therequiredvoltageis5V

● DOoutput:is0.1to5V

● AOoutputis0.1to0.3V

● Detectiongasismethaneornatural

● Theconcentrationofdetectionrangesfrom200to 10000ppm

● Interface:TTL-compatibleinput&output

● Heaterutilizationislowthan750mw

● Operatingtemperaturerangesfrom14to122° Fahrenheitor-10to50°Centigrade

Exhaust Fan: An exhaust fan will be connected to the NodeMCU controller to control the ventilation inside the food storage unit. The fan will be activated based on the temperatureandgaslevelsdetectedbythesensors.

Exhaust fans aid in getting rid of excess moisture and unwantedodorsinrooms,kitchens,pantries,dining,toilet, washrooms, pump house, battery rooms, etc. They are present in areas where water builds up quickly. Ensuring properventilationisofprimeimportance.

Exhaust fans help in ventilation and also remove contaminants that can cause harm or irritation if inhaled. Theyaredevicesthatprovideventilationandhenceprevent allergies,headaches,asthma,etc.Italsoreducestheriskof mold,mildew,anddamagetowallsorfurniture

NodeMCUController:TheNodeMCUcontrollerwillbeused to manage the sensors and control the exhaust fan. It is a low-cost and easily programmable microcontroller board basedontheESP8266Wi-Fimodule.

The open-source NodeMCU uses the ESP8266, a low-cost System-on-a-Chip (SoC). Espressif Systems' ESP8266 contains CPU, RAM, WiFi networking, and a modern operatingsystemandSDK.It'sidealforanyIoTproject.

The ESP8266 is difficult to access and utilize as a chip, though. For the simplest operations, like turning it on or sendingakeystroketothe"computer"onthechip,youmust attachwires with the necessaryanalogvoltageto itspins. Additionally,youneedto programitinlow-level machine

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 04 | Apr 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page1459
Fig -5:ExhaustFan Fig -6:NodeMCU[20]

instructionsthatthechiphardwarecanunderstand.Using the ESP8266 as an embedded controller chip in massproduced devices is not problematic at this degree of integration.Foramateurs,hackers,orstudentswhowantto testitoutintheirownIoTprojects,itisasignificantburden

communication(RS232andRS485),andcancommunicateat upto4.5Mbps.UART0(TXD0,RXD0,RST0&CTS0pins)can be used for communication. However, UART1 (TXD1 pin) featuresonlydata transmitsignal so,itisusuallyusedfor printinglogs

SPI Pins NodeMCU/ESP8266 features two SPIs (SPI and HSPI)inslaveandmastermodes.TheseSPIsalsosupport thefollowinggeneral-purposeSPIfeatures:ithas4timing modesoftheSPIformattransfer.Ithasclockedupto80MHz andthedividedclocksof80MHz.ithas64-ByteFIFO

SDIO Pins NodeMCU/ESP8266 features a Secure Digital Input/Output Interface (SDIO) which is used to directly interfaceSDcards.4-bit25MHzSDIOv1.1and4-bit50MHz SDIOv2.0aresupported.

PWM Pins The board has 4 channels of Pulse Width Modulation(PWM).ThePWMoutputcanbeimplemented programmatically and used for driving digital motors and LEDs.PWMfrequencyrangeisadjustablefrom1000 μsto 10000μs(100Hzand1kHz).

PowerPins:Therearefourpowerpins wheretheVIN pin andthreepinsof3.3Varethere.

VIN supplies the NodeMCU/ESP8266 and peripherals directly. The NodeMCU module's integrated regulator regulatesVINpower,whichmayalsobe5Vcontrolled.

3.3V pins are the output of the onboard voltage regulator andcanbeusedtosupplypowerto external components. GNDarethegroundpinsofNodeMCU/ESP8266

I2CPinsareusedtoconnectingI2Csensorsandperipherals. BothI2CMasterandI2CSlavearesupported.I2Cinterface functionalitycanberealizedprogrammatically,andtheclock frequencyis100kHzatamaximum.Itshouldbenotedthat theI2Cclockfrequencyshouldbehigherthantheslowest clockfrequencyoftheslavedevice.

DigitalI/OPortsThereare17general-purposeinput/output (GPIO) pins on the NodeMCU/ESP8266 that may be programmedtodoawidevarietyoftasks.EachGPIOwith digital capabilities can be set to high impedance, internal pull-uporpull-down,orboth.Edge-triggerandlevel-trigger settings are available when used as input to cause CPU interruptions.

ADC Channel The NodeMCU is embedded with a 10-bit precisionSARADC.Thetwofunctionscanbeimplemented usingADC.TestingpowersupplyvoltageofVDD3P3pinand testinginputvoltageofTOUTpin.However,theycannotbe implementedatthesametime.

UART Pins NodeMCU/ESP8266 has 2 UART interfaces (UART0 and UART1) which provide asynchronous

ControlPinsareusedtocontrollingtheNodeMCU/ESP8266. ThesepinsincludetheChipEnablepin(EN),Resetpin(RST), andWAKEpin.

EN:TheESP8266chipisenabledwhentheENpinispulled HIGH.WhenpulledLOWthechipworksatminimumpower.

RST:RSTpinisusedtoresettheESP8266chip.

WAKE: A wake pin is used to wake the chip from a deep sleep.

Tiny Sine WaveControl Pins are used to control the NodeMCU/ESP8266.ThesepinsincludetheChipEnablepin (EN),Resetpin(RST),andWAKEpin.

EN:TheESP8266chipisenabledwhentheENpinispulled HIGH.WhenpulledLOWthechipworksatminimumpower.

RST:RSTpinisusedtoresettheESP8266chip.

WAKE: A wake pin is used to wake the chip from a deep sleep.

Power Supply: The system will be powered by a 5V DC powersupply.

Breadboard and Jumper Wires: The sensors, NodeMCU controller, and exhaust fan will be connected using a breadboardandjumperwires.

Thehardwaredesignofthesystemisstraightforwardand canbeeasilyassembledusingoff-the-shelfcomponents.The sensors, controller, and fan will be connected to the breadboard,andthebreadboardwillbepoweredbythe5V DC power supply. The NodeMCU controller will be

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 04 | Apr 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page1460
Fig -7:NodeMCUwithvariouspins[17]

programmedusingtheArduinoIDEtocollectdatafromthe sensors and control the exhaust fan based on the temperature and gas levels detected by the sensors. The entiresystemwillbeenclosedinsuitablehousingtoprotect itfromtheenvironment.

3.6 SOFTWARE DESIGN

The software design of the IoT-based Food Monitoring System involves two parts: programming the NodeMCU controllerandconfiguringtheBlynkserver.

NodeMCUControllerProgramming:

The NodeMCU controller will be programmed using the Arduino Integrated Development Environment (IDE). The followingstepswillbefollowed:

Install the necessary libraries for the DHT11 and MQ4 sensors.

Definethepinsforthesensorsandtheexhaustfan.

Initializethesensorsandthefaninthesetupfunction.

Create a function to read the sensor data and control the exhaustfanbasedonthetemperatureandgaslevels.

ConnecttheNodeMCUtotheWi-FinetworkandtotheBlynk server.

Create a Blynk virtual pin to display the temperature and humidityreadingsandanothervirtualpintocontrolthefan.

CreateaBlynkfunctiontoupdatethevirtualpinswiththe sensorreadingsandtoreceivecommandsfromtheappto controlthefan.

Run the loop function to continuously monitor the sensor readingsandupdatetheBlynkapp.

BlynkServerConfiguration:

TheBlynkserverwillbeconfiguredasfollows: CreateanewprojectintheBlynkapp.

Add two virtual pins to the project, one for displaying the temperature and humidity readings and another for controllingthefan.

Generateanauthenticationtokenfortheproject.

ConnecttheNodeMCUcontrollertotheBlynkserverusing theauthenticationtokenandtheWi-Finetworkcredentials. The real-time temperature and humidity readings are analyzedonBlynkAppandthefanisalsobeingcontrolled.

Thesoftwaredesignofthe systemisessential in ensuring that the IoT-based Food Monitoring System functions as intended.TheBlynkserverenablesremotemonitoringand

management of the system in real-time. Additionally, the programmingoftheNodeMCUcontrollerenablesthesystem to take actions based on the sensor readings, such as activating the exhaust fan to control temperature and gas levels.

3.7 Data Management and Analytics

TheIoT-basedFoodMonitoringSystemcollectsasignificant amountofdatafromtheDHT11andMQ4sensors.Tomake this data useful, it needs to be stored, managed, and analyzed.TheBlynkserverprovidesreal-timemonitoringof the data, but more in-depth analysis requires data managementandanalytics.

DataManagement:

Thedatagatheredfromsensorswillbestoredinadatabase. Thedatawillberecordedatfixedintervals,suchasevery10 minutes,andstoredinatabularformat.Thedatabasecanbe setupusingsoftwaresuchasMySQLorSQLite.Thedatawill bestoredinthedatabasewiththefollowingfields:

Timestamp:thedateandtimewhenthedatawasrecorded.

Temperature: the temperature reading from the DHT11 sensor.

Humidity:thehumidityreadingfromtheDHT11sensor.

GasLevel:thegaslevelreadingfromtheMQ4sensor.

DataAnalytics:

Dataanalyticsinvolvesusingstatisticalmethodstouncover trends and patterns in the data. In the context of the IoTbased Food Monitoring System, data analytics can help detect anomalies in the temperature and gas levels that couldindicatespoilageorcontaminationofthefood.

Several data analytics techniques can be used with the collecteddata,including:

Descriptivestatistics:Thedatamaybesummarisedandany patterns or trends can be found by utilizing statistical measuressuchasthemean,themedian,andthestandard deviation.

Time-seriesanalysis:analyzingthedataovertimetodetect patternsandtrends.

Machinelearning:Usingthedatatobuildamachinelearning modeltopredictfuturetemperatureandgaslevelreadings andfindoutliers.

Thedataanalyticscanbeperformedusingsoftwaresuchas Python with libraries such as Pandas, NumPy, and Scikitlearn. The analytics results can be displayed using visualizationtoolssuchasMatplotlibandPlotly.

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 04 | Apr 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page1461

Overall, data management and analytics are essential components of the proposed model. By analyzing the collecteddata,itispossibletodetectpotentialissuesearly andtakecorrectiveactionsbeforesignificantdamageoccurs.

SystemIntegration:

Systemintegrationistheprocessofputtingallthedifferent parts of the proposed model together to make sure they workasasingleunit.ThefollowingstepsshowhowtheIoTbasedFoodMonitoringSystemisputtogether:

HardwareIntegration:Thefirststepinsystemintegrationis to connect all the hardware components. The DHT11 and MQ4 sensors are connected to the NodeMCU controller, whichisconnectedtotheinternetviaWiFi.Theexhaustfan is connected to the NodeMCU controller and is controlled basedonthetemperaturereadingfromtheDHT11sensor. Thehardwarecomponentsareconnectedaccordingtothe hardwaredesigndescribedearlier.

Software Integration: The software components of the system are integrated using the Blynk platform. The NodeMCUcontrollerisprogrammedusingtheArduinoIDE tosenddatafromthesensorstotheBlynkserverusingthe BlynkAPI.TheBlynkappisusedtodisplayreal-timesensor readingsandtocontroltheexhaustfan.Thedatacollected from the sensors is also stored in a database using the softwaredesigndescribedearlier.

CloudIntegration:TheIoT-basedFoodMonitoringSystem usescloudservicestostorethedataandmakeitaccessible fromanywhere.TheBlynkserverisacloud-basedplatform thatprovidesreal-timemonitoringofthedata.Thedatabase canalsobehostedonacloudserversuchasAmazonWeb ServicesorMicrosoftAzure.

AnalyticsIntegration:Thedatacollectedfromthesensorsis analyzedusingdataanalyticstechniquessuchasdescriptive statistics, time-series analysis, and machine learning. The analyticscanbeperformedusingsoftwaresuchasPython and can be integrated with the Blynk platform to provide real-timealertswhenanomaliesaredetected.

UserIntegration:Thefinalstepinsystemintegrationisto integrate the system with the end users. The Blynk app providesaninterfacefortheend-userstomonitorthesensor readingsandcontroltheexhaustfan.Theanalyticsresults can also be displayed on the app to help end-users make informeddecisionsaboutthefoodbeingmonitored.

4 Implementation and Testing

4.1 Implementation of the System:

TosetuptheIoT-basedfoodtrackingsystem,thehardware partshadtobeputtogether,andsoftwarehadtobemadeto collect,store,andanalyzedata.Thehardwarecomponents

includedtheDHT11temperatureandhumiditysensor,MQ4 gas sensor, exhaust fan, NodeMCU controller, and power supply.Thesoftwarecomponentsincludedprogrammingthe NodeMCU controller, configuring the Blynk server, and developingauserinterfacefordisplayingreal-timedata.

The temperature and humidity of the food storage environmentweremeasuredusingtheDHT11sensor.The MQ4gassensorwasusedtodetectanyharmfulgasesthat may accumulate in the storage area. The exhaust fan was used to regulate the temperature and expel any harmful gasesdetectedbytheMQ4sensor.

The NodeMCU controller was programmed using the Arduino Integrated Development Environment (IDE) to collectdatafromtheDHT11andMQ4sensorsandcontrol theexhaustfan.TheNodeMCUwasconnectedtotheBlynk server,whichprovidedaplatformformonitoringthesystem inrealtime.TheBlynkapplicationwasdevelopedtodisplay thetemperature,humidity,andgaslevelsofthefoodstorage area.Theuserinterfacealsoprovidedanotificationsystem that alerted the user when the temperature or gas levels exceededsafelimits.

The system was implemented using a breadboard and jumper wires to connect the various components. The software was developed using the Arduino IDE and the Blynk application was developed using the Blynk app builder. The system was tested by monitoring the temperatureandgaslevelsofasmallfoodstorageareaover severaldays.

Overall, the implementation of the IoT-based food monitoring system was successful in providing real-time monitoringofthefoodstorageenvironmentandalertingthe userofanypotentiallyharmfulconditions.Thesystemwas alsoabletoregulatethetemperatureandexpelanyharmful gases,therebyimprovingfoodsafetyandreducingtheriskof spoilage.

4.2 Testing and Validation:

Testingandvalidationarecritical stepstoensurethatthe developed system is functional and meets the required specifications.Inthecaseofthe"IoTBasedFoodMonitoring System," the testing and validation process involves the followingsteps:

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 04 | Apr 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page1462

Testing the hardware components: Each hardware component, including the DHT11 sensor, MQ4 gas sensor, exhaust fan, and NodeMCU controller, should be tested to ensurethattheyarefunctioningcorrectly.

Testingthesoftware:Thesoftwaredesignshouldbetested to ensure that all functions and features are working correctly. This includes testing the code for the NodeMCU controller,theBlynkserver,andtheuserinterface.

Testing the data management and analytics system: This should be tested to ensure that all data is accurately captured,stored,andanalyzed.

Validationofthesystem:Thesystemshouldbevalidatedby testingitunderdifferentscenariostoensurethatitmeets the requirements specified in the project report. This includes testing the system's ability to monitor the temperature and gas levels in a food storage area and activatetheexhaustfanasneeded.

Performance testing: The system should be performance tested to ensure that it is functioning optimally, including testingtheresponsetimeofthesensors,thecommunication speedbetweenthesensorsandtheNodeMCUcontroller,and thespeedofdatatransfertotheBlynkserver.

Usertesting:Finally,thesystemshouldbetestedbyusersto ensurethatitisuser-friendlyandmeetstheirneeds.

Overall, the testing and validation process is critical to ensuring that the "IoT Based Food Monitoring System" is reliable,accurate,andeasytouse.

4.3 Results and Analysis

The findings of the proposed systemare based on the analysisofdataacquiredbythesystem'snumeroussensors. The system is capable of monitoring temperature and

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 04 | Apr 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page1463
Fig -8:IOT-BasedFoodMonitoringSystemCasing Fig -10:IOT-BasedFoodMonitoringSystemsetup Fig -11:IOT-BasedFoodMonitoringSystemwithSensors andNodeMCU Fig -9:IOT-BasedFoodMonitoringSystem TestingandValidationwithLCDDisplay

humidity levels as well as detecting harmful gases like methaneandcarbon monoxide. The data collectedisthen transmitted to the Blynk server, where it is analyzed and stored.

TheanalysisofdatacollectedbytheDHT11sensorindicates thatthe system iscapableofmonitoringtemperatureand humidity levels accurately. The system is also capable of detectingchangesintemperatureandhumiditylevelsover time,whichisessentialforensuringthatfoodremainsfresh andsafeforconsumption.

The analysis of data collected by the MQ4 gas sensor indicates that the system is capable of detecting harmful gases like methane and carbon monoxide accurately. The systemcanalsodetectchangesingaslevelsovertime,which is essential for ensuring that food remains safe for consumption.

Overall, the results indicate that the IoT-based food monitoring system is effective in monitoring and maintaining the quality and safety of food. The system is capableofdetectingchangesintemperature,humidity,and gaslevelsaccurately,anditcanactivatetheexhaustfanto maintainasafeandhealthyenvironment.TheBlynkserver provides real-time monitoring of data, which helps to preventspoilageoffoodandensureitssafety.

CONCLUSION

Toconcludewith,usingavarietyofhardwareandsoftware components,theIoT-basedfoodmonitoringsystemhasbeen successfully developed and put into use. The system successfullymaintainstherighttemperaturerangeandsafe gaslevelsbymonitoringthetemperatureandgaslevelsin the food storage area. An exhaust fan is also a part of the system,whichhelpscontrolthetemperatureandgaslevels inthestoragechamber.Thesystemmaynowberemotely monitoredatanytimeandfromanylocationthankstothe usage of a NodeMCU controller and a Blynk server. To guarantee its accuracy and dependability, the system has undergoneextensivetestingandvalidation.Withreal-time data, automatic actions, and the ability to monitor food remotely,thesystemhasgenerallyshowntobeaneffective solutiontothefoodmonitoringissue.Byassuringfoodsafety andminimizingfoodwaste,thistechnologyhasthepotential torevolutionizethefoodsector.

REFERENCES

1. S.Kumar,S.Tiwari,V.Kumar,andA.Kumar,"IoTbasedsmartagriculturesystem using DHT11and Arduino," 2020 11th International Conference on Computing, Communication and Networking Technologies(ICCCNT),Kharagpur,India,2020,pp. 1-6,doi:10.1109/ICCCNT49239.2020.9225307.

2. S.A.Soliman,M. S.A. El-Din,andA.F. A.Soliman, "IoT based gas leakage detection and notification system using MQ4 sensor," 2019 International Conference on Computer, Control, Electrical, and Electronics Engineering (ICC EEE), Cairo, Egypt, 2019, pp. 1-7, doi: 10.1109/ICCCEEE47785.2019.9061054.

Theanalysisofdatacollectedbytheexhaustfanindicates thatthesystemiscapableofmaintainingasafeandhealthy environmentwithinthefoodstoragearea.Theexhaustfanis activatedautomaticallywhenthetemperatureorgaslevels exceed the preset thresholds, which helps to prevent the spoilageoffoodandensureitssafety.

3. M.M.Ahmed,S.H.Bakar,M.S.Kamal,M.S.Alam, and M. T. Islam, "Design and implementation of temperature and humidity monitoring system based on IoT technology," 2020 8th International Conference on Information and Communication Technology(ICoICT),Bandung,Indonesia,2020,pp. 1-6,doi:10.1109/ICoICT49170.2020.9196751.

4. S. Yadav and S. Prakash, "IoT-based real-time monitoring and controlling of exhaust fan using NodeMCU,"20193rdInternationalConferenceon Computing Methodologies and Communication

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 04 | Apr 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page1464
Fig -11:IOT-BasedFoodMonitoringSystemoutputon BlynkServer

(ICCMC), Erode, India, 2019, pp. 739-742, doi: 10.1109/ICCMC.2019.8827229.

5. Blynk, "Blynk - The most popular IoT platform to connect your devices to the cloud, design apps to controlthem,andmanageyourdeployedproducts at scale," [Online]. Available: https://blynk.io/. [Accessed:22-Mar-2023].

6. T.T.Thai,L.Yang,G.R.DeJeanandM.M.Tentzeris, "NanotechnologyEnablesWirelessGasSensing,"in IEEEMicrowaveMagazine,vol.12,no.4,pp.84-95, June2011.

7. Ki-hwan ecom, chang won lee, Nghia Truong Van, KyungKwonJung,JooWoongKimandWooSeung choi“foodpoisoningpreventionmonitoringsystem based on the smart IOT system “International JournalofmultimediaandubiquitousEngineering Vol.8,No.5(2013),Pp.213-322.

8. K.Mohanraj, S.Vijayalakshmi, N.Balaji, R.Chithrakkannan, R.Karthikeyan, “Smart Warehouse Monitoring Using IoT”, International Journal of Engineering and AdvancedTechnology, Vol8,Issue6,2019,pp.3597-3600.

9. Z. Pang, Q. Chen, W. Han and L. Zheng, "Valuecentricdesignoftheinternet-of-thingssolutionfor foodsupplychain:Valuecreation,sensorportfolio and information fusion," Information Systems Frontiers},vol.17,pp.289 319,2015.

10. Mr.A.Venkatesh, T.Saravanakumar, S.Vairamsrinivasan, A.Vigneshwar, M.Santhosh Kumar."A Food Monitoring System Based on Bluetooth Low Energy and Internet of Things". Mr.A.Venkatesh et al. Int. Journal of Engineering Research and Application www.ijera.com ISSN: 2248-9622,Vol.7,Issue3,(Part - 6)March2017, pp.30-34.

11. Sumathi MS, Thejaswini S, Pranav Kashyap, ShahinaAnjum, Shashi Shanker, Shreya GK "IoT based project for food quality and monitoring" International Journal on Recent and Innovation Trends in Computing and Communication ISSN: 2321-8169Volume:3Issue:53172–3174.

12. YousefiH.,AliMM.,SuHM.,FilipeCD.,andDidarT F. Sentinel wraps: Real-time monitoring of food contaminationbyprintingdnazymeprobesonfood packaging.ACSNano,(pp.3287–3294).(2018).

13. C. Arun, K. Lakshmi Sudha “Agricultural Management using Wireless Sensor Networks –Aurvey” 20 2 2nd International Conference on Environment Science and Biotechnology

IPCBEEvol.48 (2012) © (2012) IACSIT Press, Singapore.

14. Alexandru Popa , Mihaela Hnatiuc , Mirel Paun , OanaGeman,D.JudeHemanth,DanielDorcea,Le HoangSon,SimonaGhita,“AnIntelligentIoT-Based FoodQualityMonitoringApproachUsingLow-Cost Sensors”,Symmetry,MDPI,2019,pp.1-18.

15. C. R. Byrareddy, “IoT-Based Smart Food Storage Monitoring and Safety System”, International Conference on Computer Networks and CommunicationTechnologies,2018,pp.623-638.

16. Soumya T K et. al , “Implementation of IoT based Smart Warehouse Monitoring System”, International Journal of Engineering Research & Technology,Vol6,Issue5,2018,pp.1-4.

17. https://www.projectguideline.com/usingnodemcu-esp8266-wifi-with-arduino-ide-for-iotprojects-and-experiments

18. https://www.elprocus.com

19. https://components101.com/sensors/dht11temperature-sensor

20. https://www.make-it.ca

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 04 | Apr 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page1465

Turn static files into dynamic content formats.

Create a flipbook