MQ-2, MQ-3, MQ-5, MQ-7 or MQ-135: Which Gas Sensor?
Quick answer
- Choose MQ-2 if your project is about gas leaks or smoke.
- Choose MQ-3 if your project is about alcohol sensing.
- Choose MQ-5 if you're doing a gas meter model.
- Choose MQ-7 if your project is about ventilation.
- Choose MQ-135 if your project is about air quality.
Choose by the question your project asks: smoke and gas, alcohol, methane, carbon monoxide or air quality. All of them need to warm up, and none is a safety device. Never test with a real gas leak.
Side by side
MQ-2
- Who it's for
- Intermediate
- Level
- intermediate
- Cost
- Medium
- Main parts
- Uno, MQ-2, I2C LCD, or a relay and solenoid valve
- Wiring
- Medium
- Code
- About 24 to 36 lines; one needs the MQ2 library
- It can
- React to gas and smoke; one build shuts a valve
- It can't
- Replace a certified alarm
MQ-3
- Who it's for
- Intermediate
- Level
- intermediate
- Cost
- Low
- Main parts
- Uno, MQ-3 module, I2C LCD
- Wiring
- Easy
- Code
- About 26 to 28 lines
- It can
- Show a higher number near alcohol
- It can't
- Say if someone may drive
MQ-5
- Who it's for
- Intermediate
- Level
- intermediate
- Cost
- Medium
- Main parts
- Uno, MQ-5, 16x2 LCD
- Wiring
- Hard
- Code
- About 30 lines
- It can
- Show a gas level
- It can't
- Bill real gas use
MQ-7
- Who it's for
- Intermediate
- Level
- intermediate
- Cost
- Medium
- Main parts
- Uno, MQ-7, 16x2 LCD, relay, fan
- Wiring
- Hard
- Code
- About 42 lines
- It can
- Start a fan when the reading rises
- It can't
- Protect you from real carbon monoxide
MQ-135
- Who it's for
- Beginners and up
- Level
- intermediate
- Cost
- Low
- Main parts
- Uno, MQ-135, I2C LCD (and DHT22 and a relay in one)
- Wiring
- Easy
- Code
- About 25 to 57 lines
- It can
- Show air quality as a number
- It can't
- Give true ppm without calibration
Written from the parts lists and code in these tutorials. Cost is a rough guide to the parts they list, compared with each other; line counts are of the main program.

