This tutorial will teach you how to build a $10 no soldering required, microUSB powered version of the IFTTT Smart Button first posted by Noel Portugal. You won’t have to code anything, and you won’t have to solder or buy breadboards/breakout boards, etc. Any services you are asked to use will be 100% free. Its that easy. A fuller tutorial with more detailed instructions can be found at SimpleIOThings.com, but most Hacksters will probably be cool with this tutorial. Lets get started!
Sometimes you just need to communicate with the push of a button. What if I told you it was possible for about 10 bucks? With a wifi connected smart button you could:
– Excuse yourself from a conversation by sending a text or phone call to your own phone.
– Quickly call store/business security for help.
– Invite a reliable friend to come over and watch Netflix with you.
Whatever your particular snap communication need is, a wifi enabled smart button can help you send a smartphone notification, SMS, email, and even an automated phone call at the press of a button.
STEP 1: Gather Your Materials
Its a good idea to buy your parts first because on the sites where the merchandise is cheapest (Ebay or Aliexpress) shipping times are rather lengthy. Depending on where you live in the world, it might take some time for your components to reach you so its better to do this sooner in the process than later. A full list of things you need to buy and some suggested tools can be found in the components section of this tutorial.
NOTE: Hackster keeps changing the link in components to the Sparkfun ESP8266. This project requires the development board, not the standalone chip. You should follow the link to the dev board here or find one on the web. You can also visit the SimpleIOThings DIY Project Parts Page for a list of components.
STEP 2: Setup Your IFTTT Account & Recipes
The Wifi Smart Button, and all of the devices on SimpleIOThings, uses a service called If This Then That (IFTTT). You can find a full tutorial on how to sign up and configure digital communications for your IoT devices in the Getting Started: Setup IFTTT post. Once you completed it, you should have completed the following:
- Signed up for an IFTTT account
- Downloaded the IFTTT App
- Connected to the Maker Channel
- Recorded your Maker Key
- Organized Maker Events (Triggers) that lead to IFTTT Actions.
Okay! We’ve got some really nifty digital infrastructure setup for your project. Soooooo…its gonna take a while before you get all this stuff…so its probably best to bookmark this page and come back after it’s all arrived. See you in a few weeks!
STEP 3: Install Firmware to your Dev Board
Oh hi there! Welcome back. I know its been a while. Maybe the seasons changed in your part of the world. Governments may have risen, switched hands, entered alliances, broken alliances, fallen, and then risen again. Yea…it takes a while to get your stuff. But now that it’s here, lets start building!
You can find a full tutorial on how to load firmware onto your ESP8266 Development Board on the Getting Started: Setup ESP8266 Dev Board post. After you’re done with this tutorial you should have completed the following.
- Connect your ESP8266 Dev Board and Install Drivers
- Load Firmware onto Dev Board using ESP8266Flasher.exe.
- Connect to Dev Board using LuaLoader.
STEP 4: Install Sensor Specific Software to your Dev Board
Great! Now your dev board speaks Lua and its ready to start communicating with the world and run programs. Now it just needs specific instructions or programs to be useful for your specific use case. Lucky for you, I’ve already written the programs needed to get your device up and running. Full instructions on how to program your device with specific settings for your use case can be found on the Getting Started: Loading Device Software Via LuaLoader tutorial page. In this tutorial you should have completed the following:
- Downloaded SimpleIOThings.zip from the Downloads page.
- Extracted the zip file and run the SensorSetup.bat file.
- Input your information into the command prompt to enter user and device specific information (IFTTT Maker Key, the Maker Event name, the device’s location info, etc).
- Enter input thresholds, input timeouts, and interval between notifications as prompted.
- Uploaded device specific files to your ESP8266 Development Board using LuaLoader.
- Set the Wifi Network Name and Password for your ESP8266 Development Board.
STEP 5: Modding Your Enclosure
All the way back in step 1, we talked about gathering materials. Now that you have everything in hand and your board is programmed, get all your materials together in one space.
Some suggestions on how to mod your enclosure can be found here at Getting Started (5): Modding Your Enclosure. After completing this tutorial you should have completed the following:
- Created an opening in the rear of the enclosure for the microusb power cable.
- Created an opening in the front of the enclosure for the button wires.
STEP 6: Build the Button
Now go ahead and unplug your dev board (there is almost no electrical danger to you from touching the dev board while plugged in, but might as well err on the side of safety).
Now, grab the button that you bought, and bend two of the prongs on one side until they snap off. You’ll only need 2 prongs, and the other two will just get in the way. Here’s a picture of what it looks like after you’ve snapped off one of the prongs.
After that, flatten out the remaining prongs (bend them flush to the bottom of the button), and then go ahead and grab your two jumper wires and plug them into the remaining prongs. If they wires aren’t grabbing onto the prongs well, increase the amount of “kink” in the prongs with a set of pliers. Finally put the cap on the button. In the end it should look like this:
Now grab your dev board, and observe the names of the pins on the board. Go ahead and plug your jumper wires into the “GND” and “D2” pins on the right hand side. It should look like this:
Just a quick note for those of you who are interested in the electronics. When setup this way the button, when pressed, is acting as a bridge between the D2 pin and the electric ground (-). That way when the button is pressed, it grounds the D2 pin, registering a change in electrical signal which the chip detects as a sensor input. Pretty cool! Great, the electronics are all setup. Pretty simple right?
Alright, now you can put your electronics into the enclosure. Plug your usb cable into the dev board, and make sure your jumper wires are well positioned before you close the project box. Finally, place the button on top of the enclosure, and glue it down.
And we’re done!
Your button should now be fully operational. Give it a press and it should trigger whatever you’ve set it up to do, whether that’s a smartphone notification, SMS, phone call, email, etc.
I hope you enjoyed building a super simple Internet of Things device. Hopefully you will be able to use it for something useful, or use it to do something fun. If you enjoyed this tutorial, consider visiting SimpleIOThings.com for more projects. Follow us on Twitter (@simpleiothings) and Facebook to get notified when new posts and projects are published. Thanks for reading!
SimpleIOThings
Comments