Arduino Forum

Using Arduino => Sensors => Topic started by: harryprogram on Apr 20, 2019, 07:49 pm

Title: MQ-7
Post by: harryprogram on Apr 20, 2019, 07:49 pm
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?
Title: Re: MQ-7
Post by: jremington on Apr 20, 2019, 09:55 pm
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 (https://learn.adafruit.com/calibrating-sensors/why-calibrate).
Title: Re: MQ-7
Post by: harryprogram on Apr 21, 2019, 10:05 pm
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?
Title: Re: MQ-7
Post by: jremington on Apr 22, 2019, 12:34 am
Up to you; they all work. The more tests YOU do, the more accurate the calibration and hence, the more accurate the data.
Title: Re: MQ-7
Post by: harryprogram on Apr 23, 2019, 07:57 pm
I used the code from http://wiki.seeedstudio.com/Grove-Gas_Sensor-MQ5/. Is the code compatible with mq-7 and how to get ppm value?
Title: Re: MQ-7
Post by: jremington on Apr 23, 2019, 08:08 pm
The code just reads the voltage output by either sensor.

You convert that value to PPM after calibrating the sensor.
Title: Re: MQ-7
Post by: harryprogram on Apr 23, 2019, 09:54 pm
What is a normal ppm value I should get in my house and when I place it near fire?
Title: Re: MQ-7
Post by: jremington on Apr 23, 2019, 09:59 pm
Who could possibly know but you? Do the experiment and tell us what you get.
Title: Re: MQ-7
Post by: harryprogram on Apr 23, 2019, 10:22 pm
In my house it's 0ppm. When it's near fire it rises to 3-4ppm.
Title: Re: MQ-7
Post by: wvmarle on Apr 24, 2019, 07:36 am
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.