ESP32 Internet of things MQ-4 sensor Project

Intelligent gas leak detection system with ESP32

Detecting gas leaks at industrial sites can not only be dangerous and time-consuming, but also subject to human misinterpretation.

In order to remedy the risks associated with gas leaks, we are installing gas leak detection systems which, thanks to detection heads, will give an alarm.

Purpose of this project

In this project we will realize a gas leak detection system controlled by the ESP32 board connected to the Internet.

It mainly uses MQ-4 gas sensor, when the sensor detects gas leak, ESP32 board will send email alert by WIFI.

Necessary components

  • ESP32
  • MQ-4 sensor
  • Connecting wires

  • Test plate 

  • Wifi network


To perform the assembly, you can connect:

For MQ-4 sensor:

  • pin DO to pin D34 of the ESP32 board

  • the VCC pin to the 5V pin of the power supply module

  • the GND pin to the GND pin of the ESP32 board

Programme en micropython:

Voici le programme du système de détection des fuite de gaz intelligent connecté à l’Internet:

Note: you must import the two libraries: ConnectWifi.py and umail.py.

0 commentaire

Leave a comment

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Scroll to Top