MQ-2 Smoke/Gas, MQ-3 Alcohol, & MQ-7 Carbon Monoxide sensor modules (HCSENS0049)

Modules for various types of sensors including accelerometers. gyro's, IR motion, etc
Post Reply
admin
Site Admin
Posts: 814
Joined: Sun Aug 05, 2012 4:02 pm

MQ-2 Smoke/Gas, MQ-3 Alcohol, & MQ-7 Carbon Monoxide sensor modules (HCSENS0049)

Post by admin » Tue Mar 08, 2022 3:48 pm

Image


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.


Image

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.



Image



Arduino example:
  1. #include <MQ2.h>
  2.  
  3. // Analogue input connected to the MQ2s A0 output
  4. #define SENS_PIN A0
  5.  
  6. MQ2 mq2(SENS_PIN);
  7.  
  8. void setup()
  9. {
  10.   Serial.begin(9600);  
  11.   mq2.begin();
  12. }
  13.  
  14.  
  15. void loop()
  16. {
  17.   // Read the sensor
  18.   mq2.read(false);
  19.  
  20.   float lpg = mq2.readLPG();
  21.   float co = mq2.readCO();
  22.   float smoke = mq2.readSmoke();
  23.  
  24.   Serial.print("LPG: "); Serial.print(lpg); Serial.print("ppm\t");
  25.   Serial.print("CO: "); Serial.print(co); Serial.print("ppm\t");
  26.   Serial.print("SMOKE: "); Serial.print(smoke); Serial.println("ppm\t");
  27.  
  28.   delay(1000);
  29. }


Image

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:
  1. // Analogue input connected to the MQ3s A0 output
  2. #define SENS_PIN A0
  3.  
  4. void setup()
  5. {
  6.   Serial.begin(9600);
  7. }
  8.  
  9. void loop()
  10. {
  11.   // Read the sensor
  12.   unsigned int value = analogRead(SENS_PIN);
  13.  
  14.   //Output the result to the serial monitor
  15.   Serial.println(value);
  16.  
  17.   delay(1000);
  18. }


Image

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:
  1. // Analogue input connected to the MQ7s A0 output
  2. #define SENS_PIN A0
  3.  
  4. void setup()
  5. {
  6.   Serial.begin(9600);
  7. }
  8.  
  9. void loop()
  10. {
  11.   // Read the sensor
  12.   unsigned int value = analogRead(SENS_PIN);
  13.  
  14.   //Output the result to the serial monitor
  15.   Serial.println(value);
  16.  
  17.   delay(1000);
  18. }



Image

MQ2 Library:
MQ2.zip

Datasheets:
MQ2.pdf
MQ3.pdf
MQ7.pdf


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.
You do not have the required permissions to view the files attached to this post.

Post Reply

Return to “Sensors”