Ks0133 keyestudio EASY plug MQ135 Air Quality Sensor: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
Line 71: Line 71:
==Resources ==
==Resources ==
'''Download the PDF:'''<br>
'''Download the PDF:'''<br>
https://drive.google.com/open?id=1pyThscSF3TAERFTrTj7xfPnUuO15KSsR
https://drive.google.com/open?id=18KvRqj_AdeugZOYtHy37wv2uTH_lMW-W


'''Download the Code:'''<br>
'''Download the Code:'''<br>
https://drive.google.com/open?id=1ZyuI9kgD-cFl9uK3tMqLUqj-ZIvEQqc8
https://drive.google.com/open?id=1UNkLh-9mgglkhnOdmHxxUOskxzzkqG4-


<br>
<br>

Revision as of 10:25, 28 November 2018

EASY plug MQ135 Air Quality Sensor

Introduction

MQ135 sensor uses SnO2 sensitive material because SnO2 has low electrical conductivity in the clean air. 
When surrounded by polluted air, the electrical conductivity of MQ135 sensor will increase with the increase of pollutants, and the change in electrical conductivity can be converted to corresponding output signal.
You can rotate the potentiometer on the sensor to adjust the sensitivity.
MQ135 has a high sensitivity to ammonia, sulfide, benzene vapor, smoke and other harmful gases.
Note: this module should be used together with EASY plug control board.


Features

  • Interface: Easy plug
  • Sensor type: Semiconductor
  • Operating voltage: 5V DC
  • Load resistance: Adjustable RL
  • Quick response and high sensitivity
  • Target gas: ammonia; methylbenzene; hydrogen


Technical Details

  • Dimensions: 56mm*20mm*18mm
  • Weight: 9.2g


Connect It Up

Connect the EASY Plug MQ135 sensor to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable.
thumb


Upload the Code

Copy and paste below code to Arduino IDE and upload.

int gas_din=2;
int gas_ain=A7;
int led=13;
int ad_value;
void setup()
{
  pinMode(led,OUTPUT);
  pinMode(gas_din,INPUT);
  pinMode(gas_ain,INPUT);
  Serial.begin(9600);
}
void loop()
{ 
  ad_value=analogRead(gas_ain);
  if(digitalRead(gas_din)==LOW)
  { 
    digitalWrite(led,HIGH);
    Serial.println("Gas leakage");
    Serial.println(ad_value);
  }
  else
  {
    digitalWrite(led,LOW);
Serial.println("Gas not leak");
    Serial.println(ad_value);
  }
  delay(500);
}


What You Should See

Done uploading the test code, open the serial monitor and set the baud rate to 9600, you should be able to see the “Gas leakage” and analog value.
thumb thumb


Resources

Download the PDF:
https://drive.google.com/open?id=18KvRqj_AdeugZOYtHy37wv2uTH_lMW-W

Download the Code:
https://drive.google.com/open?id=1UNkLh-9mgglkhnOdmHxxUOskxzzkqG4-


Buy from