Wednesday, July 11, 2012

Wifi garage door opener

I took apart my last garage door opener because there's another project that needs my bluetooth antenna. I realized how much easier the garage door opener would be to make over wifi and much less work to have it tidy in a permanent enclosure. Not to mention, the ethernet shield is roughly the same price as a 2nd antenna. This assumes you have wifi in your home with access from your driveway, a spare network port in your home network for the ethernet shield, and a cell phone.

In the picture is the PCB from the inside of a traditional garage door opener is laid on top of the ethernet shield + arduino uno combo. The transistor is pushed into the heated solder points of the push button with the center pin going through a 10k resistor to the output pin of your choice.
This 2nd example in this tutorial for lighting an LED can be copied without editing to use pin 2. The tutorial also walks you through testing the local address that will trigger the button. Now you can create a shortcut or bookmark to the website on your smartphone to be able to open with one click.

While this is all you need, I've also soldered wire to replace the battery. Since this one uses a 3v battery it's going to the 3.3v and ground pins on the board.

Adding to it by opening with a text

So in the rare occurance that I'd need to open the door while away (family member locked out of the house.. just takes one time). I decided to go with sending a text. For the time being I have an older android phone as a "home phone" and this script should be easy to replace the check for new texts section with anything from checking email to checking twitter and can easily grow into a smart home station. Aside from the wifi setup as the foundation, this involved downloading the SL4A app from here. Then create a Python script with the following code:

import android
import httplib
import time
droid = android.Android()
var = 1
while (var == 1):
 smscheck = droid.smsGetMessages(True, 'inbox')
 for i in smscheck.result:
  if 'Open Sesame' in i['body']:  # The command you want to send via text
   url = ''  # IP address of ethernet shield goes here
   uri = '/?2'  # Pin number being used should replace 2
   ES = httplib.HTTPConnection(url)
   ESreply = ES.getresponse()
   print ESreply

Thursday, July 5, 2012

R2-Q5 - Making a droid

I've been a Star Wars fan since my parents took me to see Return of the Jedi when I was three years old. It's one of my earliest memories. Sitting in my dad's lap in a crowded theater and seeing luke wielding a green lightsaber with the sands of Tatooine in the background.

So when I started getting the bug to make stuff last summer, I came across A sight dedicated to droid builders of the R2 variety. A great site for collaborating ideas, tutorials, or just chatting on a regular basis with people who share the interest. With any large group there are a few bad apples, but I've found this to be a great community.

Here's a photo of how my droid has been sitting since the fall.

I'm going with R2-Q5 as the designation. There's something of a 10:1 ratio for R2-D2 vs. other full size replicas and imperial droids need to represent!

This one will permanently be on all three feet. Apparently retracting feet are expensive to make, but it will be remote controlled with moving dome, opening doors, blinky lights, and sounds. The last piece I put together was a lens for the radar eye. The radar itself was made from Resin by Mansugi on 

The lens is from an arts and crafts ornament found at Michaels. An idea discussed at The diameter of the cut coincidentally matched my kitchen sink drain, which was used as a template. Yes, I went looking through the house like a Sesame Street episode looking for circles.
The ornament ball is fairly sturdy, but I put too much pressure on it trying to rush through cutting. The edge of the dome is thicker than the top, meaning the breaking point isn't going to be on the piece of scrap. This is why I'm using a knife in the picture and taking my time.

Here's the final fit before gluing in place.