A gas sensor is a device that detects the presence or concentration of gases in the atmosphere. based on the gas concentration, the sensor produces a corresponding potential difference by changing the resistance of the material inside the sensor, which can be measured as output voltage. Based on this voltage value the type and concentration of the gas can be estimated.
Many types of MQ Sensors are available to detect different gasses, but the basic gas sensor to detect Smoke, LPG gas, Methane, Butane is MQ-2 Sensor.
The MQ-2 Gas sensor can detect or measure gasses like LPG, Alcohol, Propane, Hydrogen, CO, and even methane. The module version of this sensor comes with a Digital Pin which makes this sensor operate even without a microcontroller and that comes in handy when you are only trying to detect one particular gas. When it comes to measuring the gas in ppm the analog pin has to be used, the analog pin is also TTL driven and works on 5V and hence can be used with the most common microcontroller
MQ-2 Sensor is sensitive to sense Smoke & some Flammable gasses like Methane, Butane, and LPG gas.