Monday, December 30, 2013

Garage Door Controller Tutorial - Introduction




I call this project 'Garage Door Controller'. The hardware is based on Arduino, and the 'software client' is an Android app. I do not have any immediate plans to release an iOS version of the software as I have no interest in developing on that platform (I'm not a fan of Apple's closed source model). However, if there is someone out there interested in porting the program to iOS, you may contact me and we can discuss that.

With the hardware and the free Android app, you will be able to see if your garage door is opened or closed, and you will actually be able to open and close it...from anywhere in the world you have Internet access.

Before you go any further, let me just make a couple things clear:
  1. You need to have a working automatic garage door opener
  2. I'm assuming you have the ability to run an Ethernet cable from your network switch/router to your garage door controller device, which should be near the general vicinity of your automatic garage door opener. (Technically you don't have to run an Ethernet cable to your router/switch...if you have a wireless router and/or Access Point, you could use one of these. I explain this more in Step 6.)
  3. I'm assuming you have the ability to run (2) lengths of wire (light gauge/low voltage) from your garage door controller device to the vicinity of your garage door. This is your 'sensor' that will tell you if your garage door is open or not. (This is not required, but recommended)
  4. I'm assuming you have a way of programming an ATMega328 microcontroller. For example, you have a computer running Windows/Mac/Linux (to run the free Arduino IDE), a standard USB cable, and an Arduino board (or similar/compatible). If you are brand new to Arduino, you should check out some of the following links:

All the source code for the Arduino and the Android app are linked below. The Android app is called 'Garage Door Controller' and is available for free on Google Play.

There is a possibility that you may run into a slight inconvenience when using this system if your router does not support loopback. Please check out my post, Garage Door Controller Tutorial - Using the app away from home for more info on this.

The project cost can vary wildly, so a very rough estimate would be around $40 - $85. It depends on several factors. Please see my FAQs page under the question, 'Is there anything I can do to bring the total cost of the project down?'. Obviously the more components you already have on hand, the cheaper it will be (it may actually only cost you a few dollars!).

How does this device work? You connect your garage door controller to the Internet by connecting it to your network. Connect the garage door controller to your automatic garage door opener. Install a reed switch and magnet on your actual garage door, and the (2) wires that come off of that connect to your garage door controller. Download and install my free Android app to connect to the garage door controller over your network and/or over the Internet to check the status of the door, and open and close it.

Here is a video of my device in action:




Downloads/links for this project (all on GitHub):
  1. The Arduino sketch (and supporting files)
  2. Android app source code
  3. Circuit board files (for submitting to professional board house)
  4. Circuit board files (for making your own circuit board at home)

I tried to break this project down into several smaller steps:
  1. Step 1 - Parts Gathering
  2. Step 2 - Soldering
  3. Step 3 - The microcontroller
  4. Step 4 - Putting it together
  5. Step 5 - Testing
  6. Step 6 - Opened / Closed sensor (optional)
  7. Step 7 - Your network
  8. Step 8 - Mount and connect
  9. Step 9 - Smartphone app
  10. Using the app away from home (supplemental/optional)


In the next step, I provide direct links (to Digikey, Sparkfun, etc.) to the individual parts you'll need. As an alternative, you can check out my store which includes the full kit, fully assembled device, etc which may be more convenient for you.

Ready? Let's go - Step 1 - Parts Gathering!


Disclaimers:
1. I am not responsible for any damage/harm you may do to your garage door, your phone, yourself, or anything/anyone else during this project.
2. I am not a professional electronics engineer, or a professional programmer. I have had no prior Android development experience, so I picked up a couple of books and started learning for this project. In other words, please don't laugh at my code. On the other side of the coin, I would love to hear ideas/suggestions from the more experienced programmers out there.
3. Even though I've implemented a 'password' requirement for the Android to be able to send commands to the Arduino to open the garage door, it's not very strong security. It's sent as plain text over the internet, so anyone with the right software and know-how could intercept it, and start opening/closing your garage door with just a little more info. I do have some ideas about implementing better security, so in future Android/Arduino releases I may implement something...but can't make any promises.

7 comments:

  1. The device can be very helpful to control garage easily using control.

    ReplyDelete
  2. Its like you read my mind! You appear to know a lot about this, like you wrote the book in it or something.

    I think that you can do with some pics to drive the message home
    a little bit, but other than that, this is
    magnificent blog. A great read. I'll definitely be back.


    Feel free to visit my site - garage door services

    ReplyDelete
  3. Very nice information.Nowadays this device is used frequently

    Garage Door Opener Tempe

    ReplyDelete
  4. Blog is very good, I like it! Thanks for sharing this information!
    American Best Garage Doors | Garage Door Repair

    ReplyDelete
  5. I love that the garage door repair is broken into ten smaller parts. Sometimes I don't function with a whole big process. There are times I need to have word and visual step by step processes. I'll be reviewing your steps for sure.
    http://www.allseasonsgaragedoor.com/service-repair/

    ReplyDelete
  6. I really like the way you have explained each and everything so well. Very well done with the article! I enjoyed the information lot. Thanks for sharing this information!

    ReplyDelete
  7. Thank you very much for sharing on this valuable information with us, i truly appreciate it.
    Garage Door Opener

    ReplyDelete