# Gas Sensors MQ Series Principle

**URL:** <https://forum.arduino.cc/t/gas-sensors-mq-series-principle/400772>\
**Category:** Sensors\
**Created:** [August 3, 2016, 7:46am UTC](https://forum.arduino.cc/t/gas-sensors-mq-series-principle/400772 "2016-08-03T07:46:49Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![natong](https://avatars.discourse-cdn.com/v4/letter/n/b5a626/32.png) [@natong](https://forum.arduino.cc/u/natong)\
**Post date:** [August 3, 2016, 7:46am UTC](https://forum.arduino.cc/t/gas-sensors-mq-series-principle/400772/1 "2016-08-03T07:46:49Z")

</div>

![Diagram.png](https://europe1.discourse-cdn.com/arduino/original/4X/6/c/1/6c1a2ce93a977efcac4ce7bff30ab345549d6b36.png)

The virgin sensor require to run for 24 hours (the 1st time initialization).  
The heater require 5V 800mW (160mA) which is a bit hot while working.

 ![RS.png](https://europe1.discourse-cdn.com/arduino/original/4X/8/1/d/81d8bb85d13ee0927b240ff99047928ce1870b22.png)

**Updated:** ~~The MQ-2 sensor resistance (RS) will vary between 3 - 30 kohm while measuring gas.~~ I don't known what it mean. Normally when measuring the clean air, the MQ-2 sensor resistance (RS) just only 10 kohm and reduce when found the gases. Look at the graph (post #4), if RO is fixed, the RS should be lowest to 0.3 kohm. The prefered range should be 0.3 to 10 kohm.

The MQ-2 sensor resistance will working as the Voltage Dividers.

![003 Voltage-Divider.png](https://europe1.discourse-cdn.com/arduino/original/4X/e/2/9/e29a8ebfd584e91fb3ce4485a62d374b84e9b93a.png)

---

<div class="post-metadata">

**Author:** ![natong](https://avatars.discourse-cdn.com/v4/letter/n/b5a626/32.png) [@natong](https://forum.arduino.cc/u/natong)\
**Post date:** [August 3, 2016, 8:02am UTC](https://forum.arduino.cc/t/gas-sensors-mq-series-principle/400772/2 "2016-08-03T08:02:22Z")

</div>

RS while measuring gas can find from VOUT and the fixed RL.  
The best RL value for the entire sensitivity range can find from the equation below:

 ![004 RL.png](https://europe1.discourse-cdn.com/arduino/original/4X/a/f/e/afe2986e826d6ad74c46df2db2db764f562ec3c4.png)

---

<div class="post-metadata">

**Author:** ![natong](https://avatars.discourse-cdn.com/v4/letter/n/b5a626/32.png) [@natong](https://forum.arduino.cc/u/natong)\
**Post date:** [August 3, 2016, 8:17am UTC](https://forum.arduino.cc/t/gas-sensors-mq-series-principle/400772/3 "2016-08-03T08:17:56Z")

</div>

**Updated:** If we choose RS (min) = 0.5 kohm and RS (max) = 10 kohm, the best RL will be 2.2 kohm.

![snap0947.png](https://europe1.discourse-cdn.com/arduino/original/4X/f/f/a/ffaf421e523f25defdcad25fa76ce2cb53944fa2.png)

These are the RL calculation from the RS max & min range:

RS (min) = 0.5 kohm  
RS (max) = 10 kohm

 ![snap0948.png](https://europe1.discourse-cdn.com/arduino/original/4X/2/1/6/21689a9e74237e1298e4f5e40ada30700b065cf2.png)

The best RL value should be 2.2 kohm which give the analog VOUT 649 scales/spreads. It is the highest resolution.

![006 Voltage-Divider-2K2-184.png](https://europe1.discourse-cdn.com/arduino/original/4X/1/0/7/1072a384e2d369dc88efb3c73e487ab1871b2810.png)

![007 Voltage-Divider-2K2-833.png](https://europe1.discourse-cdn.com/arduino/original/4X/8/c/b/8cbd5041c0fae551662be736af05209c480271c2.png)

---

<div class="post-metadata">

**Author:** ![natong](https://avatars.discourse-cdn.com/v4/letter/n/b5a626/32.png) [@natong](https://forum.arduino.cc/u/natong)\
**Post date:** [August 3, 2016, 8:23am UTC](https://forum.arduino.cc/t/gas-sensors-mq-series-principle/400772/4 "2016-08-03T08:23:41Z")

</div>

(Reserved)

---

<div class="post-metadata">

**Author:** ![natong](https://avatars.discourse-cdn.com/v4/letter/n/b5a626/32.png) [@natong](https://forum.arduino.cc/u/natong)\
**Post date:** [August 3, 2016, 8:48am UTC](https://forum.arduino.cc/t/gas-sensors-mq-series-principle/400772/5 "2016-08-03T08:48:21Z")

</div>

To calibration, we need to find the RO value while measuring the clean air.  
Since we known the ratio of the clean air from the graph is 9.83, then we can calculate RO from the equation below:

![008 RO.png](https://europe1.discourse-cdn.com/arduino/original/4X/a/d/1/ad164884f2303ebc8ee3997b886860921f031608.png)

Now we can find the concentrations (ppm) of any gas from the graph from RS/RO ratio.

 ![009.png](https://europe1.discourse-cdn.com/arduino/original/4X/f/2/2/f223536bbe93d30cafedbc02b2d56deada1965b2.png)

---

<div class="post-metadata">

**Author:** ![natong](https://avatars.discourse-cdn.com/v4/letter/n/b5a626/32.png) [@natong](https://forum.arduino.cc/u/natong)\
**Post date:** [August 3, 2016, 9:02am UTC](https://forum.arduino.cc/t/gas-sensors-mq-series-principle/400772/6 "2016-08-03T09:02:29Z")

</div>

The FC-22 Gas Sensor Module use RL = 1 kohm.  
These module will give 589 spreads.  
The module also power down the heater by connected the resistor 5.1 ohm.

![010 FC-22 MQ Series Gas Sensor Module Schematic.png](https://europe1.discourse-cdn.com/arduino/original/4X/a/2/f/a2f14859a7582b24d83a4c7671fefd71248cf063.png)

 ![011 FC-22 RL.png](https://europe1.discourse-cdn.com/arduino/original/4X/e/1/8/e18967465374b87d4d4c73eba095864010b310da.png)

![012 Voltage-Divider-1K-93.png](https://europe1.discourse-cdn.com/arduino/original/4X/b/3/2/b32138aa5dfbf45cb552b541e558f005171525db.png)

![013 Voltage-Divider-1K-682.png](https://europe1.discourse-cdn.com/arduino/original/4X/c/6/1/c61cdf23323e131d561fb6c127fba974976fc000.png)

PS: Some modules use RL = 5 kohm which give 589 spreads too.

---

<div class="post-metadata">

**Author:** ![natong](https://avatars.discourse-cdn.com/v4/letter/n/b5a626/32.png) [@natong](https://forum.arduino.cc/u/natong)\
**Post date:** [August 3, 2016, 9:39am UTC](https://forum.arduino.cc/t/gas-sensors-mq-series-principle/400772/7 "2016-08-03T09:39:25Z")

</div>

```cpp
const int MQ_PIN = A5;
const float RL = 1.0;    // kohm (FC-22 module = 1.0 kohm)
const float CLEAN_AIR_RATIO = 9.83;    // Taken from datasheet graph
float RS;    // kohm   
float RO;    // kohm
int ADC;    // 0 to 1023
  
ADC = analogRead(MQ_PIN);
RS = ( (float) RL * (1023 - ADC) / ADC );

RO = RS / CLEAN_AIR_RATIO;    // Do only once while measuring clean air.

```

---

<div class="post-metadata">

**Author:** ![Sijuro](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@Sijuro](https://forum.arduino.cc/u/Sijuro)\
**Post date:** [April 23, 2020, 5:20pm UTC](https://forum.arduino.cc/t/gas-sensors-mq-series-principle/400772/8 "2020-04-23T17:20:08Z")

</div>

Hello natong,

The Rs/Ro ratio of this kind of sensors are measured in a static value of RL, so i thought that Rs/Ro ratio change if you change RL. For example, i'm using MQ-7, and in datasheet show that the Rs/Ro ratio is for a RL value of 10k, and in my case, i'm using FC-22 too and i'm a little confused.

Kind regards.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 6, 2021, 10:14am UTC](https://forum.arduino.cc/t/gas-sensors-mq-series-principle/400772/9 "2021-05-06T10:14:24Z")

</div>

Closed on May 6, 2021, 10:14am UTC


