Introducing the MQ-2 gas sensor
In this section, we will get to know the details of the main hardware component to build our gas sensor: the MQ-2 sensor. This sensor is recommended to detect LPG, propane, alcohol, and smoke, mainly with concentrations between 300 and 10,000 parts per million (ppm). So, we can say that it is a sensor to detect smoke and flammable gases.
Concentration refers to the amount of gas in the air and is measured in ppm. That is, if you have 2,000 ppm of LPG, it means that in a million gas molecules, only 2,000 ppm would be LPG and 998,000 ppm other gases.
The MQ-2 gas sensor is an electrochemical sensor that varies its resistance when exposed to certain gasses. It includes a small heater to raise the circuit's internal temperature, which provides the necessary conditions for the detection of substances. With the 5 V connection on the pins, the sensor is kept warm enough to function correctly.
Important note
The sensor can get very hot, so it...