DIYGadgets

Build | Fix | Re-use

DIY WiFi Smoke Detector

Check out this cool instructable by Proto G the DIY Wifi Smoke Detector. This is a simple WiFI Smoke Detector that sends text messages when it senses smoke.

 

 

Step 1: What You Will Need

1. Particle Photon

2. MQ2 sensor

3. Piezo buzzer

4. Prototyping Board

5. 5V USB battery or usb wall charger

6. IFTTT(If This Then That) account for texting, calling, emailing, controlling outlets.

 

Step 2: Assembly and Soldering

After you decide where you want your components, mark out an outline with a marker and cut out the excess board. Solder each component to the Photon as follows:

Solder the negative lead of the piezo speaker to the ground of the photon and the positive lead to digital pin 0.

Solder the negative lead of the MQ2 sensor to ground and the positive lead to Vin. The reason for connecting it to Vin and not 3.3V is because the sensor needs at least 5v. Make sure your power supply is at least 5v and no more than the specified max voltage on your sensors datasheet. Solder the lead labelled A0 of the MQ2 sensor to analog pin 0. Note that there is a D0 pin on the MQ2 breakout board but it is not needed to function properly.

 

Step 3: Upload The Code

One of my favorite features of the Photon is the ability to wirelessly upload your code to the Photon via wifi. Copy the code from the provided text file and paste it at build.particle.io

Click the device you want to upload to and click flash. I have also included the chunk of code that allows you to continue using the Particle mobile application so you can get real time reads from your devices analog pins and it also allows you to write to your digital pins.

Smoke_Detector.txt

 

Step 4: Setup With IFTTT

Once you setup your IFTTT account, you will need to go through and activate the channels that you want to use.

Use the SMS channel for texting.

Use the Phone Call channel for calls.

Use the Email or Gmail channel for emails.

Use the WeMo channel to control outlets.

I use the Gmail channel to text because there is a limit to SMS text messages on IFTTT but there is not a limit on emails so I found a little work around. To text via email, find out what format your cell provider uses. Here are some common providers and their format:

Alltel: phonenumber@message.alltel.com

AT&T: phonenumber@txt.att.net

T-Mobile: phonenumber@tmomail.net

Virgin Mobile: phonenumber@vmobl.com

Sprint: phonenumber@messaging.sprintpcs.com

Verizon: phonenumber@vtext.com

Nextel: phonenumber@messaging.nextel.com

US Cellular: phonenumber@mms.uscc.net

You can have IFTTT monitor a variable on your device and trigger a channel when it surpasses a certain value but I have found it more reliable for the device to publish an event instead. That way, all of the logic is handled at the device end and IFTTT just has to see if an event has been published.

 

Step 5: All Done

Leave a Reply