What is a Fire Fighting Robot?
A fire fighting robot is an autonomous or remotely operated machine designed to detect and extinguish fires without human assistance. These robots are equipped with sensors to identify flames or smoke and use extinguishing agents such as water, CO₂, or other fire suppressants to control and put out the fire. Powered by a microcontroller, advanced models can automatically locate the fire, navigate toward it, and efficiently extinguish it.
In this project, we’ll learn how to create a DIY Arduino-based Fire Fighting Robot. This robot will use flame sensors to detect fire, BO motors with a motor driver to move toward the fire, and a mini water pump to spray water and extinguish it.
Materials Required
-
Arduino UNO
-
Flame Sensors (3 units)
-
Servo Motor (SG90)
-
L293D Motor Driver Module
-
Mini DC Submersible Pump
-
Small Breadboard
-
Robot Chassis with 2 motors and 2 wheels
-
Small Water Can (for the water tank)
-
Connecting Wires
Fire Fighting Robot Using Arduino – Circuit Diagram
The complete circuit diagram for the Arduino-based Fire Fighting Robot is shown below. This diagram illustrates how all the components—such as the Arduino UNO, flame sensors, motor driver, motors, servo motor, and water pump—are connected to work together. It serves as a guide for assembling the hardware and wiring the robot correctly.
Code
/*------ Arduino Fire Fighting Robot Code----- */
#include <Servo.h>
Servo myservo;
int pos = 0;
boolean fire = false;
/*-------defining Inputs------*/
#define Left_S 9 // left sensor
#define Right_S 10 // right sensor
#define Forward_S 8 //forward sensor
/*-------defining Outputs------*/
#define LM1 2 // left motor
#define LM2 3 // left motor
#define RM1 4 // right motor
#define RM2 5 // right motor
#define pump 6
void setup()
{
pinMode(Left_S, INPUT);
pinMode(Right_S, INPUT);
pinMode(Forward_S, INPUT);
pinMode(LM1, OUTPUT);
pinMode(LM2, OUTPUT);
pinMode(RM1, OUTPUT);
pinMode(RM2, OUTPUT);
pinMode(pump, OUTPUT);
myservo.attach(11);
myservo.write(90);
}
void put_off_fire()
{
delay (500);
digitalWrite(LM1, HIGH);
digitalWrite(LM2, HIGH);
digitalWrite(RM1, HIGH);
digitalWrite(RM2, HIGH);
digitalWrite(pump, HIGH); delay(500);
for (pos = 50; pos <= 130; pos += 1) {
myservo.write(pos);
delay(10);
}
for (pos = 130; pos >= 50; pos -= 1) {
myservo.write(pos);
delay(10);
}
digitalWrite(pump,LOW);
myservo.write(90);
fire=false;
}
void loop()
{
myservo.write(90); //Sweep_Servo();
if (digitalRead(Left_S) ==1 && digitalRead(Right_S)==1 && digitalRead(Forward_S) ==1) //If Fire not detected all sensors are zero
{
//Do not move the robot
digitalWrite(LM1, HIGH);
digitalWrite(LM2, HIGH);
digitalWrite(RM1, HIGH);
digitalWrite(RM2, HIGH);
}
else if (digitalRead(Forward_S) ==0) //If Fire is straight ahead
{
//Move the robot forward
digitalWrite(LM1, HIGH);
digitalWrite(LM2, LOW);
digitalWrite(RM1, HIGH);
digitalWrite(RM2, LOW);
fire = true;
}
else if (digitalRead(Left_S) ==0) //If Fire is to the left
{
//Move the robot left
digitalWrite(LM1, HIGH);
digitalWrite(LM2, LOW);
digitalWrite(RM1, HIGH);
digitalWrite(RM2, HIGH);
}
else if (digitalRead(Right_S) ==0) //If Fire is to the right
{
//Move the robot right
digitalWrite(LM1, HIGH);
digitalWrite(LM2, HIGH);
digitalWrite(RM1, HIGH);
digitalWrite(RM2, LOW);
}
delay(300); //Slow down the speed of robot
while (fire == true)
{
put_off_fire();
}
}
For tutorial...
Comments
Post a Comment