I love microcontrollers and wanted to find a good excuse to play with one! This project was born from a particular annoyance I encountered on a daily basis, for which I then decided to create a solution.
My current living situation does not provide space for parking my car in the garage, and so I must find parking on the street nearby. My walk up to the house then takes me to the garage door (on the backside of the house), but without my garage remote on hand, I have no way of getting in. I must take a longer route around to the front door. Conversely, I cannot leave out the garage door on foot since I have no way of closing the door behind me, unless I close the door while inside and run under it like Indiana Jones.
Wouldn't it be great if I could control the garage door with something I always have on hand, such as my smartphone?!
With our purpose established, we can now look at how the intended functionality will be accomplished and what hardware will be needed.
The chain begins with my smartphone, which happens to be a Nexus 5 running Android 6.0.1. The specifics of setting up my phone will be discussed with greater detail in notebook 04, but the end product will be a POST command via the Hypertext Transfer Protocol (HTTP).
The next piece of hardware is the network that will connect my smartphone command to the rest of my system. If I am within range of my local wireless home network, the home router will take care of the networking task. If I am out of range of the local network, the signal can travel through the world-wide-web before reaching my home router.
The signal will then be sent to the microcontroller, which will be physically connected to a garage door remote. The remote will be cycled on and off, thus triggering the garage door to open. The remote signal is capable of penetrating through multiple walls, making it possible to place the microcontroller and remote anywhere within the house without disrupting its functionality.
There are many microcontrollers available for hobbyists to choose from, but the use of the Raspberry Pi 3 was a somewhat easy choice to make. The Pi 3 is less of a microcontroller and more of an entire Linux computer in a small package. This includes built-in WiFi connectivity and a full Linux distribution, Raspbian.
Given my comfort with Linux, I knew I could jump right in with this controller and get working. Furthermore, Linux (and other Unix-based systems like macOS) can easily worth together through the use of remote terminal shells (SSH) and the remote mounting of filesystems (SSHFS). Together, these make working with the Pi via another Linux machine very quick and easy.