MQ-4

                                                      Mq-4 Sensor

Working Principle:

This is a simple-to-use comprssed natural gas sensor, suitable for sensing natural gas (composed of mostly Methane [CH4]) concentrations in the air. The MQ-4 can detect natural gas concentrations anywhere from 200 to 10000ppm.The principal use of methane is as a fuel. The combustion of methane is highly exothermic, meaning reactions create the release of a great deal of energy. The energy released by the combustion of methane, in the form of natural gas, is used directly to heat homes and commercial buildings. It is also used in the generation of electric power. During the past decade, natural gas accounted for about 1/5 of the total energy consumption worldwide 

 Arduino Interfacing

Pin Configuration:

 Vcc: 5v

GND: GND

A0: Analog pin of arduino

D0: Digital pin of arduino

 

 

Code

const int AOUTpin=0;//the AOUT pin of the methane sensor goes into analog pin A0 of the arduino
const int DOUTpin=8;//the DOUT pin of the methane sensor goes into digital pin D8 of the arduino
const int ledPin=13;//the anode of the LED connects to digital pin D13 of the arduino

int limit;

int value;

void setup() {

Serial.begin(115200);//sets the baud rate
pinMode(DOUTpin, INPUT);//sets the pin as an input to the arduino
pinMode(ledPin, OUTPUT);//sets the pin as an output of the arduino
}void loop()

{
value= analogRead(AOUTpin);//reads the analaog value from the methane sensor’s AOUT pin
limit= digitalRead(DOUTpin);//reads the digital value from the methane sensor’s DOUT pin
Serial.print(“Methane value: “);
Serial.println(value);//prints the methane value
Serial.print(“Limit: “);
Serial.print(limit);//prints the limit reached as either LOW or HIGH (above or underneath)
delay(100);
if (limit == HIGH){
digitalWrite(ledPin, HIGH);//if limit has been reached, LED turns on as status indicator
}
else{
digitalWrite(ledPin, LOW);//if threshold not reached, LED remains off
}
}

 Advantages:

  • High sensitivity
  • High response
  • longer sustain
  • Highly capable

 

Application:

  • Domestic gas leakage detector
  • Industrial Combus
  • tible gas detector
  • Portable gas detector

Reference:

http://www.geekstips.com/mq4-sensor-natural-gas-methane-arduino/

http://www.learningaboutelectronics.com/Articles/MQ-4-methane-sensor-circuit-with-arduino.php

https://create.arduino.cc/projecthub/andrew85/mq-4-natural-gas-sensor-experiment-based-on-arduino-f17bec

https://www.hackster.io/andrew85/mq-4-natural-gas-sensor-experiment-based-on-arduino-f17bec

 

WhatsApp us whatsapp