MQ sensor curve with 2 values?

I am trying to find the concentration of acetone using a MQ138 sensor. I'm currently using the code here: arduino-mysensors-contribs/AirQuality-Multiple_Gas_Sensor1_4.ino at master · empierre/arduino-mysensors-contribs · GitHub, however there is no curve for acetone so I'm looking to make my own. From the datasheet, I have the graph below:

image

The lines are fairly linear, so to my understanding a curve can be written with the logarithm of the first point and the slope--however this should result in three points (for example: float ​MQ6_curve[3] = {2.3,0.30,-0.41}; ). The code on github however only has two points for each of the different gases (something like float NHEX_Curve[2] = {2142.297846, -2.751369226};)--how do these values work? Is it because the curve was created using a power fit instead of linear fit? If so, how would I go about calculating these two values?

Any help would be much appreciated!

Those graphs are just representative, and not useful for your particular sensor.

To be quantitative, each MQ sensor must be calibrated for the specific gas to be detected. Unfortunately those sensors all respond to several gases, so the calibration will be invalid if more than one of the gases are present.

If you really want to measure the concentration of a particular gas, the MQ sensors are not the way to go. At best, they tell you if something in the environment has changed.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.