Use Wemos D1 mini with MQ-9 gas sensor on ESPhome
4h 0m
1× print file
0.16 mm
0.40 mm
25.00 g
Creality Ender 3 V2
1
1
0
14
updated November 28, 2025

Description

PDF

This system leverages the MQ-9 gas sensor (Carbon Monoxide (CO), Methane, LPG detection) and an ESP8266 D1 Mini microcontroller to create a smart gas detection system integrated into Home Assistant (HA).

🔌 Hardware Connection

The MQ-9 sensor connects to the D1 Mini via the Analog Output (A0) pin to read the raw gas concentration (voltage) continuously. The Digital Output (D0) can optionally be connected to a GPIO pin (e.g., D1) to monitor the module's built-in alert threshold.

💻 Software and Integration

Firmware: The D1 Mini is flashed with ESPHome firmware.

Configuration: The ESPHome YAML configures the ADC sensor (reading A0) to report the voltage level of the gas concentration to Home Assistant. A Binary Sensor can be used for the D0 pin.

 

Tags



Model origin

The author marked this model as their own original creation.

License


Highlighted models from creator

View more