fireFightingRobot iot project

About Robot:

The primary goal of this project is to design and develop an autonomous fire-fighting robot vehicle capable of detecting, approaching, and extinguishing fires without the need for human intervention.

In hazardous environments such as industrial sites, warehouses, or residential buildings during fire outbreaks, early detection and suppression are critical to minimizing damage and saving lives. However, these situations often pose significant risks to firefighters, such as exposure to toxic gases, extreme heat, and structural instability.

This autonomous robot is designed to mitigate these risks by identifying fire sources in a defined area, moving towards the fire autonomously, and then extinguishing the flames using a water pump mechanism. By integrating fire detection sensors, motors for mobility, and a water-based suppression system, the robot can act swiftly and efficiently in emergency scenarios. Such a system is ideal for environments where rapid response is essential but human access may be delayed or dangerous. In industrial facilities with high fire risks, this robot can patrol designated areas, continuously scanning for fire hazards. In residential or commercial spaces, the robot can act as a first responder, tackling smaller fires before they escalate.

This project not only highlights the use of IoT technology for real-world applications but also showcases the potential of robotics in life-saving operations.

Objectives:

System Design and Architecture:

Component List

fire_fighting_robot_circuit_design


            #define enA 10      // Enable1 L298 Pin enA
            #define in1 9       // Motor1 L298 Pin in1
            #define in2 8       // Motor1 L298 Pin in2
            #define in3 7       // Motor2 L298 Pin in3
            #define in4 6       // Motor2 L298 Pin in4
            #define enB 5       // Enable1 L298 Pin enB
            
            #define ir_R A0     // Right IR sensor
            #define ir_F A1     // Front IR sensor
            #define ir_L A2     // Left IR sensor
            #define servoPin A4 // Servo pin for water pump
            #define pump A5     // Water pump pin
            
            int fireThreshold = 900;      // Sensitivity threshold for detecting fire
            int stopRangeThreshold = 600;  // Stop range threshold to ensure robot moves closer before stopping
            
            void setup() {
                Serial.begin(9600); // Start serial communication
                pinMode(ir_R, INPUT); // Set fire sensor pins as input
                pinMode(ir_F, INPUT);
                pinMode(ir_L, INPUT);
                pinMode(enA, OUTPUT); // Motor control pins as output
                pinMode(in1, OUTPUT);
                pinMode(in2, OUTPUT);
                pinMode(in3, OUTPUT);
                pinMode(in4, OUTPUT);
                pinMode(servoPin, OUTPUT); // Set servo pin as output
                pinMode(pump, OUTPUT);     // Set pump pin as output
            
                // Enable the motors
                analogWrite(enA, 255); // Set motor speed to maximum
                analogWrite(enB, 255);
            }
            
            void loop() {
                int s1 = analogRead(ir_R); // Read right sensor
                int s2 = analogRead(ir_F); // Read front sensor
                int s3 = analogRead(ir_L); // Read left sensor
            
                // Print sensor readings for debugging
                Serial.print("Right: ");
                Serial.print(s1);
                Serial.print(" | Front: ");
                Serial.print(s2);
                Serial.print(" | Left: ");
                Serial.println(s3);
            
                // Control logic
                if (s2 < fireThreshold) {  // Fire detected in front
                    if (s2 > stopRangeThreshold) { // Fire detected but outside stop range
                        moveForward();  // Move towards the fire
                    } else { // Stop and activate water pump when within range
                        stopMotors();
                        activatePump();  // Spray water
                    }
                } else if (s1 < fireThreshold) { // Fire detected on the right
                    alignLeft();  // Turn left and adjust alignment
                } else if (s3 < fireThreshold) { // Fire detected on the left
                    alignRight();  // Turn right and adjust alignment
                } else { // No fire detected
                    stopMotors();
                    stopPump();  // Ensure pump is turned off when no fire
                }
            
                delay(100); // Delay for stability
            }
            
            void activatePump() {
                digitalWrite(pump, HIGH); // Activate the pump
            
                // Continuously move servo from 50 degrees to 130 degrees until the fire stops
                while (analogRead(ir_F) < fireThreshold) {
                    // Move the servo from 50 degrees to 130 degrees
                    for (int angle = 50; angle <= 130; angle += 3) {
                        servoPulse(servoPin, angle);
                    }
            
                    // Move the servo back from 130 degrees to 50 degrees
                    for (int angle = 130; angle >= 50; angle -= 3) {
                        servoPulse(servoPin, angle);
                    }
            
                    // Check again if the fire is still detected before repeating the loop
                    if (analogRead(ir_F) >= fireThreshold) {
                        break; // Exit the loop if fire is no longer detected
                    }
                }
            
                stopPump(); // Stop the pump when fire is no longer detected
            }
            
            
            
            void stopPump() {
                digitalWrite(pump, LOW); // Deactivate the pump
            }
            
            void servoPulse(int pin, int angle) {
                int pwm = (angle * 11) + 500; // Convert angle to microseconds
                digitalWrite(pin, HIGH);
                delayMicroseconds(pwm);
                digitalWrite(pin, LOW);
                delay(50); // Refresh cycle of servo
            }
            
            // Function to move the robot forward
            void moveForward() {
                digitalWrite(in1, LOW);  // Right motor forward
                digitalWrite(in2, HIGH); // Right motor backward
                digitalWrite(in3, LOW);  // Left motor forward
                digitalWrite(in4, HIGH); // Left motor backward
            }
            
            // Function to turn slightly left and re-align when fire is detected on the right
            

Working Principle

Applications

Conclusion

This fire-fighting robot vehicle exemplifies the synergy between IoT, automation, and sensor technology to address fire hazards in real-world scenarios. By leveraging three infrared flame sensors, the robot autonomously scans its environment for fire, even across a wide angle, ensuring comprehensive coverage without requiring human supervision. Upon detecting a fire, the system uses motorized control to navigate towards the source, demonstrating intelligent decision-making and precise movements in complex environments. The incorporation of a servo-controlled water nozzle allows for targeted fire suppression, reducing water wastage and ensuring efficient extinguishing.

The robot's reliance on low-cost components like B.O motors, an L298 motor driver, and an Arduino Uno make it affordable and accessible for educational and prototyping purposes. The simplicity of the design ensures ease of replication, allowing others to build similar robots for diverse applications. Moreover, its adaptability means the system can be scaled or modified to handle larger fires, be equipped with different sensors, or operate in more challenging environments. This project provides a robust foundation for developing autonomous fire-fighting systems in hazardous industrial sites, remote locations, or areas inaccessible to humans, significantly improving safety and response times in high-risk environments.

Video


Fire Fighting Robot vehicle in Working