Description
MQ6 - LPG Domestic Gas Sensor Module
The MQ6 Gas Sensor Module is specifically designed to detect LPG (Liquefied Petroleum Gas), butane, propane, and to some extent, methane and hydrogen. It's commonly used in gas leak detection systems and safety alarms.
This sensor contains a sensing element, mainly aluminum-oxide based ceramic, coated with Tin dioxide, enclosed in a stainless-steel mesh.
Technical Specifications:
-
Operating Voltage: 5V DC
-
Analog Output (A0): Varies based on gas concentration
-
Digital Output (D0): HIGH or LOW depending on threshold (adjustable)
-
Gas Detected: LPG, butane, propane, methane, hydrogen
-
Detection Range: 300 – 10,000 ppm (gas concentration)
- Preheat Time: 20 seconds to a few minutes for stable readings
Pinouts:
Connection with Arduino:
Module |
Arduino UNO |
VCC |
5V |
GND |
GND |
A0 |
A0 |
D0 |
D2(Optional) |
Sample code:
Analog reading:
int mq6Pin = A0; // MQ6 analog output connected to Arduino A0
void setup() {
Serial.begin(9600); // Start Serial Monitor
}
void loop() {
int sensorValue = analogRead(mq6Pin); // Read gas sensor value
Serial.print("LPG Gas Level: ");
Serial.println(sensorValue); // Display in Serial Monitor
delay(1000); // Wait 1 second
}
Buzzer Alert (Gas Detected)
int mq6Pin = A0;
int buzzerPin = 8;
int gasThreshold = 400; // Adjust based on your environment/testing
void setup() {
Serial.begin(9600);
pinMode(buzzerPin, OUTPUT);
}
void loop() {
int gasLevel = analogRead(mq6Pin);
Serial.print("Gas Level: ");
Serial.println(gasLevel);
if (gasLevel > gasThreshold) {
digitalWrite(buzzerPin, HIGH); // Sound buzzer
} else {
digitalWrite(buzzerPin, LOW); // Buzzer off
}
delay(500);
}