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.


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

MQ5 Gas Sensor


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





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 *