Instructables
Picture of Arduino WiFi Garage Door Opener
webpage.png
IMG_4250.JPG
IMG_4470.JPG

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?...

 
Remove these adsRemove these ads by Signing Up

Step 1: Needed Things

Parts:

  • 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
Benjamink11 month ago

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?

#include <Servo.h>

#include "AccessControl.h"

Servo myservo

{

void setup()

{

myservo.attach(9);

}

void locked()

{

if()

{

digitalWrite(PIN_DOOR, HIGH);

myservo.write(90);

}

else

{

digitalWrite(PIN_DOOR,LOW);

myservo.write(0);

}

}

I write this coding. It show error "function definition does not declare parameters".

I want to know what coding is wrong.

Juniorb11 month ago

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?

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.

supak1111 month ago

You can do this cheaper and easier by buying a $30 iHued cable and using an old android phone. That way you can open/close the garage through the internet and view it happening it in real time vie the webcam that's already on the old phone. Here check out

http://www.iHued.com

jeremy loa2 months ago

How about if I use raspberry pi ? I'm more talented on raspberry pi .

MegunoLink (author)  jeremy loa2 months ago

Yep that should also work well. Let me know if you do go ahead and implement it.

NapoleonXII3 months ago

I went looking for a cool project to use the UNO board I ordered but didn't end up using for a class. Found this genius project and immediately went to work. As advertised, this project works just as well with an Arduino with ethernet shield. Zero issues with the program compiling, which is great since this was my first go with this program. Great project!!!

gelizadoor3 months ago

I went with the WiFi WPA2/AES option and TinyWebServer. That way I could set it up to accept commands via different URL’s (I guess it’s a REST interface) from any device that is authorised to connect to our home WiFi.

http://wnet.name/

ShawnsM4 months ago

I used this 2 years ago and it worked well then. Now other than a compile issue it REALLY works well. Thanks for the coding and time.

Shawn

kachlf5 months ago

hey great project, when i was trying to implement it i'm getting the following compiling error

Arduino: 1.5.6-r2 (Windows 7), Board: "Arduino Ethernet"

In file included from Webserver.cpp:4:

/Webduino.h: In member function 'int WebServer::read()':

Webduino.h:729: error: ambiguous overload for 'operator==' in '((WebServer*)this)->WebServer::m_client == 0'

/Webduino.h:729: note: candidates are: operator==(int, int) <built-in>

C:\Program Files (x86)\Arduino\libraries\Ethernet\src/EthernetClient.h:27: note: virtual bool EthernetClient::operator==(const EthernetClient&)

This report would have more information with

"Show verbose output during compilation"

enabled in File > Preferences.

can you please help with that.

MegunoLink (author)  kachlf5 months ago

I suspect something is changed in that version of the Arduino IDE to break things. Downloading an earlier version should fix it. I recommend 1.0.5.

jedgemon5 months ago

I love this, thanks a lot! I have been using MyDoorOpener for iOS for the last year, and its amazing, but only works for iOS. I am getting a new android phone next week and have been searching for weeks trying to find an alternative, and this works great!

One question though, would it be possible to add the ability to see the status of the door on the web page? I have a sensor on the garage door, and its nice to be able to quickly check and see if the door is open or closed. All it needs to do is check the status of a pin, I have a normally open sensor running from ground to pin 3, and then output that status as either open or closed on the web page. I don't know where to begin to add that in myself... Would that be possible?

MegunoLink (author)  jedgemon5 months ago

Thanks for the feedback. Yep it is possible. You would just need to connect something to the door to signal when it is closed and read that using an IO port on the microcontroller. Then modify the form page in this file Webserver file to display the state.

tem4945 months ago

If you look at the voltage rating it says 9 volts AC and you will need DC voltage

mmchugh16 months ago

First off I'd like to say that you are a very accomplished programmer. I tried out your code myself and it works no problem. Even got it to turn on/off RF socket by inlcuding an extra library. I want to add extra buttons to the 'logged in' page and I don't want anything to activate as soon as password is entered. Any helpful suggestions?

srilyk mmchugh16 months ago

Do you have a GitHub account? It should be pretty easy to change up the source. You can find me as wangofett in #instructables on freenode, or in my campfire room (https://awesomepeople2.campfirenow.com/44e54) if you need help.

bhermance6 months ago

What is wrong with the third pic of the wrong type? What am I not seeing here? you said at least 300 mA? I am greek about this stuff. LOL

Wish I could do this without requiring a wi-fi connection. :-( great job though!!!

srilyk bhermance6 months ago

In theory you could use an Arduino and make a keypad that would trigger the door instead. Another alternative - use a bluetooth enabled receiver. And still another option - get a cheap "burner phone" and use the sms texting capabilities. That's a bit tricksier, though.

Gilo6 months ago

Hi.

I am new to the world of arduino.

I have a HanRan HR911105A ethernet shield. Which driver should I use?

Thanks. I am building this opener after my garage door opener got flushed down the commode. :(

vadipp6 months ago

You have to consider security for this project.

1. Be sure your Internet router doesn't have any known vulnerabilities that would allow an attacker to enter your internal network.

2. Be sure to use a WPA-encrypted WiFi with a secure password.

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.

bhermance6 months ago

oh! I love the idea!!!

mprose6 months ago

You should do a tutorial for making this same function for a gas fireplace switch.

pshields6 months ago

This is an awesome idea. You could make the controls work anywhere with a service like Onion ( http://onion.io/ ). They let you link an Arduino to a web API! I really like how clean your end product is.

harvsch6 months ago

Very nicely done. You do a good job of teaching how to do it, rather than just showing off how clever you are. It is good to see the whole project explained in detail.

Thanks for sharing your accomplishment with us.

www111www6 months ago
Wow, it's great idea!!! But, can you do another idea, for raspberry pi?? Beacause I have one, and I am a beginner, and I like doing this thinks. Can you do that? Aaa, it's great your job!!!
MegunoLink (author)  www111www6 months ago

Thanks for the compliment and taking the time to comment! It's great to see you showing such enthusiasm but I'm afraid I have no projects planned for a Raspberry Pi at present. I'm afraid I don't even have one! However, as diy_bloke has said, I'm sure there are people who have done similar projects before. That is, in addition to the loads of fantastic, completely different ones on this very site you may also wish to try!

www111www. Not sure if you realise that you are asking to do a complete new project on a computer board that he might not even have. :-)
Yet, it is not so hard to give it a try yourself as long as you understand the concepts.
The Raspberry has an ethernet connection and you can install a webserver on it, like apache and have that switch a relay through its GPIO pins.
You may find people probably already have done that before you. Have a look here:

http://www.openhomeautomation.net/control-a-relay-...

Doug Paradis6 months ago

Nicely done! Your project has a professional finish. You have described how to replicate it in very clear manner.

MegunoLink (author)  Doug Paradis6 months ago

Thanks!

ysa'adeh6 months ago
do it by blurtooth is better! !
MegunoLink (author)  ysa'adeh6 months ago

Hmm, an interesting idea! You'd need a bluetooth module and some way of serving a password input form. I'm not immediately sure how to do this, but I'm sure someone out there does and might make an instructable of how to do it!

I have tried this with bluetooth and though in theory it should work, I found android to be rather picky regarding the bluetooth applications. some would work and others would not and the oens that would work, just didnt always work.
remember that if you cant write android applications yourself, you have to rely on whats vailable for bluetooth in the appstore, with the before mentioned result

I do, I can make use bluetooth module with Arduino UNO. That great idea, but I use Ninja Blocks very easy feature, same use Internet.

adanvasco6 months ago
I think the diode is actually there to protect the transistor from the relay, and not viceversa. Anyway, great project!
MegunoLink (author)  adanvasco6 months ago

Thanks, I'm glad you like it!

Ah yes, quite right! I'll update the section in question immediately.