This is a sensor module kit that contains 3 of the most popular gas sensor modules: smoke/gas sensor MQ-2, alcohol sensor MQ3 and a carbon monoxide sensor MQ7.
NOTE: These sensor modules are for educational purposes only. They should not be used in safety critical applications.
MQ-2:
- Type: Smoke/Gas Sensor
- Detection types: Liquefied petroleum gas, natural gas, coal gas, smoke
- Operating voltage: 5V
- Analog output AO: the higher the concentration of combustible gas, the higher the output voltage
- Digital output DO: Adjustable concentration alarms by potentiometer, when the concentration exceeds the threshold you set, it outputs low level, otherwise high level output, and it can be connected to microcontroller or relay modules.
Arduino example:
- #include <MQ2.h>
- // Analogue input connected to the MQ2s A0 output
- #define SENS_PIN A0
- MQ2 mq2(SENS_PIN);
- void setup()
- {
- Serial.begin(9600);
- mq2.begin();
- }
- void loop()
- {
- // Read the sensor
- mq2.read(false);
- float lpg = mq2.readLPG();
- float co = mq2.readCO();
- float smoke = mq2.readSmoke();
- Serial.print("LPG: "); Serial.print(lpg); Serial.print("ppm\t");
- Serial.print("CO: "); Serial.print(co); Serial.print("ppm\t");
- Serial.print("SMOKE: "); Serial.print(smoke); Serial.println("ppm\t");
- delay(1000);
- }
MQ-3:
- Type: Alcohol Sensor
- Detection types: alcohol
- Operating voltage: 5V
- Analog output AO: Adjustable concentration alarms by potentiometer, when the concentration exceeds the threshold you set, it outputs low level, otherwise high level output, and it can be connected to microcontroller or relay modules.
Arduino example:
- // Analogue input connected to the MQ3s A0 output
- #define SENS_PIN A0
- void setup()
- {
- Serial.begin(9600);
- }
- void loop()
- {
- // Read the sensor
- unsigned int value = analogRead(SENS_PIN);
- //Output the result to the serial monitor
- Serial.println(value);
- delay(1000);
- }
MQ-7:
- Type: Carbon Monoxide Sensor
- Detection type: carbon monoxide or other gases containing carbon monoxide
- Operating voltage: 5V
- Analog output AO: the higher the concentration of carbon monoxide, the higher the output voltage
- Digital output DO: Adjustable concentration alarms by potentiometer, when the concentration exceeds the threshold you set, it outputs low level, otherwise high level output, and it can be connected to microcontroller or relay modules.
Arduino example:
- // Analogue input connected to the MQ7s A0 output
- #define SENS_PIN A0
- void setup()
- {
- Serial.begin(9600);
- }
- void loop()
- {
- // Read the sensor
- unsigned int value = analogRead(SENS_PIN);
- //Output the result to the serial monitor
- Serial.println(value);
- delay(1000);
- }
MQ2 Library:
Datasheets:
FAQ:
The module(s) gets warm when I apply power to them, are they faulty?
The sensor element in these modules requires heating to work correctly and so includes a heating circuit as part of the sensor. It is therefore normal for them to run warm when powered. They may also emit a faint smell when first powered up.
Libraries, example code, and diagrams are provided as an additional free service by Hobby Components and are not sold as part of this product. We do no provide any guarantees or warranties as to their accuracy or fitness for purpose.
Descriptions and diagrams on this page are copyright Hobby Components Ltd and may not be reproduced without permission.