Back to Projects
IoTAdvancedESP32MQ-2IoTSafety

Gas detector

MQ-2 Gas Leak Detector with IoT Dashboard

Overview

Build a gas leak detection system that monitors air quality using an MQ-2 sensor, sounds a local buzzer alarm when gas concentration is dangerous, and pushes readings to a free cloud IoT dashboard (ThingSpeak) for remote monitoring.

How It Works

The MQ-2 sensor outputs an analog voltage that rises with the concentration of combustible gases (LPG, methane, smoke). The ESP32 reads this voltage via its ADC, compares it against a configurable threshold, and triggers a buzzer and LED when the level is too high. Simultaneously, the ESP32 connects to Wi-Fi and posts the sensor readings to ThingSpeak every 15 seconds, allowing you to view a live graph from any browser.

What You Will Build

A complete, working gas detector using real ESP32 hardware, sensors, and motors. You will take it home once the course is complete.

Hardware Components

ESP32 Dev Module
MQ-2 Gas Sensor
Active Buzzer
LED (5mm)
Resistor 220Ω
Breadboard (full size)
Jumper Wires (40-pcs set)

Project Details

CategoryIoT
DifficultyAdvanced
Time3-4 hours
Classes2-3

Full Build Guide

Wiring diagrams, step-by-step build instructions, full code, and troubleshooting — available after enrollment.

Book a DemoBook 30-min Consult