OLIMEX MQ Gas and Air Quality Sensors User Manual

OLIMEX guide for reading data from SNS-MQ2, SNS-MQ3, SNS-MQ7 and SNS-MQ135 sensors with an Arduino-like board.


OLIMEX MQ Gas and Air Quality Sensors User Manual - cover page
Brand
OLIMEX
Category
sensor
Document type
User Manual
Language
English
Pages
6
File format
PDF
File size
446 KB
Published
30 November, 2026
Updated
30 November, 2026
MD5 checksum
06F56743978C453961660871A62B2DF9

About this manual

This OLIMEX guide explains how to read the values of an MQ gas or air quality sensor. It covers hardware assembly, software configuration and the Arduino code used to read analog input from the sensor.

The example setup uses an SNS-MQ2 sensor, an OLIMEXINO-328 board, three jumper wires, a mini USB cable and a personal computer. The guide also describes the four sensors OLIMEX distributes and the substances each one is suitable for detecting.

What's inside

  • Goal of the guide
  • Requirements
  • Assembling the hardware setup
  • Selecting a sensor
  • Selecting a host board
  • Connecting the hardware together
  • Running the software
  • Arduino code to read analog input

Specifications

Sensor power supply5V voltage source and a ground line
Data outputAnalog data line or digital data line
Analog input pinanalog input pin 0
Serial baud rate9600
Read interval100ms
Example host boardOLIMEXINO-328 with ATmega328p

Frequently asked questions

What does the SNS-MQ2 sensor detect?

The SNS-MQ2 detects LPG, propane and hydrogen in the air, and can also be used to detect methane and other combustible substances.

What does the SNS-MQ7 sensor detect?

The SNS-MQ7 is a highly sensitive detector of carbon monoxide in the air.

What does the SNS-MQ135 sensor detect?

The SNS-MQ135 is an air sensor that detects NH3, NOx, alcohol, benzene, smoke, CO2, etc.

What does the SNS-MQ3 sensor detect?

The SNS-MQ3 is an air detector suitable for detecting alcohol and benzin.

Download PDF (446 KB)

More OLIMEX Manuals


View all OLIMEX manuals →