This project integrates a fire detection system using a combination of sensors, a camera, and actuators. The system detects fires through both sensor data and a real-time camera feed, and responds accordingly with actuators like a fan and a submerged water motor to mitigate the detected fire.
- Real-time Fire Detection: Uses a camera and computer vision (Haar Cascade) for detecting fire.
- Sensor Monitoring: Includes flame, temperature, and gas sensors to detect fire conditions.
- Automated Actuation: Controls a fan and water motor when a fire is detected.
- LabVIEW Interface: Provides real-time monitoring, control, and visualization of sensor outputs.
- Flame Sensor: Detects visible flames.
- Temperature Sensor: Monitors ambient temperature to detect heat anomalies.
- MQ2 Gas Sensor: Detects the presence of flammable gases (e.g., propane, methane).
- Camera: Detects fire visually using a pre-trained Haar Cascade model.
- Fan: Cools down the surrounding area when the temperature is high and work as a eshaust fan when gas detected.
- Submerged Water Motor: Activates to release water when a fire is detected.
- Buzzer: Alerts users when a fire or dangerous gas is detected.
- Performs real-time fire detection using a camera and Haar Cascade for image processing.
- Communicates over TCP/IP with the LabVIEW interface to send fire detection results.
- Monitors sensor outputs and controls the actuators.
- Displays real-time video feed for fire detection and graphical gauges for sensor outputs.
- Live Video Feed: Shows the camera feed for real-time fire detection.
- Sensor Gauges:
- IR sensor gauge with voltage output.
- Temperature gauge with real-time temperature readings.
- MQ2 gas sensor gauge indicating gas levels.
- Controls:
- Set threshold values for the sensors (flame, temperature, gas) to trigger actuators.
- Outputs:
- Indicator lights and gauges show whether fire or gas is detected.
- Server Setup: Acts as a TCP server, listening for commands.
- Image Processing: Processes the camera feed to detect fire using the Haar Cascade model.
- Result Communication: Sends detection results (1 for fire, 0 for no fire) back to the client (LabVIEW interface).
- Error Handling: Sends any errors encountered during image processing back to the client.
-
Run the Python Script:
python fire_detection.py
-
Start the LabVIEW Interface: Configure the sensor thresholds and start monitoring through the VI file.
- Python 3.x
- OpenCV (cv2 library)
- LabVIEW
- Flame, temperature, MQ2 gas sensors, and a camera
- Fan, submerged water motor, and buzzer as actuators
-
Clone the repository:
git clone https://github.com/ushariRanasinghe/Fire-Detection-and-Mitigation-
-
Install the required Python libraries:
pip install opencv-python numpy
-
Run the Python Script:
python fire_detection.py
-
Open LabVIEW VI: Configure thresholds, start the interface, and monitor the system.