How To Make A Copy Of The Key To The Intercom At Home | Hi-Tech

 

 

Hi-Tech

How to make a copy of the key to the intercom at home

With Arduino you can do at home a copy of the key for intercom for 15 minutes, if, for example, the workshop is closed and the key is needed urgently. Let's see how it's done.

How to make a copy of the key to the intercom at home

You will need:

- Arduino; - a computer; - Key intercom type iButton or 1-wire; - Key-blank to create "clone" the original key; - 1 resistor 2.2 ohms; - Connecting wires.

Instruction how to make a copy of the key to the intercom at home

Step 1:

Each key has an intercom for your room - this is the number, and serves as a key identifier. That number intercom key decides - your own or someone else's. Therefore, such a copy algorithm: first you need to check the "permitted" key, and then assign the same number to another key - clone. For intercom no difference was attached original key or its copy. By checking the number from their database of allowed data rates, it will open the door. Keys for intercom that we will be connected to the Arduino (sometimes called iButton or Touch Memory), read and written to 1-wire interface, 1-wire. Therefore, the connection circuit is very simple. We need a couple of wires and a pull-up resistor of 2.2 ohms. The circuit shown in Fig.

Connect the intercom key to Arduino

Step 2:

To work with the 1-wire interface, there are ready-made library for Arduino. You can use, for example, this: http://www.pjrc.com/teensy/arduino_libraries/OneWire.zip. Download the archive and extract it to a folder "libraries"Located in the directory Arduino IDE. We are now very easy to work with this protocol. Download to sketch Arduino standard method, is shown in the illustration.

Sketch reading rooms on the intercom key

Step 3:

This sketch shows the key number for the intercom, which is connected to the circuit. This is what we need now - we need to find the key number, a copy of which we want to do. Connect the Arduino to your computer. Start the serial monitor: -gt Tools; Serial Port Monitor (or the keyboard shortcut Ctrl + Shift + M). Now connect the key to the scheme. The port monitor will show the key number. Remember this number.

We learn the key number, which will make a clone

Step 4:

Now rewrite the sketch so that he could write data to the memory key. The code is shown in the illustration. provides detailed comments in the code. Importantly, do not forget to specify the number of the original key in key_to_write array that you learned a little earlier.

Sketch for the iButton key programming

Step 5:

Download this sketch in Arduino. Open the serial monitor. Connected to the circuit key to be a clone of the original key. About result of programming the serial port monitor will display a message.

Step 6:

1) If you compile the sketch error occurs [WConstants.h: No such file or directory #include "WConstants.h" ] Should be in the file "OneWire.cpp" replace the first block after the comments on the following: #include "OneWire.h" #include "Arduino.h" extern "C" {#include "avr / io.h" #include "pins_arduino.h" } 2) If an error occurs during compilation "class OneWire has no member named read_bytes" or the like, then get OneWire another library, on the Internet a lot of them.