2

I am trying to detect LPG leakage by using MQ4 gas sensor. I have made this circuit

enter image description here

My Arduino code is

int sensorValue;

void setup()
{
  Serial.begin(9600);      // sets the serial port to 9600
}

void loop()
{
  sensorValue = analogRead(0);       
  Serial.println(sensorValue, DEC);  
  delay(100);                        
}

On my serial monitor, I am getting values like

307
277
289
282
283
283
260
248
265
285
308
278
278
315
321
316
327

These values are not getting change even after putting sensor near gas lighter. Did I made any mistake in circuit or this sensor could be faulty ? Any help is appriciated.

1 Answer 1

1

That is what I would expect to see with one of these sensors.

I'm not sure on the wiring, I think you may be wrong. Have a read of http://playground.arduino.cc/Main/MQGasSensors#readdatasheet and see if you agree.

Did you leave the sensor to warm up? It takes a few minutes (from memory) and until its warm it won't give you a proper reading.

An MQ4 should be able to detect Methane, butane and propane, so was your lighter using on of these gasses? When it does detect the target gas, the number will go up, and stay up for a while.

Another thing you can try is blowing on the sensor, the results will vary depending on what you have been eating, but it should shift one way or another.

If it still doesn't work then buzz out your connections, just to triple check, and re-read the manual.

3
  • thanks for replying, I let it warms for 5mins or so. One thing I also noticed that when I touch the sensor, its value goes down to range 0-50. Blowing on it doesn't change its value. :(
    – Bhushan
    Apr 11, 2016 at 12:53
  • 1
    If the value changes when you touch it I would check the earth connection. Apr 11, 2016 at 15:00
  • 1
    I think my wiring was wrong, after re-doing everything its working fine. Its value getting changed when sensor is exposed to LPG gas. Thanks.
    – Bhushan
    Apr 15, 2016 at 6:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.