Introduction
The new IoT board LinkIt ONE co-designed by Mediatek and Seed Studios is an open-source, high-performance board for prototyping Wearables and IoT devices. It is a small board based on SoC that comes with onboard Wi-Fi, GSM, and GPRS that makes it a powerful board for connected devices. The pin layout of the board is exactly similar to Arduino, making the development easy with many Arduino compatible shields and sensors. It comes at an affordable price of $ 59, you can get it from here.
For setting up the development environment and getting familiar with LinkIt one, I highly recommend you to go through the previous articles of the series.
- Pointing the Spotlight on LinkIt ONE
- Getting Started with LinkItOne
- Getting Familiar with Arduino IDE: LinkItOne
- Hello World With LinkIt One
- Grove Starter Kit With LinkIt One
- Speed Detection With LinkIt One
- alcohol Detection Using Linkit One
In India, many accidents happen every year due to domestic gas leakage. LPG is a need of every household but it should be used carefully. Let us create a Gas Leakage detection system with LinkIt One and MQ5 Sensor. This system will help you to upgrade your safety standards and prevent accidents by detecting any gas leakage in your home. We will place a buzzer in the circuit if the system detects any gas leakage it will alert us by playing the buzzer or even you can go one step further by adding mobile notifications on detection. LinkIt One has onboard GSM which will help us in sending SMS too, that we will see in upcoming parts.
Requirements

Figure 1: Equipment
- LinkIt One board
- Grove MQ5 sensor
- Buzzer
- Jumper cables
- USB cable
The sensor I am using in this article is the MQ5 sensor from Seeed Studios. It has a Grove interfacing which means you need not to do breadboarding or any soldering as it is a complete module.
Grove MQ5 Sensor
The Grove Gas Sensor (MQ5) module is useful for gas leakage detection in homes and industries. This sensor is suitable for detecting a wide range of gases including H2, LPG, CH4, CO, Alcohol. It provides high sensitivity and fast response time and has a potentiometer to adjust the sensitivity. The output voltage from the Gas sensor increases when the concentration of gas increases.
Features of Grove MQ5 Sensor

Figure 2: Gas Sensor

Figure 3: Gas Sensor Board
- High sensitivity to LPG, natural gas, town gas
- Small sensitivity to alcohol, smoke.
- Fast response
- Stable and long life
- Simple drive circuit
Connections
- Connect LinkIt One to your computer using a USB A to micro B cable.
- Connect the MQ5 sensor into the A0 port of Grove Base Shield.
- In the Arduino IDE, go to the Tools pull-down menu at the top, select Board, and make sure “LinkIt One” is checked.
- Then pull down the Tools menu again, and select appropriate Serial Port.
- Connect the Buzzer to the D2 port of Grove Base Shield.
If you have multiple serial ports to choose from and aren’t sure which to choose, try unplugging the board from your computer and plugging the board back again to see which port gets added.
Code
- int buzzer = 2;
- int sensor = A0;
- // The setup routine runs once when you press reset
- void setup()
- {
- pinMode(buzzer, OUTPUT); // Initialize the digital pin2 as buzzer output
- Serial.begin(9600); // Initialize serial communication at 9600 bits per second
- }
- // The loop routine runs over and over again forever
- void loop()
- {
- var sensorValue = analogRead(sensor); // Read the input on analog pin 0 ('sensor')
- Serial.println(sensorValue); // Print out the value on serial monitor
- if (sensorValue > 200)
- {
- // If sensorValue is greater than 200
- digitalWrite(buzzer, HIGH);
- }
- else
- {
- digitalWrite(buzzer, LOW);
- }
- }

Figure 4: Running the system

Munish APosted Apr 8, 2018, 2:38 AM
Great article, keep sharing.......
Shekhar PanwarPosted Feb 13, 2017, 2:07 AM
Cool IOT i am impressed where we can these type of stuff..
Sr KarthigaPosted Jan 14, 2016, 8:21 PM
good one
Sibeesh VenuPosted Dec 31, 2015, 3:24 AM
Again a great article. Where do you buy all these stuffs? I think I must try some IoT :).
Santhakumar MunuswamyPosted Dec 30, 2015, 3:08 PM
Thanks for nice article
Afzaal Ahmad ZeeshanPosted Dec 30, 2015, 1:45 PM
You should write your own guide for "Project SafeHouse" :D
Kiranteja JallepalliPosted Dec 30, 2015, 1:36 PM
very nice article
Ankur MistryPosted Dec 30, 2015, 1:06 PM
Nice share, from where i can get this stuff
Rupesh KahanePosted Dec 30, 2015, 12:46 PM
very great stuff...