Slide for 2nd Floor

DIY Fire Safety Door & Escape Slide for 2nd Floor | Arduino Robotics Project | MakeMindz
🔥 Building Safety Robotics

DIY Fire Safety Door & Escape Slide for a 2nd Floor Building

Tall buildings need a fast way out when there's a fire — and it shouldn't depend on someone finding a key! In this project, you'll build a mini two-storey model where a flame sensor automatically swings open a fire door and unlocks an escape slide, so everyone can get down to safety in seconds.

⏱️ 2.5 Hours 🎯 Beginner Friendly 🔌 Arduino Uno 👧 Ages 9–14
2nd Floor 1st Floor 🔥 Flame detected → Door opens → Slide unlocks → Safe exit

Why Build This?

Fire safety engineers design real escape systems so that people never get trapped behind a locked door during an emergency. This project lets you build a working miniature model of that idea: a second-floor door that unlocks itself the instant a flame sensor detects fire, followed by a slide chute that unlocks so your toy figures (or a ball!) can glide safely down to the ground — just like real fire-escape slides used in schools and apartment buildings.

🧰 Parts You'll Need

🧠

Arduino Uno

The brain of your fire safety system

🔥

Flame Sensor Module

Watches for fire near the 2nd floor

🚪

SG90 Servo #1

Swings the fire door open

🛝

SG90 Servo #2

Unlocks the slide latch

🔔

Buzzer

Sounds a loud fire alarm

🟠

Amber LED

Flashes when danger is detected

🔵

Blue LED

Glows steady when everything is normal

🔘

Push Button

Manual fire-alarm override

🧩

Breadboard + Jumper Wires

Connects the whole circuit

📦

Cardboard 2-Storey Model

Your mini building with a slide

🔌 Circuit Diagram

ARDUINO UNO (control board) Flame Sensor OUT → Pin 2 Push Button Pin → 4 Buzzer Pin → 8 Door Servo #1 Signal → Pin 9 Slide Servo #2 Signal → Pin 10 Amber LED (Danger) Pin → 6 Blue LED (Normal) Pin → 7 All sensors, servos and outputs share GND with the Arduino
ComponentComponent PinArduino Pin
Flame SensorOUTDigital Pin 2
Push ButtonSignalDigital Pin 4
Buzzer+Digital Pin 8
Door Servo #1SignalDigital Pin 9
Slide Servo #2SignalDigital Pin 10
Amber LEDAnode (+)Digital Pin 6
Blue LEDAnode (+)Digital Pin 7
All componentsGNDArduino GND
Sensor & servosVCCArduino 5V

💻 Arduino Code

/*
  DIY Fire Safety Door + Escape Slide (2nd Floor Model)
  MakeMindz.com — beginner Arduino safety project

  When the flame sensor detects fire (or the emergency button
  is pressed), Servo #1 swings the fire door open, then a moment
  later Servo #2 unlocks the escape slide latch. The buzzer sounds
  and the amber LED flashes while the blue "all normal" LED turns off.
*/

#include <Servo.h>

Servo doorServo;
Servo slideServo;

const int flamePin    = 2;
const int buttonPin   = 4;
const int buzzerPin   = 8;
const int doorServoPin = 9;
const int slideServoPin= 10;
const int amberLedPin = 6;
const int blueLedPin  = 7;

const int doorClosedAngle  = 0;
const int doorOpenAngle    = 90;
const int slideLockedAngle = 0;
const int slideOpenAngle   = 100;

bool escapeActivated = false;

void setup() {
  pinMode(flamePin, INPUT);
  pinMode(buttonPin, INPUT_PULLUP);
  pinMode(buzzerPin, OUTPUT);
  pinMode(amberLedPin, OUTPUT);
  pinMode(blueLedPin, OUTPUT);

  doorServo.attach(doorServoPin);
  slideServo.attach(slideServoPin);
  doorServo.write(doorClosedAngle);
  slideServo.write(slideLockedAngle);

  digitalWrite(blueLedPin, HIGH); // all normal at startup

  Serial.begin(9600);
  Serial.println("Fire Safety Door + Slide system ready.");
}

void loop() {
  int flameDetected  = digitalRead(flamePin) == LOW; // most flame sensors go LOW near fire
  int buttonPressed  = digitalRead(buttonPin) == LOW;

  if ((flameDetected || buttonPressed) && !escapeActivated) {
    runEscapeSequence();
  }

  delay(200);
}

void runEscapeSequence() {
  escapeActivated = true;
  Serial.println("FIRE DETECTED! Opening door and unlocking slide...");

  digitalWrite(blueLedPin, LOW);

  // Step 1: swing the fire door open
  doorServo.write(doorOpenAngle);
  flashAlarm(4);

  // Step 2: unlock the escape slide right after the door
  delay(500);
  slideServo.write(slideOpenAngle);
  flashAlarm(6);

  Serial.println("Escape route is open. Stay calm and exit safely.");
}

void flashAlarm(int beeps) {
  for (int i = 0; i < beeps; i++) {
    digitalWrite(amberLedPin, HIGH);
    digitalWrite(buzzerPin, HIGH);
    delay(150);
    digitalWrite(amberLedPin, LOW);
    digitalWrite(buzzerPin, LOW);
    delay(150);
  }
}

💡 Tip: open the Serial Monitor at 9600 baud after uploading to watch the escape sequence messages print in real time.

🛠️ How It Works — Step by Step

1

Build your 2-storey model

Make a simple cardboard building with a marked "2nd floor," a small hinged door, and a ramp or tube acting as the slide down to the ground.

2

Mount the flame sensor

Place the flame sensor near the 2nd floor door so it can "watch" for fire in that area, following the circuit diagram.

3

Attach Servo #1 to the door

Fix the servo horn to the door hinge so turning from 0° to 90° swings the door fully open.

4

Attach Servo #2 to the slide latch

Connect this servo to a small latch or gate blocking the top of the slide, so it releases when the servo turns.

5

Upload the code

Copy the code into the Arduino IDE, select your board and port, then click Upload.

6

Test with a flame

With an adult present, hold a small flame near the sensor and watch the door swing open, followed by the slide unlocking.

7

Try the manual alarm button

Press the push button to trigger the same door-and-slide escape sequence, just like a manual fire alarm pull station.

🩹 Troubleshooting

Door servo doesn't move

Confirm the signal wire is on Pin 9 and that the servo has a steady 5V supply — weak power is the most common cause.

Slide servo moves before the door

That shouldn't happen with this code, but if your wiring is swapped, double-check Servo #2 is on Pin 10, not Pin 9.

Flame sensor won't trigger

Keep the flame within about 20–30 cm and make sure it's a real flame — most sensors don't react to LED torches.

Alarm won't stop beeping

That's expected — a fire alarm should keep signalling danger. Press the Arduino's reset button to restart the system.

LEDs are swapped

Check the longer leg (anode) of each LED is connected through a resistor to its Arduino pin, and the shorter leg to GND.

🚀 Upgrade Ideas

💨 Add a Smoke Sensor

Wire in an MQ-2 sensor so the door and slide also activate when smoke builds up, even without visible flame.

📢 Floor-by-Floor Alerts

Add more flame sensors on different "floors" of your model, each triggering its own door and slide.

💡 Guiding Light Path

Add a row of LEDs along the slide that light up one after another to show the direction to safety.

📱 Remote Alert

Upgrade to an ESP32 board to send a WiFi notification the moment the escape sequence activates.

❓ Frequently Asked Questions

Is this the same as a real building fire escape?

This is an educational model that demonstrates the idea behind automatic fire doors and escape slides. Real buildings use certified, professionally installed fire-safety hardware.

Do I need two servos, or can I use one?

Two servos let you clearly show the door opening and the slide unlocking as separate steps, which mirrors how real evacuation routes work — but you can simplify to one servo if you're just getting started.

Is it safe to test with real fire?

Only test the flame sensor with adult supervision, using a small controlled flame like a lighter held at a safe distance.

What age group is this project best for?

This build suits young makers around 9–14, ideally with an adult helping with the wiring and the flame test.

Can I use an Arduino Nano instead of an Uno?

Yes — an Arduino Nano works the same way and is a great choice if you want a smaller, more compact model.

Made with ❤️ for young makers by MakeMindz — engineering safer buildings, one circuit at a time.

Comments

Product Cards
Buddy Bot eBook
⭐ New 2026 Release
Build Your
Own Robot!
3D design, wiring &
Arduino coding.
★★★★★ Young inventors love it!
🖨️
3D Print
All parts
⚡
Wire it
Circuit guide
💻
Code it
Arduino IDE
🤖
Watch it
Walk & react
📋 Your Details
Enter your name
Valid 10-digit no.
Enter a valid email
Special Website Offer
₹499 ₹300
🌍 International: $5 USD
One-time · Instant digital delivery
🔒 Secured by Razorpay · Your data is safe
📄 Download Free Sample Copy
🔒 Secured by Razorpay · Your data is safe
🍓
Raspberry Pi Pico Mastery
21 Projects
⚡ Launch Price — 80% OFF
Learn Pico
Build 21 Projects!
MicroPython · Wokwi
IoT · Certificate
★★★★★ Perfect for beginners!
🖥️
Wokwi
No hardware
🐍
MicroPy
From zero
🔨
21 Projects
IoT + sensors
📄
Certificate
Verified cert
📋 Your Details
Enter your name
Valid 10-digit no.
Enter a valid email
Special Launch Offer
₹999 ₹200 80% OFF
🌍 International: $5 USD
One-time · Lifetime access · No subscription
🔒 Secured by Razorpay · UPI · Cards · NetBanking
🎉

You're in!

Payment successful! Your Buddy Bot eBook is ready. Time to build!

📖 Access Your eBook Now
🎉

Enrolled!

Payment successful! Lifetime access to all 21 Pico Projects is yours!

🍓 Go to My Course