Android + IOIO + Garage Door

  

Control your garage door with Android and IOIO.

For additional background information on interfacing Android with IOIO, check out my other introductory tutorials:

Android + IOIO + Simple Digital Output
Android + IOIO + Simple Digital Input
Android + IOIO + Simple Analog Output
Android + IOIO + Simple Analog Input

Background on Android development, IOIO, and electronics:

Meet IOIO
IOIO for Android Beginners Guide
IOIO Wiki
Android Developer’s Guide

 

Hardware

Parts needed:

  • Android Device (1.6+, 2.1 for Bluetooth)
  • IOIO (available at Sparkfun)
  • Hackable garage door remote
  • 2N3904 transistor
  • 10k ohm resistor
  • 5V DC Relay
  • Breadboard
  • Power supply
  • Hook-up wire

 

Assembly

First, remove the outer plastic case from the garage door controller.  Locate the two sides of the button that are connected when depressed.  Solder a lead to both sides, and connect these leads to the two sides of the switch terminal of the relay.  Now the relay is ready to ‘press’ the button with the coil is activated.

Then connect the base of the transistor to the desired IOIO pin with a 10k ohm resistor in series. Connect the collector to +5v and the emitter to the one side of the relay coil.  Finally, connect the opposite side of the relay coil to GND. Here is a diagram of the completed circuit (created with Fritzing). Note: the button on the right side represents the remote garage door controller:

Software

Get the source

With the circuit assembled, the next step is to get the demo application on the Android device. You can either download the pre-built .apk or checkout the source from Github:

git clone git://github.com/mitchtech/android_ioio_garage_door.git

If you are building from source, you will also need to import the IOIO Library project, and optionally the IOIO Bluetooth library projects, both available here:

git clone git://github.com/ytai/ioio.git

 

Install, connect, profit!

Finally, upload the app to the Android device (or browse to this page on the device and download the apk above). Connect the device to the IOIO, and start up the app.

 

6 Comments

  1. Mitch, at this time the link to the apk on this project is broken. Shows that the file is no longer on the server. Can you help?

  2. cagiva851

    Hi Michael,

    I followed your diagram Fritzing to completed circuit for Android + IOIO + Garage Door project. However, I am not able to trigger the relay since transistor emitter only outputs 2.8V and 43mA.

    Would you mind taking a look at this picture to see if I missed anything salient from your steps?

    Thanks in advance, and best regards!
    -AJ

    https://lh5.googleusercontent.com/-KspEsGGgido/UQXGlBp5KsI/AAAAAAAAASI/dsX9y_3_bzw/s1041/SANY0015.JPG

    https://lh4.googleusercontent.com/-K_c1ozwsQOY/UQjB7HTo9II/AAAAAAAAATM/0oSNDWVinx8/s753/Transistor.jpg

  3. Hi Michael.

    I am trying to duplicate your diagram and when i put a volt meter after the transistor i only get 3.0 volts…. I do see that clicking you on application drops the volts to zero for a second, but i think due to the low voltage at the 5v dc relay my switch doesn’t work… Any ideas as to why i get 3volts? PS.. i do get 5 volts right in front of the transistor.

  4. These advances in technology amaze me. For years we have had customers call us to ask for replacement garage door remote controls that have broken or been lost. It is exciting to think that we could be heading towards solutions that could be integrated into their existing gadgets.

Leave a Reply