Arduino WiFi Garage Door Opener
Ever come home in the rain to find the door locked and your keys elsewhere? No? Lucky you then! For those who have had such an experience or never wish to, this project will let you open your garage door with nay but a smartphone/tablet/laptop/WiFi-thing and your super secret password! After all, who leaves their smartphone at home nowadays. The very idea!
All it takes is a network capable Arduino, a relay, a long network cable and a few other bits ‘n bobs like wire and a soldering iron.
So how does it work? I’m so glad you asked! The Arduino hosts a little web page on your local network which you can access from any other device on the network, such as your smartphone, just like a normal website. When you input your password, the Arduino triggers a relay that acts like a wired garage door remote that you often see next to the internal door. This sets the garage door opening mechanism into motion, letting you through with the a new felt sense of control over your home!
So, shall we get started then?…
Step 1: Needed Things
- A Freetronics EtherTen or other network capable Arduino board – This is the brains of the operation. It hosts the web page you connect to when you want to open the door and triggers the garage door opener (via the relay) when the correct password is entered.
- A Relay Board to activate the opener – This acts like a wall switch or button but the EtherTen ‘pushes’ it instead of you. In this case it will emulate the switch in the wall mounted or portable remote that you currently use to open the garage door. This can work alongside the existing buttons and remotes. Either buy one such as this one from dealextreme that I used in my case or make your own with: a relay, a transistor (any small signal one such as a 2N2222 or 2N3904 should do) to turn the relay on and off, and a flyback diode to protect the transistor and EtherTen from the voltage spike generated by the inductive load of the relay coil when it is turned off (such as a 1N4001).
- A Case – For those with access to a 3D printer or who feel like giving a 3D printing service such as Ponoko, i.materialise, Sculpteo or Shapeways a try, you can make the “EtherTen Enclosure” used in this project. This is available on this projects GitHub repository will house both the Freetronics EtherTen and dealextreme relay board nicely. Just hit the “Download ZIP” button on the bottom right to download it and other necessary project files. You will need to print off a top, a base and 4 clips. To mount things together you will need 12, M3 sized, 6 mm long (shaft length) screws and an M3 tap or 12 self-tapping screws of the similar size. Sometimes I’ve gotten away with using ‘normal’ (machine) screws instead of self -tapping but it depends on how soft the plastic is. The reason four of the screws that can be seen in the image above are plastic is so that the colour matches the case and looks nice.
- A Connector and Dual Conductor cable to go between the relay board and the opener or remote you wire it to – I used a 3.5 mm jack and plug usually used for audio equipment and some thicker than needed wire. The length of wire required depends on the distance between the opener or remote you will wire into, as informed by the next step, and the nearest convenient spot to place the box containing the relay board and EtherTen. If you are truly averse to soldering you could omit this and instead open the box up and unscrew the terminals each time you wish to disconnect it.
- Three Male to Female Jumper Wires to connect the relay board to the EtherTen with.
- Network Access – This can be a long Ethernet cable as in my case or an old wireless access point or router.
- A Power Supply to power the EtherTen. This needs to be around 6-9 V DC (7.5 V ideally) and at least 300 mA for the EtherTen to be happy. See Appendix A (Step 10) for how to check if any old wall plug packs that might be lying around will do the job. Advanced makers may be able to get some Power over Ethernet (PoE) thing to work instead but that is beyond my knowledge.
Tools that will be needed are:
- A multimeter
- Flat head and philips screw drivers
- A ruler
Tools that will be useful are:
- A pair of pliers
- A wire stripper
- A soldering iron
Step 2: Check your opener
Before getting started you should find the best way to connect to your garage door opener.
Option 1, terminals on the opener: Take a look at the garage door opener its self. This is the box that houses the motor and usually makes a loud hum when operating. On this there is usually several terminals for connecting other bits and pieces. Find the ones used for a wired remote. In my case they are labeled P B (likely short for “push button”) and GND (short for ground) but are most easily identified by the wires connecting them and the remote. If your opener doesn’t have these, your only choice is option 3. To test these terminals for suitability grab a multimeter and measure the voltage across the two terminals. If you get a nice low value like the 3.66 V I obtained, it should be safe to connect the relay to these terminals. Any voltage in the 100-240 V region is far too high. If you don’t already have a wired wall remote, use this as your connection point and go to the next step. Otherwise go to option 2.
Option 2, the wired remote: If you do have a wired wall mounted remote, usually found on the wall by the internal door of the garage, it may be a more convenient connection point. Carefully pop off the cover and see if the points where the wires from the opener terminate are easily accessible as in image above. If so then connecting the relay here should function just the same if you were to connect it to the terminals on the opener its self but will save having to run another pair of wires to the opener. This is where I chose to connect to in my case. If this will work for you then choose it as your connection point and go to the next step. Otherwise use the terminals on the opener or as a last resort the method described in option 3.
Option 3, the wireless remote (advanced): If your opener lacks wired remote capability or it’s tricky to connect the relay to the opener or wired remote, a wireless remote is the remaining, more advanced, option. These differ significantly by manufacturer but as long as it has a button you can push to open the door, it should work. Open it up and see if you can get at the legs of said button. Soldering one of the wires from the relay to each side of this should do the job. If it has four legs things get more complicated. Use the continuity function of your multimeter to find the pairs of legs are electrically on the same side of the button. These are connected to the other pair of legs only when the switch is pressed. Solder one of the relay wires to each pair, so that the pairs are connected either when the button is pressed or when the relay triggers (closes).
Once you have chosen a place to connect our device to, find a convenient spot to put it. Every situation is different. The device needs a network connection, power, and of course, a connection to the opener or remote. Choose a spot that you can route these things to with the least difficulty. In my case I used a wired wall remote that was handily near a mains power socket, so I put the device on the bench that was under them.
Now we know how we will connect to the opener, it’s time to do some soldering!
Step 3: Soldering
Time to solder up our relay-to-opener connector. If this is a three leg 3.5 mm female connector like the one I’m using, the third leg is usually used to detect whether anything is plugged into it or not, something we have no interest in.
First we need to figure out which two legs to use. To do this take the plastic back off the male connector and stick the remainder in the female one. Use the continuity function of your multimeter to find out which legs on the female connector connect to the two legs of the male connector. If the male connector has more than two legs, use any two that connect to legs on the female side. Take note of which legs connect through so we can solder to them.
Second, we solder some wire to the female connector to go to the relay. To do this, cut a section of wire to go between the female connector and the relay board from the stuff to be used to connect to the opener/remote. For the 3D printed case that goes with this project I recommend 140 mm. Solder this onto the useful legs of the female connector. The recommended method is to separate the conductors, strip the insulation back about 5 mm, ‘tin’ the connector legs and wire ends by melting some solder onto them separately, then solder each wire to its corresponding leg.
Finally, we solder the wires that will connect to the opener or remote to the legs of the male connector. This is much the same as for the female connector but you may have to cut one wire shorter than the other if, like me, you’re not using coaxial cable. Remember to clamp the metal fins around the cable if you have them as it will take any strain put on the cable instead of the solder joints.
Now that we’ve done the messy stuff, it’s time to bring things together!
Step 4: Mounting the parts in the case
The below instructions apply to the 3D printed case designed for this project. If you intend to use/make your own case or mounting medium skip to the next step.
Unscrew the panel mounting ring from the front of the female connector we just soldered up and push it through the round hole in the top half of the case until you can get the mounting ring back on from the outside. Tighten this up and the connector should be securely mounted.
In my case the hole was too small so I put the case in a vice with some cardboard and drilled the hole bigger. The hole has since been made bigger in the 3D model available so this should no longer be a problem.
If you’re using a tap and machine screws, thread the four free standing and the taller of the pairs of internal mounting pillars. Pop the relay board on the four free standing ones and screw it down. For the EtherTen you need to line it up on the lower of the pairs of pillars and then insert the four 3D printed mounting pins. The pin part goes through the EtherTen mounting holes and into the lower pillars. The hole part goes over the taller pillars which you then screw down as seen above.
Now the components are mechanically connected, our next task is the electrical connections and closing the case!
For more detail: Arduino WiFi Garage Door Opener
This Post / Project can also be found using search terms:
- arduino garage door opener
- wifi gate opener for arduino
- arduino garage door projects
- arduino garage remotr