In this project, we learn how to interface MQ5 Gas sensor (which is a generic Gas Sensor more suited to detect and determine LPG concentrations) with Arduino.
- Arduino Uno with USB Cable – 1
- Breadboard 400 points – 1
- MQ-5 Gas Sensor – 1
- 9v Battery
- DC jack – 1
- Jumper Wires(Male to Male) – 40 pcs.
The module has two output possibilities – an analog out (A0) and a digital out (D0). The analog out can be used to detect Gas leakage and to measure volume of Gas leakage (by doing proper calculation of the sensor output inside the program) in specific units (say ppm). The digital out gives only two possible outputs – High and Low (hence it’s more suited for detection of gas leak than to measure volume of gas presence).
HARDWARE REQUIRED
- Arduino Uno with USB Cable – 1
- Breadboard 400 points – 1
- MQ-5 Gas Sensor – 1
- 9v Battery
- DC jack – 1
- Jumper Wires(Male to Male) – 40 pcs
SOFTWARE REQUIRED
Arduino IDE 1.8.5 (programmable platform for Arduino)
Click To Download: https://www.arduino.cc/en/Main/Software
SPECIFICATIONS
The Gas Sensor (MQ5) module is useful for gas leakage detection (in home and industry). It is suitable for detecting H2, LPG, CH4, CO, Alcohol. 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.
- Supply Voltage: 5V
- Detecting concentration :200-10000ppm LPG,LNG,Natural gas,Iso-butane
- Analog and Digital Output
- Digital Out is High or Low based on a adjustable preset threshold.
PIN DESCRIPTION
MQ-5 Gas Sensor Module
CIRCUIT CONNECTION
CODE
For calibration with a known concentration, you can use the following code. Use this code in clean air (no gasses).
Upload this code to get the value of “R0” The following code can be used to calculate ppm values. The R0 value found by the next code should be put into the R0 variable in the second code.
After getting the value of “R0” put in the next code.