MQ7 Sensor Module Analog Output

Hi Everyone!
Im having troubles to understand the analog output mq7 module monoxide sensor. And the datasheet doesnt help at all.

So here is my question:

According to the datasheet this module detects between 10-1000ppm, so if i put the sensor inside of a upside down glass with a candle, this mean that the higher analog value would be match with 1000ppm? I kwon that is a rough approximation, but I dont have any other idea.

Thks!!

ps: this is the module http://dx.com/en/p/mq-7-high-sensitivity-co-carbon-monoxide-detector-sensor-black-166570

and this are the specifications:

  1. Signal output indicator;
  2. Dual Signals output (analog output and TTL output);
  3. TTL output signal is low level, allows to connect with SCM directly;
  4. Analog output 0~5V voltage;
  5. High sensitivity;
  6. Long working lifetime and stable performance;
  7. Quick response and recovery

Specification
Chipset: LM393 + MQ-7 sensor;
Working voltage: DC 3~5V;
Detecting range: 10~1000ppm

The gas insoft drinks is C02, so if you can capture that in an upside down jar then you are sure that the concentration is very high.

OK! so if i get values max and min from the jar, i can do a linear equation with those points and the datasheet data.
something like this:

jar empty : analog value 50 --> ppm 10.
jar full of co: analog value 170 ---> ppm 1000.

Y that right??

Have you googled "MQ7 Arduino" - I am sure you are not the first. Also it is worthwhile getting the datasheet for the MQ7 - try "MQ7 datasheet pdf" in google.

You can only do a linear interpolation if the sensor is linear. The response curve will be on the datasheet information. It looks pretty linear and they also give good ideas on the responsiveness, etc

Lowest analog value (0) will be the lowest value for the voltage and the highest (1023) will be the highest value. Not sure where you get 50 and 170.

Also the sensor is for CO, not CO2 (my mistake), so soft drink will not work.

Yes, I already read the datasheet .by the way, here is the link https://www.sparkfun.com/datasheets/Sensors/Biometric/MQ-7.pdf.

But my problem is the module, im not sure how it works.

Do i need to connect the vcc pin to an analog pin in the arduino and do something like this?

A0 -> AOUT
A1 -> VCC
GND -> GND

int sensorValue;
int pulsewidth;

void setup()
{
  Serial.begin(9600);      // sets the serial port to 9600
}
void loop()
{
  pulsewidth=255;  //set to 5 V
  analogWrite(A1, pulsewidth);
  delay(60*1000);
  pulsewidth=71.4; //set to 1.4 V
  analogWrite(A1, pulsewidth);
  delay(90*1000);
  sensorValue = analogRead(A0);
  Serial.println(sensorValue);
}

Vcc is generally connected to the 5V (or 3.3V) supply. Datasheet says Vc for this sensor is 5V. Most sensor breakout boards will have pins for GND, Voltage and Signal (GVS).

As the data sheet shows, the module heater has a low resistance and therefore requires quite a bit of current, so it can't be powered from an Arduino pin. You will need external circuitry to control the heater power. Calibration is only useful if it is done with a known standard. Mr. Google will be glad to help.

Thanks for your replies guys!

But Im still lost, I think my module already has a circut to control the heater power, but im not sure.

The dx specifications of the module says:

Chipset: LM393 + MQ-7 sensor;

This LM393 handles the heating process?

This is the graph of the module sensing every second during 24 hours:

As you see, is a very strange curve. and i cant figure out how to translate that to something usefull.

The LM393 is a voltage comparator and cannot control the heater power. You should connect Vcc on the module to a +5V source capable of supplying 150 mA -- the current required by the 33 ohm heating element. I would guess from the module description that the LM393 is there to provide a TTL output to turn on a buzzer, indicating high CO concentration.

Without proper documentation, the only way to figure out what the analog output means is to expose the sensor to known concentrations of CO, and measure the output voltage.

Thanks jremington !!

You were very clear. One last question:

How can i do the power clicle of the sensor with my arduino mega? I kown that the 5v pin suply 200 mA, but i dont know how to down and up that from the board.

Do i need another thing to do this?

I'm not sure what you mean by "power clicle" -- are you referring to the heater voltage switching or do you just want to switch the module on and off?

According to the datasheet, while sampling you need to continuously change the heater voltage between 1.4 and 5 volts. There are various ways of doing that, for example, use a relay or transistor to switch a resistor in and out of the heater circuit. Here is one discussion of how others have accomplished that (and you can probably find others): https://forum.sparkfun.com/viewtopic.php?t=18447

Thanks! I will read that thread.