Smartphone operated garage door is beginning of Arduino home automation system

[Tim] is showing off the first step in his home automation projected with this smart-phone garage door interface. In the video after the break you can see him open and close the garage door with the touch of a button. There’s also an open or closed indicator that he can check when away from home.

An Arduino takes care of a portion of the control for this project. Like the post we saw yesterday, he’s using PHP code on a webpage to manipulate the Arduino via its USB connection in order to open and close the door using a relay. The door status is also monitored by the Arduino and sent to the PC over the serial connection. The computer uses a Python script to monitor the incoming data and update a text file which is merged into the web interface using a PHP include. Future plans for the system include adding control for heating and air conditioning systems.

If you’re looking to do something like this but wirelessly here’s some advice on ditching the Arduino and using an XBee module instead.

Comments

  1. Tom Hargrave says:

    Great project.

    But it would be even a better project if it were hosted on its own stand alone web server. This way he would not need to tie up a PC or depend on a running PC to operate the garage door.

    Another idea would be to use the phone’s GPS to automatically open the garage door when he drove into range.

    • Mitchell says:

      Hello

      I have done this using a Netduino Plus and a 2GB SD Card.
      I think it would be more effective to use a Netduino as it has all the features built in.
      You can link the Netduino using serial to other Arduinos’ and enabling complete control of your house.
      You can add a pass-code that is needed to be sent wen operating the devices for security.

      Regards
      Mitchell

  2. Tim says:

    The reason I didn’t use an ethernet shield or the like is that I was trying to save some money. I had an old PC laying around so I figured I would put it to use.

    The idea of opening the garage door based on location is a fun one, but probably not practical. I’d need to leave something running on my phone all the time which would eat up my battery. Also, with weak gps signal in the house it might cause problems if it showed me moving around.

  3. UserName says:

    You could of also used Python for the web pages by installing WSGI for apache. May of made things a little simpler. Or the web page could just query the arduino each time for the state of the door.

    But the Ethernet shield would be awesome to be a stand alone project. Be better for electricity bill.

  4. jamen says:

    hey Tim, this is awesome to me strictly because i’m working on a similar project

    i can control my garage door with a php script, but i can’t get the status via a serial port working for some reason, i was trying to use a loopback method to echo to the serial port and listen for it to determine if the door was open or closed, but it seems unreliable.

    any more details on that step would be sweet!

  5. Add some Ajax tO send the status back to the webapp, jquery is pretty easy to pick up

  6. Bill says:

    Looks like one of those Gateway Drug things. First you try using your smart phone to control the garage door, and then you’re making things to turn the hot tub on remotely, or make the front door lights turn on when you’re about to get home, and eventually you’ve got Arduino-controlled detectors playing different theme music when your different kids walk in the room and little robots feeding the cats. Just Say No!

  7. swink says:

    The schematic is wrong
    d1 r4 led1 and
    d2 r5 led2 have no function what so ever
    (they are shorted)

    d1 and d2 have to be // over the relay coil

    and i doubt if the relay will switch if you put
    an led an a resistor in series with it

  8. swink says:

    sorry didn’t read the line above the picture

  9. Fred says:

    This uncannily similar to my own setup – a garage door and two sets of lights in the garage.

    The difference being that I’ve used a Netduino Plus to control it and have the web pages served up directly from there. No need for a PC.

  10. Tim says:

    @jamen, I had similar problems with unreliable data when trying to monitor the status of the door contact. I originally wanted to just pass the string directly from the arduino (open, closed, etc) and have it saved in a text file. I ended up just passing numbers and using result.strip in the python script which then writes a text file based on what number it received.

    @Fred, I originally wanted to control lights too, but I ended up controlling my security system instead. I’d be interested to see how you did your setup. Do you have any information on it?

  11. Tim says:

    @swink I removed the LED’s and resistors to prevent confusion, but you were right about D1 and D2, I dropped them on the schematic wrong. Thank you!

    • tr2628 says:

      I’m sure Tim has shown this to at least
      100 people 3 times each week . There for I offer my services free of charge when he needs a new opener installed.

      Heck I’ve seen it 4 times personal just last week. Maybe a status to tell you your
      Wife’s Home and you should not wake her up with the door again.

  12. tropicsigns says:

    @Fred (and others) – Is your method broadcasting the webpage over your home network back to the internet,where any computer can access the page?

    Or is it broadcasting the webpage inside your garage only – meaning your phone has to be in close proximity to view the page?

    I’m looking for a way to cycle a relay using wifi or bluetooth using a cellphone without requiring an internet connection.

    Any suggestions would be appreciated,

    Gaver

  13. tropicsigns says:

    @Fred (or others) – does your netduino system broadcast the page thru a router back thru the internet for all to access?

    Or is it only broadcasting for a short distance in the garage for your cellphone to view?

    I’m searching for the ability to cycle a relay using bluetooth or wifi from a cellphone without requiring an internet connection?

    Any suggestions on where to search for help?

    Gaver

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 94,539 other followers