- All products
- Sensors & Modules
- Gas
- MQ 4 Methane Gas Sensor Module RobotDYN
- Gas
Features:
- Straightforward drive circuit
- Long-lasting with quick response time
- Low sensitivity to smoke and alcohol
- High sensitivity for methane (CH4) and natural gas
- Wide detection range
- Semiconductor type sensor
- Preheat time: >24 hours
- Load resistance: 20Ω
- Humidity tolerance: <95% RH
- Operating temperature: 14–122°F (-10–50°C)
- TTL-compatible digital output (D0) and input (HSW)
- Gas detection range: 200–10,000 ppm
- Operating voltage: 5V ±0.1V
- Analog output: 0.1–0.3V
- Digital output: 0–5V TTL
Principle of Work:
When powered, the module's power LED turns on. The analog pin produces a voltage proportional to methane concentration, which can be read by a microcontroller ADC. The digital pin goes HIGH when methane exceeds the set threshold, triggering the built-in detection LED. Sensitivity can be adjusted with the onboard trim potentiometer.
Pinout:

| Pin Name | Description |
|---|---|
| VCC | Power supply, connect to 5V output from Arduino |
| GND | Ground, connect to Arduino GND |
| D0 | Digital output indicating gas presence (threshold adjustable) |
| A0 | Analog output voltage proportional to gas concentration |
Applications:
- Environmental Monitoring: Lightweight, low-cost air monitoring for methane concentration.
- Methane Detection: Methane gas measurement and display through microcontrollers and sensors.
- Gas Leakage Detection: Prevents potential hazards by detecting natural gas leaks using MQ4.
Circuit:

Connect VCC to Arduino +5V, GND to Arduino GND, A0 to analog pin A0, and D0 to a digital pin for threshold detection. Monitor readings using the Serial Monitor.
Library:
No library is required to operate the RobotDYN MQ4 sensor.
Example Arduino Code:
#define MQ4pin A0
float sensorValue;
void setup() {
pinMode(13, OUTPUT);
Serial.begin(9600);
Serial.println("RobotDYN MQ4 warming up!");
delay(20000); // allow sensor to preheat
}
void loop() {
sensorValue = analogRead(MQ4pin); // read analog pin
Serial.print("Sensor Value: ");
Serial.println(sensorValue);
if(digitalRead(8)){ // digital output threshold
digitalWrite(13, HIGH);
} else {
digitalWrite(13, LOW);
}
delay(2000);
}
Technical Details:
- Operating Voltage: 5V ±0.1V
- Heating Voltage: 5V ±0.1V
- Load Resistance: 20Ω
- Sensing Resistance Range: 10–60kΩ
- Methane Sensing Range: 300–10,000 ppm
- Sensor Heat Consumption: ≤950 mW
- Relative Humidity: ≤95% RH
- Standard Oxygen Concentration: 21%
- Analog Output Voltage: 2.5–4V (5000 ppm CH4)
- Preheating Time: >48 hours
Comparisons:
The MQ series sensors are widely used for gas detection. The MQ4 module is optimized for methane detection (300–10,000 ppm) but also responds to propane and butane. For broader gas detection including LPG, the MQ5 sensor is preferred. MQ4 is ideal for methane leak detection in homes, industrial sites, and monitoring systems.
Features:
- Straightforward drive circuit
- Long-lasting with quick response time
- Low sensitivity to smoke and alcohol
- High sensitivity for methane (CH4) and natural gas
- Wide detection range
- Semiconductor type sensor
- Preheat time: >24 hours
- Load resistance: 20Ω
- Humidity tolerance: <95% RH
- Operating temperature: 14–122°F (-10–50°C)
- TTL-compatible digital output (D0) and input (HSW)
- Gas detection range: 200–10,000 ppm
- Operating voltage: 5V ±0.1V
- Analog output: 0.1–0.3V
- Digital output: 0–5V TTL
Principle of Work:
When powered, the module's power LED turns on. The analog pin produces a voltage proportional to methane concentration, which can be read by a microcontroller ADC. The digital pin goes HIGH when methane exceeds the set threshold, triggering the built-in detection LED. Sensitivity can be adjusted with the onboard trim potentiometer.
Pinout:

| Pin Name | Description |
|---|---|
| VCC | Power supply, connect to 5V output from Arduino |
| GND | Ground, connect to Arduino GND |
| D0 | Digital output indicating gas presence (threshold adjustable) |
| A0 | Analog output voltage proportional to gas concentration |
Applications:
- Environmental Monitoring: Lightweight, low-cost air monitoring for methane concentration.
- Methane Detection: Methane gas measurement and display through microcontrollers and sensors.
- Gas Leakage Detection: Prevents potential hazards by detecting natural gas leaks using MQ4.
Circuit:

Connect VCC to Arduino +5V, GND to Arduino GND, A0 to analog pin A0, and D0 to a digital pin for threshold detection. Monitor readings using the Serial Monitor.
Library:
No library is required to operate the RobotDYN MQ4 sensor.
Example Arduino Code:
#define MQ4pin A0
float sensorValue;
void setup() {
pinMode(13, OUTPUT);
Serial.begin(9600);
Serial.println("RobotDYN MQ4 warming up!");
delay(20000); // allow sensor to preheat
}
void loop() {
sensorValue = analogRead(MQ4pin); // read analog pin
Serial.print("Sensor Value: ");
Serial.println(sensorValue);
if(digitalRead(8)){ // digital output threshold
digitalWrite(13, HIGH);
} else {
digitalWrite(13, LOW);
}
delay(2000);
}
Technical Details:
- Operating Voltage: 5V ±0.1V
- Heating Voltage: 5V ±0.1V
- Load Resistance: 20Ω
- Sensing Resistance Range: 10–60kΩ
- Methane Sensing Range: 300–10,000 ppm
- Sensor Heat Consumption: ≤950 mW
- Relative Humidity: ≤95% RH
- Standard Oxygen Concentration: 21%
- Analog Output Voltage: 2.5–4V (5000 ppm CH4)
- Preheating Time: >48 hours
Comparisons:
The MQ series sensors are widely used for gas detection. The MQ4 module is optimized for methane detection (300–10,000 ppm) but also responds to propane and butane. For broader gas detection including LPG, the MQ5 sensor is preferred. MQ4 is ideal for methane leak detection in homes, industrial sites, and monitoring systems.