get(Calculating) toluene gas with MQ138 Sensor



  • hello!
    i want to get a toluene PPM by using MQ138 sensor.
    there are some sources on internet so i have used that.
    but the output is not correct( i have another thing to get a toluene gas the name is YesAir device)
    so i want to check that source codes are correct.
    is there another guys have used MQ138 sensor?
    i used this sources
    https://gist.github.com/esmarr58/2e9335bfc64077407ed2286408982f61
    i knew this site from this source. but i do not know how to get the curve and can not sure the initialized value. and some codes was not working such as

    return  (long)((long)(1024*1000*(long)rl_value)/raw_adc-(long)rl_value);
    

    https://gist.github.com/esmarr58/2e9335bfc64077407ed2286408982f61
    i used this source. sure i changed curve to [1.7, -0.57, -0.5] and RL value to 4.7(from datasheet)
    now i can get a PPM value but the values are 0.00006, 0.00008.....
    MQ138 datasheet

    i know this sensor's range is 5~500 PPM. so i want to check the code. that codes are correct?
    and if that wrong, where should i get a correct source code..?
    waiting anything.
    regard.


Log in to reply
 

Suggested Topics

  • 87
  • 6
  • 1
  • 7
  • 3
  • 5

65
Online

11.4k
Users

11.1k
Topics

112.7k
Posts