Built to order

IoT LPG Gas Leakage Detector with Auto Shutoff Valve

This project builds an LPG safety node that does more than beep: an MQ-6 gas sensor watches the air around the cylinder, and when the LPG concentration crosses the alarm threshold an ESP32 fires a buzzer, closes a solenoid shutoff valve on the gas line, and pushes an alert with live PPM readings to a cloud dashboard. The dashboard shows the real-time concentration gauge, valve state and an event log, so the detection-to-action loop is fully visible. Thresholds are set by the student during calibration against known test conditions — no safety figures are pre-claimed. Suitable for B.E./B.Tech

IoT LPG Gas Leakage Detector with Auto Shutoff Valve — project thumbnail preview
More project photos (2)

The problem

LPG leaks are dangerous precisely because the gas is invisible and the failure mode is binary: either someone smells it in time or they don't. Standalone gas alarms only beep — if nobody is home, the beep protects nothing, and none of them can stop the leak. The engineering gap is a node that both senses and acts: detect the leak, cut the supply automatically, and notify someone who can respond, with the whole event visible remotely. This project builds that node on an ESP32: an MQ-6 semiconductor gas sensor (sensitive to LPG in the 200–10000 ppm band per its datasheet) feeds the controller; on crossing the alarm threshold the firmware sounds a buzzer, drives a normally-closed solenoid valve shut on the gas line, and publishes the event plus live PPM readings to a cloud dashboard. The dashboard renders a live concentration gauge, valve status and a timestamped event log, and sends the alert to the user's phone. A manual reset and valve self-test routine complete the safety logic.

How it works

  1. The MQ-6 sensor heats its sensing element; after the documented warm-up/burn-in period the ESP32 samples the divider voltage.
  2. The firmware converts the reading to an approximate LPG concentration using the sensor's characteristic curve (documented as indicative, not laboratory-grade).
  3. Crossing the pre-alarm threshold starts intermittent buzzing and a dashboard warning; crossing the alarm threshold escalates.
  4. On full alarm the ESP32 de-energizes the normally-closed solenoid valve (spring shut), sounds the continuous buzzer, and publishes the event with PPM and timestamp.
  5. The dashboard raises the alert on the user's phone; the event log records the full sequence for the report.
  6. Once readings fall below the safe band, a manual reset re-energizes the valve; the self-test routine verifies valve movement on schedule.

Tech stack:

  • ESP32 development board (Wi-Fi)
  • MQ-6 LPG gas sensor module
  • Normally-closed solenoid valve (gas-line rated) with driver relay/MOSFET
  • Buzzer and status LEDs
  • 12 V power supply for valve + 5 V logic supply
  • Cloud dashboard (Blynk/ThingSpeak class) with live gauge and event log
  • Arduino IDE (C/C++ firmware)
  • Demo gas-test chamber accessories for calibration
Parameter Value
Controller ESP32 (Wi-Fi for dashboard telemetry)
Sensor MQ-6 semiconductor; datasheet LPG sensitivity band 200–10000 ppm
Alarm stages Pre-alarm warning threshold + full-alarm threshold; both student-calibrated
Shutoff Normally-closed solenoid valve; fail-safe (closes on power loss); manual-reset reopen
Indication Buzzer (intermittent/continuous), status LEDs, dashboard gauge
Dashboard Live PPM gauge, valve state, warm-up status, timestamped event log, phone alert
Power 12 V DC for solenoid + regulated 5 V/3.3 V for logic
Calibration Burn-in + threshold-setting procedure run by the buyer; no detection figures claimed at build

Project features

  • [MQ-6 LPG sensing] Semiconductor sensor with datasheet sensitivity to LPG in the 200–10000 ppm band; the load-resistor divider and burn-in procedure are documented.
  • [Automatic shutoff valve] A normally-closed solenoid valve on the gas line is held open during normal operation and released shut on alarm — fail-safe by design, since power loss also closes it.
  • [Two-stage alerting] A pre-alarm warning stage (buzzer intermittent) escalates to full alarm (continuous buzzer + valve shut + dashboard/phone alert) at the higher threshold.
  • [Live PPM dashboard] The cloud dashboard shows a real-time concentration gauge, valve open/closed state, sensor warm-up status and a timestamped event log.
  • [Student-run calibration] The alarm thresholds ship as starting values; the student sets final values with the included calibration procedure and documents the process — no claimed detection figures at build.
  • [Valve self-test] A scheduled self-test pulses the valve to confirm it moves freely, with the result logged on the dashboard — stuck valves are the classic silent failure.
  • [Manual reset with interlock] After an alarm, the valve reopens only on a deliberate manual reset after the concentration falls below the safe band.

What is included

  • Working gas-leak detector prototype (ESP32, MQ-6, solenoid valve, buzzer, power supplies)
  • Complete firmware source code (sensing, staging, valve control, dashboard sync)
  • Live PPM dashboard setup with gauge, valve panel and event log
  • Circuit and wiring documentation (including valve driver sizing)
  • Burn-in and calibration procedure for threshold setting
  • Component list with ratings
  • Project report PDF (gas-sensor theory, safety logic, methodology, calibration results)
  • PPT presentation for final review
  • Viva Q&A preparation document (semiconductor sensors, fail-safe design, IoT alerting)
  • Setup and demonstration guide

Limitations & prerequisites

  • This is an academic demonstration of leak detection and shutoff logic, not a certified gas-safety device; it must not be presented or installed as life-safety equipment — real installations need certified detectors fitted by qualified personnel.
  • MQ-6 is a broad-spectrum semiconductor sensor: it responds to LPG but also to alcohol vapors, smoke and cooking fumes; cross-sensitivity is documented and the report must acknowledge it.
  • Concentration readings are indicative (characteristic-curve estimates), not laboratory measurements; thresholds are relative trip points set by the student's own calibration.
  • The sensor needs a warm-up/burn-in period before readings stabilize; cold-start readings are not valid and the firmware flags this state.
  • The solenoid valve must be gas-line rated for the demo line used; the kit specifies the rating and the student must not substitute an unrated valve.

Frequently Asked Questions

Which sensor is used and what does it detect?

An MQ-6 semiconductor sensor, sensitive to LPG in the 200–10000 ppm band per its datasheet. It is broad-spectrum, so alcohol vapor and smoke can also move the reading — the report documents this honestly.

How does the auto shutoff work?

A normally-closed solenoid valve is held open electrically during normal operation; on alarm (or power loss) it springs shut, cutting the gas line. It reopens only on manual reset.

What shows on the dashboard?

A live PPM gauge, valve open/closed state, sensor warm-up status, a timestamped event log, and phone alerts on alarm.

Is it a certified safety device?

No. It is an academic prototype demonstrating detection-to-shutoff logic. Real kitchens need certified detectors installed by qualified personnel.

How are thresholds set?

With the included burn-in and calibration procedure — you expose the sensor to controlled test conditions, set the pre-alarm and alarm points, and document the process. No detection figures are pre-claimed.

Is this project suitable for a final-year project?

Yes — for Electronics, IoT and Embedded programs. It combines sensor interfacing, fail-safe actuation design, and a live IoT dashboard with genuinely testable behavior. Suitable for B.E./B.Tech final-year projects in Electronics, IoT and Embedded Systems.

Components & software requirements
  • ESP32 development board (Wi-Fi)
  • MQ-6 LPG gas sensor module
  • Normally-closed solenoid valve (gas-line rated) with driver relay/MOSFET
  • Buzzer and status LEDs
  • 12 V power supply for valve + 5 V logic supply
  • Cloud dashboard (Blynk/ThingSpeak class) with live gauge and event log
  • Arduino IDE (C/C++ firmware)
  • Demo gas-test chamber accessories for calibration
Delivery information

Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.

Support terms

Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.

Download abstract (PDF)

Related guides

All guides
Blueprint-style technical illustration of an ESP32 development board at the centre, with sensor nodes, data-flow arrows and a circuit-brain motif representing an AI agent reasoning and sending decisions back.Engineering students building IoT or embedded final-year projects who want to add local AI agent behaviour with ESP32, MQTT and a small language model.

AI Agents on ESP32: Agentic IoT Final-Year Projects

An agentic IoT system observes, reasons, acts, remembers and explains. On ESP32 that means a split architecture: the chip senses and acts while a small local model (Ollama on your laptop) reasons over MQTT — a full LLM needs gigabytes of RAM the chip doesn't have. This guide covers three working patterns (host-reasoned agent, on-device tinyML on ESP32-S3, and a hybrid of both), plus Wi-Fi CSI presence sensing, parts and budget for India, code shapes, and honest limits to state in your report.

Read guide
Technical illustration of three electronic control units linked by a twisted-pair CAN bus cable carrying signal pulses between them.Electronics, E&TC, IoT and robotics students who keep hearing “CAN bus” in EV, automotive and industrial project ideas and want to understand it properly before wiring anything

CAN Bus Basics for Students: How ECUs Communicate

CAN bus is the shared network that lets dozens of controllers in a car, EV or robot communicate over two wires. This guide explains message IDs, arbitration, the physical layer, frame structure, error handling and CAN FD, then walks through building a working two-node bench network with an ESP32 and a transceiver.

Read guide
Illustration of a quadcopter drone build showing labeled parts including frame, motors, propellers, ESCs, flight controller, and battery.B.E./B.Tech Electronics, Mechanical, and Computer Science students planning to build a quadcopter drone who need to select compatible parts without wasting money on mismatched

Drone Build: Parts Selection Guide

Picking drone parts that actually work together is a sizing problem, not a shopping problem. This guide walks the compatibility chain — frame to props to motors to ESCs to battery — with the thrust math, firmware choices, LiPo safety, and the bench-test order that prevents disasters.

Read guide
Get a quotation