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.
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
| Component | Component Pin | Arduino Pin |
|---|---|---|
| Flame Sensor | OUT | Digital Pin 2 |
| Push Button | Signal | Digital Pin 4 |
| Buzzer | + | Digital Pin 8 |
| Door Servo #1 | Signal | Digital Pin 9 |
| Slide Servo #2 | Signal | Digital Pin 10 |
| Amber LED | Anode (+) | Digital Pin 6 |
| Blue LED | Anode (+) | Digital Pin 7 |
| All components | GND | Arduino GND |
| Sensor & servos | VCC | Arduino 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
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.
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.
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.
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.
Upload the code
Copy the code into the Arduino IDE, select your board and port, then click Upload.
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.
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.

Comments
Post a Comment