MQ-2 Sensitive for Methane, Butane, LPG, Smoke (MQ-2) [S100]



https://www.youtube.com/watch?v=PHpsr3MPV28


*GitHubhttps://github.com/rdiot/rdiot-s100.git


* Specs

Sensitive for Methane, Butane, LPG, smoke.

This sensor is sensitive for flamable and combustible gasses.

The heater uses 5V.


Sensitive material of MQ-2 gas sensor is SnO2, which with lower conductivity in clean air. When the

target combustible gas exist, The sensor’s conductivity is more higher along with the gas concentration

rising. Please use simple electrocircuit, Convert change of conductivity to correspond output signal of

gas concentration.

MQ-2 gas sensor has high sensitity to LPG, Propane and Hydrogen, also could be used to Methane

and other combustible steam, it is with low cost and suitable for different application. 



* Contents

- The MQ-2 at seeed: http://www.seeedstudio.com/wiki/Grove_-_Gas_Sensor%28MQ2%29


- DataSheet : https://www.pololu.com/file/0J309/MQ2.pdf


- Key Code

const int gasPin = A0;

  

void setup()

{

    Serial.begin(9600);

}

 

void loop()

{

    Serial.println(analogRead(gasPin));

    

    if (analogRead(gasPin) > 400)  

    {                                     

        tone(12,2000,1000); 

    }  

    delay(1000);

}

Posted by RD IoT RDIoT

댓글을 달아 주세요

TPM-300 Air Quality Module (TPM-300) [S092]



https://www.youtube.com/watch?v=zHqDCyS7dPU


*GitHubhttps://github.com/rdiot/rdiot-s092.git


* Specs

Module type: TPM-300

sensor: the air quality sensor

gas detection: ammonia, hydrogen, alcohol, carbon monoxide, methane, propane, Gan, styrene, propylene 

glycol, alkyl phenol, toluene, ethylbenzene, xylene, formaldehyde and other volatile organic gases, incense smoke, wood, paper burning smoke

physical interface: XH2.54-4 vertical socket

output data: TTL level (built in 200 ohm current limiting resistor)

input voltage: 5 + 0.2VDC (no reverse voltage protection)

working current: less than 80mA

the preheating time: less than 60 seconds

response time: less than 10 seconds

recovery time: less than 20 seconds

operating temperature: -10 - 40 C

the humidity: less than 95%RH

storage temperature: -20 - 60 C

storage humidity: less than 60%RH

dimensions: 24 x 20 x 15 (L * W * H)

module: weight of about 20 grams

sensitivity: 0.5ppm hydrogen

the sensitivity attenuation: less than 1%/ years

: more than 10 years service life


* Contents

- Connect 

B ----- D3

A ----- D2

5V ----- 5V

GND ----- GND


- Level

A              B            Level

Low            Low           0

Low            High          1

High           Low           2

High           High          3


- Key Code 

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>


int pinA = 2; // A

int pinB = 3; // B


LiquidCrystal_I2C lcd(0x27,20,4);  // LCD2004


void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");


  pinMode(pinA, INPUT);

  pinMode(pinB, INPUT);  

  delay(1000);


  lcd.clear();

}

void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S092:TPM-300 Air Q");


  int valueA = digitalRead(pinA);

  int valueB = digitalRead(pinB);

  int airGrade = -1;


  lcd.setCursor(0,1);

  lcd.print("pinA(H/L)=" + (String)valueA + " ");

  

  lcd.setCursor(0,2);

  lcd.print("pinB(H/L)=" + (String)valueB + " ");



  if(valueA == LOW && valueB == LOW)

  {

    airGrade = 0;

  }

  else if(valueA == LOW && valueB == HIGH)

  {

    airGrade = 1;

  }

  else if(valueA == HIGH && valueB == LOW)

  {

    airGrade = 2;

  }

  else if(valueA == HIGH && valueB == HIGH)

  {

    airGrade = 3;

  }


  lcd.setCursor(0,3);

  lcd.print("Air Grade 0~3=" + (String)airGrade + " ");


  delay(300);

}

Posted by RD IoT RDIoT

댓글을 달아 주세요

Air Quality Sensor (MQ135) [S037]



https://www.youtube.com/watch?v=JJonDVX8CYQ


*GitHubhttps://github.com/rdiot/rdiot-s037.git


* Specs

Sensitive material of MQ135 gas sensor is SnO2, which with lower conductivity in clean air. When the

target combustible gas exist, The sensor’s conductivity is more higher along with the gas concentration

rising. Please use simple electrocircuit, Convert change of conductivity to correspond output signal of

gas concentration.

MQ135 gas sensor has high sensitity to Ammonia, Sulfide and Benze steam, also sensitive to smoke

and other harmful gases. It is with low cost and suitable for different application. 



* Contents

- Library : https://github.com/GeorgK/MQ135


- DataSheet : http://www.cooking-hacks.com/skin/frontend/default/cooking/pdf/MQ-135.pdf


- Connect


- Key Code

#include <MQ135.h>

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>


LiquidCrystal_I2C lcd(0x27,20,4);  // LCD2004

int pin = A0;

int sensorValue;

int ledPin = 13;


MQ135 gasSensor = MQ135(pin);

float rzero = gasSensor.getRZero();

int ppm = gasSensor.getPPM();


void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S037:MQ135");



  sensorValue = analogRead(pin);

  lcd.setCursor(0,1);

  lcd.print("A0=" + (String)sensorValue + " Resis="+(String)gasSensor.getResistance() +" ");


  float rzero = gasSensor.getRZero();

  digitalWrite(ledPin, HIGH);      // turn the ledPin on

  delay(100);                      // stop the program for some time

  digitalWrite(ledPin, LOW);       // turn the ledPin off

  delay(100);  // stop the program for some time

 

  lcd.setCursor(0,2);

  lcd.print("rzero=" + (String)rzero + "    ");

 


  float co2_ppm = gasSensor.getPPM();

  int ppm = co2_ppm / 4;

  //Vrl = val * ( 5.00 / 1024.0  );      // V

  //Rs = 20000 * ( 5.00 - Vrl) / Vrl ;   // Ohm 

  //ratio =  Rs/Ro;     

  lcd.setCursor(0,3);

  lcd.print("co2 ppm=" + (String)co2_ppm + "    ");

    

  delay(1000);

}

Posted by RD IoT RDIoT

댓글을 달아 주세요