MQ-7

Hello, I wanted to use the mq-7 gas sensor,but when I read the readings from Analog OUTPUT pin they weren't accurate so I researched and realized I have to calibrate the sensor. Could anyone explain me how to calibrate the mq-7?

Calibrate the sensor by first "burning it in" (preheating for 48 hours) as described in the sensor data sheet, then expose the sensor to known concentrations of the gas of interest, in dry air. Note that the MQ-7 responds to several different gases.

General overview on sensor calibration.

I Read the “General overview on sensor calibration”, but I don’t understand if I should use one, two point or multi-point curve calibration. Which one should I use?

Up to you; they all work. The more tests YOU do, the more accurate the calibration and hence, the more accurate the data.

I used the code from Grove - Gas Sensor(MQ5) | Seeed Studio Wiki. Is the code compatible with mq-7 and how to get ppm value?

The code just reads the voltage output by either sensor.

You convert that value to PPM after calibrating the sensor.

What is a normal ppm value I should get in my house and when I place it near fire?

Who could possibly know but you? Do the experiment and tell us what you get.

In my house it’s 0ppm. When it’s near fire it rises to 3-4ppm.

harryprogram:
I Read the “General overview on sensor calibration”, but I don’t understand if I should use one, two point or multi-point curve calibration. Which one should I use?

Single point: if you know the sensor is linear, and you know the slope. Determines the offset.
Two point: if you know the sensor is linear but not the slope, or you want to confirm the slope. Determines slope and offset.
More points: if you know the sensor is not linear, or you want to confirm the slope and linearity of a sensor that should be linear.

Indeed the more points the better, even for sensors where a single point would have done. At the very least you get a more accurate offset and a confirmation of the slope and linearity of the sensor.

For the MQ7, have a look at the data sheet to see what kind of slope you can expect and its range. Decide on your calibration points so they're spread out through the expected range. If not linear add a point or two in the range of your interest.