Boreas – 618 A Firefighting Robot

Boreas – 618: A Firefighting Robot

Samuel III Ulric Antonio G. Espiña, Ronuel Joseph L. Pilla, Ravi Reese L. Tobongbanua

Abstract

Fires are a huge problem not just here in the Philippines, but also across the globe. According to BFP statistics, more than 10,000 fires occurred during the span of 2017. Many of the systems built to combat the spread of fire in buildings all have their own flaws and may not be used in certain circumstances. The researchers wanted to develop an automated firefighting robot to help stop the spreading of fire in urbanized and office spaces. To put all the components together, an Arduino MEGA 2560 was used. For the robot’s movement, four 5V DC Motors, to be attached to H-bridge Modules, were fixed on specific points on the underside of the chassis base and were used to propel the robot forward and to maneuver around possible obstructions of the robot’s path. An Ultrasonic Range Finding Sensor was used to detect objects that were in sufficient range and the robot had to maneuver around. A combination of the functions of a Flame sensor and a Temperature sensor was used to determine whether there was a fire, and where it was. To activate the extinguisher, a Servo Motor was used to clamp the handle down. Upon detecting a rise in heat, the robot would send a text message to the owner, signaling that a fire might be occurring. Afterwards the robot would then move toward the open flame until it was a meter away and would unload the extinguisher on it. Testing has proven this robot to be effective.

Schematic Diagram of Boreas - 618 A Firefighting Robot
Schematic Diagram of Boreas – 618 A Firefighting Robot

INTRODUCTION

According to the Statistics of BFP for the year 2017, the Philippines was struck by more than 14,000 fire incidents. In the wake of those incidents, the Philippines people were faced with about P7.8 billion worth of property damage, excluding the Metro Ayala Cebu center, which was clocked in to have cost P809.3 million worth of damage. Now, according to the BFP as of the 18th of March in 2018, there have been 1758 recorded fires which leave and estimate of P1 billion worth of damage and a body count of 3041.

As of now, there are multiple systems in place to prevent or delay the progression of fires, as well as warn the inhabitants of the incoming hazard, in most urbanized areas. These systems include fire alarms, sprinkler systems and dedicated spots for fire extinguishers. While these systems are effective at what they do, they each have specific problems that may cause malfunctions that may result in them not being able to perform optimally, or at all.

Boreas – 618, inspired by the Boreas of Greek Mythology, is an automated robot that locates and assists in the extinguishing of fires. While it hasn’t detected a fire, it will stay in a “dormant” mode to conserve power. Using an Arduino 2560 board, a variety of sensors were used to determine where to move and where to spray.

Generally, this study aims to create a fully automated, fire fighting, robot prototype that can be improved to suit higher needs. Specifically, this study aims to create a robot prototype that automatically seeks the source of fire and extinguishes it. This study is limited to flat surface areas as the robot was not built to traverse rocky or mostly bumpy terrain. This study is also limited to the size and capacity of the fire extinguisher, or for how long it can stay spraying without running out.

Attaching of the Components

The 4 DC Motors were attached to the underside of the chassis in their assigned positions. The Battery was fixed in place along with the fire extinguisher, as well as the Arduino board and the rest of the electrical components. The DC Motors were attached to Hbridge modules and were powered from there. After the DC motors were attached, a Servo Motor was attached to the handle of the extinguisher to activate it when necessary. After everything was put in its place, the Arduino board was attached to the 12v battery.

Source code:

#include <Vector.h>

#include <IRLib2.h>
#include <IRLibAll.h>
#include <IRLibDecodeBase.h>
#include <IRLibGlobals.h>
#include <IRLibRecvBase.h>
#include <IRLibRecvLoop.h>

#include <DHT.h>
#include <Servo.h>
#include <SoftwareSerial.h>

#define DHT11PIN 37
#define DHT11TYPE DHT22
#define fireSensor A8
#define smokeDetectorPin A1
// Servos and Sensors
const int servoPin = 12;
const int fireServoPin = 10;
const int triggPin = 13;
const int echoPin = 9;
const int fireRelay = 40;
const int hostServoPin = 11;

// H-bridge motor pins
const int ENA = 2;
const int IN1 = 3;
const int IN2 = 4;
const int ENB = 6;
const int IN3 = 7;
const int IN4 = 8;

//SIM9000 pins
const int vr5RX = 51;
const int vt5TX = 53;

SoftwareSerial smsSerial(vt5TX, vr5RX);
Servo servo;
Servo fireServo;
Servo hostServo;
DHT dht11(DHT11PIN, DHT11TYPE);

int pos = 90;
int fireServoPos = 0;

int messageCount = 0;
bool messageSent = false;

int forSwitch;

Vector<int> goBack;

void setup() {
Serial.begin(9600);

while (!Serial) {
// wait for serial port to connect. Needed for native USB port only
}

smsSerial.begin(9600);
dht11.begin();
pinMode(triggPin, OUTPUT);
pinMode(echoPin, INPUT);
servo.attach(servoPin);
fireServo.attach(fireServoPin);
hostServo.attach(hostServoPin);
delay(100);
servo.write(90);
fireServo.write(90);
hostServo.write(125);

pinMode(ENA, OUTPUT);
pinMode(ENB, OUTPUT);
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
pinMode(IN3, OUTPUT);
pinMode(IN4, OUTPUT);

pinMode(fireSensor, INPUT);
pinMode(fireRelay, OUTPUT);
pinMode(smokeDetectorPin, INPUT);

digitalWrite(fireRelay, HIGH);

delay(10000);
}

bool readSmoke(){
int smokeValue = analogRead(smokeDetectorPin);
if(smokeValue > 510){
return true;
}else{
return false;
}
}

void Nod() {
for (int i = 135; i < 175; i += 20) {
hostServo.write(i);
isFire();
delay(200);
}
for (int i = 175; i > 135; i -= 20) {
hostServo.write(i);
isFire();
delay(200);
}
}

void horizontal() {
for (fireServoPos = 0; fireServoPos < 180; fireServoPos += 10) {
fireServo.write(fireServoPos);
delay(100);
Nod();
}
fireServo.write(90);
}

void botMove() {
for (int i = 0; i < 3; i++) {
checkObject();
isFire();
forward(ENA, IN1, IN2);
forward(ENB, IN3, IN4);
delay(20);
}
}

void goToOrigin() {
for (int countdown = goBack.Size() - 1; countdown > -1; countdown--) {
forSwitch = goBack[countdown];
switch (forSwitch) {
case 1:
turnRight();
break;
case 2:
turnLeft();
break;
case 3:
reverse(ENA, IN1, IN2);
reverse(ENB, IN3, IN4);
break;
case 4:
forward(ENA, IN1, IN2);
forward(ENB, IN3, IN4);
break;
}
}
}
bool isObject(int angle) {
int distance = getDistance(angle);
if (distance < 40) {
return true;
} else {
return false;
}
}

int getDistance(int angle) {
servo.write(angle);
delay(1000);
digitalWrite(triggPin, LOW);
delayMicroseconds(10);
digitalWrite(triggPin, HIGH);
delayMicroseconds(10);
digitalWrite(triggPin, LOW);
long echoResult = pulseIn(echoPin, HIGH);
int distance = echoResult * 0.034 / 2;

return distance;
}

int checkObject() {
bool objectResult = isObject(90);
if (objectResult) {
stopMotion(ENA, IN1, IN2);
stopMotion(ENB, IN3, IN4);
bool leftLook = isObject(26);
bool rightLook = isObject(130);

delay(200);

if (leftLook && rightLook) {
reverse(ENA, IN1, IN2);
reverse(ENB, IN3, IN4);
delay(2000);
stopMotion(ENA, IN1, IN2);
stopMotion(ENB, IN3, IN4);
int leftDistance = getDistance(26);
int rightDistance = getDistance(130);
if (leftDistance >= rightDistance) {
turnLeft();
}
else {
turnRight();
}
}
if (!leftLook && rightLook) {
turnRight();
}
if (leftLook && !rightLook) {
turnLeft();
}
}
servo.write(90);
}

bool checkHumidity() {
int secondTemp = dht11.readTemperature();
Serial.println("temp2: " + (String)secondTemp);
delay(500);
if (secondTemp > 20) {
return true;
} else {
return false;
}
}

void forward(int EN, int firstIN, int secondIN) {
analogWrite(EN, 250);
digitalWrite(firstIN, HIGH);
digitalWrite(secondIN, LOW);
goBack.PushBack(3);
}


void reverse(int EN, int firstIN, int secondIN) {
analogWrite(EN, 250);
digitalWrite(firstIN, LOW);
delay(150);
digitalWrite(secondIN, HIGH);
goBack.PushBack(4);
}

void stopMotion(int EN, int firstIN, int secondIN) {
analogWrite(EN, 0);
digitalWrite(firstIN, LOW);
digitalWrite(secondIN, LOW);
}

void turnLeft() {
stopMotion(ENA, IN1, IN2);
stopMotion(ENB, IN3, IN4);
delay(1000);
forward(ENB, IN3, IN4);
reverse(ENA, IN1, IN2);
delay(1000);
goBack.PushBack(1);
}

void turnRight() {
delay(1000);
forward(ENA, IN1, IN2);
reverse(ENB, IN3, IN4);
delay(1000);
goBack.PushBack(2);
}

void isFire() {
int fire;
fire = analogRead(fireSensor);
Serial.println("Fire value: " + (String)fire);
if (fire < 30) {
digitalWrite(fireRelay, LOW);
delay(5000);
digitalWrite(fireRelay, HIGH);
}
}


void sendMessage() {
if (!messageSent) {
smsSerial.println("AT+CMGF=1");
delay(1000);
smsSerial.println("AT+CMGS=\"+639499226042\"r");
delay(1000);
smsSerial.println("Fire Detected:");
delay(200);
smsSerial.println((char)26);
delay(300);
if (messageCount == 2) {
messageSent = true;
}
}
}

void loop() {
bool highTemp = checkHumidity();
// bool highSmoke = readSmoke();
Serial.println("temp value: " + (String)highTemp);
botMove();
stopMotion(ENA, IN1, IN2);
stopMotion(ENB, IN3, IN4);
horizontal();
}

Credits to the authors fo the project.

You may visit our facebook page for more information, inquiries and comments.

Hire our team to do the project.

,

Post navigation