Introduction: Alohomora :: Unlock the Door

About: Just an ordinary person who loves #thinking and #tinkering

Talking about wizard, the first thing comes to my mind is "Magic Wand". Reading the "Wizarding Contest" at Instructables makes me thinking if I can combine the old magic wand to the new digital world of robot or electronics. For celebrating Harry Potter's birthday, here I present the magic charm to unlock the door. "Alohomora!"

Keep reading to find out how it works.

Step 1: Let's Go Shopping

Here are your shopping list :

  • An Arduino Uno.
  • A micro servo.
  • A mini breadboard.
  • An 11 V LiPo battery.
  • A 16 V 1,000 uF capacitor.
  • Any resistor between 50 to 100 ohm.
  • A mini momentary switch.
  • An infrared LED transmitter (I took out from an old broken remote controller).
  • An infrared receiver (I took out from an old broken DVD player).
  • Some jumper wires
  • Nylon fishing line

Tools involved in this project :

  • Mini hammer
  • Chisel
  • Screwdriver
  • ehm...er.. I guess that's all, well you can pick a box to put all your electronics or you can think about it later.

Step 2: Hack the Latch

This is an old door lock system but still being used widely in Indonesia. The top latch is the one keeps the door closed. The bottom part is the lock with a key. We are talking about releasing the top latch, not the key lock.

The mechanism is simple, the door levers will move the "d" shape lever, pulling the door latch to open the door.

Remove the "d" shape lever and tie up the thin nylon fishing line to the door latch. Tie up the other end to the servo's horn. Make it as close as possible to the door latch case, because we don't have much room inside the door or you want to dig it deeper. Now put back the "d" shape lever.

If you are using a micro servo, you might want to replace the spring with a softer one (well, don't ask me where to get it. I found one in my junk box :D ) unless you have a stronger servo.

Put the door latch case back, there must be a little gap for the fishing line to move freely. I have seen in 3 door latches of mine and all of them have little gaps. If there happens to be no gap, then you should bend the case a little to make gap for the line to move.

Step 3: Wiring the Arduino

The mini breadboard is used here to share the power lines. Capacitor goes to power lines. Servo needs power lines. So is the infrared receiver. For infrared transmitter I use separate power because it will be on the magic wand separated from the Arduino circuit. You can minimize the circuit by soldering directly so you don't need the breadboard and lot of wires. You can use Arduino Pro Mini for more compact size circuit on your door.

You can see the wiring from the image above, I will describe by parts :

  • Battery (+) to Breadboard (+)
  • Battery (-) to Breadboard (-)
  • Capacitor (+) to Breadboard (+)
  • Capacitor (-) to Breadboard (-)
  • Servo Brown to Breadboard (-)
  • Servo Red to Breadboard (+)
  • Servo Orange to Arduino D3
  • IR receiver left pin to Arduino D2
  • IR receiver middle pin to Breadboard (-)
  • IR receiver right pin to Breadboard (+)

For the IR transmitter wiring will be describe later in the next step.

Step 4: The Magic Wand

What we need for the Magic Wand :

  • A wand for sure (a stick at desired length about 10" to 14")
  • IR transmitter LED
  • 50 to 100 ohm resistor
  • Two or three coin batteries ( 3V or 4.5V )
  • A small momentary switch
  • Some wires

Thanks to bamboo which has a hollow part in it, but we still need to drill the solid center on every node. Then I make a mini drill from a wire. I filed one end of the wire with several sharp cuts. Make a circular movements with the wire to drill through the bamboo's nodes. Yes, it is not that easy, but it is doable and I have proved it to you ^_^

Get a pair of wire through the bamboo. Try to find a smaller gauge wires. I peeled off the black wire jacket to get it through.

At the tip of the wand, solder the black wire to resistor, and the resistor to cathode of IR transmitter LED (the large piece inside). Then solder the red wire to the anode of IR transmitter LED (the small piece inside). Put a shrink tube if possible to avoid short. Due to the thick wires I used, I couldn't push the LED in. Instead, I cut another short piece of bamboo and split it into two at the diameter. Then I filed the inside so that the resistor and wires could fit inside. Simply wrapped it with transparent tape.

I run the wires at the handle end of the wand in zig-zag style to the position of my pointer when holding the wand. Solder the wires to a momentary switch. So you got black and red wires on the momentary switch. Now cut the black wire at the end of the bamboo (the handle end). Stack two or three coin batteries in series (I used LR44) on top of one black wire end. Put the other end of the black wire on top of the batteries. In short your cables go this way, wire from resistor goes to negative of battery. Positive of battery goes to momentary switch. From the momentary switch, the cable goes to anode pin of IR transmitter LED. That's it. Wrap the wires with brown tape to give the same color with the bamboo. The crossing wires give more art to the wand and make a better grip.

To test the circuit, open your phone's camera app. Point the led to the camera lens. Press the momentary switch button. If everything goes well, you should see the led is glowing pink/purple light. We cannot see the light with bare eyes, but phone's camera can ^_^

Step 5: Arduino Sketch

/*
 * Use any IR signal to open a door latch.
 * By Chienline @2016
 */

#include <IRremote.h>
#include <Servo.h>

int RECV_PIN = 2; //IR signal on pin D2
IRrecv irrecv(RECV_PIN);
decode_results results;

Servo myservo3; //Servo on pin D3  

void setup()
{
  Serial.begin(9600);
  Serial.println("Serial Ready ...");
  irrecv.enableIRIn(); // Start the receiver
  myservo3.attach(3); 
  myservo3.write(120); 
}

void loop() {
  if (irrecv.decode(&results)) {
//    Serial.println(results.value, HEX);
    openTheDoor(); //any IR signal can open the door
    irrecv.resume(); // Receive the next value
  }
  delay(200);
}

void openTheDoor(){
  myservo3.write(0);
  delay(1000);
  myservo3.write(120); 
}

Step 6: Fitting the Circuit

The hardest work in this project is fitting the circuit in and on the door. It took me one night thinking how to put the servo in the door. Finally, I cut out a hole, as big as the servo. Another difficult task was to put the servo's horn. Luckily my calculation of the horn position and the hole I made was just perfect. Pressing the door latch, I could pull out the horn with tweezers. After fixing the horn to the servo, I put the servo's top part inside the door, inline with the door latch. I just hooked my circuit to the other unused door latch above. You can screw a box on your door and put all the circuits in it. Turn it on and cast your spell. Alohomora!

Note : Author is NOT RESPONSIBLE for the damage of your door.

Hope you read to the very end of this instructables to see the "Note". Oh.. I should have put this note at the beginning. I am not responsible anyway. Just enjoy the making of this project ;)

Now your door can be opened with any infrared remote controller. For sure!

Wizarding Contest

First Prize in the
Wizarding Contest

Automation Contest 2016

Runner Up in the
Automation Contest 2016