Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

IoT Project Report

Food Quality Monitoring System

Team Members: Enroll. No.

Nency Faganiya 180420116012


Charmi Lakhani 180420116024
Drashti Thummar 180420116061
Shivani Varu 190423116010

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.

In this project, a similar food quality monitoring devices are used


that will keep watch of environmental factors like temperature,
humidity, alcohol content etc. Our project is built on NodeMcu
which is an open-source firmware and development kit. It is
interfaced with various sensors like DHT-11 to monitor
temperature and humidity, and MQ3 to detect alcohol content. 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 IoT
cloud platform used for logging and monitoring of sensor data is
"thingspeak.com". With the power of Internet of Things, the
environmental factors affecting the food storage can be monitored
from anywhere, anytime and from any device.
We have made private channel on Thingspeak and then plotted
three graphs of measurement parameters of Temperature, Humidity
and Ethanol content. We have also took various observations in
different types of food and weather conditions and tested whether
our device is working or not in different conditions.

Arduino Code:

#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ThingSpeak.h>
#include <DHT.h>
#define DHTPIN 2

DHT dht(D4,DHT11);
float h,t,val;

int ALCOHOL_SENSOR = A0;

char* ssid = "vivo1724";


char* pass = "nency1234";
WiFiClient client;
char ip[] = "184.106.153.149"; // ip address of thingspeak-this
will remain same for all
long id = 1526430;// this will change
char* api = "IM04BCHJRKCH91DQ"; //this will change
void setup() {
Serial.begin(9600);
Serial.println("Connecting to WiFi");
WiFi.begin(ssid,pass);
while(WiFi.status()!=WL_CONNECTED){
Serial.print(".");
delay(500);
}
Serial.println("WiFi Connected");
ThingSpeak.begin(client);
dht.begin();
}

void loop() {
if(client.connect(ip,80)){
h = dht.readHumidity();
t = dht.readTemperature();
val = analogRead(ALCOHOL_SENSOR); //Read Analog
values and Store in val variable

Serial.print("Humidity = ");
Serial.print(h);
Serial.println("%");
Serial.print("Temperature = ");
Serial.println(t);
Serial.print("Ethanol content(ppm) = ");
Serial.println(val);
ThingSpeak.setField(1,t);
ThingSpeak.setField(2,h);
ThingSpeak.setField(3,val);
ThingSpeak.writeFields(id,api);
// ThingSpeak.writeField(id, 3,val, api); //Update in
ThingSpeak

if (val < 540.00) {


if ((25.00 <= t <= 40.00) && (90.00 <= h <= 97.00)){
Serial.println("Food is edible");
}
else {
Serial.println("Food is not edible");
}
}
else {
Serial.println("Food is not edible");
}

}
client.stop();
delay(5000);
}

You might also like