Sparkcore Smart Garage
2016-08-10 | By James Wolf
License: None Arduino
Make your own smart garage door based on a Sparkcore board with OLED display, an LCC120 digital relay, a 3D-printed casing, and a smartphone (Pebble Smartwatch) for remote access.
I had previously built an IOT garage door opener with Arduino and the CC3000 shield, but had issues with finding a reliable connection. I decided to upgrade the idea with my favorite new IOT device, the Sparkcore, which abstracts away the whole task of connection maintenance and allows you to focus on the code. The I2C OLED shows the status of the door and the LCC120 relay emulates the garage door button being pressed. The power for the device comes from a USB power supply (from a phone) that I have plugged into the wall. I switched the normal cyan breathing on the RGB LED to be an ultra dim green to show that it’s connected.
A good-old Reed Sensor allows the Sparkcore to know whether the door is open or closed. It is wired from the 3.3V line to an analog input pin which is said to be a digital input (1 or 0 means open or closed). I used a simple proto-board for the Sparkcore that had spots to connect the OLED, Reed Sensor, and the digital relay. Applying power to 2 pins on the relay connects the 2 pins that are attached to the garage door button. The other 2 screw terminals are used to attach the Reed Switch to the A0 pin.
To operate the door remotely and check on its status, I use my Pebble Steel smartwatch. I wrote a quick application in javascript that allows me to query the status of the door (using the RESTful services of the Sparkcore). Because the Pebble can run Javascript applications it can easily make AJAX requests when buttons are pressed.
A Pebble Smartwatch is not really a requirement for this project. You can execute the “door open” command using a web application just as easily. The RESTful interface means that any device or application capable of HTTP request can operate the garage door.
3D-Printed Housing
The first part is the main case that holds the circuit, the OLED, and the Sparkcore. The PCB slides in and locks in place with the USB port pointing down. The screen then mounts on top of that. The front panel slides its tabs under the section that holds the OLED and locks it in place.
Download: Sparkcore code, Pebble Smartwatch code and Housing files.
Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.
Visit TechForum