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 EtherTenor 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 andDual 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
<p>I think this project is great, and certainly cheaper that buying a unit.</p><p>I am new to Arduino/ I have seen all projects using Ethernet. I don't want to run Ethernet into my garage, so I bought a ESPDunio (Arduino+WiFi from ESP8266)</p><p>So my question. How do I change, or what do I change to have this script, to operate as WIFI. </p>
Hi Angi1, im not sure what it would take to port it across but there seems to be plenty of esp8266 garage door examples if you google it.<br><br>Cheers<br>Phil
<p>I have been looking for days. I have found others, but this project is better. I prefer this setup. The only thing this project is missing is the magnet switches which identify if the door is open or closed. I am looking to convert the only network portion of the device from Ethernet to WIFI. I will keep on fiddling with it. </p>
<p>@Angi1 Give particle.io a try. $20 Wifi cloud connected and managed board. As for detecting garage door state, garage openers already keep that state. Check if the chain/belt triggers some switch upon stop.</p>
<p>I'm assuming he wants to be able to tell if the door is open or not through the web app, in case he forgets to close it. In that case, he will need to attach a limit switch somewhere on the door mechanism and program a couple of I/O pins to the switch and then program the arduino to output the state of the switch to the web page.</p>
<p>@mdshann I understood that. I've this implemented solutions myself. I detect the garage state by tapping into the limit switch inbuilt into the garage unit. The belt/chain triggers this inbuilt limit switch and that's how the unit knows when to stop. We can tap into this existing mechanism to detect the state.</p>
<p>Thanks guys, I got up created using 8266. I have some tweets to be performed I will update this blog in a couple of weeks on the code.</p>
<p>When I enter the IP address [which i made sure i did the rite way] , i get a blank page, can someone help, <br>Am using an Uno with Ethernet Shield combo, am sure the device is working as the Ethernet examples in the IDE work perfectly. </p>
<p>I do too. Any resolution to the issue? I managed to copy a bit of code from the DhcpAddressPrinter (specifically the printMyAddress() method) into the Webserver.cpp class and the arduino is getting the correct IP address that I set in HardwareConfiguration.h. Otherwise I'm stumped.</p>
<p>Great project!</p><p>I made something very similar with an Arduino Uno, W5100 Ethernet shield, a relay, door sensor, and dht11 temp &amp; humidity sensor. I can monitor the status of the door, open &amp; close it, and view the current temperature and humidity inside my garage. </p><p>Instead of hosting the page directly on the Arduino (or in your case the EtherTen) and serving static pages, I just host the page on my own server and get the needed information from the Arduino using AJAX. The button is protected by a PIN code and temperature, humidity, and door status data is logged to MySQL every 10 minutes. It will also send me an e-mail if I leave my door open past 10PM.</p><p>I made a simple Android webview app so I can easily control it via my phone (see attached screenshot). Using AJAX, I can see the status of the door change without needing to refresh the page (polls every 2 seconds).</p>
<p>Do you have the project to share ? I'm very interesting to do it.</p>
You can view my project that is similar to this here if it helps http://www.chimera.co.nz/electronics/arduino-garage-door.htm
<p>I do not have an instructable currently, sorry. I'm currently in the process of re-building the entire setup using a Raspberry Pi, which will do everything (webserver, database, control the relays, etc), instead of having to run a separate webserver. I recently got a 3D printer and just finished designing and printing the final version of the case. I may consider doing an instructable in the future.</p>
<p>ydoucare,</p><p>I am interested as well. I am in the process of building something similar but with an Arduino MKR1000. The MKR1k will monitor my garage door and control it (with leftover pins for temp, humidity, light sensor etc). I would like it to report back to a RPi running flask. Any suggestions on how to get the two to communicate to each other over my local ethernet? I am assuming html GET and POST? </p>
<p><a href="https://www.instructables.com/member/ThothLoki" rel="nofollow">ThothLoki</a>, in my case, I just send GET requests using jquery/javascript in the browser to a PHP script sitting on the webserver which sends the actual GET requests locally over the LAN to the Arduino which returns back the data to the PHP script, which gets returned back to the javascript code. Then I just manipulate the DOM with jquery to update the client with the new data. Same thing goes with controlling the relay. I just send a GET request to the Arduino using a PHP script and instead of returning data, I just have the Arduino cycle the relay. I have no experience with the MKR1000, but the code on the Arduino side to respond to HTTP over the network is pretty small and simple. But again, i'm moving the whole solution to a Pi to consolidate it down into one device which will handle the relay control and sensor reading along with serving up the website and logging the data. It's probably 95% there already, I just need to do the swap and pull my DHT22 temp sensor from my Arduino and hook it up to the Pi and update my code from the DHT11 I currently am using. I've got a hacked together authentication system so some random person can't just take the url and play with my garage door, but i'm not confident enough in it at this point to post it. </p>
<p>Just think of the MKR1000 as a Arduino 101 with wifi shield except for half the size of an UNO</p>
<p>Thanks. I am hoping to set my Pi up as a hub for more than one location. This should be a fun start. I agree with you though, security will be an issue.</p>
<p>I am interested in how you built your project. Do you have a post anywhere showing the steps? Can you post your code?</p><p>Thanks, great project!</p>
<p>Awesome! I would like to pursue something more similar to what you did. Do you happen to have your own instructions?</p>
<p>I just built this and was wondering why when I log into the &quot;Speak friend, and enter:&quot; website, the garage door automatically opens/closes? I ask because I embedded some code for a network video camera and would like to see if the garage door is closed or open. </p>
<p>I created a solution that seems to be working, just in case anyone else needs it. I'm sure there is a much better way to do it though, but here is what I added. The items I added are bold.</p><p><strong>************************************************************************************</strong></p><p>Webserver.cpp:</p><p><strong>boolean boolDoorActive = false;</strong> // This is a global variable that is used between the different libraries. false = the door will not open, true = the door will open</p><p>// --------------- Initialization and processing.</p><p>void InitializeGarageDoorWebserver()</p><p>{</p><p><strong>boolDoorActive</strong><strong>= false;</strong></p><p><strong>************************************************************************************</strong></p><p>WebPages.cpp</p><p>void SendLoginPage(WebServer &amp;rServer)</p><p>{</p><p><strong>extern boolean </strong><strong>boolDoorActive</strong><strong>; </strong>//This is getting the global variable value</p><p><strong>boolDoorActive</strong><strong>= false;</strong> //this is set to false so the garage door does not open. So if you Lock the page and then sign back in later, the flag gets set to false and the door will not open.</p><p><strong>************************************************************************************</strong></p><p>AccessContrl.cpp</p><p>void ActivateGarageDoor()</p><p>{</p><p><strong>extern boolean </strong><strong>boolDoorActive</strong><strong>;</strong></p><p>Serial.println(F(&quot;Door activated.&quot;)); //Door activated - is the Serial monitor</p><p><strong>if (</strong><strong>boolDoorActive</strong><strong>== true) { </strong>//when you are signed into the page, initially the value will be set to false and the door will not open. However, when you click the Activate button then this code will be implemented.</p><p>digitalWrite(PIN_INDICATOR, HIGH); // set the LED on</p><p>digitalWrite(PIN_DOOR, HIGH); // Open door.</p><p>delay(DOOR_ACTIVATION_PERIOD);</p><p>digitalWrite(PIN_INDICATOR, LOW); // set the LED off</p><p>digitalWrite(PIN_DOOR, LOW); // Door will continue to open by itself.</p><p><strong>}</strong></p><p><strong>else</strong></p><p><strong>{</strong></p><p><strong>boolDoorActive</strong><strong>= true; //</strong>if you just signed into the website then the value will initially be false. This step changes the value to true, so when you press the Activate button the door will open/close. Since there is no other code in this step, the garage door will not open.</p><p><strong>}</strong></p><p><strong>}</strong></p><p><strong>************************************************************************************</strong></p>
<p>Can i use Bluetooth and Arduino WiFi together? When the internet or my WiFi running slow? Thank you for the answer! :)</p>
<p>It is so great project for other makers.</p><p>The hardware you did is so powerful.</p><p>Keep it up!!! </p>
What kind of modifications do i need to do to use a plain arduino uno and ethernet shield instead of an etherten module?
<p>I would also be interested if this would work so that I don't need to buy a new unit.</p>
<p>I need help for the 3D printed case; when I go to the suggested website do I ask them to print it in cm, mm, or inches?</p>
<p>Hi, one problem with creating the model in blender is that it came out 10x smaller (when opened in UP! 3D Printing software at least). If you can scale it somehow so that the final dimensions are 120mm x 95mm x 50mm (height x width x depth).</p>
<p>Hi MegunoLink:</p><p>I sent the dimensions to my designer and he asked: Are those the dimensions for all 3 files? </p><p>So, are they the dimensions for the entire box, or do they apply to the base, top, and brackets?</p>
<p>What if I DON'T want to use my wifi or home network or smartphone, but instead want to make my own regular common radio-clicker garage door opener, like from a Genie or Liftmaster or Craftsman or something? Is there a radio shield for Arduino that will take a radio input from a clicker? I'm trying to build a gate opener for a heavy gate with speed control and programmable accel-decel to ease the stress on the drive screw. But there's no network available there.</p><p>I guess I could use bluetooth but again, I want to just use a clicker not a smartphone. There is a clicker built into most cars these days so you don't even need a separate clicker. I think other people would find this useful because you can use this switch built into your car to signal the arduino, like this could signal your entire house or other location that you have arrived even if you don't want to get your phone out.</p>
I'd suggest then you simply install a small wireless router at the gate, and pair your phone to that. Don't assume a router must be connected to the Internet - it can be an island (or you could go ad hoc network). Then you can leverage this guide without bigger &quot;unknowns&quot;.
<p>what will be total cost of this project</p>
<p>How can I use OpenHab to control this instead of Megunolink?</p>
<p>You have to consider security for this project.</p><p>1. Be sure your Internet router doesn't have any known vulnerabilities that would allow an attacker to enter your internal network.</p><p>2. Be sure to use a WPA-encrypted WiFi with a secure password.</p><p>3. Additionally, it's better to use HTTPS on the Arduino server, because this way even if an attacker somehow gets inside your network, they will not be able to see your password in plaintext.</p>
<p>You could also work with Bluetooth, the Bluetooth API for Android is relatively simple and easy to send/receive information with the Arduino.</p>
<p>I don't believe an Aurdino can accommodate HTTPS. It doesn't have enough memory. I think a good solution is a VPN server in front of the Aurdino. </p>
<p>I've gotten the project working. I've got a Raspberry Pi VPN server in front of it so that I can let non-family members open the garage, and easily turn off their access, as well as access the opener from anywhere in the world. My son said he can print the case on a maker bot, but needs the dimensions. The commercial printers wanted a few hundred to print it, and the price varied over a wide range. </p>
<p>Hi,</p><p>I've downloaded the most recent Arduino IDE V1.6.1 and the Garage Opener Zip file. I've adjusted the IP address as instructed and when I compile I receive the error below - can anyone advise? I'm lost. Any assistance appreciated.</p><p><em>In file <br>included from <br>/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.h:7:0, from <br>Webserver.cpp:3:</em></p><p><em>/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/EthernetClient.h: <br>In member function 'int WebServer::read()':</em></p><p><em>/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/EthernetClient.h:27:16: <br>note: candidate 1: virtual bool EthernetClient::operator==(bool)</em></p><p><em> virtual bool <br>operator==(const bool value) { return bool() == value; }</em></p><p><em> ^</em></p><p><em>In file included from <br>/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h:570:0,</em></p><p><em> from <br>/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h:25,</em></p><p><em> from <br>/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h:224,</em></p><p><em> from <br>Webserver.h:6,</em></p><p><em> from <br>Webserver.cpp:1:</em></p><p><em>Webduino.h:729:19: note: candidate 2: operator==(int, int) <br>&lt;built-in&gt;</em></p><p><em> if (m_client == <br>NULL)</em></p><p><em> ^</em></p><p><em>Sketch uses 20,152 bytes (62%) of program storage space. <br>Maximum is 32,256 bytes.</em></p><p><em>Global variables use 1,405 bytes (68%) of dynamic memory, <br>leaving 643 bytes for local variables. Maximum is 2,048 bytes.</em></p>
<p>I've tried to build this project with slightly different hardware. Arduino Uno and Ethernet Shield only because I already had the hardware on hand. Do you know what changes I need to make in the configuration in order to use the Arduino Uno and Ethernet Shield?</p>
<p>thank you</p>
<p>what if gagrage is detached and it be wireless?</p>
<p>You could use one of the many wireless arduino shields available now. The code would need to be modified to suit but it should work.</p>
<p>These relays have three inputs so that you can use an external power supply. How many relays can I have off of the arduino powered by 12v 350 ma transformer. I was reading that you can power 200 ma from the arduino powered from a transformer with each relay requiring 40 ma. Can I use a high digital pin to power the relay and also triger the relay? Wiring the + pin and the data pin to the programmed arduino digital pin. The relay would only receive power when being triggered and relays not being used would not be using any power unless needed. I also need to power an HC-06 bluetooth and would like to power everything from the arduino.<br>Thanks in advance,<br>Armando</p>
<p>Hi Armando, you would be better off driving the relay through a MOSFET like the ones available here (http://www.dx.com/p/5v-relay-module-for-arduino-bl... The Arduino could then control a larger number of relays without exceeding its own pin current rating. </p>
<p>I have a garage that is not connected to my apartment. And I am not able to connect a Ethernet cord to the Arduino unit. I not even sure if my wifi signal reaches to my garage. I will check that later today. What are my options then? </p><p>I wish to use my Android phone.</p>
<p>If you use the above relay, do you still need the diode and transistor? Isn't the relay optically isolated from electric back flow? </p>
<p>No you don't, the relay used in the pictures above already has the diode incorporated.</p><p>Cheers</p>
<p>I am ben and student. I use servo motor but i don't know how to write code. Would u help me to write code, please?</p><p>#include &lt;Servo.h&gt;</p><p>#include &quot;AccessControl.h&quot;</p><p>Servo myservo</p><p>{</p><p>void setup()</p><p>{</p><p> myservo.attach(9); </p><p>}</p><p>void locked()</p><p>{</p><p> if()</p><p> {</p><p> digitalWrite(PIN_DOOR, HIGH);</p><p> myservo.write(90);</p><p> }</p><p> else</p><p> {</p><p> digitalWrite(PIN_DOOR,LOW);</p><p> myservo.write(0);</p><p> }</p><p>}</p><p>I write this coding. It show error &quot;function definition does not declare parameters&quot;.</p><p>I want to know what coding is wrong.</p>
<p>I am a newbie and just recetly purchased an Pcduino 2 that has wifi and ethernet, a linkerkit base , T- board v2 and a 5v linker relay , also has the Arduino Ide installed, would this project work on this board? If so would it be hard to implement?</p><p>I have tried another project wriiten in python for the Pcduinco and have not been able to get it up and running due to code errors iAttributeError: 'module' object has no attribute 'pinMode) and can't seem to get any help. </p>
<p>How about if I use raspberry pi ? I'm more talented on raspberry pi .</p>
<p>Yep that should also work well. Let me know if you do go ahead and implement it.</p>

About This Instructable



More by MegunoLink:Arduino WiFi Garage Door Opener 
Add instructable to: