together (see Figure 4). The A
and B pins are driven by a
common voltage (VCC). A
picture of this sensor and a
general circuit of the MQ
sensor is shown in Figure 5.
The schematic shows a
resistor network for the
sensor (RS) in series with the
load (RL) to ground. The gas
sensor output voltage is VRL
— the voltage across RL. From
the schematic (using the
Kirchhoff voltage law), it can
be shown that:
All of our MQ sensor breakout boards incorporate RL
as a settable potentiometer and +5V as VCC. It should be
no surprise with a lower RL there is a lower VRL value,
resulting in less resolution in measurement. Likewise, the
higher the VRL value, the greater resolution we have for
similar concentrations of gas.
There is a notable exception to the heating scheme
with the MQ- 7 CO. It requires a two-cycle VCC heater
voltage: first, applying +5V to purge the sensor for 60
seconds; and then +1.4V for 90 seconds to perform
before measurement. Fortunately, the Parallax breakout
board has an on/off transistor that allows for the heater
voltage to be changed using Pulse Width Modulation
(PWM). More on this later.
Let’s examine a typical MQ spec. The manufacturer’s
spec sheet for all MQ sensors uses a graph indicating gas
sensitivity of a sensor as a ratio of RS (sensor resistance)
to R0 versus PPM (refer again to Figure 5).
This RS/R0 ratio is a
linear relationship across
different gas concentrations
when using a log scale for
RS/R0 versus gas PPM.
Generally, PPM is the lowest
unit of measurement, where
10,000 PPM = 1% by
Note that within the
graph there is a pure air
condition where RS/R0 =1.
This is an important
relationship in our PPM
determinations. Let’s review
the following steps to
understand the process of
1. Fix the VCC (+5V).
2. Fix and measure your RL (in pure air) for necessary
sensitivity (use manufacturer recommendations).
3. Measure corresponding VRL for pure air conditions.
4. Derive RS (pure air) using the equation shown
5. Look up the RS/R0 ratio for pure air conditions
using the MQ graph.
6. Calculate R0 using the ratio. We now have a fixed
R0 to use for PPM determination.
7. Once we’ve completed steps 1 to 5, we are in a
position to calculate PPM from VRL samples.
a. Measure VRL with our computer system.
b. Use VRL to derive RS (step 4).
c. Look up the RS/R0 ratio (step 5).
d. Calculate R0 (step 6).
e. Look up gas PPM using RS/R0.
Although steps 6 and 7 seem straightforward, they
can be cumbersome. There are a number of discrete
equations to solve, and the manufacturer’s graph can be
FIGURE 4. Generic gas sensor.
FIGURE 5. Manufacturer’s spec: RS/R0 versus PPM for MQ- 2.
August 2015 55
Vcc RS=( -1)x RL