GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - KeertiAM29/Fuel-Leakage-Detection-Engine-Protection-STM32: STM32-based fuel leakage detection and engine protection system using MQ-3 gas sensor, ADC threshold detection, and automatic motor shutdown with LED indication.

BranchesTags
Open more actions menu

Latest commit

 

History

14 Commits
14 Commits

Folders and files

NameName
Last commit message
Last commit date
images
images
 
 
src
src
 
 
README.md
README.md
 
 

Repository files navigation

šŸ”„ Fuel Leakage Detection & Engine Protection System — STM32

STM32-based automotive safety system that detects fuel vapors using an MQ-3 gas sensor and automatically shuts down the engine when leakage is detected.


šŸ“Œ Overview

An embedded automotive safety system that detects fuel-related vapors using an MQ-3 gas sensor and automatically stops a DC motor (representing the vehicle engine) when the detected vapor concentration exceeds a predefined threshold. The system provides real-time visual indication via LEDs for safe and unsafe conditions.


šŸŽÆ Objective

To interface an MQ-3 gas sensor with the STM32 microcontroller and implement threshold-based fuel leakage detection with automatic engine shutdown and warning indication.


šŸ› ļø Hardware Components

Component Specification
Microcontroller STM32F103C8T6 (Blue Pill)
Gas Sensor MQ-3 (Alcohol/Fuel Vapor)
Actuator 5–12V DC Motor (Engine simulation)
Indicators Green LED (Safe) + Red LED (Warning)
Resistors 330Ī© (for LEDs)
Misc Connecting Wires, Breadboard

šŸ—ļø System Architecture

MQ-3 Sensor → ADC → STM32F103C8T6 → Threshold Decision → Motor / LED Control
                         │
                    ā”Œā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”
               Safe │         │ Leakage Detected
                    ā–¼         ā–¼
              Green LED    Red LED
              Motor ON     Motor OFF

āš™ļø Working

Normal Condition (No Leakage)

  • MQ-3 sensor reads vapor concentration via ADC
  • ADC value below threshold → safe condition
  • āœ… Green LED ON
  • āœ… DC Motor RUNNING

Leakage Detected

  • ADC value exceeds threshold → leakage detected
  • šŸ”“ Red LED ON (warning)
  • āŒ Green LED OFF
  • āŒ DC Motor STOPPED (engine shutdown)

šŸ’» Technologies Used

  • STM32F103C8T6 — ARM Cortex-M3 microcontroller
  • Embedded C — firmware development
  • ADC (Analog to Digital Converter) — sensor reading
  • GPIO — LED and motor control
  • Sensor Interfacing — MQ-3 gas sensor
  • Threshold-Based Control — decision logic
  • Automotive Safety Monitoring

šŸ“ Project Structure

Fuel-Leakage-Detection/
ā”œā”€ā”€ Core/
│   ā”œā”€ā”€ Src/
│   │   └── main.c          # Main firmware logic
│   └── Inc/
│       └── main.h
ā”œā”€ā”€ Drivers/                # STM32 HAL drivers
ā”œā”€ā”€ README.md
└── .ioc                    # STM32CubeMX config file

šŸš€ How to Run

Step 1 — Open project in STM32CubeIDE

Step 2 — Connect STM32 Blue Pill via ST-Link programmer

Step 3 — Build the project → Flash to STM32

Step 4 — Power the circuit → observe LED and motor behavior

Step 5 — Bring alcohol/fuel vapor near MQ-3 sensor → motor should stop and red LED should activate


šŸ“Š Results

  • āœ… Successfully detected alcohol-based vapors used to simulate fuel leakage
  • āœ… Red LED activated when vapor concentration exceeded threshold
  • āœ… DC motor stopped automatically to represent engine shutdown
  • āœ… System returned to normal operation when vapor cleared

šŸ”Œ Circuit Connections

STM32 Pin Connected To
PA0 (ADC) MQ-3 Analog Output
PB0 Green LED (+)
PB1 Red LED (+)
PB5 DC Motor control
GND Common Ground
3.3V / 5V Sensor VCC

About

STM32-based fuel leakage detection and engine protection system using MQ-3 gas sensor, ADC threshold detection, and automatic motor shutdown with LED indication.

Topics

fuel-leakagestm32

Resources

Readme
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Ɨ600. No cookies required.