Description
What it is
The MQ-9 sensor is a device designed to detect carbon monoxide (CO) and propane methane (GPL) in domestic or industrial environments. This component can be used by makers to create fire safety systems or air quality monitoring systems.
Features
- Operating voltage: 5V
- Detects carbon monoxide (CO)
- Detects propane methane (GPL)
What it is for
The MQ-9 sensor is ideal for applications that require monitoring CO and GPL methane levels. It can be integrated into Arduino or ESP8266/ESP32 systems to send email notifications when detected values exceed a certain limit.
Tutorial: How to use MQ-9 Gas Detection Sensor
The MQ-9 detector is ideal for monitoring levels of carbon monoxide and propane methane in domestic or industrial environments. This component is particularly useful for makers who wish to create fire safety systems or air quality monitoring systems.
What you need
- Arduino Uno or compatible
- USB connection
- 5V power supply
Steps
- Connect the VCC and GND pins of the MQ-9 detector to the 5V power supply and ground of the Arduino respectively.
- Connect the DO (Digital Output) pin to digital pin 2 of the Arduino to receive binary data.
- If necessary, also connect the analog output AO to an analog pin of the Arduino such as A0.
- Install the Adafruit_ADS1015 library if using analog connections (check the datasheet).
- Upload the sketch to the Arduino to initialize the detector and configure reference values.
- Insert a piece of paper with methane or carbon monoxide near the detector to test it.
- Monitor the Arduino serial console during sketch execution to see sensor data.
- Analyze the values and calibrate the sensor according to the datasheet specifications.
Example code
// Esempio di codice Arduino
#include <Adafruit_ADS1015.h>
// Inizializzazione del sensore analogico
Adafruit_ADS1015 ads;
int pinAO = A0;
void setup() {
Serial.begin(9600);
}
void loop() {
int val = ads.readADC_SingleEnded(pinAO);
Serial.println(val);
}
Mini project
Create a home alarm system that sends an email notification when the carbon monoxide level exceeds a certain value.
Common mistakes
- Connect VCC to ground
- Do not verify the correct power supply voltage (5V)
- Ignore sensor calibration
- Use an unconfigured digital port for input
Recommended accessories
- Arduino Uno R3
- Jumper Connections
- 16×2 LCD for data display
- ESP8266 Wi-Fi Module
Frequently asked questions
Does the sensor work with Arduino Mega?
Yes, but make sure the power pin is 5V.
What other gases can it detect besides CO and LPG?
Check the datasheet for detailed specifications.







Reviews
There are no reviews yet.