Introduction

Gas leakage can become a disaster for any family. In India where cooking gas is made available in Steel Canisters this type of mishaps can happen. To solve this problem, we can make a Gas Leakage detection monitor with Intel Edison. This project is easy and we will use only a simple MQ5 sensor. So let’s see how we can make a Gas Leakage Detection Monitor with Internet of Things.
Requirements
MQ5 Gas Sensor
Sensor
The Grove - Gas Sensor(MQ5) module is useful for gas leakage detecting (in home and industry). It can detect LPG, natural gas, town gas and so on based on its fast response time, measurements can be taken as soon as possible. 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 provided.
potentiometer
Features of MQ5 Sensor
Connections
MQ5 is an Analog output sensor. This needs to be connected to any one Analog socket in Base Shield. I have connected it to A0 pin of the base shield. It is also possible to connect the Grove module to Edison directly by using jumper wires by using the connection. The output voltage from the Gas sensor increases when the concentration of gas increases. Sensitivity can be adjusted by varying the potentiometer. Please note that the best preheat time for the sensor is above 24 hours.
Code:
  1. void setup() {
  2. Serial.begin(9600);
  3. }
  4. void loop() {
  5. float sensor_volt;
  6. float sensorValue;
  7. sensorValue = analogRead(A0);
  8. sensor_volt = sensorValue/1024*5.0;
  9. Serial.print("sensor_volt = ");
  10. Serial.print(sensor_volt);
  11. Serial.println("V");
  12. delay(1000);
  13. }
gasdetection
The voltage read from the sensor is displayed. This value can be used as a threshold to detect any increase/decrease in gas concentration.
sensor
Note: Best preheat time for the sensor is above 24 hours.
Read more articles on the Internet of Things (IoT):