Katelyn CockerhamKhayzaran Qubbaj
Published

Burn Prevention Alert System

To prevent burn injuries from hot appliance.

BeginnerFull instructions provided257
Burn Prevention Alert System

Things used in this project

Hardware components

PIR Motion Sensor
×1
MLX90614
×1
LED (generic)
LED (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×10
Argon
Particle Argon
×2
Breadboard (generic)
Breadboard (generic)
×2
Resistor 220 ohm
Resistor 220 ohm
×1

Software apps and online services

Particle Build Web IDE
Particle Build Web IDE
Maker service
IFTTT Maker service
Google Sheets
Google Sheets
Fritzing

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Schematics

Flow Chart

PIR Motion Sensor and LEDs

MLX90614 IR Temperature Sensor

Code

Motion Sensor with LEDs

C/C++
This code was generated to detect motion. Once motion is detected the code was informed to light the external LED and the D7 LED pin.
int inputPin = D2;              // choose the input pin (for PIR sensor)
int ledPin = D4;                // LED Pin
int pirState = LOW;             // we start, assuming no motion detected
int val = 0;                    // variable for reading the pin status
int calibrateTime = 5000;  
int Count = 0;
// wait for the thingy to calibrate

void setup() {
    pinMode(D2, INPUT);
    pinMode(D7,OUTPUT);
    pinMode(D4, OUTPUT);
    
   
    Particle.subscribe("Hot", test1);

        // declare sensor as input
}

void loop() {
   
val = digitalRead(D2);
          }
          
void test1(const char *event, const char *data){
 
    
    if (val == HIGH) {
        // the current state is no motion
        // i.e. it's just changed
        // announce this change by publishing an event
          // we have just turned on 
          //digitalWrite(D7,HIGH);
                  //  delay(20000);
                  //    digitalWrite(D7,LOW);  
                  Count++; //count = count +1
          Particle.publish("PhotonMotion", "Motion Detected",PRIVATE);
        
          delay(1000);
          //for(i=0;i<80;i++)  {
          

                


digitalWrite(D4,HIGH);
digitalWrite(D7,HIGH);

delay(500);//wait for 1ms


digitalWrite(D4,LOW);
digitalWrite(D7,LOW);
//digitalWrite(D5,HIGH);

//delay(500);//wait for 1ms

}}
    

Temperature Sensor

C/C++
This code was generated to publish an event of "Hot" whenever temperature detected exceeded 40 degrees Celsius.
// This #include statement was automatically added by the Particle IDE.
//LEDwithTemp


#include <Adafruit_MLX90614.h>
float object_tempc;
Adafruit_MLX90614 mlx = Adafruit_MLX90614();

void setup() {

  mlx.begin();
}



void loop() {

object_tempc = mlx.readObjectTempC();
  if (object_tempc>40.0){
      String temperature = String(object_tempc);
   Particle.publish("Hot","temperature",PRIVATE);
digitalWrite(D2,HIGH);   
  // publish to cloud
  
 } 

    
 
  
  //Serial.print("Ambient = "); Serial.print(mlx.readAmbientTempF());
  //Serial.print("*F\tObject = "); Serial.print(mlx.readObjectTempF()); Serial.println("*F");


  
  delay(1500);
}
  

Credits

Katelyn Cockerham

Katelyn Cockerham

0 projects • 0 followers
Khayzaran Qubbaj

Khayzaran Qubbaj

0 projects • 0 followers

Comments

Add projectSign up / Login