Gas Leakage Detection In Home With IoT


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.
  • An Intel Edison board
  • Power supply
  • Grove Base Shield
  • Grove MQ5 Gas Sensor
  • USB cables
  • Jumper Cables
MQ5 Gas 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.
Features of MQ5 Sensor
  • Wide detecting scope
  • Stable and long life
  • Fast response and High sensitivity
  • Connect the Edison to Power supply. Wait for 15-20 seconds.
  • Now connect it to your computer with USB cables.
  • Connect MQ5 Sensor to A0 Pin.
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.
  1. void setup() {  
  2.   Serial.begin(9600);  
  3. }  
  5. void loop() {  
  6.   float sensor_volt;   
  7.   float sensorValue;  
  9.   sensorValue = analogRead(A0);  
  10.   sensor_volt = sensorValue/1024*5.0;  
  12.   Serial.print("sensor_volt = ");  
  13.   Serial.print(sensor_volt);  
  14.   Serial.println("V");  
  15.   delay(1000);  
  16. }  
The voltage read from the sensor is displayed. This value can be used as a threshold to detect any increase/decrease in gas concentration.
Note: Best preheat time for the sensor is above 24 hours.
Read more articles on the Internet of Things (IoT):