<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[MQ Sensor Curve]]></title><description><![CDATA[<p dir="auto">Hi guys</p>
<p dir="auto">I have a MQ2 sensor and have been using the following tutorial (<a href="http://sandboxelectronics.com/?p=165" rel="nofollow ugc">http://sandboxelectronics.com/?p=165</a>), which seems  to be working fine, as is.</p>
<p dir="auto">My question is with regards to the calculation of the curve for a particular gas. How have the curves being calculated?</p>
<pre><code>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
</code></pre>
<p dir="auto">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.</p>
<p dir="auto">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?</p>
<p dir="auto">Any help will be hugely appreciated.</p>
<p dir="auto">Thank you in advance!</p>
]]></description><link>https://forum.mysensors.org/topic/6629/mq-sensor-curve</link><generator>RSS for Node</generator><lastBuildDate>Mon, 17 Aug 2026 07:11:48 GMT</lastBuildDate><atom:link href="https://forum.mysensors.org/topic/6629.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 10 Apr 2017 15:30:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to MQ Sensor Curve on Mon, 10 Apr 2017 17:39:09 GMT]]></title><description><![CDATA[<p dir="auto">My guess is that the supplier got the data from manufacturer and made the sample sketch, so hopefully they knew it better</p>
]]></description><link>https://forum.mysensors.org/post/64371</link><guid isPermaLink="true">https://forum.mysensors.org/post/64371</guid><dc:creator><![CDATA[gohan]]></dc:creator><pubDate>Mon, 10 Apr 2017 17:39:09 GMT</pubDate></item></channel></rss>