Smart Overhead Door Opener (1)
I've made three versions of a Smart Garage Door Opener. This is the best one. Here is a brief description of the three:
This version (see image) replaces a "garage doorbell button" and only needs a Raspberry Pi power supply and a 3V Remote
Another version uses a 12v universal remote to open and close a garage door. It requires two power supplies 12V and 5V and because of the components requires a rather large case
My first ever Instructable, which does not use a remote but hacks into the doorbell wires and uses a relay to simulate a doorbell push. However, not all garage door openers use a doorbell as an opener any more
DRAFT - NOT FINISHED YET - almost done
Step 1.1. Overview:
My focus in the redesign was on:
Better case
Easier install
minimize cable runs and soldering
code is downloadable with minimal edits
Minimize costs and steps
In this project, a headless Raspberry Pi Zero WH (RPi0 with Header) is connected to:
a 3V garage door remote control
a garage door sensor
a Raspberry Pi (RPi) camera with an RPi Zero cable
a low-profile, blue push button
All the components are mounted inside an "old work" standard junction box with a black metal, blank wall plate. The end device replaces the garage door opener's "doorbell button".
The RPi0 connects to the internet via low speed Wi-Fi (802.11n)
Step 1.2. Features:
The door can be opened, closed and monitored using:
Any computer that can access a website
Any smartphone
Amazon Echo
Blue pushbutton
A sensor is used to determine if the garage door is opened or closed.
A [Optional] Security camera takes photos when motion is detected. Videos and streaming can be enabled.
Wall mounted unit replaces the garage opener's doorbell
Works with any garage door opener
Keeps the garage door secure (e.g., on power loss, the door does not open, no one else on the web can open the door)
Do not allow anyone else on the net to open the door (two way self-signed SSL certificate)
Set a schedule for when the garage door should be opened or closed (time of day, vacation, no one home)
Send a text message to one or more smart phones if the door is open when it should be closed
Command-line scripts to open, close and return the status of the garage door
Step 1.3. Gather Parts (prices of parts and tools are in USD):
Raspberry Pi Zero WH ($5 without headers. I am using with headers. Without headers would require a bit more soldering)
MicroCenter $14.99
AdaFruit $14.00
3V Key Fob Style Garage Door Remote that is compatible with your Garage Door Opener, 2 pack on Amazon for ~$19
SanDisk Ultra 16 GB microSDHC Class 10 with Adapter, Amazon $6.91
Any size (16-64) GB, Class 10 microSD Card will work
Female to Female (or Female to Male) Jumper Wires. Bought a package of wires at Fry’s for $4.95 only need female end
Case:
1-Gang 18 cu. in. Old Work Heavy Wall Switch and Outlet Box, The Home Depot, $3.12
Black Metal Blank Wall Plate, The Home Depot, ~$2
9/30 gauge plexiglas from The Home Depot, 2x2 foot sheet ~20
Low profile (but not flat) heat sink for RPi0. I bought these in bulk <$1/heat sink
Sensor
SECO-LARM SM 226L, Garage Door Sensor, price varies widely, $9.99 on Amazon
Copapa Heat Shirnk Tube
I bought a case in various sizes: For my projects, I only need 3mm and 1.5mm
Heat shrink tubes (1) 1.5mm by 38mm
50ft of Solid thermostat wire, Home Depot or Lowe's, ~$20: measure your distance
Bojack Dupont Connector Kit (any brand)
(2) 1x1 plastic header
(2) female crimp pins
Power Supply
50ft of Solid thermostat wire, Home Depot or Lowe's, ~$20: measure your distance (same spool of wire as above)
1.5 foot USB to USB-C adapter cable, $5
Copapa (any brand) Heat Shrink Tubes
Heat shrink tubes (2) 1.5mm by 38mm
Heat shrink tube (1) 3mm by 38mm
Power Adapter USB 5.2V output, $6
Heat shrink tubes
M2.5 screws, nuts and hex standoffs (6x6). I bought a case of these. So, mush less than $1 for this project
Step 1.4. Get Tools and Services:
Soldering Iron Station, Deoxit Tip Tinner and Cleaner, and Solder
Needle nose pliers. Wire Stripper
Flat Head and Phillips Head Screwdrivers
Box Cutter, X-acto knife
Drill with metal drill bits (Special Spade bit - 3/8 inch)
Breadboard and jumper wires
MacBook (a PC can be used)
AT&T GigaPower (any internet service provider can be used)
gmail account
Dynamic DNS $40 per year for 30 names (dyn.com)
Fish Tape
Tape Measure
Level
Step 1.5. Notes:
Text enclosed in spades, like this ♣replace-this♣ should be replaced with an actual value
I’ve attempted to credit every source used in the references
$ indicates a command executed in a terminal window on the MacBook and usually is being executed on a Raspberry Pi
Links are to reusable steps (these are part of the project)
Step 1.6. Locate garage opener doorbell button and cut a hole in the drywall
If you don't know what you are doing, then stop. Wires for switches and outlets can run near the doorbell, and by cutting through or into a wire you could kill yourself or burn down your house.
This device replaces the doorbell garage door opener. So, the hole for the "old work" junction box should include where ever the garage doorbell is located.
Cut a hole in the wall large enough to fit an "old work" junction box. It is better to cut hole too small than too large. Old work junction boxes have cleats that screw into place to hold the junction box. New work junction boxes have nails for the studs.
Cut the doorbell wire so no exposed wire is showing, and then cap the doorbell wires with very small electrical wing nuts. These should be in the junction when all the work is complete (i.e., do not bend them back up into the wall cavity.
Slide the old work junction box in the hole. Adjust the opening until the junction box fits snugly.
Mark the junction box's top and bottom.
Pop out both ears on the top back of the junction box. So, the power and sensor wires can get into the junction box come through on the right, and the doorbell wires come through on the right.
junction box
Seco-larm sensor
Step 1.7. Install Garage Door Sensor (SECO-LARM) and run wires
The magnet is attached to the left-hand, top indoor side of the garage door (yellow box on bottom right of picture)
The sensor is attached to the garage wall (bottom left and middle above) .
I ran solid thermostat wire from the sensor back to the raspberry pi. This required a hole from the garage into the attic and from the attic into the wall containing the garage door opener (doorbell switch).
The SECO-LARM wires are too short to run all the way back to the Raspberry Pi. So, I inserted a blue junction box between the SECO-LARM sensor and the solid wires running back to the Raspberry Pi.
In my house, there is an 18 inch gap between the ceiling of the first floor and the bottom of the second floor. I assume this is where the heating and cooling ducts run. I needed a drill bit extension long enough to go through the second floor and through the top 2x4 (top plate) containing the doorbell.
The most important part is when drilling from the attic into the area where the wires will run to the garage door opener is to NOT drill through the electricity. Fixing this was not fun. Seeing the sparks and having the lights go out was pretty thrilling!
The sensor requires two solid thermostat wires or invisible dog fence wire.
Step 1.8. Install Garage Door Sensor (SECO-LARM)
The magnet is attached to the left-hand, top indoor side of the garage door (yellow box on bottom right of picture)
The sensor is attached to the garage wall (bottom left and middle above) .
I ran solid thermostat wire from the sensor back to the raspberry pi. This required a hole from the garage into the attic and from the attic into the wall containing the garage door opener (doorbell switch).
The SECO-LARM wires are too short to run all the way back to the Raspberry Pi. So, I inserted a blue junction box between the SECO-LARM sensor and the solid wires running back to the Raspberry Pi.
In my house, there is an 18 inch gap between the ceiling of the first floor and the bottom of the second floor. I assume this is where the heating and cooling ducts run. I needed a drill bit extension long enough to go through the second floor and through the top 2x4 (top plate) containing the doorbell.
The most important part is when drilling from the attic into the area where the wires will run to the garage door opener is to NOT drill through the electricity. Fixing this was not fun. Seeing the sparks and having the lights go out was pretty thrilling!
The sensor requires two solid thermostat wires or invisible dog fence wire.
Step 1.9. Run sensor wire from attic to junction box opening
I have a metal fish tape. After prolonged storage it acquires a curve, making it difficult to feed the wire straight down. So, the trick is to unwind the length needed and gently bend it back every six inches or so until the fish tape is straight.
There should be insulation and other wires, perhaps even firebreaks, where the fish tape is going through the wall. nothing should catch or hold the fish tape.
Bend a small amount of sensor wire into the fish tape's lead, push the wire into the lead, cut any pokey ends, and use a small bit of Scotch tape to attach the wire to the fish tape. Being sure to feed the fish tape straight in the direction of the junction box, slide it gently through until you can pull the fish tape and sensor wire through the junction box hole.
Step 1.10. Attach Header Pin to Sensor Wire
Strip 1/4 inch from the end of both sensor wires. It should be a little bit short of the point where the header pins slide into the female crimp pin.
One side of the crimp pin is square. This is where the header pin will go. The other side has two angled fold overs and two rectangular fold overs. The sensor wire slides into the fold over side.
I use my thumbnail to bend them a bit, and then a needle nose pliers to crimp it tight.
And since I never want to worry about this connection again, I put a small bead of solder on the pin between the two fold overs. And then slide on the black plastic header pin until it snaps tight
Step 1.11. Create very long USB to micro-USB power cable
I was planning to use voltage and ground from the Garage Door Opener. However, not all models provide output voltage and ground. And the output voltage may be higher than the 5V required by the RPi0. So, I decided it would be more universal to run USB to USB-C cable from an outlet to the junction box.
In this case I took 1.5 foot USB/USB-C cable, and spliced in thermostat wire to make a 25+ power cable. The data lines do not work.
Cut the USB to USB-C wire so the USB side is long enough to go from outlet to opening where other garage door opener wires run and up into the ceiling
The shorter end is the USB-C and will go in the junction box
Run the thermostat wire leaving plenty running out the junction box and near the outlet
The USB side of the wire is by the outlet, and the USB-C side is by the junction box
Slide a 3mm heat shrink wrap over both ends of the thermostat wire. This will bind the USB wire to thermostat wire
Strip 1 inch from each end of USB and USB-C wires
Remove shielding and unused wires from USB
There is not standard color coding for wires inside a USB
In my USB wire, Red = Vcc and Black = Ground (this is common), but check with voltmeter
Strip 1/4 inch from each of the red and black wires, snip off the other two USB data wires
Remove 1 inch of outer sheathing from thermostat wire
My thermostat wire has Red and White wires inside
I will use Red = Vcc, and White = Ground
Strip 1/4 inch from each of the red and white wires
Cut four 3/8 small heat shrink wraps
Slide heat shrink wraps onto each red and white wires
Solder wires together. Solder Red to Red (USB), and White to Black (USB)
Since the wire are hanging from the wall or ceiling, I used two spring wood clamps, a paint stirrer and some blue tack to hold the wires in place while soldering
Turn off soldering iron
Slide the small heat shrinks in place
Use the barrel or side of soldering iron to shrink the heat wraps
If the heat shrinks don’t work use electrical tape to separate Vcc and Ground to prevent shorts
The smart way to connect wires ground and Vcc close together is to offset them so the bare metal does not overlap, and then even if the heat shrink or electrical moves, there is no chance of a short
Slide the larger heat shrink over the USB and thermostat wires and shrink
The spliced section of wire is much less structurally sound than the other parts of the wire. So, I bend the thermostat wire and then bind the soldered section to the thermostat tape using electrical wire
shows slots with plexiglas
cut away with wall plate
cutaway
Step 1.12. Junction Box and Plexiglas [optional]
Since the case is so cheap, I thought i would use one as a throwaway. I wanted to get all of the components to fit, and be able to see they were fitting.
I cut the plexiglas to the inside measurements and then trimmed it down to accommodate the slope, and to allow for the low profile button to fit.
The old work junction box has two slots, and I thought this would be a cool way to mount the Raspberry Pi 0 one one piece of plexiglas and the Remote on another. And then I could slide the plexiglas in and out.
After trying with two pieces, I realized it is much easier to use one piece of plexiglas mounting the Remote and RPi0 at right angles to each other. The mounting holes for each device should not overlap.
Use the left most slot. In the image above "shows slots with plexiglas". The plexiglas is in the right slot. But mounting it this way doesn't leave enough room for the female headers on the GPIO pins. So, put the one sheet in the left most slot.
The camera's ribbon cable wraps over the top of the plexiglas to the Remote's side. I damaged the first ribbon cable when I slid the board all the way in.
Cut down the upper slots so they are even with the punch outs. I used a needle nose pliers to twist off the slot's wings, and then a putty knife and a rubber mallet to get it smooth
Step 1.13. Cut plexiglas to rough size
Cut two pieces of plexiglass (the 2nd one is in case you make a mistake)
9/30 x 2-1/2 x 2-13/16 inches
The box slopes from the front opening to the back
The depth is 3.5 inches, but cut shorter to allow for the low profile push button
Switch box = 4.3 x 2.3 inches
faceplate = 4.5 x 3 inches (metal face plat is larger, but only box size matters
Step 1.14. Drill holes in wall plate
Drill holes in wall plate for camera and pushbutton
On the back side of the wall plate, mark the center line and determine location for push button and camera
Use a countersink or nail to hammer an indent for the drill to start (The push button requires a big hole. I needed a 3/8 inch metal drill bit for the push button)
Attach push button to faceplate. Hand tighten in place with hex nut on backside of wall plate
Remove the four screws from the push button, which makes the low profile button just a bit shorter
Step 1.15. Trim plexiglas to fit
I marked the top, bottom and back of the plexiglass piece.
Trim down the plexiglas until the pushbutton and the plexiglas fit in the case
With the plexiglas sheet slid into the junction box, see if the wall plate with the push button is flush with the wall
If the wall plate is not flush, then trim down the plexiglas until the wall plate sits flush with the wall
Step 1.16. Drill holes in plexiglas
Mark and drill holes for RPi0
RPi0 mounting must leave room on top and bottom for camera and for microSD Card
Note: the camera cable is delicate, but can take a beating in terms of bends (I have one cable that is bent at a 90 degree angle, and it still works)
The Raspberry Pi power supply comes in through the back of the case. So, the RPi0 should have the pins facing towards the wall plate and the USB-C power connector pointing towards the back of the junction box
The RPi0 is mounted vertically on the right piece of plexiglass
The RPi0 should as close to the front of the plexiglas as possible. My power supply cable is not that flexible
Mark and drill holes for Remote
Use the holes on the remote as a guide to drill holes in the plexiglas
I use two spring clamps to hold the remote PCB to the plexiglas.
The remote is mounted horizontally and in the middle of the plexiglas to avoid the wings on the junction box
One Remote hole will be covered by the RPi0. So, the Remote must be mounted first