RoboticsIntermediatePRJ-072

Rescue Robot for Disaster Areas Using Arduino

Avoids obstacles on its own and raises an alarm when it finds dangerous gas.

Built and tested by Shahan Fathima K · Industrial Robotics Institute

Circuit diagram of the Rescue Robot for Disaster Areas using Arduino Uno
Circuit diagram · Arduino Uno
LevelIntermediate
Build time3–4 hours
BoardArduino Uno
Parts10 components

What is the Rescue Robot for Disaster Areas?

A search-and-rescue helper for disaster zones such as collapsed buildings or fires. It drives forward on its own, turns away from obstacles using an ultrasonic sensor, and uses an MQ-2 gas sensor to warn of smoke or gas leaks with an LED and buzzer, keeping human rescuers out of danger.

How it works

  1. The robot drives forward through the area.
  2. The ultrasonic sensor measures the distance ahead.
  3. If something is closer than 20 cm, the robot stops and turns right.
  4. The MQ-2 sensor checks for gas and smoke.
  5. Gas above 400 turns on the LED and buzzer as a danger alert.

Parts list

ComponentQty
Arduino Uno1
L298N Motor Driver Module1
DC Motors with Wheels2
Robot Chassis1
Ultrasonic Sensor (HC-SR04)1
Gas Sensor (MQ-2)1
Buzzer1
LED1
Battery Pack1
Jumper WiresAs needed

Software

  • Arduino IDE

Wiring and connections

FromConnect to
Ultrasonic TRIGPin 2
Ultrasonic ECHOPin 3
Ultrasonic VCC / GND5V / GND
MQ-2 AOUTA0
MQ-2 VCC / GND5V / GND
L298N IN1Pin 8
L298N IN2Pin 9
L298N IN3Pin 10
L298N IN4Pin 11
L298N VCCBattery +
LED +Pin 6
Buzzer +Pin 7

How to build the Rescue Robot for Disaster Areas

  1. Build the chassis and mount the ultrasonic sensor at the front.
  2. Mount the MQ-2 gas sensor on top, plus the LED and buzzer.
  3. Wire everything as in the table and power the L298N from the battery pack.
  4. Upload the code from the Arduino IDE.
  5. Let the gas sensor warm up, then test obstacle turning and gas alerts.

Rescue Robot for Disaster Areas code

Complete, tested Arduino C++ code for this project. Copy it into Arduino IDE and upload it to the Arduino Uno.

#define trigPin 2
#define echoPin 3

#define in1 8
#define in2 9
#define in3 10
#define in4 11

#define ledPin 6
#define buzzer 7
#define gasPin A0

long duration;
int distance;
int gasValue;

void forward()   { digitalWrite(in1, HIGH); digitalWrite(in2, LOW); digitalWrite(in3, HIGH); digitalWrite(in4, LOW);  }
void rightTurn() { digitalWrite(in1, HIGH); digitalWrite(in2, LOW); digitalWrite(in3, LOW);  digitalWrite(in4, HIGH); }
void stopRobot() { digitalWrite(in1, LOW);  digitalWrite(in2, LOW); digitalWrite(in3, LOW);  digitalWrite(in4, LOW);  }

void setup()
{
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
  pinMode(in1, OUTPUT);
  pinMode(in2, OUTPUT);
  pinMode(in3, OUTPUT);
  pinMode(in4, OUTPUT);
  pinMode(ledPin, OUTPUT);
  pinMode(buzzer, OUTPUT);
}

void loop()
{
  // Measure distance
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);
  duration = pulseIn(echoPin, HIGH);
  distance = duration * 0.034 / 2;

  // Read gas sensor
  gasValue = analogRead(gasPin);

  if (distance < 20)
  {
    stopRobot();
    delay(500);
    rightTurn();
  }
  else
  {
    forward();
  }

  if (gasValue > 400)
  {
    digitalWrite(ledPin, HIGH);
    digitalWrite(buzzer, HIGH);
  }
  else
  {
    digitalWrite(ledPin, LOW);
    digitalWrite(buzzer, LOW);
  }

  delay(200);
}

Real-world uses

  • Search and rescue training
  • Fire and gas leak inspection
  • Disaster management demos
  • Autonomous robotics learning

Frequently asked questions

What is a Rescue Robot for Disaster Areas?

A search-and-rescue helper for disaster zones such as collapsed buildings or fires. It drives forward on its own, turns away from obstacles using an ultrasonic sensor, and uses an MQ-2 gas sensor to warn of smoke or gas leaks with an LED and buzzer, keeping human rescuers out of danger.

What components are needed for the Rescue Robot for Disaster Areas?

You need: Arduino Uno (1), L298N Motor Driver Module (1), DC Motors with Wheels (2), Robot Chassis (1), Ultrasonic Sensor (HC-SR04) (1), Gas Sensor (MQ-2) (1), Buzzer (1), LED (1), Battery Pack (1), Jumper Wires. Software: Arduino IDE.

Is the Rescue Robot for Disaster Areas project good for beginners?

It is rated intermediate and takes about 3–4 hours to build, using the Arduino Uno. The guide on this page explains every connection and step.

Where can I get the code for the Rescue Robot for Disaster Areas?

The complete, tested Arduino C++ code is free on this page. Copy it into Arduino IDE and upload it to the board.

Can I buy a kit for the Rescue Robot for Disaster Areas?

Yes. IRI sells a kit with the parts for this project (PRJ-072). Message IRI on WhatsApp at +91 86060 82634 for the kit price and delivery details.

Industrial Robotics Institute
Logo