MQ2 Sensor is a gas module and it is suitable to detect Hydrogen, LPG, Smoke, CO, and Alcohol. It has high sensitivity and fast response time to measure and take the data. Sensitivity can be adjusted by potentiometer behind it:
The resistance of the sensor is different depending on the type of the gas.
The smoke sensor has a built-in potentiometer that allows you to adjust the sensor sensitivity according to how accurate you want to detect gas.
The MQ-2 smoke sensor is sensitive to smoke and to the following flammable gases:
The smoke sensor has a built-in potentiometer that allows you to adjust the sensor digital output (D0) threshold.
The voltage that the sensor outputs changes accordingly to the smoke/gas level that exists in the atmosphere. The sensor outputs a voltage that is proportional to the concentration of smoke/gas.
In other words, the relationship between voltage and gas concentration is the following:
- The greaterthe gas concentration,the greaterthe output voltage
- The lowerthe gas concentration,the lowerthe output voltage
The output can be an analog signal (A0) that can be read with an analog input of the Arduino or a digital output (D0) that can be read with a digital input of the Arduino.
Package Included: 1 X MQ-2 sensor
//I2C pins declaration
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
int Analog_Input = A0;
int lpg, co, smoke;
lcd.begin(16,2);//Defining 16 columns and 2 rows of lcd display
float* values= mq2.read(true); //set it false if you don’t want to print the values in the Serial
//lpg = values;
lpg = mq2.readLPG();
//co = values;
co = mq2.readCO();
//smoke = values;
smoke = mq2.readSmoke();