That one time I set up a smart garage door opener for a housemate

The Raspberry Pi is a mini computer based multi-purpose use. It is a minimalist computer made to do a number of different tasks. It has always fascinated me how small they have been able to make these computers because several years ago these computers were serviceable for full size machines. Now you can have the same amount of processing power within the palm of your hand.

Not only does the raspberry pi feature decent CPU and serviceable memory it is meant to directly interface with a wide range of electronics. For this reason I have been very attracted to this device. I have had several ideas of ways to incorporate the raspberry pi into my electronics projects.

Practical Scenario

I was living with a coworker of mine who had just bought an older house. She had plans to replace the garage door opener but it was going to cost something like $500 for the one she wanted. This was not cost effective for someone who just bought a new house. She wanted to get into the house without carrying around the garage door opener. After some failed exploring with installing a side door to the garage I offered to help out getting the garage door to open using our cell phones. Winter was coming quickly and she wanted a solution before the major snowfalls of the year.

Attempt One

Logistics aside, I used my trusty Raspberry Pi model B for this project. I had read about people adding raspberry pi’s to the garage door to accomplish this task so I knew it was possible. after a bit of research of the model garage door and the type of garage door opener I found out the electronics involved in the garage door opener are just a really simple normally open circuit that when closed completes the circuit and tells the garage door to close when you push the button. At first I attempted to use the opener to activate the simple circuit with a relay. I confirmed I could open the garage door using the opener and with a piece of wire two pins closed the circuit. Once I knew this I soldered a wire on each pin and hooked the two pins to a relay. I then hooked the relay to the gipo pin on the raspberry pi. The relay is to protect both the raspberry pi and the garage door opener which have different currents. If it was hooked up the opener directly to the gipo output of the of the pi it could damage the one or the other most likely the opener. The setup was plug the raspberry pi to the ethernet, load the software/web interface for the gipo to open the door, pull up the web interface ip address on your phone, and activate the switch.

The problem ended up being that the garage door opener was much too spastic to be practical. When the opener was activated using the raspberry pi, the red led that turns on when you hold the button would stay on meaning it was if nothing else draining the openers battery. I had to finagle a new way to accomplish the same thing.

Attempt Two

After realizing using the garage door opener was not going to work I decided to use the actual garage door mechanism itself instead of the opener. The disadvantage of this was I would be forced to use a USB wifi dongle to connect to the network instead of the ethernet. This was ok because the router was directly below the garage door and well within the signal of the raspberry pi. The garage door had a similar circuit to the opener except there were 4 pins. After fiddling with it for a while I found out the pins were: ground, garage door, light, and another light. When connecting the garage door to ground with bare wire it activated the garage door. I knew then that the circuit would work the same as it did with the opener but without the problems the opener had. I hooked raspberry pi and the same relay circuit to the garage door box and using the web interface and it allowed me to open and close the door. Despite having to be in wifi signal when you want to open the door with your phone It worked quite well for a while.

Troubles

This introduced another impracticality. During some of the harshest parts of winter the power would turn off and on for a second, usually no big deal. Come to find out in the middle of the night when this happened it would force the door open right after power was restored. Even though I had it set up as normally open so the door would only open when the relay activated the garage door would open as soon as power was restored.

So to solve this I set the raspberry pi up as normally closed which seems contrary to what would make sense to me. This allowed the door to stay closed during an outage but when it came back on it would need to be pressed twice to activate the door. Perhaps a closed circuit when the opener first gets power doesn’t make the garage door open or maybe the relay activates once when it first gets power. It was somewhat strange behavior. This way worked pretty well for a while except sometimes you would have to wait what seemed like longer and longer for the raspberry pi to connect to the wifi or to wake up from a sleep mode. This is not very helpful when you are waiting in the cold by the door. Sometimes I could snipe it when I was just within wifi range as far as the sidewalk and other times I did was left waiting.

All in all, it was sort of a novelty to add this garage door opener and a lot of strange behavior made it difficult to work with. If I were to do it again I would find a way to get the raspberry pi hooked up directly to the router and the gipi output and relay hooked up directly to the garage door mechanism. What’s that dad you can’t find your garage door opener? You want to open the garage door with your cell phone?