Carbon Monoxide Gas Sensor MQ-7 HELP...!

I am trying to make security system in which I am using Carbon Monoxide Gas Sensor MQ-7 (pololu.com/catalog/product/1482CO detector using MQ 7).

In order to test the sensor, I have used simple sketch that reads analog value from the analog pin A0 and shows on serial monitor.[code]

const int analogInPin = A0; // Analog input pin that the potentiometer is attached to
const int ledPin = 13; // LED connected to digital pin 13

int sensorValue = 0; // value read from the sensor
void setup()
{
// initialize serial communications at 9600 bps:
Serial.begin(9600);
pinMode(ledPin, OUTPUT); // sets the digital pin as output
}

void loop() {
// read the analog in value:
sensorValue = analogRead(analogInPin);
// determine alarm status
if (sensorValue >= 750)
{
digitalWrite(ledPin, HIGH); // sets the LED on
}
else
{
digitalWrite(ledPin, LOW); // sets the LED off
}

// print the results to the serial monitor:
Serial.print("sensor = " );
Serial.println(sensorValue);

// wait 10 milliseconds before the next loop
// for the analog-to-digital converter to settle
// after the last reading:
delay(1000);
}

[/code]

While typing this, I am getting an analog reading between 34-36 every second. They were around 50-60 last night when I connected it first time. I am using this sensor first time, so it is still under pre-heating. It has been 24 hours now.

Now, I have query that if there is not Carbon Monoxide-CO gas around the sensor, then analog value supposed to be 0…?? or close to 0…?? Right now, there is no CO gas around this sensor and it shows me the value of 34 to 36.

ADC gives range of 0 to 1023, so without any gas, it should give 0… right…??

  1. Another problem is that when I blow an air in front of sensor, the analog value on serial monitor increases upt0 100-120 and then settles down to 34-36 …!! I don’t know why…?? I exhale CO2 in breath out, then why does this analog value increase…? This sensor doesn’t react to CO2 as per datasheet. Is this normal…??

  2. How could I convert these analog values to PPM…?? If i want to trigger an alarm at certain value then, What suppose to be threshold value of gas in PPM for the alarm…?? I will use the sensor at home, so what would be the safest PPM count for CO at home and howmany PPM count would be dangerous…?? So that i can set my alarm at that value…!!

Plus, I am running the sensor at straight 5 V from Arduino 5V output. Is it okay…? or do i need to feed it 1.4V and 5V alternatively…???
(I have read the thread post regarding the same sensor MQ7 in which Ryantm has responded that we can use straight 5V. So, just want to confirm.)

Any kind of help will be highly appreciated.

Datasheet: pololu.com/file/download/MQ7 … e_id=0J313

There has been some discussion of this sensor on the SparkFun forums. You do need to alternate the supply voltages between 1.4 and 5 V and the timing for sampling is important. See for example this thread https://forum.sparkfun.com/viewtopic.php?f=14&t=18447&hilit=carbon+monoxide&sid=0817830f33ec6771764377c46a708817

Hi Jim…

Thank you for your response. I"ll check it out…!! And i will feed 5 V and 1.4 V alternatively…