8:20pm Fri. 11/1/2019
(1) MQ9 Learning Notes: https://penzu.com/p/93aaa16e
(2) MQ9 Calibration and Test Notes: https://penzu.com/p/f2d2f438
MQ9 Learning Notes V0.9
Question
How can Rpi read MQ9 Gas Sensor Data?
Answer
1. MQ9 module has two types of output: (a) Digital, (b) Analog
2. MQ9 digital output is Low when gas concentration is below threshold/alarm level, and High when concentration is above threshold level.
3. MQ9’s analog output voltage is in the range 0V to 5V, and varies to log scale of gas concentration.
4. MQ9’s digital and analog output can be measured manually/by hand, using a multi-meter.
5. Rpi can read MQ9 digital value High or Low, by any GPIO pin.
6. Rpi can read MQ9’s analog value by using an ADC, such as MCP3008, or ADS1115, or Arduino Nano.
7. MQ9 must be calibrated before use. (See Appendix F)



References
(1) MQ9 Gas Sensor – CO and Flamable Gases €6
(2) How to Choose GAS sensor? – theorycircuit.com
(3) Gas Detection Handbook – RikenKeiki
(4) MQ2 for Rpi (Examples using MCP3009, ADS1115, No MQ9, Level shifting to 5V, log calculations)
(5) Groove Gas Sensor MQ9 – Seeed
(6) MQ2 Gas Sensor Smoke Detector using Arduino – Saddam 2017jan10
(7) MQ135 Gas sensor based Air Pollution Monitoring using Arduino – Muhammad Aqib 2016dec10
(8) MQ137 Ammonia Gas Sensor Measuring PPM using Arduino – Aswinth Raj 2018feb09
(9) LM393 Dual Comparator Datasheet – TI
(10) SandBox Electronics MQ-2 Smoke/LPG/CO Gas Sensor Module – $9
(11) SandBox Electronics MQ-2 Smoke/LPG/CO Gas Sensor Module, Theory and Arduino Code
(12) MQ9 Gas Snesor – SeeedStudio
Appendices
Contents
Appendix A – (1) MQ9 Gas Sensor – CO and Flamable Gases €6
Appendix B – (2) How to Choose GAS sensor? – theorycircuit.com
Appendix C – (8) MQ137 Ammonia Gas Sensor Measuring PPM using Arduino – Aswinth Raj 2018feb09
Appendix D – MQ9 Schematic
Appendix E – Sensor characteristics (Rs/R0 vs ppm)
Appendix F – How to Calculate the Initial Resistance of the Sensor Named R0 and Gas Concentration
Appendix G- MQ9 Gas Sensor User Guide – SeeedStudio
Appendix A – (1) MQ9 Gas Sensor – CO and Flamable Gases €6
Description
Gas sensor MQ9 detects the presence of CO (Carbon Monoxide), CH4 (Methane) and LPG in the air. The best results are given while compounds are in liquid form, however, it still does an amazing job when measuring in gas form. It needs a bit of time to warm up in order to work correctly.
* Detects: CO (Carbon Monoxide), CH4 (Methane), LPG
* Dimensions: 32mm x 22mm x 27mm
* Voltage: 5V
* Digital (HIGH/LOW) and analog (0V-5V) output
* With LM393 comparator
* Comes with soldered 4-pin male header
Appendix B (2) How to Choose GAS sensor? – theorycircuit.com

Appendix C – (3) Gas Detection Handbook – RikenKeiki

Appendix C – (8) MQ137 Ammonia Gas Sensor Measuring PPM using Arduino – Aswinth Raj 2018feb09


Appendix D – MQ9 Schematic

Appendix E – Sensor characteristics (Rs/R0 vs ppm)

Appendix F – How to Calculate the Initial Resistance of the Sensor Named R0 and Gas Concentration
SandBox Electronics MQ-2 Smoke/LPG/CO Gas Sensor Module, Theory and Arduino Code

Overview
This sensor module utilizes an MQ-2 as the sensitive component and has a protection resistor and an adjustable resistor on board. The MQ-2 gas sensor is sensitive to LPG, i-butane, propane, methane, alcohol, Hydrogen and smoke. It could be used in gas leakage detecting equipments in family and industry. The resistance of the sensitive component changes as the concentration of the target gas changes.
Theory
The protection resistor (4.7 Kohms) and the adjustable (0-50 Kohms) are in serial which forms a load resistor RL (4.7 – 54.7Kohms).
The sensor’s resistance RS and RL forms a voltage divider. The output voltage on the signal pin could be read by Arduino or MCU via ADC.
Given a value of RL, Power Supply Voltage, and output voltage, RS could be derived.
Based on the chart provided in the MQ-2 datasheet, RS in clean air under given temperature and humidity is a constant, which is the “initial” resistance of the sensor named RO.
RO of the resistor could be derived from RS. The main job of the calibration is to calculate the RO by sampling and averaging the readings when the module is placed in the clean air.
Once the RO is derived, the concentration of target gas could be calculated by using the RS/RO ratio as the input.
To achieve more accuracy, a segmented look-up table should be used. However, in the demonstration, a linear formula is used as an approximation to the original curve.
Appendix G- MQ9 Gas Sensor User Guide – SeeedStudio
(12) MQ9 Gas Snesor – SeeedStudio
MQ9 Gas Sensor module is useful for gas leakage detection in home and industry. It is suitable for detecting LPG, CO, CH4. Due to its high sensitivity and fast response time, measurements can be taken as soon as possible. The sensitivity of the sensor can be adjusted by using the potentiometer.
Note
The sensor value only reflects the approximated trend of gas concentration in a permissible error range,
it DOES NOT represent the exact gas concentration.
The detection of certain components in the air usually requires a more precise and costly instrument, which cannot be done with a single gas sensor. If your project is aimed at obtaining the gas concentration at a very precise level, then we do not recommend this gas sensor.
4:11pm Sun. 11/3/2019
Categories: Uncategorized
