Smartphone Garage Door Opener – Internet of Things
This project was inspired by a post I saw at Make magazine (post here). The simplicity of it sucked me in and I was pumped to get back into experimenting with electrical components like I’d done when I was little. This project was also quite selfish, as I spend lots of time running up and down the flights of stairs to the garage only to find I’d forgotten the opener upstairs. This was a really fun project for an evening with some wine and is also really practical.
Two Channel Relay – $6.79 – http://www.amazon.com/gp/product/B00E…
Jumper Wires – $5.71 – http://www.amazon.com/gp/product/B008…
Project Enclosure – $5.29 – http://www.amazon.com/gp/product/B000…
22AWG Wire – $0 – Already had on hand
Velcro – $0 – Already had on hand
Double stick Tape – $0 – Already had on hand
5V 1A Wall Wort – $8.95 – http://www.amazon.com/gp/product/B00N…
USB cable – (included in my Photon kit) – Upgraded to longer one during install – $9.99 – http://www.amazon.com/gp/product/B00J…
Mini Breadboard – (Included in the jumper wire pack)
– Wire strippers and cutter
– Small flathead and phillips screwdriver
– Power drill (for cutting holes in enclosure)
– File to shape enclosure hole
Tips and points of clarification:
– The breadboard that comes with the Photon is great, but too big for the enclosure I bought. I used the small one that came with the jumper wires I ordered.
– Pin configuration – D0 to IN1, D3 to IN2, 3v3 to ACC, GND to GND
– When you activate the Particle, navigate to https://build.particle.io/ to start coding. Part of the button creation process in Blynk creates an authorization token that you need to plug into the code block to get the function to work. Add it in the snippet char auth = “xxxxxxxxxxxxxxxxxxxxx”;
– Originally I didn’t include anything in the code to control the D3-IN2 pin on the relay. The code I got from Make magazine didn’t include it. For some reason, it did not work until I added the line about D3 output. The updated snippet is below:
The full code for this project is:
// This #include statement was automatically added by the Particle IDE.
char auth = “xxxxxxxxxAPI Token Key xxxxxxxxxxxxx”;
– After installation, I thought I was having some buggy issues with my wifi because pressing the button didn’t do anything. I came to find out that everything is fine, I just needed to press the button for about one second before letting go and it seems to have fixed any issues.
– The usb cord that comes with the Photon kit is pretty short, so I ordered a 15 foot version so I could run it to the closet outlet and hide the cord a bit.