SparkFun will be closed Nov 26th and 27th for the Thanksgiving holiday. Orders placed after 2:00pm MT on the 25th will ship out Monday the 30th.

Creative Commons images are CC BY-NC-SA 3.0

Description: This is a simple-to-use compressed natural gas (CNG) 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.

This sensor has a high sensitivity and fast response time. The sensor’s output is an analog resistance. The drive circuit is very simple; all you need to do is power the heater coil with 5V, add a load resistance, and connect the output to an ADC.

This sensor comes in a package similar to our MQ-3 alcohol sensor, and can be used with the breakout board below.


Recommended Products

Customer Comments

  • so the big question is… can you detect farts with it?

  • I checked with a multimeter and it does not matter if it’s A or B on any of the gas sensors that is connected with the breakout board. If you look at the datasheet, it shows that the pins for A1 and A2 or B1 and B2 are internally connected together, respectively. Also the application circuit shows that the polarity does not matter, just as long as the pins on each side align with the breakout board.

  • I’m looking at both the MQ-3 and MQ-4 sensor. I don’t see anything on the case or bottom to indicate which pins are which. Does anybody have any info that can help determine the orientation?

    • Somebody suggested metering the leads but both sides test the same for continuity… wth.

      Next to the stamped part number there is a smaller “3” - do you think that means pin 3?

  • Anyone use the readings to measure CH4 in ppm? I am trying to understand how to do the conversion from the datasheet, but do not see how to get the equation. I assume it is linear over the entire range, what is confusing me is why does the sensitivity graph show the characteristics for 7 different gases? Does the conversion need to account for the contribution of each of those 7 gases to determine the actual concentration of CH4? Also, shouldn’t the datasheet say what is the expected resistance at 1000ppm at room temp or something so you can extrapolate from there? It lists a range of 10k to 60k, which seems really wide. The datasheet says it can detect from 200-10000ppm, so seems like you should be able to measure in ppm, right?

  • any tips on how to calibrate this sensor??

  • any tips on how to calibrate this sensor??

  • Hi, I am using MQ6 gas sensor in my circuit. when i power on it gives alert continuously.

    My configuration is like this.

    1. the two A pins shorted and connected to +5V through a pot (present POT value 4.7K)
    2. H on A side connected to +5V through 100ohm.
    3. The two B’s shorted and connected to 20K resistor to ground. also, a series resistor to NPN transistor.

    the problem is when i power on the circuit, the output is high continuously. I get 1V continuously on B pins. i tried to separate two B pins and i see on 1 B pin output is 5V and second pin 0.

    I am using a pretty new Gas sensor.

    Can you tell me why i am getting high on output continuously?

  • Why is the GND and VCC shorted? it’s killing my voltage regulator! getting hot as hell

    • It shouldn’t be shorted, but there is a 33 ohm heater in there; it will draw 150mA at 5V.

      • hmm, perhaps the MQ4 i bought was defective? could you please double confirm with me using a short circuit test with your multimeter? thanks~

        • Also note that in my multimeter at least, if you’re doing a continuity test, anything under 100 ohms will cause a beep. This is different from a hard short (0 ohms). Perform this test using resistance mode.

          • There’s resistance across the heater. But what is the safest voltage supply connection to the sensor? I used a 5V 1A voltage regulator and my voltage regulator gets pretty darn hot.

        • Double-check your circuit against the datasheet, several pins on the device are supposed to be shorted. If you’re sure you’re reading a hard short across the heater (the pins labeled ‘H’), contact our tech support department and they’ll be happy to help you out.

          • there’s no hard short, but my voltage regulator still emits high temperature.

            • Because it’s based on a heater, this sensor requires quite a bit of current, and will tax a small linear regulator. All linear voltage regulators will heat up based on how much current they’re supplying. You can switch to a larger regulator, and/or reduce the input voltage to the regulator so it’s closer to the dropout voltage (e.g. change from 12V to 9V). What Arduino are you using?

              • Im using the 5V voltage regulator. The input to the regulator is 7.4V. So do I need to add in a resistor to reduce the current flowing through the heater? If yes, how much?

  • where do I find a wiring diagram that is actually for the MQ4 sensor. the example is for a different sensor. Also does anyone have the scoop on EXACTLY how to hook these up as a working model?

    Many thanks in advance

  • Anyone know where you can get those mounting sockets for the MQ series of gas sensors?

  • I’ve been playing around with this sensor over the past few days and I thought I’d share my findings…

    The sensor is sensitive to CO2–not just CO. So if you blow on it your breath will increase the reported values (val +330 if I try real hard by holding my breath before I blow on it =). This means that if you want to use it as a fart detector you need to keep out of the direct exhale path of heavy breathers. I also suspect that the humidity and cooling properties of your breath amplifies the effect.

    Tip: You can perform a quick CO2 test with your breath or you could just pop open a can/bottle of soda right next to the sensor.

    The sensor is also sensitive to sudden temperature changes. For example, if you grab it with your fingers it will drop the temperature (which hovers around 50 degrees celcius) a few degrees very quickly. When this happens the values coming off the sensor will be increased by about 30 to 100 depending on how long you hold it and how cold your fingers are.

  • How fast is “fast response time”? (The datasheet is silent on this.) 150ma at 5V is a lot to draw 24/7 from a battery, so I would like to cycle this sensor. From power on to moderate accuracy, are we talking milliseconds or seconds or what?

    • It’s an electric heating element. You’re not going to make it a power saver…

    • I know it has been a long time since you asked this question but I’ve done some testing and I have the answer: The gas sensor takes about one minute to “warm up” to the point where it is producing stable values.

  • xD The fart sensor is sold out.

  • does this sensor require a drive circuit to send the square wave heating signal like the CO sensor or does it just require a steady 5v?

  • After playing with the alc sensor which was awsome this one was rather a dissapointment.
    To get any readings you must have some sort of an airflow(fart flow) directly on the unit. In other you must fart directly on it. If you fart 0.5m away it will not detect anything.
    Also when i touch the sensor, or blow on it the AD value goes up 2-300.
    Anything I’m doing wrong, or is it simply not designed to detect farts?
    My normalised value is ~200 using a 10k resistor…

  • my arduino has a nose for farts now.

  • But still no Co2 sensor!!

Customer Reviews

No reviews yet.