MQ Gas Sensor Range – Gas and Pollution Detectors


MQ Gas Sensor Range – Gas and Pollution Detectors

MQ Gas Sensor Detectors have 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. Simple 🙂

All of the MQ gas sensors come in the same footprint, with the same pinout. Because we like to make things easy for you, we’ve designed the gas:bit for microbit, which provides an ultra-fast way to play with the whole of the MQ Sensor range. Alternatively, it can be connected to an Arduino or Raspberry Pi. We have supplied some Arduino code to help get you started below.

The Range and MQ Datasheets:

MQ2 – Flammable Gas and Smoke, High Sensitivity for LPG, Propane and Hydrogen Gas Sensor (MQ2 Datasheet)

MQ3 – Alcohol or Benzine Gas Sensor (MQ3 Datasheet)

MQ4 – Methane or Compressed Natural Gas Sensor (MQ4 Datasheet)

MQ6 – LPG (Butane or Propane) Gas Sensor (MQ6 Datasheet)

MQ8 – Hydrogen Gas Sensor (MQ8 Datasheet)

MQ9 – Carbon Monoxide and Flammable Gas Sensor (MQ9 Datasheet)

Connecting up the MQ Sensor Range:

Connecting five volts across the heating (H) pins keeps the sensor hot enough to function correctly. Connecting five volts at either the A or B pins causes the sensor to emit an analog voltage on the other pins. A resistive load between the output pins and ground sets the sensitivity of the detector. Please note that the picture in the datasheet for the top configuration is wrong. Both configurations have the same pinout consistent with the bottom configuration. The resistive load should be calibrated for your particular application using the equations in the datasheet, but a good starting value for the resistor is 20 kΩ.
MQ Gast detection Sensor Range Connection image

Example Basic Arduino Code:

int sensorValue;

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

void loop()
sensorValue = analogRead(0); // read analog input pin 0
Serial.println(sensorValue, DEC); // print the value read
delay(100); // wait 100ms for next reading

Arduino Alcohol Project Documents:


There are no reviews yet.

Be the first to review “MQ Gas Sensor Range – Gas and Pollution Detectors”
Scroll to Top