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 the Internet of Things.

Requirements

  • An Intel Edison board
  • Power supply
  • Grove Base Shield
  • Grove MQ5 Gas Sensor
  • USB cables
  • Jumper Cables

MQ5 Gas Sensor

 

image001

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.

 

image002

Features of MQ5 Sensor

  • Wide detecting scope
  • Stable and long life
  • Fast response and High sensitivity

Connections

  • 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.

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. }

 

 

 

 

image003OK

The voltage read from the sensor is displayed. This value can be used as a threshold to detect any increase/decrease in gas concentration.

image004

Note: Best preheat time for the sensor is above 24 hours.

Leave a comment

Your email address will not be published. Required fields are marked *