0% found this document useful (0 votes)
27 views25 pages

Iot Report

Uploaded by

viks23mca
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views25 pages

Iot Report

Uploaded by

viks23mca
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 25

Visvesvaraya Technological University

Belgaum,Karnataka

An IOT Mini-Project Report on


“Fire Fighting Robot using Arduino”
Submitted In Partial Fulfillment For The Award Of
Degree Of
Master Of Computer Applications

SUBMITTED BY:
VIGNESH K S
1CR23MC118

INTERNAL GUIDE:

Dr. Vakula Rani J


Professor
Dept. of MCA
CMRIT

CMR INSTITUTE OF TECHNOLOGY


132, IT Park Road, AECS Layout Kundalahalli, Bangalore-560037
2024-2025
CMR INSTITUTE OF TECHNOLOGY
132, IT Park Road, AECS Layout Kundalahalli, Bangalore-560037

CERTIFICATE

This is to certify that Vignesh K S bearing 1CR23MC118 has satisfactorily completed the
IOT Mini Project – 22MCAL37 entitled “Fire Fighting Robot using Arduino” in the
academic year 2024-25 as prescribed by VTU for III Semester of Master of Computer
Applications.

Signature of Internal Guide Signature of the HOD


CMR INSTITUTE OF TECHNOLOGY
132, IT Park Road, AECS Layout Kundalahalli, Bangalore-560037

ACKNOWLEDGEMENT

I would like to express my sincere gratitude to Dr. Vakula Rani J, Professor in the Department of
MCA at CMR Institute of Technology, for her invaluable guidance, support, and mentorship
throughout the development of the Fire Fighting Robot using Arduino. Her expertise in the field of
computer science and dedication to academic excellence have been instrumental in shaping this project.

I am deeply thankful for her insightful feedback, encouragement, and constructive criticism, which
have contributed significantly to the refinement and success of the project. Her unwavering
commitment to fostering learning and innovation has inspired me to strive for excellence and push the
boundaries of technological advancement.

I am also grateful to the faculty and staff of CMR Institute of Technology for providing a conducive
learning environment and access to resources essential for the completion of this project. Additionally,
I extend my appreciation to my peers and colleagues for their collaboration and support throughout this
journey.

Finally, I would like to thank my family and friends for their encouragement, understanding, and
patience during the course of this project. Their unwavering support has been a source of strength and
motivation, driving me to achieve my goals and aspirations.

Thank you to everyone who has contributed to the realization of the Fire Fighting Robot using
Arduino. Your support and encouragement have been invaluable, and I am truly grateful for the
opportunity to work on this project.

Vignesh K S
1CR23MC118
TABLE OF CONTENTS

SR No. INDEX Page No.


1. Introduction 5

2. Requirement Analysis 6-7

3. Software Requirement Specification 8-9

4. Analysis and Design 10-12

5. Implementation and Screenshots 13

6. Testing 14-15

7. Learning Outcome 16-17

8. Future Scope 18-19

9. Source Code 20-23

10. Conclusion 24

11 References 25
INTRODUCTION

Fire safety is a critical concern in various domains including households,


industrial plants, and public infrastructures. This project, titled "Autonomous
Fire-Fighting Robotic Car", aims to address small-scale fire emergencies
using a robotic system built around the Arduino Uno microcontroller. The robot
can detect the presence and direction of fire using flame sensors and extinguish
it with a relay-actuated extinguishing system.

In traditional systems, fire detection and suppression often rely on manual


operation or stationary sensors with limited coverage. This project introduces
mobility and autonomous behavior to such systems, enabling proactive
detection and suppression. The robot not only detects flames but also
determines their direction using a triad of flame sensors. Once the direction is
known, it navigates toward the fire source, halts at a close range, and activates a
flame suppression system.

The key motivation behind this project is to build a low-cost, portable, and
autonomous robot capable of enhancing safety in constrained or hazardous
environments. This includes scenarios where human intervention might be
dangerous or time-consuming. The robot employs common components such as
an Arduino Uno, motor driver (L298N), DC motors, servo motor, and relay
module, along with a 9V power source, making it an ideal educational and
prototypical application.

The project involves an interdisciplinary approach, combining knowledge of


embedded systems, programming, electronics, and control systems. It serves as
a comprehensive demonstration of how microcontrollers can be utilized to
develop real-time, responsive solutions to physical-world problems. The results
validate the concept that autonomous robots can augment fire safety protocols,
especially in remote or hazardous conditions.

5
REQUIREMENT ANALYSIS

Requirement analysis forms the backbone of any engineering project, ensuring


that all necessary conditions and resources are identified and allocated
effectively. For the autonomous fire-fighting robotic car, both functional and
non-functional requirements are analyzed to guide the development and
deployment phases.

Functional Requirements:

1. Flame Detection: The system must be capable of detecting the presence


of fire using multiple flame sensors.
2. Direction Identification: It must determine the direction of the flame
(left, center, right).
3. Autonomous Movement: Based on the detected flame direction, the
robot should move accordingly.
4. Extinguishing Mechanism: Upon reaching the flame, the robot must
activate a relay to trigger the extinguishing process.
5. Servo Operation: The servo motor should sweep to cover the flame area
effectively while extinguishing.
6. Safety Stop: The system should stop motors before activating the relay
for safety.

Non-Functional Requirements:

1. Portability: The robot must be compact and lightweight for easy


deployment.
2. Reliability: Must function consistently in detecting and reacting to fire.
3. Efficiency: Should perform fire detection and suppression within
minimal response time.
4. Battery Powered: Should operate on a 9V power supply for mobility and
safety.
5. User-Friendly Code: Code should be modular and easy to understand for
further development.

6
Hardware Requirements:

 Arduino Uno
 L298N Motor Driver
 Flame Sensors x3
 Relay Module
 Servo Motor
 DC Motors x2
 9V Battery

Software Requirements:

 Arduino IDE
 USB interface for code upload
 Serial Monitor for debugging

The defined requirements ensure that the robotic car can autonomously detect
and suppress small-scale fires while remaining easy to construct, program, and
operate.

7
SOFTWARE REQUIREMENT SPECIFICATION

The Software Requirement Specification (SRS) outlines the detailed


expectations for the software component of the fire-fighting robotic car. This
includes the design, behavior, and constraints of the embedded program running
on the Arduino Uno.

Objectives
 To create software that enables real-time response to fire detection.
 To control hardware components such as motors, sensors, servo, and
relay.
 To ensure safe and efficient operation during fire suppression.

Key Software Features


1. Sensor Integration: Continuously monitors inputs from multiple flame
sensors.
2. Decision-Making Logic: Determines direction of fire based on sensor
priority logic.
3. Motion Control: Sends PWM signals via L298N driver to control
forward, left, and right movement.
4. Fire Suppression Activation: Halts movement and triggers relay for fire
suppression using a servo motion sweep.
5. System Reset: Returns to monitoring mode after suppression cycle is
completed.

Software Architecture
 Input Layer: Digital input from flame sensors.
 Processing Layer: Logic and control decisions executed in Arduino
sketch.
 Output Layer: Motor control via L298N, relay activation, and servo
sweeping.

Development Tools
 Arduino IDE (for programming and uploading code)
 Serial Monitor (for debugging and sensor output monitoring)
 Standard C/C++ libraries and Servo.h for motor control

8
Performance Requirements
 Flame detection and movement decision within 200ms.
 Servo activation immediately after reaching target zone.
 Continuous polling to ensure updated sensor feedback.

Safety Considerations
 Relay should not trigger unless motors are halted.
 Servo and relay cycles must be limited to prevent mechanical wear.
 Software must handle sensor disconnections or out-of-range values
gracefully.

Maintainability
 The code should be modular, with separate functions for sensor reading,
movement, and actuation.
 Comments should describe all control logic for ease of future upgrades.

This software framework is essential to ensure the smooth, responsive, and safe
operation of the fire-fighting robot. It transforms sensor input into real-world
autonomous actions.

9
ANALYSIS AND DESIGN
The Analysis and Design phase plays a crucial role in ensuring the success of the
fire-fighting robotic car by providing a structured understanding of system
behavior and interactions before the actual implementation. This phase involves
identifying how the system components interact to fulfill the defined requirements
and establishing the flow of control and data within the system.

System Analysis

The system is designed to autonomously detect and extinguish fire using


multiple flame sensors, a relay-based extinguisher, and mobility provided by
DC motors. The system functions based on a combination of sensor input and
programmed logic. The flame sensors act as the primary detection modules.
These are strategically positioned to detect fire in different directions — left,
center, and right. Based on the sensor that records the highest intensity or
detects the flame first, the robot determines the direction to move.

The Arduino Uno acts as the central control unit, reading sensor values and
controlling the output components accordingly. The L298N motor driver is
responsible for driving the two DC motors that power the robot’s movement. It
allows the robot to move forward, turn left or right, and stop when needed. The
robot moves in the direction of the flame and halts once it is in proximity to the
fire source.

At this point, the system activates a relay module that simulates triggering a fire
extinguishing mechanism. Simultaneously, a servo motor is activated to
perform a sweeping motion, enhancing the extinguishing coverage. After
completing the suppression routine, the system resets to its monitoring state to
detect any new sources of fire.

System Design

The design phase involves laying out the interaction between hardware
components and the logic for control flow. The system is divided into four key
subsystems:
1. Sensing Subsystem: This includes the flame sensors which continuously

10
monitor for fire presence and intensity.
2. Control Subsystem: The Arduino Uno processes input data from sensors
and determines the appropriate action.
3. Motion Subsystem: This consists of DC motors and the L298N motor
driver, which facilitate robot navigation.
4. Suppression Subsystem: Includes the relay and servo motor that activate
and execute the fire extinguishing process.

The flow of operation begins with fire detection, followed by directional


movement, suppression preparation, relay activation, and servo sweeping, after
which the robot resets to its idle scanning mode.

The control logic is simple yet efficient. When the left sensor detects the fire,
the robot turns left; for center detection, it moves forward; and for right
detection, it turns right. Once near the flame, it stops, activates the relay, and
initiates the servo to sweep left and right, mimicking an extinguishing spray or
fan. This logic ensures accurate targeting and maximizes suppression
effectiveness.

The system is designed to operate continuously, polling the sensors and taking
real-time actions based on inputs. The modular approach in both hardware
layout and software logic makes the system easy to debug, upgrade, and
maintain.

In conclusion, this phase outlines a well-integrated and functionally segmented


design that ensures each component of the robotic car works in harmony to
fulfill its fire-fighting purpose. It transforms user needs and technical
requirements into a reliable, autonomous system ready for practical
applications.

11
CIRCUIT DIAGRAM

12
IMPLEMENTATION AND SCREENSHOTS

13
TESTING

The Testing phase is essential in validating the functionality, reliability, and


responsiveness of the fire-fighting robotic car. After hardware assembly and
software implementation, various tests were conducted to ensure that the robot
performed as expected under different conditions. The testing process was
divided into individual component testing and full system integration testing.

Component Testing
Each hardware module was first tested individually to confirm that it was
functioning properly before integrating it with the rest of the system. The flame
sensors were tested by placing a small flame (such as a lighter) at different
distances and angles. The sensor outputs were monitored using the Arduino
Serial Monitor to verify accurate detection and directional response. This
ensured that the sensor arrangement could successfully distinguish between left,
center, and right flame sources.

The DC motors were then tested using the L298N motor driver. Simple forward,
backward, left, and right commands were executed to confirm proper
movement. The relay module was tested by triggering it through the Arduino
digital pin to simulate an extinguisher being activated. The servo motor was
separately checked using a simple sweep program to ensure it could rotate as
expected within its limits.

Integration and Functional Testing

Once all components were confirmed to be operational, integration testing


began. The complete setup was powered using a 9V battery, and the Arduino
was loaded with the full program. The robot was placed in a controlled
environment, and a flame source was introduced at various positions. The robot
was observed for correct directional movement, motor response, relay
activation, and servo sweeping.

Functional testing confirmed that the robot could accurately detect the direction
of a flame and approach it. Upon nearing the fire, the robot successfully
stopped, activated the relay, and executed the servo's sweeping motion to
simulate extinguishing the flame. Each stage was performed sequentially and

14
reliably.

Edge Case and Stress Testing

Additional tests were conducted to simulate edge cases such as:


 Multiple flame sources at once.
 No flame detected.
 Flame quickly extinguished before reaching.
 Low battery conditions.
In each scenario, the robot handled the situation gracefully. If no flame was
detected, the robot remained idle. If multiple sensors were triggered, the robot
prioritized the sensor with the strongest signal. In low battery conditions, the
motor performance dropped slightly, but the robot continued to function,
indicating power efficiency.

Observations and Improvements

One challenge observed during testing was the variability in flame detection
distance depending on ambient light conditions. Bright light could reduce
sensor sensitivity, so future improvements may include IR filtering or adaptive
thresholding in software.
Overall, testing verified that the robotic car met all functional and non-
functional requirements. The system responded quickly and performed each
task as intended, proving its utility as a fire-detection and extinguishing
prototype.

15
LEARNING OUTCOME

The development of the fire-fighting robotic car has provided a comprehensive


and enriching learning experience, integrating concepts from electronics,
programming, robotics, and systems design. Throughout the project, various
technical and analytical skills were acquired and refined, laying a strong
foundation for future work in embedded systems and automation.

One of the primary learning outcomes was a deep understanding of Arduino


programming and embedded system integration. Writing the code to
interface with different hardware components such as flame sensors, servo
motors, relays, and motor drivers taught valuable lessons in input-output
handling, conditional logic, and real-time control systems. This experience
helped reinforce the importance of structuring code for modularity and
maintainability, especially in time-sensitive applications.

Another major takeaway was the hands-on experience with electronic


components and circuit design. Assembling the robot required careful
planning of connections, power distribution, and safety precautions. Working
with the L298N motor driver to control DC motors highlighted the importance
of understanding current ratings and voltage levels. Similarly, testing and
integrating the relay and servo motor emphasized the need for precise timing
and sequencing in automation tasks.

From a design and planning perspective, the project improved our abilities in
system analysis and architectural thinking. Breaking down the overall
objective into manageable subsystems—such as sensing, control, motion, and
suppression—allowed for clearer project milestones and better debugging.
Creating flowcharts and control logic prior to implementation ensured smoother
development and faster troubleshooting.

Furthermore, the project strengthened problem-solving skills. Numerous


challenges were encountered during development, including sensor calibration,
inconsistent motor behavior, and timing issues with relay and servo
coordination. Resolving these issues fostered a methodical and resilient
approach to debugging, testing, and iteration.

16
Working on this robot also highlighted the value of team collaboration and
interdisciplinary learning. The successful completion of the project required
the integration of knowledge from electronics, mechanical systems, and
programming. Effective communication and task delegation played an essential
role in achieving the desired outcome within a limited timeframe.

In conclusion, this project provided a real-world application for theoretical


knowledge and encouraged innovation in the field of fire safety. It offered a
platform to explore how low-cost, embedded technology can be leveraged to
solve critical problems in hazardous environments. The skills and insights
gained will undoubtedly benefit future academic and professional endeavors.

17
FUTURE SCOPE

The autonomous fire-fighting robotic car developed in this project serves as a


prototype with immense potential for further improvement and real-world
application. While the current version demonstrates fundamental capabilities
such as fire detection, directional movement, and fire suppression, there are
multiple avenues for enhancing its performance, efficiency, and scalability.

One significant area of future development is the integration of wireless


communication technologies such as Bluetooth, Wi-Fi, or GSM. This would
enable the robot to send real-time alerts to users or emergency response teams
upon detecting a fire. With this capability, it can serve not only as a suppression
system but also as an early warning system in sensitive environments like data
centers, storage facilities, or residential buildings.

Another promising enhancement is the incorporation of advanced sensors such


as gas sensors, temperature sensors, and thermal cameras. While the current
setup relies solely on flame sensors, a multi-sensor system would improve
detection accuracy and allow the robot to differentiate between actual flames
and false positives caused by light reflections or heat sources. It would also
allow the system to evaluate the severity of the fire before engaging suppression
mechanisms.

In terms of navigation and mobility, future versions can be upgraded to use


ultrasonic or infrared sensors for obstacle detection and path planning. This
would make the robot capable of navigating complex or cluttered environments
without human intervention. Implementing line-following or room-mapping
algorithms (like SLAM) could make the robot more intelligent and versatile in
various fire-prone zones.

The fire suppression system can also be enhanced. Instead of a relay-based fan
or extinguisher trigger, the robot can be fitted with a pressurized CO₂ or foam
dispensing module with more effective flame coverage. A feedback loop using
flame intensity readings post-suppression could confirm whether the fire has
been extinguished, leading to more intelligent and resource-efficient
suppression.

18
Furthermore, the robot could be redesigned using metallic or fire-resistant
materials to allow it to operate safely in high-temperature zones. With proper
shielding and heat management, the robot could potentially approach more
hazardous fire conditions without damage.

Lastly, the use of AI and machine learning can be explored to improve


detection accuracy, decision-making speed, and autonomous operation. AI
models can be trained to recognize different fire scenarios and select the most
appropriate course of action, thereby improving both efficiency and safety.
In conclusion, the current prototype lays the groundwork for more advanced
autonomous fire-fighting robots. With technological upgrades and broader
integration, this project has the potential to evolve into a powerful tool for
modern firefighting and disaster management systems.

19
SOURCE CODE

#include <Servo.h>

// Pin configuration
const int flameSensorPins[] = {2, 3, 4}; // flameSensorPins[0] = Left, [1] =
Middle, [2] = Right
const int relayPin = 5; // Relay control pin
const int leftMotorForward = 6; // Left motor forward control pin
const int leftMotorBackward = 7; // Left motor backward control pin
const int rightMotorForward = 8; // Right motor forward control pin
const int rightMotorBackward = 9; // Right motor backward control pin
const int servoPin = 10; // Servo motor control pin

// Variables
unsigned long relayOnDuration = 3000; // Relay on duration in milliseconds
(5 seconds)
unsigned long lastFlameTime = 0;
bool fireDetected = false;
int flamePosition = -1; // 0 = left, 1 = middle, 2 = right

Servo fireExtinguishServo; // Servo object for fire extinguishing

void setup() {
for (int i = 0; i < 3; i++) {
pinMode(flameSensorPins[i], INPUT);
}

pinMode(relayPin, OUTPUT);
digitalWrite(relayPin, LOW);

pinMode(leftMotorForward, OUTPUT);
pinMode(leftMotorBackward, OUTPUT);
pinMode(rightMotorForward, OUTPUT);
pinMode(rightMotorBackward, OUTPUT);

fireExtinguishServo.attach(servoPin);
fireExtinguishServo.write(90);

stopMotors();

20
Serial.begin(9600);
}

void loop() {
fireDetected = false;
flamePosition = -1;

// Check sensors
for (int i = 0; i < 3; i++) {
if (digitalRead(flameSensorPins[i]) == LOW) { // Flame detected
flamePosition = i;
fireDetected = true;
break;
}
}

if (fireDetected) {
Serial.print("Flame detected at position: ");
if (flamePosition == 0) Serial.println("LEFT");
else if (flamePosition == 1) Serial.println("MIDDLE");
else if (flamePosition == 2) Serial.println("RIGHT");

// Move based on flame position


if (flamePosition == 0) {
turnLeft();
delay(1000);
} else if (flamePosition == 1) {
moveForward();
delay(1000);
} else if (flamePosition == 2) {
turnRight();
delay(1000);
}

stopMotors();

// Activate relay & extinguish fire


Serial.println("Activating relay and servo...");
digitalWrite(relayPin, LOW);
lastFlameTime = millis();
extinguishFire();
}

21
if (digitalRead(relayPin) == LOW && millis() - lastFlameTime >=
relayOnDuration) {
Serial.println("Turning off relay...");
digitalWrite(relayPin, HIGH);
}

delay(100);
}

void moveForward() {
digitalWrite(leftMotorForward, HIGH);
digitalWrite(leftMotorBackward, LOW);
digitalWrite(rightMotorForward, HIGH);
digitalWrite(rightMotorBackward, LOW);
}

void moveBackward() {
digitalWrite(leftMotorForward, LOW);
digitalWrite(leftMotorBackward, HIGH);
digitalWrite(rightMotorForward, LOW);
digitalWrite(rightMotorBackward, HIGH);
}

void turnLeft() {
digitalWrite(leftMotorForward, LOW);
digitalWrite(leftMotorBackward, HIGH);
digitalWrite(rightMotorForward, HIGH);
digitalWrite(rightMotorBackward, LOW);
}

void turnRight() {
digitalWrite(leftMotorForward, HIGH);
digitalWrite(leftMotorBackward, LOW);
digitalWrite(rightMotorForward, LOW);
digitalWrite(rightMotorBackward, HIGH);
}

void stopMotors() {
digitalWrite(leftMotorForward, LOW);
digitalWrite(leftMotorBackward, LOW);
digitalWrite(rightMotorForward, LOW);
digitalWrite(rightMotorBackward, LOW);
}

22
void extinguishFire() {
Serial.println("Swinging servo...");
for (int i = 0; i < 5; i++) {
fireExtinguishServo.write(180);
delay(200);
fireExtinguishServo.write(0);
delay(200);
}
fireExtinguishServo.write(90);
}

23
CONCLUSION
The fire-fighting robotic car project successfully demonstrates how embedded
systems and automation can be harnessed to develop a functional, autonomous
solution for fire detection and suppression. Through careful integration of
sensors, actuators, microcontrollers, and control logic, the robot is capable of
identifying the direction of a flame, navigating toward it, and activating a
suppression mechanism upon reaching the source.

The project began with a clear objective: to build a small-scale, autonomous


robot capable of responding to fire hazards in environments where human
presence may be risky or impractical. Throughout the development cycle—from
requirement analysis and system design to coding, testing, this objective was
consistently met. The robot was able to perform as intended, responding quickly
to flame detection and executing an extinguishing sequence that involved
multiple coordinated components.

One of the key achievements of this project is its demonstration of real-time


embedded control using Arduino. By working with flame sensors, relay
modules, servo motors, and motor drivers, the project team gained hands-on
experience in interfacing hardware with responsive software systems. The
success of the final implementation confirms the viability of using affordable,
open-source tools for creating safety-focused automation solutions.

In addition to technical learning, the project encouraged problem-solving,


critical thinking, and collaboration. Each challenge—whether it involved sensor
calibration, movement control, or suppression timing—was addressed through
iterative testing and refinement. The end result is a reliable robotic platform
that, while simple in its current form, offers a solid foundation for future
enhancements and real-world applications.

In conclusion, this fire-fighting robotic car serves as a proof-of-concept for


autonomous safety systems. With future improvements, such as advanced
sensors, wireless communication, and AI integration, this project could evolve
into a more sophisticated and life-saving technology. It underscores the
powerful role robotics and embedded systems can play in creating safer living
and working environments.

24
REFERENCES
 - Arduino Official Guide
https://www.arduino.cc/en/Guide/HomePage

 - L298N Motor Driver Module Datasheet


https://components101.com/modules/l298n-motor-driver-module

 - Flame Sensor Module Interfacing


https://lastminuteengineers.com/flame-sensor-arduino-tutorial/

 - Servo Motor with Arduino


https://www.arduino.cc/en/Reference/Servo

 - Relay Module Control Using Arduino


https://circuitdigest.com/microcontroller-projects/relay-module-
interfacing-with-arduino

 - Book: Embedded Systems: A Contemporary Design Tool by James


Peckol

 - Book: The 8051 Microcontroller and Embedded Systems by


Muhammad Ali Mazidi

 - Electronics_Project_Components.pdf (Uploaded component datasheet


reference)

 - Arduino Stack Exchange & Instructables – For coding examples and


troubleshooting tips.

25

You might also like