miguel5612 / MQSensorsLib

We present a unified library for MQ sensors, this library allows to read MQ signals easily from Arduino, Genuino, ESP8266, ESP-32 boards whose references are MQ2, MQ3, MQ4, MQ5, MQ6, MQ7, MQ8, MQ9, MQ131, MQ135, MQ136, MQ303A, MQ309A.
MIT License
169 stars 64 forks source link

Calculations a and b for equation #32

Closed PhilMncn closed 2 years ago

PhilMncn commented 4 years ago

Hy,

I am testing the mq135 sensor with your library. Thanks for it ! I red this page https://jayconsystems.com/blog/understanding-a-gas-sensor to understand the method. And, then I tried to make the calculations to find a and b as described in the page. But I really dont find the same as written in the example file neither for MQ135 nor for the MQ4 (in the page above). For example : I find 1.02 and -0.41 for CO2. And, the same thing when I compare a and b, in the MQ4 example and in the page.

I think I am missing something. Maybe you could light me.

Thank you Have a gode day.

miguel5612 commented 4 years ago

Best regards PhilMncn Thank you in advance for consulting us, I am very happy that you are checking the calculations, it is a process of vital importance for us. The value can give you different for multiple reasons:

  1. The value you are taking with the webplot digitizer is usually different in each attempt, this is because as you are taking the data from an image, all are close, precise values but none exact
  2. The way Excel calculates the regression. Therefore you can find different values of m and B which are valid as long as they give similar values when entering the measured and calibrated values. Then I invite you to share with us an excel file where you have your equation, our equation and compare the results, if they are very different, we will enter to compare the points you used in your regression against ours to identify if there is a problem. I wait for your answer :D