IoT Based Smart Fire Extinguisher
Data science projects in pondicherry
Create New

IoT Based Smart Fire Extinguisher

Project period

06/24/2020 - 06/30/2020

Views

64

0



IoT Based Smart Fire Extinguisher
IoT Based Smart Fire Extinguisher

The internal environment of public buildings prompts us how to protect the people and quickly reach the safe area. With the help of the Internet of Things, things such as fire hydrants, fire extinguishers, safety evacuation signs, fire sprinklers, fire pumps, smoke, temperature, and fire doors in buildings can be dynamically monitored and controlled. In addition, based on the relevant fire emergency evacuation strategies and ideas at home and using artificial intelligence technology, we can construct an efficient and intelligent dynamic evacuation path solving model. An intelligent mobile terminal re-evacuation system can be built for large public buildings based on artificial intelligence technology.

Why: Problem statement

Fire causes tremendous property damage and loss of human life. Recently, it's sometimes been impossible for fire-fighting personnel to access the location of a fireplace, whilst the hearth causes tremendous property damage and loss of human life, due to high temperatures or the presence of explosive materials. In such environments, fire-fighting robots are often useful for extinguishing a fireplace . Thus, Fire-fighting robots are operated in places where firefighters are unable to figure . Besides that, fire fighting robots are often used for shielding firefighters from extreme danger in petrochemical, chemical dangerous products, toxicity, or exploder fire accidents. Therefore, it can also reduce human injury from fire burning. There were 644 cases with sufficient information to be included in the study. Frequency analysis revealed that the dominant contributing factors toLODD are health/fitness/wellness (53.88%), personal protective equipment(19.41%), and human error (19.1%).

How: Solution description

Firefighter rovers can be used for protecting toxicity or explorer fire accidents.

Fire fighting is an important job but it is a very dangerous occupation. Here, we use firefighter robots to turn-off fire. The Robot works both manually and automatically. Manually working robots need to be controlled by humans. On the other hand, automatic robots work automatically whenever it senses fire in a place. 

The firefighter rover has three flame sensors, a servo motor, pump, motor driver, ultrasonic sensor, Arduino board, 4 wheels, 12v battery, and tube for water supply. The rover initially ran in the forward direction. The three flames were placed in three directions (left, center, and right) on the rover board. If any flame is sensed by the flame sensor it will send the signal to the microcontroller. The servo will turn on whatever side the sensor is blinked. If the right side sensor is blinked, the servo motor will turn 180 degrees. In the servo motor, we attached a tube, which is connected by a pump. When the flame sensor detects the flame, suddenly the running wheels get stopped in 5 seconds. In that 5 seconds, the pump pushes out the water using the tube. The tube is connected to the servo motor. If any obstacle is present in the surrounding area, we use the ultrasonic sensor. If this sensor senses the obstacle, the wheel gets suddenly stopped. Then it will turn left in 2 seconds and run forward for 5 seconds.

How is it different from competition

Our project detects fire and provides controlled water supply to turn off the fire. A flame sensor to the relay 5-channel pin is used to connect the water pump. An ultrasonic sensor is used to control the flow of fire to the motor driver. In the existing project, the rover will drive by the control of the user. But our project automatically detects the fire by using the flame sensors. The sensor is fitted in three directions each one gets the power supply they will activate and try to sense if any nearby flame is.

Who are your customers

  • People

Combustible gases are a really common reason for blasts and fire accidents, causing large damage to life and property thanks to these fires. This can be because people have gotten the damages easily. It may also end in emotional damages, personal injuries, or other property damage. In fact, fire damage ranks within the top five of the foremost costly and customary insurance claims. Fire damage is even costlier when a lawsuit is involved.

  • Building and Physical system

Defective products, negligence, and intentional acts are all common legal issues involved in fire injury and property damage cases. Parties which you will hold chargeable for injuries or damages caused by a hearth accident may include:

  1. The owner of a rental house or unit

  2. The contractor of the property

  3. The seller of any defective material utilized in the development of the house

  4. Manufacturers of defective products.

Project Phases and Schedule

Design: The design of the project is fully focused on to avoid fire accidents.

Construction: The construction of the project is mainly based on Arduino UNO. Interfacing microcontroller, three flame sensors, Ultrasonic sensor, servo motor, rover, water pump, tube by using a jumper wire. These all are fitted to the rover. 

Connection: Connecting all the components by using a jumper wire. Interface all the components to the microcontroller. The microcontroller gets the power supply from the 12V battery, the three flame sensors have positive and negative pins connected to the microcontroller and the three signal pins are connected to the microcontroller through a breadboard. The ultrasonic sensor is connected to the microcontroller. The echo and trigger pins are connected to the signal pin of the microcontroller. The relay will connect the input to the flame sensor and output is connected to the water pump positive, if the flame occurs, it trips the relay to turn on the water pump. The water pump tube is placed on the servo motor. The servo is interconnected to the flame sensor. It analyses which side the flame sensor is activated.

Program: We use the Arduino Uno microcontroller, so the programming tool is an Arduino. In the programming flow,

  1. The rover will move forward for 5 seconds. If the ultrasonic senses any object in front of the rover, it will stop the rover for 2 minutes and turn right side for 2 minute and turn left side for 2 minutes and take forward to the rover for 5 minutes.

  2. The three flame sensors senses around 3 sides of the rover. If anyone of the flame sensors is activated, the servo motor gets turned on, on which side of the sensor is activated. The water pump tube will be placed on the servo motor strip and can easily split the water spray to that side of the flame.

  3. If any sensor gets activated the relay will turn on the water supply.

Testing: Finally, we tested and verified the connection and code of the program.

Resources Required

Hardware Requirements

Flame sensor: A flame-sensor is one quiet detector that's specially designed for detecting also as responding to the occurrence of a fire or flame. The flame detection response can rely on its fitting. It includes a device, a fossil fuel line, propane & a hearth suppression system. This sensor is employed in industrial boilers. The most function of this can be often to supply authentication whether the boiler is correctly working or not. The response of those sensors is quicker in addition as more accurate compared with a heat/smoke detector thanks to its mechanism while detecting the flame.

Motor driver: Motor drivers act as an interface between the motors and also the control circuits. Motors require a high amount of current whereas the controller circuit works on low current signals. Therefore the function of motor drivers is to want a low-current control signal then turn it into a higher-current signal which can drive a motor.

Servo motor: A servo motor could be a device which will push or rotate an object with great precision. If you would like to rotate and object at some specific angles or distance, then you employ a servo motor. it's just made of a straightforward motor that runs through a servo mechanism. If the motor is DC powered then it's called DC servo motor, and if it's AC powered motor then it's called an AC servo motor. We are able to get a very high torque servo motor during small and lightweight packages. thanks to these features, they're being employed in many applications like toy cars, RC helicopters, planes, Robotics, Machine, etc.

Mini breadboard: A breadboard is also an oblong plastic board with a bunch of small holes in it. These holes allow you to simply insert electronic components to prototype (meaning to make and test an early version of) an electronic circuit, like this one with an electric battery, switch, resistor, and an LED (light-emitting diode).

Software Requirements

Arduino: Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a Twitter message - and turn it into an output - activating a motor, turning on an LED, publishing something online. You can tell your board what to do by sending a set of instructions to the microcontroller on the board. To do so you use the Arduino programming language (based on Wiring), and Arduino Ide based on Processing.

Download:
Project Code Code copy
/* Your file Name : firefighter_01.ino */
/* Your coding Language : arduino */
/* Your code snippet start here */
 #include <Servo.h>
Servo myservo;
int Echo = A4;
int Trig = A5;
int flame_detected;
int servopin = 3;
#define ENA 5
#define ENB 6
#define IN1 7
#define IN2 8
#define IN3 9
#define IN4 13
#define flamesensor_Forward  11      //forward sensor
#define flamesensor_Right 4         // right sensor 
#define flamesensor_Left 2      // left sensor
#define carSpeed 150
long duration;
int flamesensor = flamesensor_Forward and flamesensor_Left  and flamesensor_Right ;
int distance;
int wheel_direction;

void forward() {
  analogWrite(ENA, carSpeed);
  analogWrite(ENB, carSpeed);
  digitalWrite(IN1, LOW);
  digitalWrite(IN2, HIGH);
  digitalWrite(IN3, HIGH);
  digitalWrite(IN4, LOW);
  Serial.println("Forward");
}
void back() {
  analogWrite(ENA, carSpeed);
  analogWrite(ENB, carSpeed);
  digitalWrite(IN1, HIGH);
  digitalWrite(IN2, LOW);
  digitalWrite(IN3, LOW);
  digitalWrite(IN4, HIGH);
  Serial.println("Back");
}
void left() {
  analogWrite(ENA, carSpeed);
  analogWrite(ENB, carSpeed);
  digitalWrite(IN1, LOW);
  digitalWrite(IN2, LOW);
  digitalWrite(IN3, HIGH);
  digitalWrite(IN4, LOW);
  Serial.println("Left");
}
void right() {
  analogWrite(ENA, carSpeed);
  analogWrite(ENB, carSpeed);
  digitalWrite(IN1, LOW);
  digitalWrite(IN2, HIGH);
  digitalWrite(IN3, LOW);
  digitalWrite(IN4, LOW);
  Serial.println("Right");
}

void stop() {
  digitalWrite(ENA, LOW);
  digitalWrite(ENB, LOW);
  digitalWrite(IN1, LOW);
  digitalWrite(IN2, LOW);
  digitalWrite(IN3, LOW);
  digitalWrite(IN4, LOW);
  Serial.println("Stop!");
}


void setup() {
  myservo.attach(servopin);
  myservo.write( servopin);
  Serial.begin(9600);
  pinMode(flamesensor_Left, INPUT);
  pinMode(flamesensor_Right, INPUT);
  pinMode(flamesensor_Forward, INPUT);
  pinMode(Echo, INPUT);
  pinMode(Trig, OUTPUT);
  pinMode(IN1, OUTPUT);
  pinMode(IN2, OUTPUT);
  pinMode(IN3, OUTPUT);
  pinMode(IN4, OUTPUT);
  pinMode(ENA, OUTPUT);
  pinMode(ENB, OUTPUT);
  stop();
}
void loop()
{

  myservo.write(90);
  delayMicroseconds(500 );

  {
    analogWrite(ENA, carSpeed);
    analogWrite(ENB, carSpeed);
    digitalWrite(IN1, LOW);
    digitalWrite(IN2, HIGH);
    digitalWrite(IN3, LOW);
    digitalWrite(IN4, LOW);
    Serial.println("Right");
    delayMicroseconds (500);
  }
  flame_detected  = digitalRead(flamesensor );

  if (digitalRead(flamesensor_Forward) == LOW) {


    myservo.write(90);
    delayMicroseconds(500);

    digitalWrite(ENA, LOW);
    digitalWrite(ENB, LOW);
    digitalWrite(IN1, LOW);
    digitalWrite(IN2, LOW);
    digitalWrite(IN3, LOW);
    digitalWrite(IN4, LOW);

    Serial.println("Stop!");
    delayMicroseconds(500);
  }
  else if (flamesensor_Forward == HIGH);
  {
    analogWrite(ENA, carSpeed);
    analogWrite(ENB, carSpeed);
    digitalWrite(IN1, LOW);
    digitalWrite(IN2, HIGH);
    digitalWrite(IN3, HIGH);
    digitalWrite(IN4, LOW);

    Serial.println("Forward");
    delayMicroseconds (500);
  }
  if (digitalRead(flamesensor_Right) ==  LOW) {

    myservo.write(0);
    delayMicroseconds(500);

    digitalWrite(ENA, LOW);
    digitalWrite(ENB, LOW);
    digitalWrite(IN1, LOW);
    digitalWrite(IN2, LOW);
    digitalWrite(IN3, LOW);
    digitalWrite(IN4, LOW);
    Serial.println("Stop!");
    delayMicroseconds(500);

  }
  else if  (flamesensor_Right == HIGH)
  {
    analogWrite(ENA, carSpeed);
    analogWrite(ENB, carSpeed);
    digitalWrite(IN1, LOW);
    digitalWrite(IN2, HIGH);
    digitalWrite(IN3, HIGH);
    digitalWrite(IN4, LOW);

    Serial.println("Forward");
    delayMicroseconds(500);
  }
  if (digitalRead(flamesensor_Left) == LOW) {

    myservo.write(180);
    delayMicroseconds(500);

    digitalWrite(ENA, LOW);
    digitalWrite(ENB, LOW);
    digitalWrite(IN1, LOW);
    digitalWrite(IN2, LOW);
    digitalWrite(IN3, LOW);
    digitalWrite(IN4, LOW);
    Serial.println("Stop!");
    delayMicroseconds(500);
  }
  else  ((flamesensor_Left) == LOW   );
  {
    analogWrite(ENA, carSpeed);
    analogWrite(ENB, carSpeed);
    digitalWrite(IN1, LOW);
    digitalWrite(IN2, HIGH);
    digitalWrite(IN3, HIGH);
    digitalWrite(IN4, LOW);

    Serial.println("Forward");
    delayMicroseconds(500);

  }
  {
    digitalWrite(Trig, LOW);
    delayMicroseconds(2);
    digitalWrite(Trig, HIGH);
    delayMicroseconds(10);
    duration = pulseIn(Echo, HIGH);
    distance = ((duration * 2) / 29.1);
    Serial.println(distance);

    if (distance < 10)
    {
      digitalWrite(ENA, LOW);
      digitalWrite(ENB, LOW);
      digitalWrite(IN1, LOW);
      digitalWrite(IN2, LOW);
      digitalWrite(IN3, LOW);
      digitalWrite(IN4, LOW);
      Serial.println("Stop!");
      delayMicroseconds(500);
    }
    else
    {
      digitalWrite(ENA, carSpeed);
      digitalWrite(ENB, carSpeed);
      digitalWrite(IN1, LOW);
      digitalWrite(IN2, HIGH);//FOWARD
      digitalWrite(IN3,  HIGH);
      digitalWrite(IN4, LOW);
      Serial.println("Forward");
      delayMicroseconds(500);


    }
  }
}
View on Github
Smart fire extinguisher sensor using Artificial Intelligence

Comments

Leave a Comment

Post a Comment

Are you Interested in this project?


Do you need help with a similar project? We can guide you. Please Click the Contact Us button.


Contact Us

Social Sharing