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:
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!