โ† 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.