MEGR 3171- Kitchen Monitoring System

This device can allow notifications for flames, filling the water pitcher, and fridge operating temperature.

MEGR 3171- Kitchen Monitoring System

Things used in this project

 

Hardware components

HARDWARE LIST
1 DFRobot Gravity: Analog Flame Sensor For Arduino
3 Solderless Breadboard Full Size
1 Temperature Sensor
1 5 mm LED: Green
1 Jumper wires (generic)
3 Particle Argon
3 USB-A to Micro-USB Cable
1 Resistor 10k ohm
1 Seeed Studio Grove - Water Sensor

Software apps and online services

 

Particle Build Web IDE

 

Google Sheets

 

fritzing

Story

 

As for most college students, you live with at least one if not up to four other people of the same age. With that being said, the common spaces of the house are all shared and cannot be monitored at all times due to very different schedules. For example, the kitchen is used throughout the day many times, and poses many issues that can arise. This project was designed to help control and eliminate the issues. The layout includes a flame, water level, and temperature sensor. The flame sensor and particle will be located next to the stove top and will notify the phone if there is a flame still present in the kitchen. This could be useful if one of our roommates leaves the stove on and help prevent a potential fire. The water level sensor is specifically for the shared water pitcher that no one ever wants to refill. This sensor can be placed in the pitcher and is paired with an LED in which, if the light is off the pitcher needs to be refilled. The third and final sensor will report temperature. This will be used in the refrigerator to monitor the temperature and make sure it does not fluctuate and spoil groceries, which are very expensive these days. The temperature sensor could also be an indicator if the door is open due to the reading being much lower than the usual temperature projected.

 

 

 

Flame Sensor

 

The flame sensor breadboard consists of the sensor, jumper wire, and the argon. The way our sensor works is that it will read a value over time and subscribe/publish to our other argons once the flame sensor value reads below a value of 500 coming from the sensor indicating that there is a flame or undesired heat source left on coming from the stove.

 

 

WaterLevel Sensor

 

The water level sensor breadboard consists of the sensor, jumper wire, 10k resistor, green LED and the argon. The water level sensor works is that it will read a value over time and subscribe/publish to our other argons once the water level sensor value reads a "High" value greater than 800 indicating that there is water in the water container and the code will automatically turn on the LED light. The low value will be any readings below 500 on the water level sensor which will have no LED light paired with it indicating the water container should be refilled.

 

 

TemperatureSensor

 

The temperature sensor breadboard consists of the sensor, jumper wire, and the argon. The way the temperature sensor works is that it will read a value over time and subscribe/publish to our other argons once the temperature sensor value reads a "High" value greater than 700 indicating that the fridge is open and the temperature inside of the fridge is warming up and there could be harm to the contents inside. The code will automatically turn on the LED light when this happens. The low value will be any readings below 500 on the sensor which will have no LED light paired with it indicating the status of the refrigerator is normal.

 

 

Water Level Graph

 

This graph shows moving the height of the water level sensor up and down.

 

 

 

 

 

 

 

Schematics

 

Flame Sensor

 

 

Water Level Sensor

 

 

Temperature Sensor

 


 

Code

 

Water Level Sensor

C/C++

CODE
int waterlevel;
bool f=false;
bool b=false;
char tempstr[30];
// the setup routine runs once when you press reset:
void setup() {
    pinMode(A0, INPUT);
    pinMode(D2, OUTPUT);
  
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
  Particle.variable("waterlevel", waterlevel);
}



void myHandler(const char *event, const char *data) // Recieves event data to save as a variable for processing
{
    if ((strcmp(data,"flame")==0))
        f=TRUE;
        
    if ((strcmp(data, "BritaHOT")==0))
        b=TRUE;
    else
     b=false;
     f=false;
}
// the loop routine runs over and over again forever:
void loop() 
{
  // read the input on analog pin 0:
  waterlevel = analogRead(A0);
  // print out the value you read:
  Serial.println(waterlevel);
  delay(2000);// delay in between reads for stability
  
  
  if (waterlevel > 800)
  Particle.publish("waterlevel","high",PRIVATE); // for bi direction communication
  else
  Particle.publish("waterlevel","low",PRIVATE);  // for bi direction communication
  
  if (waterlevel < 800 && f==1 && b==1)
   digitalWrite(D2,HIGH);
  else
    digitalWrite(D2,LOW);
    
}

Flame Sensor

C/C++

CODE
int flame;


// the setup routine runs once when you press reset:
void setup() {
    pinMode(A5, INPUT);
    pinMode(D3, OUTPUT);
  
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
  Particle.variable("flame", flame);
  Particle.subscribe("waterlevel",myHandler, ("e00fce68e492a4e6bb553c3d"));
  Particle.subscribe("Brita",myHandler,("e00fce68ed4b905a7bfa0fc7"));

}
void myHandler(const char *event, const char *data) // Recieves event data to save as a variable for processing
{
    if ((strcmp(data,"high")==0) && (strcmp(data, "READY")==0))
      digitalWrite(D3, HIGH);
    else 
       digitalWrite(D3, LOW);
}
// the loop routine runs over and over again forever:
void loop() 
{
  // read the input on analog pin 0:
  flame = analogRead(A5);
  // print out the value you read:
  Serial.println(flame);
  delay(2000);// delay in between reads for stability
  
  
  if (flame < 500)
  Particle.publish("flame","flame",PRIVATE); // for bi direction communication
  else
  Particle.publish("flame","noflame",PRIVATE);  // for bi direction communication
  
}

Temperature Sensor

C/C++

CODE
int temp;
bool waterlevelrecieved;

// the setup routine runs once when you press reset:
void setup() {
    pinMode(A5, INPUT);
  
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
  Particle.variable("temp", temp);
  Particle.subscribe("waterlevel",myHandler, ("e00fce68e492a4e6bb553c3d"));

}
void myHandler(const char *event, const char *data) // Recieves event data to save as a variable for processing
{
    if ((strcmp(data,"high")==0))
       waterlevelrecieved = 1;
    else 
       waterlevelrecieved = 0;
}
// the loop routine runs over and over again forever:
void loop() 
{
  // read the input on analog pin 0:
  temp = analogRead(A5);
  // print out the value you read:
  Serial.println(temp);
  delay(2000);// delay in between reads for stability
  
  
  if (temp < 1000)
  Particle.publish("temp","britaHOT",PRIVATE); // for bi direction communication
  else
  Particle.publish("temp","britaCOLD",PRIVATE);  // for bi direction communication
  
}

The article was first published in hackster, December 1, 2022

cr: https://www.hackster.io/group-43/megr-3171-kitchen-monitoring-system-88cc0b

author: Team Group 43: Darren Sciortino, Alberto Steffens, Spencer Smith

License
All Rights
Reserved
licensBg
0