![]() Check whether it is greater than the threshold valueĭelay(1000) // Delay 1 second for next reading Serial.begin(9600) // Initialization Serial Monitor at Baudrate = 9600 Int sensorThres = 400 // Threshold value of pin A0 that we desired which indicate concentration of gas detected by Sensor Int buzzer = 10 // Buzzer connected to pin 10 Arduino Int redLed = 12 // LED connected to pin 12 Arduino const int mqxPin = A0 // pin A0 MQ2 connected to pin analog A0 Arduino The following is an example of a simple program to read the output of the MQ2 sensor (A0), then turn on the LED and sound the buzzer if the readout from the MQ2 sensor exceeds the Threshold limit value that we set. DO output : TTL digital 0 and 1 (0.1 and 5V).The more gas concentrations detected, the higher AO voltage.The resistance value of the MQ2 sensor is directly proportional to the level or concentration of a gas detected. MQ2 or MQ-2 is a Metal Oxide Semiconductor (MOS) type gas sensor or also known as Chemiresistors because the detection is based on changing the resistance value of the material / material from the sensor when the material / material is in contact with the gas detected.īy using a voltage divider circuit construction, the content of a gas can be measured / obtained. Modul Sensor MQ2 / MQ-2 How Does MQ2 / MQ-2 Work? In addition to Fire Prevention Tools, MQ2 can also be used as a tool for Air Quality Monitoring. This is a precautionary measure because if there is a gas that has been leaked it has been detected from the beginning and action can be taken immediately so that it can prevent fires. Usually applied to the combustible gas leak detection equipment in a house, agency, warehouse or industrial factory. ![]() This sensor is designed for indoor use at room temperature. MQ2 or MQ-2 is a sensor module that can be used to detect smoke or flammable gases at concentrations between 200 ppm – 10,000 ppm.Īny gas that can be detected by MQ2 includes LPG, Hydrogen (H2), Methane (CH4), Carbon Monoxide (CO), Alcohol, Smoke (Smoke) and Propane. Previously, we discussed a little about what is the MQ2 / MQ-2 smoke / gas sensor. So for applications to sense low levels of LPG, MQ5 is the ideal choice as it can sense values starting from 200 ppm.In this article we will give an example of the MQ2 / MQ-2 smoke / gas sensor program using Arduino UNO. We choose the right sensor based on the application requirement say for example – We can not choose MQ2 for sensing low levels of LPG in the range of 700 ppm because MQ2 is insensitive low levels of LPG (its range begins at 5000 ppm and extends to 10000 ppm). The difference between MQ5 and MQ2 therefore lies in its range of values. MQ2 can sense methane(CH4) upto 20000 ppm where as MQ5 can sense CH4 only upto 10000 ppm. So we can not choose MQ5 gas sensor to design a smoke alarm or smoke involving applications. Similarly MQ2 is sensitive to smoke where as MQ5 is not that sensitive to smoke. ![]() For example, MQ5 can sense LPG in a broader range of 200 ppm to 10000 ppm, where as the range of MQ2 for LPG is short and is from 5000 ppm to 10000 ppm. Both MQ5 and MQ2 are basically gas sensors but their range of sensing different gas levels vary. In a previous article, we have wrote a tutorial on Interfacing MQ5 Gas sensor to Arduino. MQ2 is basically a general purpose gas sensor (similar to MQ5) which can sense a broad range of gases like LPG, Butane, Methane(CH4), Hydrogen and in addition to these gases MQ2 is sensitive to smoke as well. In this article, we are going to learn how to interface MQ2 Gas Sensor with Arduino.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |