Arduino and MQ-135 gas sensor example

MQ-135 gas sensor is a hazardous gas detection apparatus for the family, the environment, suitable for ammonia, aromatic compounds, sulfur, benzene vapor, smoke and other gases harmful gas detection, gas-sensitive element test concentration.

Air quality sensor is for detecting a wide range of gases, including NH3, NOx, alcohol, benzene, smoke and CO2. Ideal for use in office or factory, simple drive and monitoring circuit.

The sensitivity of the sensor can be adjusted by using the potentiometer.

 

FEATURES
* High sensitivity to Sulfide, benzene Department of steam, smoke and other harmful gases
* Long life and low cost
* Simple drive circuit

 

Connection

 

ArduinoGas Sensor
5VVCC
GNDGND
NCDO
Analog A0AO

 

Code

void setup() 
{
  Serial.begin(9600);
}
 
void loop() 
{
  float sensorVoltage; 
  float sensorValue;
 
  sensorValue = analogRead(A0);
  sensorVoltage = sensorValue/1024*5.0;
 
  Serial.print("sensor voltage = ");
  Serial.print(sensorVoltage);
  Serial.println(" V");
  delay(1000);
}

 

Results

Again look at the serial monitor, you need to let the sensor stabilise. Remember it consists of a heating element, so you effectively have to let the sensor ‘heat up’.

sensor voltage = 0.30 V
sensor voltage = 0.31 V
sensor voltage = 0.33 V
sensor voltage = 0.34 V
sensor voltage = 0.35 V
sensor voltage = 0.32 V
sensor voltage = 0.31 V
sensor voltage = 0.30 V

 

Links

Mq-135 datasheet

 
MQ-135 Air Quality Sensor Hazardous Gas Detection Module for Arduino

Related