← Back to All Articles

πŸ”₯ Design and Simulation of a Smart Fire Alarm System Using Cisco Packet Tracer

By Kaifa Ferdusa , Hammad Hassan maishakaifa836@gmail.com Posted on 16 May 2025
Area of Article:
Cisco Packet Tracer

 



🏠 Introduction


In the age of smart technology, ensuring home safety through automation has become increasingly practical and essential. This article presents a Smart Fire Alarm System built and simulated in Cisco Packet Tracer, demonstrating how IoT devices can collaboratively respond to emergency fire incidents with speed and precision.




πŸ”§ Components Used

















































Device Role
πŸ”₯ Fire Monitor (Smoke Sensor) Detects fire or smoke
🌑️ LCD Temperature Display Shows ambient temperature
πŸ”Š Piezo Speaker Emits a loud alert during fire events
🚿 Smart Sprinkler Releases water to suppress fire
🧠 MCU (Microcontroller Unit) Executes logic and controls all devices
πŸͺŸ Smart Window Opens for ventilation during fire
πŸ’‘ Smart Light & Fan Extendable for ambiance or air circulation
πŸ“± Smartphone & Tablet Allow remote monitoring via internet
🌐 Home Gateway & Modem Enable network and internet access






πŸ“ System Design


All IoT devices are logically connected to the MCU, which monitors the fire sensor and responds to emergencies. The Gateway links the setup to the internet for future remote control via a smartphone or tablet.


Key components include:





🧠 MCU Automation Script (PyScript)


Below is the full script used on the MCU in Cisco Packet Tracer:



 

from gpio import *
from time import *


def main():
    pinMode(0, INPUT)    # Fire sensor
    pinMode(1, OUT)      # Buzzer (Piezo speaker)
    pinMode(2, OUT)      # Sprinkler (on/off)
    pinMode(3, OUT)      # Window or Fan
    pinMode(4, OUT)      # LCD status display
    pinMode(5, OUT)      # LCD temperature display


    print("πŸ”₯ Fire Alarm System Initiated")
    counter = 0
    max_iterations = 30  # Runs for approx. 30 seconds


    while counter < max_iterations:
        fire = digitalRead(0)
        print("Sensor Reading:", fire)


        if fire == 1023:  # Fire detected (high signal)
            digitalWrite(1, HIGH)  # Buzzer ON
            digitalWrite(2, HIGH)  # Sprinkler ON
            digitalWrite(3, HIGH)  # Window OPEN
            customWrite(4, "FIRE DETECTED")  # LCD status
            customWrite(5, "TEMP: 45°C")     # LCD temp
        else:  # No fire
            digitalWrite(1, LOW)   # Buzzer OFF
            digitalWrite(2, LOW)   # Sprinkler OFF
            digitalWrite(3, LOW)   # Window CLOSED
            customWrite(4, "SAFE MODE")      # LCD status
            customWrite(5, "TEMP: 25°C")     # LCD temp


        sleep(1)
        counter += 1


    print("βœ… Simulation Complete.")


if __name__ == "__main__":
    main()






πŸ§ͺ Simulation Results





πŸ› οΈ Challenges & Solutions





























Challenge Solution
Managing real-time automation Used PyScript in MCU with clear GPIO mapping
Coordinating multiple devices Grouped actions inside conditional blocks
Simulation lag Calibrated timing and device sensitivity
Wire organization Used color-coded logical layout in Packet Tracer






πŸ“± Future Scope





βœ… Conclusion


The Smart Fire Alarm System implemented in Cisco Packet Tracer is a powerful demonstration of IoT automation. It successfully:



This prototype shows how embedded systems and networked sensors can work together to improve safety in smart homes.