Sunday, March 29, 2020

A Smart Garage Door

Instead of acting like a normal person and just placing a spare key outside my house for the times that I get locked out, I decided to make my garage door "smart." By that, I mean integrating it with an Arduino-controlled motor relay hooked up to a server via WiFi. I had an old Arduino Uno sitting around and decided to put it to use. All I needed to link the Arduino and my garage door together was a motor relay. A relay basically acts as a switch that can open and close a circuit when instructed to by a microcontroller or some other device. I discovered a free Internet-of-Things service for these types of projects called Blynk. The service provides pre-written Arduino code and an ecosystem for controlling the whole thing with a smartphone app. After loading up some of the sample code and hooking the relay up, I followed the simple steps for setting up the Blynk app and attempted to test my over-engineered garage door opener. With my phone connected to a network, as soon as I pressed the button in the Blynk app, I could hear the clicking sound of the relay opening and closing. Next, I found an enclosure for the Arduino and relay while also running wires from my garage door motor. After doing some cable-management and putting the wires in their correct locations, I tried opening my garage door from the app. On the first try, the door opened, but as soon as I released the virtual button the door shut immediately. In the Blynk app, I changed the button to a switch, so it could remain open without constant pressure. This change worked and marked the end of this project. I also discovered later that Blynk has its own cloud server, meaning that you don't have to be connected to your home's network to open the garage door. Theoretically, I can open my garage door from across the world, assuming I have some sort of connection. Recently, I also found out (around 2am) that when power is cut to the Arduino, it closes the relay, triggering the garage door to open. That's really the only problem with this project so far. See pictures below. 
Control UX

Relay Connected to Arduino Board

Component Enclosure

Relay Wires Connected to Existing Opener

No comments:

Post a Comment