http://davidegironi.blogspot.it/2017/05/mq-gas-sensor-correlation-function.html
In the post linked above I've discuss a method to correlate the sensor resistance to a gas ppm using the datasheet curve named "sensitivity characteristics of the MQ-135" and the formula:
ppm=a*(Rs/Ro)^b.
Someone ask me about sensor and correlation coefficients of various gasses, so here I will post some correlation coefficient for the a few MQ sensor and gasses.
sensor | gas | a | b | min Rs/Ro | max Rs/Ro |
MQ2 | LPG | 591.283 | -2.076502 | 0.256166 | 1.68543 |
MQ3 | alcohol | 0.3923202 | -1.493249 | 0.1143375 | 2.497754 |
MQ4 | CH4 | 1041.333 | -2.729007 | 0.4365277 | 1.830508 |
MQ5 | CH4 | 217.4972 | -2.422111 | 0.2058715 | 1.035233 |
MQ6 | LPG | 940.2178 | -2.521573 | 0.3915661 | 1.847477 |
MQ7 | H2 | 64.86522 | -1.405261 | 0.05323301 | 1.203488 |
MQ8 | H2 | 1079.683 | -0.6416874 | 0.03115283 | 13.84067 |
MQ135 | CO2 | 110.3794 | -2.721706 | 0.8038119 | 2.416431 |
Those values have been found using the method proposed in the above post, and the figures posted below.
In order to use the correlation function, you now need to compute the Ro value. You can find this value reading the sensor resistance at a know amount of ppm, compy in the gases ppm limits of the datasheet, and then use this formula:
Ro=Rs*(a/ppm)^(1/b).
Those are the
- collected points: https://bitbucket.org/snippets/davidegironi/z9AMEr/mq-gas-sensor-correlation-coefficients
that has been processes using the following
- R script: https://gist.github.com/davidegironi/b7be6b7cace6b475dd42c48c3e62fcf4
Notes
- read risk disclaimer
- excuse my bad english
This comment has been removed by a blog administrator.
ReplyDeleteHello Sir. I have been working on this for a course project. I have finished extracting data from the datasheet but I m somehow not able to run the R- Program. It shows up a lot of errors of which the first one is "There is no package called data.table". I do not hold any knowledge in R programming. So can you please help me go past this step. Thank you
ReplyDeleteHello, for the error you encouter, you have to set your datapoints in pointsdata array. You could try datacamp.com light to run the R script.
DeleteHello sir! My question is how to find R/Ro by the analog output we receive, what is the correlation between the two? Is it same for all sensors?
ReplyDeleteHello, you should not find R/Ro. Take a look here: http://davidegironi.blogspot.it/2017/05/mq-gas-sensor-correlation-function.html
DeleteHow can I find the CO correlation coefficients for MQ-9 sensor? I tried doing your method, by taking the data points from the datasheet, but I got around:
ReplyDeleteEstimated a
580.9079
Estimated b
-2.288135
Using the coefficients to calculate ppm, my values were absurd! Can you help me?
Hello, here i explain the method i've use to search values: http://davidegironi.blogspot.com/2017/05/mq-gas-sensor-correlation-function.html
DeleteHow does one go about a linear or systematic way of identification of gas, given a array of mq sensors? My math sucks, it's multivariate analysis.
ReplyDeleteYou can't with this type of sensor identify a specific gas, they react to a bounch of gases.
Delete