Instructables

Remote Control Door - Internet Your Thing

Featured
We can instantly open a door or control anything we can connect. It works from any iPhone, Android, or PC. After connecting something we want to control, download the free app to a PC, open a port, and control it remotely from anywhere. It's open source so anyone can modify it to sense and control anything they like. You can try it out here. In the kickstarter video we show creating a virtual fence around our house to automagically open the garage door and let the dog out when we approach home.

For less than $50 of easy to find parts and a little ingenuity, we can let our best friend out as we approach home so he can meet us at the door. If for some reason we can't be home on time, we can open the door from anywhere. We could even program a timer to automatically let him out in case we didn't have service.

We've also created prototypes that can open the kennel door or activate other items as we approach or leave home, work, or any other location. You can find out more on the Internet Your Thing Kickstarter project.

Download a fully working server here, just unpack it and run.
Get the full source here. A complete list of all technology used is published at the end of this howto.
 
Remove these adsRemove these ads by Signing Up

Step 1: Prepare

Picture of Prepare
All the materials and tools that we used are listed below. There are also some optional items listed if you want to go wireless. The kennel we modified was a large Vari Kennel. If yours is different, you will most likely have to modify the mechanism.

Materials
  • Kennel
  • aluminum or steel flat stock: (local hardware store) 1/16 inch thick, 1 inch wide, 2 feet long
  • bolts and nuts: eight 10-24 x 1/2 inch long or similar
  • board or rod: approximately two feet long
  • pulley, small
  • string: approximately two feet
  • weight: a small water bottle works well
  • hobby servo like B1221
  • small stiff wire: three inches
  • arduinio or derivative microcontroller and small stand-offs for mounting
  • wire: approximately 4 feet (old telephone or Ethernet cable works great)
  • electrical tape
  • Twist ties from toy packaging 
Tools
  • screwdriver
  • drill
  • hacksaw
  • pliers
  • hammer
  • large wrench or vice to bend metal for servo bracket
  • knife or wire strippers
Optional

Step 3: Configure Arduino

Picture of Configure Arduino
This is easy, trust me! You don't have to write a program, just load it.
  1. Download the free Aruduino IDE from the Arduino site
  2. Plug the USB cable into the Arduino and the PC
  3. Click Tools : Board and select you Arduino model - most likely an Uno if you bought it recently
  4. Click Tools : Serial Port and select the port for your Arduino, probably the only one available
  5. Copy the simple Arduino sketch below and paste it into the text area
  6. Click the on the toolbar square with the arrow that points to the right (it's white in the picture), this is upload
  7. If it succeeds, you have successfully programmed the Arduino and can close the Arduino IDE

//Start of sketch
#include <Servo.h>

Servo servo;
//pin we connected the servo to
int servoPin = 2;

//Open and closed servo positions in degrees
int closedPosition = 130;
int openPosition = 30;

void setup()
{
  servo.attach(servoPin);
  Serial.begin(57600);
}

//does the following loop forever
void loop() {
  //if something was sent to the arduino, process it
  if (Serial.available() > 0) {
    processInput();
  }
}

void processInput() {
  int input = Serial.read();

  if (input == 'o') {
    servo.write(openPosition);
  } else if (input == 'c') {
    servo.write(closedPosition);
  } else {
    Serial.println("Send 'o' to open, 'c' to close");
  }
}
//End of sketch

Step 4: Start Server

Picture of Start Server
portForwarding.png
We've provided an app you can download and run on your own PC to avoid additional fees. We've also posted all the source so you can inspect and modify the app to do whatever you want. We just ask that you maintain the link to our site.
  1. Download the app
  2. Unpack it
  3. Run the script
  4. Configure your router to port forward to the app on port 9549 - you can change this if you like
  5. If you want security, configure SSL and add authentication
You can open the web page from any PC, phone, and tablet that is connected to your home network. If you want to control things from outside your home network will either have to configure your router/firewall to port forward to your app or pay somebody to host the app on a cloud server. You will have to run a special  app called a proxy to get through the router/firewall. Everybody is chasing this recurring revenue stream right now. Anyway, you can run (host) your own for free.
  1. Run ipconfig (windows) or ifconfig (linux) on the PC where you'll run the app to get the IP address
  2. Login to your router
  3. Go to the port forwading
  4. Add a forwarding rule that forwards traffic from port 9549 (default which you can change) to the IP address from step 1 and port 9549
  5. Save the config
  6. Check the routers status and get the public internet address - this address is what you will connect to from the outside (phones, work, etc.) It will look something like http://74.44.69.247:9549
Some things to keep in mind:
  • Your public IP address can change preventing access. There are DDNS services you can use to create a name and keep the dynamic address up to date if it changes so you can always connect - you can read more about it here.
  • Your internal IP address can change preventing access if you use DHCP . It generally doesn't, however you may want to use static IP addresses so it doesn't change.
  • If you have more than one router/firewall, you will need to setup port forwarding on router/firewall between the server and the public Internet. I have Vonage and a Netgear WiFi router, so I had to configure both. The procedure is exactly the same as outlined above.

Step 5: Kennel modifications

We made three minor modifications that can all be removed/reversed in the event we ever want to ship or sell the kennel.

Latch

The door latch on the Vai Kennel has springs which push two bars in opposite directions. You have to squeeze on both of them to open the door. When shipping your kennel, this keeps the door from accidentally opening if a baggage handler were to grab and lift only on the latch.

The springs are too strong for a standard servo to open. We've found that only the bottom latch, gravity, and the servo keep our kennel door closed. You may need to experiment with yours to see what works best.

Pop the cover off the latch by gently prying from the back with a flat bladed screwdriver, remove the springs, and pop the cover back on. Put the springs in a bag and tape them to the side of the kennel in case you ever want to ship your dog in his kennel.

Counter weight

To open the door we need to add a counter weight to pull the door open when it is unlatched. This was accomplished by attaching  a narrow board to the side of the kennel with a pulley on the end. The length was chosen to match the open door so the pulley and the door meet. This gives ideal leverage. The water in the bottle was adjusted so the door didn't open too fast or slow. We also had to trim a couple bits of plastic the door was sticking on when it was closed.

Controller

We mounted the controller on the back where no one would see it. We drilled three small holes and attached the Arduino with matching stand-offs and 4-40 screws. The optional Bluetooth or Daisy WiFi controller was attached with self adhesive hook and loop tape. The cables were neatly routed under the kennel frame and held in place with twist ties from toy packaging which my wife conveniently saves - thank you dear.

Step 6: Servo mount

kennelCarwynMountingServo.JPG
kennelServoMountAssembled.JPG
kennelServoCloseup.JPG
Using the the 1/16 x 1 inch aluminum or steel flat stock.

Cut the following
  • 6-3/4 inch - servo mount
  • 2 1/8 inch - backing plate 
  • two 3-1/2 inch - risers
Drill 3/16 inch holes

Tape or clamp the above pieces to some old wood and drill all holes (3/16 inches) before bending. It is easier to drill first. All the holes will line up.

The only holes that are important are the pairs on the end of the long servo mount. To mark them, just push them in along the end of the servo under the mounting holes and mark with a pen. Do this on both ends.

The other holes just need to be roughly aligned as you see them in the picture.

Bend

Kids like love to pound on metal with hammers to form it into something.

The long servo mount needs to be bent into a "C" shape to match the servo. If you used a similar servo, then the small end bends need to both be at 1/2 inch and the other two bends need to be at 2 inches (1-1/2 inches long) leaving 2-3/4 across the bottom.

The two 3-1/2 inch risers need to be bent at 2 inches from the connection to the servo bracket.

Assemble

Kids also enjoy putting all the parts together and especially crawling inside the kennel. If the dog goes in too, all the more fun.

Connect the risers to the servo bracket and then connect the servo. It has to be done in this order so you can tighten the riser bolts before you mount the servo. Last, mount the whole assembly to the kennel door by placing the backing plate on the inside and the servo assembly on the outside. Align the servo so it is centered over the latch cover.

Step 7: Technology

Technology
hello you did great job with your project. i am very impression of you thank you for sharing for us...

hey, i was wondering i check out myself on Amazon bluetooth module serial adapter the link is http://www.amazon.com/Banggood-Wireless-Bluetooth-Transceiver-Backplane/dp/B008MVIBV4/ref=wl_it_dp_o_pC_nS_nC?ie=UTF8&colid=3LTHHNKZZI3WX&coliid=IX579Q1OUOWH6. Will it work with Arduino? If so, Where the bluetooth four wires connect to Arduino pins?

Where did you get serial.begin 576000?