Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. MQ Sensor Curve

MQ Sensor Curve

Scheduled Pinned Locked Moved Development
2 Posts 2 Posters 739 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jakes Potgieter
    wrote on last edited by Jakes Potgieter
    #1

    Hi guys

    I have a MQ2 sensor and have been using the following tutorial (http://sandboxelectronics.com/?p=165), which seems  to be working fine, as is.

    My question is with regards to the calculation of the curve for a particular gas. How have the curves being calculated?

    float           LPGCurve[3]  =  {2.3,0.21,-0.47};  //two points are taken from the curve. 
                                                        //with these two points, a line is formed which is "approximately equivalent"
                                                        //to the original curve. 
                                                        //data format:{ x, y, slope}; point1: (lg200, 0.21), point2: (lg10000, -0.59) 
    float           COCurve[3]  =  {2.3,0.72,-0.34};    //two points are taken from the curve. 
                                                        //with these two points, a line is formed which is "approximately equivalent" 
                                                        //to the original curve.
                                                        //data format:{ x, y, slope}; point1: (lg200, 0.72), point2: (lg10000,  0.15) 
    float           SmokeCurve[3] ={2.3,0.53,-0.44};    //two points are taken from the curve. 
                                                        //with these two points, a line is formed which is "approximately equivalent" 
                                                        //to the original curve.
                                                        //data format:{ x, y, slope}; point1: (lg200, 0.53), point2: (lg10000,  -0.22)                                                     
    float           Ro           =  10;                 //Ro is initialized to 10 kilo ohms
    

    I have used web plot digitizer to extract the values from the graph (see attached), but I'm still am not sure how the curve  was calculated.

    If we take the LPG curve for example (float LPGCurve[3]={2.3,0.21,-0.47};), log(200) = 2.3, where are the values 0.21 and -0.47 derive from. What is the math formula that got to those two figures?

    Any help will be hugely appreciated.

    Thank you in advance!

    1 Reply Last reply
    0
    • gohanG Offline
      gohanG Offline
      gohan
      Mod
      wrote on last edited by
      #2

      My guess is that the supplier got the data from manufacturer and made the sample sketch, so hopefully they knew it better

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      25

      Online

      11.7k

      Users

      11.2k

      Topics

      113.1k

      Posts


      Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • MySensors
      • OpenHardware.io
      • Categories
      • Recent
      • Tags
      • Popular