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).
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.
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.
The author marked this model as their own original creation.