ESP32 CAM WiFi Module with OV3660 Camera Module 2MP
MQ-2 Gas Sensor Module For H2, LPG, CH4, CO, Smoke or Propane Detector Module
Couldn't load pickup availability
Check out the entire range of Gas Sensors.
Also explore the exclusive collection for Sensors.
#define sensorPin A0 // analog input pin for MQ-2
int sensorValue = 0;
void setup() {
Serial.begin(9600);
Serial.println("MQ-2 Gas Sensor Test");
delay(2000); // sensor stabilisation
}
void loop() {
sensorValue = analogRead(sensorPin);
Serial.print("Gas Sensor Reading: ");
Serial.println(sensorValue);
if (sensorValue > 400) { // adjust threshold as needed
Serial.println(">> Gas/Smoke Detected! <<");
}
delay(1000);
}
| Feature | MQ-2 | MQ-3 | MQ-7 |
|---|---|---|---|
| Main target gases | Combustible gases & smoke (LPG, propane, methane, hydrogen, etc.) | Alcohol/ethanol vapour (also benzine, smoke to lesser extent) | Carbon monoxide (CO) primarily |
| Typical operation voltage | 5 V heater standard | 5 V heater standard | Complex heating cycle (e.g., 5 V then 1.4 V low-heater mode) for CO detection |
| Specific usage notes | General-purpose gas and smoke sensor; wide detection scope but less selective | More selective toward alcohol vapour; used in breathalyzers and alcohol detection systems | Specialised for CO; requires heating cycle and calibration for accurate measurement |
| Calibration & complexity | Relatively simple; heat up, read analog output | Simple; read analog output, target is alcohol so environment matters | More complex; proper heater cycling and careful calibration needed |
| Best for | Home/DIY gas leak & smoke detection projects | Projects detecting alcohol vapour (e.g., breath analysis, security systems) | Applications where CO detection is important (ventilation, safety, industrial) |
| Considerations / trade-offs | Not very selective; may trigger for a range of combustible gases & smoke | May also respond to other vapours or solvents, not purely alcohol | Higher cost, more complex setup, slower response; careful calibration required |
| Model | MQ2 Gas Sensor |
| Operating Voltage | 5V (DC) |
| Analog Output Voltage | 0V to 5V |
| Digital Output Voltage | 0V or 5V (TTL Logic) |
| Dimensions | 3.6 x 2 x 1 cms |
| Weight | 5 grams |