Introduction: Automatic Garage Door Open/Closed Checker

About: I have built the following around my house: TreeHouse with Zipline launch, Tire swing with reinforced steel cables keeping the tree limb in check, Chicken coop.

Have you ever noticed that nobody remembered to close the garage door last night? That it's been open like all night long, and you're just realizing it on the way out the door to work? Well, if you are a bit handy and like a small challenge, follow along these steps to create a smart system with a wheeled device that will close the door automatically for you if you've forgotten to do it yourself.

(Note: This works best for folks like me who have one big garage door. If you have multiple, you might have to construct multiple wheeled devices).

Here are the 8 basic materials you'll need:

1. A Microcontroller, or PLC -- something with I/O that you can program. At a minimum, you'll need 1 input and 1 output for this if you controller can be programmed to check the state of a switch at a certain time every day.

2. Three 2x4's: Wood Block 1, measuring 12”L, Wood Block 2: 4”L, and Wood Block 3: 7.25”L.

3. Wood Strap measuring 1”xX”x0.25”.

4. Two small right angle brackets, 1 larger one. You'll see where they go in a minute.

5. Door hinge

6. Contact/Microswitch

7. Wheel (I used an old training wheel from my kid's bike with a bolt as an axle)

8. Wire (20 gauge is fine) to hook into the garage door opener, and to hook into the microswitch, and then back to your PLC or microcontroller.

9. Wood screws, or dry wall screws. Lengths may differ, but you'll see what to use in the following steps.

Step 1: Locate Open Space on Garage Door Rail

Pick out a place on the top rail of your garage door, towards the back end.

Now, an open garage door never takes up the full length of the rail, so typically a location roughly 1 foot from the end is OK. Get a sturdy ladder or chair to stand on so you can get close to the rail with a pencil or sharpie to mark the rail.

Open your garage door the ‘normal’ way (with the push button switch) and see at what point the door stops. Make a mark on the rail. Repeat the closing/opening sequence a few more times and record the maximum and minimum positions on the rail – you’ll notice that the door does not come to rest in the same place every time. I’ve noticed in my door there is roughly a 2 inch range (+/- 1”) where this resting spot is. Ultimately we want to put a sensor at this location to sense the door is open, but to cure the variability question, we’ll install a roller mechanism that rides on the door but triggers the contact switch every time to take the variability out of play, so to speak.

Step 2: Prepare Wood Block 1

On the end of Wood Block 1, attach Right Angle Bracket 1 as shown in the top figure.

Lay this Wood Block 1 on the door rail so that the Right Angle Bracket 1 is against the wall as shown. With a pencil make a mark on the wood where the rail’s centerline intersects the Wood Block as shown in the sketch. This is where you’ll be placing Wood Block 2 in the next step.

Step 3: Drill Wood Block 1

Take Wood Block 1 and flip it over. Make a line opposite the line you drew in Step 2. Mark 2 dots on this line as shown, then drill 2 clearance holes (3/16” diameter drill bit) on the dots, all the way through.

Step 4: Mount Wood Block 2

Place Wood Block 2 centered on the line opposite where you drilled in Step 3 so that when 2 long wood screws are inserted into Wood Block 1, they drill into the end of Wood Block 2 to form a rigid “T”.

Now turn this assembly right side up again and lay it flat on the garage door rail. Bolt it to the wall with screws through the right angle bracket's holes.

Step 5: Prepare Wood Block 3 With Wheel

Take the Wood Block 3 and mount a hinge to one end as shown.

Then, Turn the Wood Block 3 around and mount 2 right angle brackets as shown on the opposite end.

Now take the wheel you've selected for this project, and make an axle through it. I used a long bolt shank with nut on one end. With some ingenuity, mount the wheel/axle to the right angle brackets on the end of Wood Block 3. I happened upon an odd-ball bracket, so I used that instead of 2 right angles, but they should work just fine.

You should be able to lash or strap/tie-wrap the axle to the bracket(s) so that it's sturdy and the wheel spins freely. You will use this wheel to bump Wood Block 3 up when the garage door comes near it. In a later step, the Wood Strap will come into contact with the microswitch no matter where the door ends up stopping. That's why it's important to take the variability of the door opening out of the equation with this roller mechanism.

Step 6: Mount Wood Block 3 / Wheel Assembly to Wood Block 1

Place the Wood Block 3 wheel assembly onto Wood Block 1 so the hinge can be bolted as shown (to Wood Block 1). Use only 1 screw for now to lock down the location of the hinge, this may get adjusted after the dry run test. Hinge should be about flush to Wood Block 1 as shown in the figure.

Step 7: Install Microswitch and Wood Strap

Install the Contact/Microswitch to Wood Block 2 in the approximate location shown in the figure, with the lever of the switch jutting out towards the garage door opening. Note, it's best if the switch has a decent lever arm on it.

Prepare the Wood Strap by drilling 2 holes through its middle section like shown in the figure, good enough for clearance holes for the 2 small lag screws you'll use to lock it down to Wood Block 3. Don't drill these holes while up on the garage rail as I've shown it; take it down and drill with care on a bench.

Now back up on the device, hold the Wood Strap on the top face of Wood Block 3 as shown in the figure and manually hinge the bar up so that Wood Strap makes contact with the switch. Once you have figured out exactly where the Wood Strap goes so it repeatedly clicks the microswitch, hold it in place and screw it onto Wood Block 3.

The assembly should be complete except for locking down the hinge to Wood Block 1. We will take care of that after the next step.

Step 8: Install Wheel Catcher

We haven't tried this yet in these instructions, but when the door moves from open to closed position, the wheel assembly hinges down as the door moves out. But it probably falls too low as it did in my design. What I mean is, the next time the garage door opens, it might crash into the wheel if the center of the rotation is not high enough, as I've shown in the figure.

So, you're going to want to catch the wheel from falling too low after the garage door is closed. I do this by screwing some wire to the ceiling (you could use a sturdy clothes hanger wire) and hooking it so the axle rod comes into contact with it, thereby arresting its fall.

Step 9: Perform System Test and Final Adjustments

Now for the tricky part -- by actuating the garage door, we're going to make sure everything works! So, being careful not to injure yourself, activate the garage door while manually elevating the wheel assembly and see if it ‘bumps up’ appropriately when the bottom of the wheel hits the end of the door as it moves closer to Wood Block 1. Try this several times until you are comfortable with where to finally lock down Wood Block 3’s hinge to Wood Block 1. You may have to play around with the positioning a bit to fit your specific door situation, including moving the Wood Strap. The goal here is to make sure of these points:

a) the wheel bumps upwards with enough stroke so the Wood Strap makes contact with the microswitch every time (you'll hear the 'click').

b) the wheel is not too low so that there is a crash when the garage door arrives

Connect an ohm meter to the contact switch leads. Activate the garage door and watch your new mechanism work -- make sure the display on the ohm meter transitions from OL (open line, 1) to a definite reading (000 or close) when the door is in the up position. This will ensure the logic will work in the programming.

Step 10: Connect Wires to Programmable Controller

Connect 2 wires to the microswitch leads just tested in the previous step. For illustration purposes, we’ll call these 2 wires BLUE and BROWN.

Now go the back of the garage door opener module and attach 2 more wires to the opener points as shown in the picture. For illustration purposes, we’ll call these 2 wires RED and GREEN.

String the 4 wires to your favorite programming module, whether it be an Arduino, Raspberry Pi, etc. For me, I had an old PLC kicking around, so I figured I’d make some use of it. Connect the I/O to the appropriate ports as shown but note that if your control doesn't include a relay output (as my PLC does), you'll want to connect your output signal to relay contacts and then connect your garage door opener to that relay. I'm assuming you know how to wire up a simple contact relay, but if you don't, find one that matches the output sourcing of your controller (ie 12VDC), and wire up the coil part of the relay to the output you'll use from the controller. Then, connect the RED/GREEN wires to one set of contacts of the relay.

Step 11: Connect a Daily Timer

The objective of this step is to provide a cheap method of waking up the controller when it's time to check the state of the garage door. For me, this is 11PM. Every night it checks for the door state and if it's still open, the circuit will shut the door for me. This step is optional if your controller can internally set a trigger time. For me, it was fun to wire this up so I'm conserving power.

If you're using a wall timer as I did, set it so the pegs are right next to each other.

Step 12: Program It!

Now comes the fun part – programming! Hopefully you have some experience at this. If not, it’s never too late to learn! I used Relay Ladder Logic for my code, which is what is the standard language for PLCs. My PLC ladder code is provided, but here’s what my basic algorithm does.

At a specific time of night (I picked 11pm), the program needs to look at the state of the switch.

If the state of the microswitch is ON:

  1. (Optional) Turn on a piezo-electric buzzer to alert anyone in the vicinity of the door that it is about to close. I had extra outputs so I figured, why not, I hooked these up to a high output on my PLC.
  2. Command the door to close by sending a momentary contact closure between the RED and GREEN wires. Meanwhile, ignore the state of the switch.
  3. About 30 seconds later, check the state of the switch again. It had better be OFF. If not, that likely means something was obstructing the closure of the door and the door was commanded back open by the garage door module. In this case, try one more time.
  4. About 30 seconds after C, check the state of the switch again. If it is still ON, this is a problem that can’t be fixed automatically, so you’re hosed until you notice the door didn’t get closed the next morning. If you are really fancy (which I’m not, yet) you could wire in an LED circuit that will blink somewhere like in the kitchen (or if you’re really brave, your bedroom!) alerting you that the door tried closing at 11pm, but failed.

If, on the other hand the switch was off when checking at 11pm, do nothing. Check again in 24 hours.

THAT'S IT! I hope you enjoyed this (rather involved) Instructable for my invention, thank you!

Automation Contest

Third Prize in the
Automation Contest