Skip to content
Salah Eddine El-Azhary profile

Salah Eddine El-Azhary

Software Engineer
  • Email salah9azhary9@gmail.com
  • Location Marrakech, MA
About Resume Portfolio Contact Gallery
Case study drive.google.com
Visit project ×

Smart Detector — IoT-Based Gas Leak Detection and Automatic Extraction

Overview

Smart Detector is an embedded safety system designed to detect butane gas leaks and respond automatically to potentially dangerous gas concentrations. The project combines sensor monitoring, real-time warnings, GSM communication, and mechanical ventilation in a single Arduino-based prototype.

Capture999

The Problem

Gas leaks in indoor environments can create serious safety risks. The project addresses the need for continuous gas monitoring, immediate user notification, and automatic actions when gas concentrations exceed predefined thresholds.

The Solution

The system uses an MQ-5 gas sensor connected to an Arduino Uno to measure gas-related sensor readings. Based on predefined thresholds, it classifies the situation into normal, warning, or danger states.

  • Gas detection: Reads sensor values and compares them against configured thresholds.
  • Visual alerts: Displays readings and warning messages on an LCD and uses green, yellow, and red LEDs to indicate the current state.
  • Remote notifications: Uses a SIM800L GSM module to send an SMS and initiate a phone call when a critical threshold is exceeded.
  • Automatic response: Activates an exhaust fan and operates a servo motor to open a window as part of the gas extraction mechanism.

Technical Implementation

The control logic was implemented in C++ using the Arduino development environment. The firmware reads analog sensor values, applies conditional threshold checks, updates the LCD and LEDs, and controls the connected output devices.

The prototype integrates an Arduino Uno, MQ-5 gas sensor, I2C LCD, three LEDs, SIM800L GSM module, exhaust fan, and servo motor. The GSM communication code uses AT commands to send SMS messages and initiate calls.

Testing and Analysis

The project included prototype testing and analysis of gas concentration readings over time while the extraction fan was operating. Python and Matplotlib were used to plot experimental measurements, while fluid-flow simulations in HELYX and ANSYS supported the investigation of extraction airflow and tube geometry.

Outcome

The project demonstrates how embedded programming, sensors, GSM communication, and electromechanical components can be integrated into a prototype that detects elevated gas readings, alerts users, and initiates an automatic extraction response.

Technologies and Components

C++ (Arduino), Arduino Uno, MQ-5 gas sensor, I2C LCD, SIM800L GSM module, servo motor, exhaust fan, Python, Matplotlib, HELYX, and ANSYS.

Safety Note

This project is an educational prototype and should not be considered a certified gas safety device. Real-world deployment would require calibrated sensing, fail-safe engineering, validated ventilation design, and testing against applicable safety standards.

More case studies

  • Pinterest AI Content Filter(Founder)chromewebstore.google.com

    Pinterest AI Content Filter(Founder)

    Building a Pinterest AI Content Filter

  • Rawnaq Al madinahrawnaqalmadinah.com

    Rawnaq Al madinah

    Transforming an Offline Decoration Business into a Search-Driven Digital Presence

  • Observability & Security LayerRequest access

    Observability & Security Layer

    Designing a centralized infrastructure layer to monitor application performance, system health, logs, and security events.

  • Content Automation SystemRequest access

    Content Automation System

    An internal system I built to automate content research, analysis, AI generation, captions, and distribution across Facebook and Pinterest