

The Duinotech Smoke Sensor MQ-2 (Manufacturer Part ID: XC4470) is a versatile gas sensor designed to detect smoke and various gases, including propane, butane, methane, and hydrogen. It provides an analog output that varies with the concentration of the detected gas, making it ideal for applications requiring gas concentration monitoring or smoke detection.








The following table outlines the key technical details of the MQ-2 sensor:
| Parameter | Value |
|---|---|
| Operating Voltage | 5V DC |
| Load Resistance (RL) | Adjustable (typically 10 kΩ) |
| Heater Resistance (RH) | 33 Ω ± 5% |
| Heating Voltage (VH) | 5V ± 0.2V |
| Power Consumption | ≤ 800 mW |
| Detection Range | 200 ppm to 10,000 ppm (varies by gas) |
| Preheat Time | ≥ 24 hours for optimal performance |
| Output Signal | Analog voltage |
| Operating Temperature | -20°C to 50°C |
| Humidity Range | ≤ 95% RH (non-condensing) |
The MQ-2 sensor module typically has four pins. The table below describes each pin:
| Pin | Label | Description |
|---|---|---|
| 1 | VCC | Power supply input (5V DC) |
| 2 | GND | Ground connection |
| 3 | AOUT | Analog output voltage proportional to gas concentration |
| 4 | DOUT | Digital output (threshold-based, adjustable via onboard potentiometer) |
Below is an example code snippet for interfacing the MQ-2 sensor with an Arduino UNO to read analog values from the AOUT pin:
// Define the analog pin connected to the MQ-2 sensor's AOUT pin
const int sensorPin = A0;
void setup() {
// Initialize serial communication for debugging
Serial.begin(9600);
}
void loop() {
// Read the analog value from the sensor
int sensorValue = analogRead(sensorPin);
// Convert the analog value to a voltage (assuming 5V reference)
float voltage = sensorValue * (5.0 / 1023.0);
// Print the sensor value and voltage to the Serial Monitor
Serial.print("Sensor Value: ");
Serial.print(sensorValue);
Serial.print(" | Voltage: ");
Serial.println(voltage);
// Add a delay for stability
delay(1000);
}
sensorValue) corresponds to the gas concentration. Higher values indicate higher concentrations.No Output or Incorrect Readings:
Fluctuating Readings:
Digital Output Not Triggering:
Sensor Not Detecting Gas:
Q1: Can the MQ-2 sensor detect multiple gases simultaneously?
A1: Yes, the MQ-2 sensor can detect multiple gases, but it does not differentiate between them. The output represents the combined concentration of all detectable gases.
Q2: How do I calibrate the MQ-2 sensor?
A2: Calibration involves exposing the sensor to a known concentration of gas and adjusting the load resistance (RL) to match the expected output. Refer to the sensor's datasheet for detailed calibration instructions.
Q3: Can I use the MQ-2 sensor outdoors?
A3: The MQ-2 sensor is not designed for outdoor use. High humidity, temperature fluctuations, and exposure to water can affect its performance and lifespan.
Q4: What is the lifespan of the MQ-2 sensor?
A4: The typical lifespan of the MQ-2 sensor is around 2-3 years under normal operating conditions. Proper maintenance and avoiding contamination can extend its life.
Q5: Is the MQ-2 sensor suitable for detecting carbon monoxide (CO)?
A5: While the MQ-2 sensor can detect carbon monoxide, it is not optimized for CO detection. For precise CO monitoring, consider using a dedicated CO sensor like the MQ-7.