Welcome to this interesting series of sensors. MQ series has different types of gas sensors like MQ-2, MQ-4, MQ-5, MQ-6, and so on. Today, I will explain MQ-4 Gas Detecting Sensor.
🍁What is MQ-4 Gas Detecting Sensor?
MQ-4 semiconductor gas sensor can detect methane (CNG) gas concentrations ranging from 300 to 10,000 parts per million, making it ideal for gas leak detection. Only one analogue input pin on your microcontroller is required for the sensor's basic analogue voltage interface.
🍁How MQ-4 Gas Detecting Sensor looks like?
🍁Pin Description of MQ-4 Gas Detecting Sensor
- Vcc -> Connects to
5V
of Arduino - Dout -> Connects to
Digital
pin of Arduino - Aout -> only connect when you want to calculate the concentration of gas
- Gnd ->Connects to
Gnd
pin of Arduino
🍁What's working funda of MQ-4 Gas Detecting Sensor?
The MQ-4 is both a heater and an electrochemical sensor. The target gas induces a redox reaction that creates electricity as it travels through the membrane and reaches the sensor. For sensors that are exposed to specific gases, this current is higher. Methane, butane, and propane are highly toxic to the MQ4.
When the module is turned on, the power LED glows. The MQ-4 is a device that monitors methane levels in the atmosphere. The analogue pin on the sensor then generates an analogue signal proportional to the amount of CH4 in the air. The analogue output of a sensor may be measured using an ADC microcontroller.
🍁Interfacing of MQ-4 Gas Detecting Sensor with Arduino
🍁Source Code
const byte MQ4_Pin = 2; //MQ4 D0 pin
void setup() {
pinMode(MQ4_Pin, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(MQ4_Pin), sensor_triggered, CHANGE); //attach interrupt on MQ4 pin
Serial.begin(9600);
}
void loop() {
// Do anything you want here
}
void sensor_triggered() {
Serial.println("Methane detected!"); // Output to serial monitor
}
🍁Applications of MQ-4 Gas Detecting Sensor
- It is used in Alarm Systems
- It is used in Industrial Applications
- It is used in Environmental pollution control
- It is used in Coal mines
- It is used in Gas sensing devices
Stay tuned to this series to gain knowledge of next sensor ... [RainDrop Sensor].