Hi, everybody, and welcome to the first in what I hope is a regular series on electronics theory, experimentation, demonstration, repair and project construction from a hobbyist’s perspective. I hope to occasionally explore topics in physics, chemistry, and computer science as well, especially as they to relate to whatever projects are on the Hideous Bench. I am no more an expert on this stuff than I am a neat freak, so expect a lot of fumbling around, screw-ups, outright failures and solder burns. But I hope we all have fun along the way. And if we’re not careful, we might just learn something.
So I was hiding from Black Friday in my blanket fort today, browsing Amazon deals online, and I ran across a bargain on a kit that adds “smart” functionality to older garage door openers. Namely, it allows the garage door to be opened & closed by a smartphone app, check whether the door is open or closed, and receive push notifications when the door is operated, all for about 18 BezosBucks. Not a bad deal, but I thought to myself, “Self, I’ll bet I can build a device that can do all those things in a much clunkier manner and for more money.” So here we go!
This first article will concentrate on the planning phase of the project. I like to make a list of must-haves and nice-to-haves so I can get a grip on its scope and try to avoid feature-creep.
- It must open and close the garage door: I mean duh, but that’s more easily said than done. I need to construct a device capable of receiving commands from a smartphone and translating them into real-world actions.
- It must report the door’s state: I want to be able to check at a glance whether the door is open or shut.
- It must be secure: I don’t want anyone else accidentally or purposefully opening my garage door.
- It must interface with my current opener: My current opener still works like a champ, and I don’t want to swap it out. Besides, I’m willing to bet new openers have all these bells & whistles built in, anyway.
- It must be accessible beyond my home network: A wifi-enabled garage door controller is certainly neat, but its usefulness is limited if I can only operate it when I’m on the same wifi network. To be truly useful, it needs to be accessible from the Internet.
Nice to haves:
- A nice, fancy app or web UI: The prototype will probably be controlled entirely by command-line scripts. But ultimately, I’d like to be able to punch up an app on my phone or point a web browser at the smart opener, and control it that way.
- Alerting and logging: It would be nice to be alerted when my garage door’s state changes, and whether the smart opener did it or not. It would also be handy to be able to review a log of state changes, and of the smart controller’s general status.
- Toggle the light: My opener has a wall switch that can turn the light on & off in addition to opening the door. I’d like to replicate that functionality with the smart controller.
The brains of the unit will likely be provided by a Raspberry Pi, which is a cheap, low-power single-board computer. They are extremely popular for automation projects like this, because they’re very well documented & supported, they have a wifi radio built in, and they sport a special type of interface called General-Purpose Input/Output, or GPIO. GPIO can be programmed to do just about anything, from reading the state of a sensor to sending commands to another device.
I’m still knocking around ideas for sensing the state of the garage door. The commercial units all seem to use a tilt sensor in a little sending unit, which wirelessly communicates the door’s state back to the base station. I want to keep mine as self-contained as possible, and not worry about changing batteries, so I will incorporate the sensor directly into it. I’ve been knocking around ideas, like using a powerful magnet on the door, and a Hall-effect sensor to detect it, a metal detector, (my door is aluminum) and an infrared LED to bounce light off the door and into photoelectric sensor. However I build it, the sensor must be able to accurately detect the door without being confused by cars or other objects.
Alright, that’s all I got for this first installment. Thanks for reading, and stay tuned for the next step: Experimentation.