The MQ-6 gas sensor measures concentrations of liquefied petroleum gas (LPG). LPG is composed mostly of propane and butane. The MQ-6 can measure concentrations ranging from 200 to 10000 ppm.

See link at http://www.savvymicrocontrollersolutions.com/index.php?sensor=mq-gas-sensors for general information about the MQ line of gas sensors and how to make connections to them.

LPG may cause asphyxia at concentrations well above the lower explosive limit (LEL) of approximately 19000 ppm, therefore the LEL should be the threshold monitored.

LPG IDLH is 2000 ppm (LEL). The LEL for propane is 2.1%.

LPG IDLH is 1900 ppm (LEL). The LEL for butane is 1.9%.

LPG may cause asphyxia at concentrations of 19000 ppm.

Given a target sensing threshold of 1900 ppm, this corresponds to a an Rs/Ro of 0.78 at 20 C and 65% RH. The Rs/Ro varies from 0.8 (very cold, low humidity) to 1.3 (very hot & humid). This corresponds to a wide range of concentration from 1700 (Rs/Ro 0.8) to 800 ppm (Rs/Ro 1.3). Therefore it is critical to account for temperature and humidity in order to achieve accurate detection.

My circuit utilizes a temperature and humidity sensor in order to provide data to permit correction of the measured output from the sensor to the standard conditions (20C 65% RH) reported by the datasheet for the relationship to concentrations of LPG. A buzzer and red LED provide warning when the threshold of 2000 ppm is exceeded.

If no ground, then B1 to GDD = 5.0V. With ground connection and in clean air, reading (B1 to GND) is approximately 4500 mV initially, then dropping over time (after burn-in) to 2300. The load resistor = 20 k ohms.

The output from the sensor is a measured voltage, Vo. A load resistor RL (10 to 60 k ohms) is in series with a protection resistor (10 k ohms). We will use a load resistor of 20 k ohms. The sensor's resistance Rs and the load resistor RL form a voltage divider. The sensor output voltage is therefore related to the voltage divider rule:

Vo = RL * Vc / (Rs + RL)

Vo = output voltage

Vc = input voltage (5.0 V)

Solving for Rs:

Rs = (Vc - Vo) * (RL / Vo)

The best way to calibrate the device is to take a measurement in an environment with a known concentration (ppm) of LPG. The alternative is to calibrate it in clean air (no LPG present). To calibrate the sensor in clean air, measure the sensor output and then calculate the Ro value:

Ro = Rs / Ro_clean_air_factor

where Ro_clean_air_factor = 10000 ohms.

Using Rs from the voltage divider equation:

Rs = ((Vc - Vo) * RL) / Vo

Rs = sensor resistance

RL = load resistor value in ohms (20 k)

Vc is the supply voltage, 5.0 V

Vo is the output voltage measured from the sensor

Substituting Rs above into the first equation and solve:

Ro = Rs / Ro_clean_air_factor

Ro = [((Vc - Vo) * RL / Vo ]/ Ro_clean_air_factor)

Ro = [(Vc - Vo) * RL ] / (Vo * Ro_clean_air_factor)

Note that from the datasheet, at a very low concentration of 200 ppm, Rs/Ro = 2.0 @ 20 C and 65% RH (RL = 20 k ohm). Lower Rs/Ro values correspond to higher concentrations of LPG.

With a calibrated value for Ro, you may now take readings of the air, calculate the value Rs from the Vo measurement, and then compare the ratio Rs/Ro to the table from the datasheet to get the LPG concentration in ppm.

Rs = (Vc - Vo) * (RL / Vo)

The data sheet provides a graph for LPG concentration in ppm versus Rs/Ro for the condition of 20 C and 65% RH. If you fit a curve to the values provided, you find that:

Rs/Ro = 18.446 * (LPG ppm) ^ -0.421

To solve for LPG concentration, you use natural logs. Then:

LPG ppm = [(Rs/Ro)/18.446]^(1/-0.421)

You can use the above equation to determine the LPG concentration from a provided Rs/Ro measured value at 20 C and 65% RH. If your measured Rs/Ro value is outside of 20 C and 65% RH, then you need to adjust your measured values to those standard conditions.

The datasheet also provides Rs/Ro for various temperatures and two relative humidity values of 33% and 85%. If you plot the values in the curves and fit a curve to them, you can derive an equation to predict the Rs/Ro values at 33% RH and 85% RH for a specified temperature.

Rs/Ro @ 33% RH = -3.21E-6*x^3 + 3.15E-4*x^2 - 1.29E02 * x + 1.16E0

Rs/Ro @ 85% RH = -3.58E-6*x^3 + 2.98E-4*x^2 - 1.02E-2 * x + 9.64E-1

If you interpolate between the two RH values (33% & 85%), you can determine the Rs/Ro value at 20C and 65% RH.