Wemos and a MQ7 Gas Sensor

The MQ7 Gas Sensor module is useful for gas leakage detection. They are used in gas leakage detecting equipments in home and industry, are suitable for detecting of Carbon Monoxide.  Due to its high sensitivity and response time, measurements can be taken as soon as possible.

The MQ-7 can detect Carbon Monoxide concentrations anywhere from 20 to 2000ppm.

The sensitivity of the sensor can be adjusted by using the potentiometer.

mq-7

FEATURES

* High sensitivity to Carbon monoxide
* Fast response .
* Stable and long life
* Simple drive circuit

Parts List

I recommend you try and get a kit of all the MQ sensors, you can buy these individually but you can also get a kit for about $9

Here are the parts I used

Name Links
Wemos Mini
MQ sensors
Connecting cables

Connection

here are the connections for my sensor

Wemos Gas Sensor
3v3 VCC
GND GND
NC DO
Analog A0 AO

 

Code

 

void setup() 
{
  Serial.begin(9600);
}
 
void loop() 
{
  float sensorVoltage; 
  float sensorValue;
 
  sensorValue = analogRead(A0);
  sensorVoltage = sensorValue/1024*5.0;
 
  Serial.print("sensor voltage = ");
  Serial.print(sensorVoltage);
  Serial.println(" V");
  delay(1000);
}

 

Results

Again look at the serial monitor, you need to let the sensor stabilise. Remember it consists of a heating element, so you effectively have to let the sensor ‘heat up’.

sensor voltage = 1.54 V
sensor voltage = 1.51 V
sensor voltage = 1.50 V
sensor voltage = 1.47 V
sensor voltage = 1.46 V
sensor voltage = 1.44 V
sensor voltage = 1.43 V
sensor voltage = 1.41 V
sensor voltage = 1.39 V
sensor voltage = 1.38 V
about 4 minutes of readings here – 1 per second
sensor voltage = 0.71 V
sensor voltage = 0.71 V
sensor voltage = 0.71 V
sensor voltage = 0.71 V
sensor voltage = 0.71 V
sensor voltage = 0.71 V
sensor voltage = 0.70 V
sensor voltage = 0.70 V
sensor voltage = 0.71 V
sensor voltage = 0.70 V

 

Links

Mq-7 Gas sensor spec

2 COMMENTS

  1. This is not the right way to use this sensor.

    According to the datasheet, it needs to heat for a minute, then you turn heater off and can measure CO for 90 sec and you need to repeat the cycle.

LEAVE A REPLY

Please enter your comment!
Please enter your name here