DIY Gas Leak Detector With LinkitONE

by ssarthak598 in Circuits > Arduino

2029 Views, 32 Favorites, 0 Comments

DIY Gas Leak Detector With LinkitONE

15 8:31 pm.jpg

Want to make a simple toy to check gas leaks? Want to be notified of any gas leaks? Want to impress your friends?

Then you are at the right place!

Here i'll show you how to make a simple gas leak notifier with your LinkitONE!

What Do You Need?

IMG_0836.JPG

1 . LinkitONE board

2. A gas stove

3. Breadboard

5. LinkitONE GSM antena

6. Battery pack

7. Relay module

8. Gas sensor (MQ5)

Hacking the Gas Stove!

15 8:27 pm.jpg
15 8:27 pm.jpg
15 8:27 pm.jpg
15 8:27 pm.jpg

Now we'll hack into the gas stove. Search for a location where gas could leak in case of an accident, it could be a pipe connection, near the stove mesh, near a valve, or a gas meter.

We'll fix the fire sensor there to sense some fire and gas leaks!

Connecting the Sensor

IMG_0838.JPG
IMG_0839.JPG
FEL57F1IHDAZB70.jpeg

Now connect your sensor to the board. Do it tightly so that it doesnot comes out.

Setting Up GSM and SIM Card

IMG_1034[1].JPG
IMG_1031[1].JPG
IMG_1035[1].JPG

Set up the GSM and SIM card by inserting it into the card slot. Attach the WiFi antenna as well.

Writing Some Code

The code is really simple here!

We're just taking soem analog readings from sensor, and processing them and then sending SMS.

CODE:

------------------------------

#include<LGSM.h>

char Num[20]="xxxxxxxxxx";

void setup() {

Serial.begin(9600); pinMode(8,INPUT);

}

void loop()

{

int re=digitalRead(9);

if(re==1) {

char text[200]="Someone At Door!";

sms.beginSMS(Num);

sms.println(text);

sms.endSMS();

}

delay(100000);

}

------------------------

Now burn this code and then lets start playing!

Testing It Out!

IMG_1033[1].PNG
15 8:31 pm.jpg

Now burn the code into your arduino!

open serial monitor and see. You'll be able to see Hello world printed on your screen after every 1 second. You can increase the delay by changing the values of delay function.

Congrats! you've made your first serial communication arduino sketch!

Final Touches!

15 8:31 pm.jpg
15 8:31 pm.jpg

You can hide it under your gas stove so that it doesnot look dirty!

Be careful, as its not resistive to water so make a waterproof mesh.