Which combination lock to choose - mechanical or electronic. How to do it yourself. How to make an electronic combination lock

After the first steel door was invented, installed at the entrance of the house, many began to think about how to protect their home from uninvited guests. Locks are structures for protecting premises that have been manufactured for a very long time. There are various types, configurations, operating features and similar differences, but the essence of the mechanism remains completely unchanged, since the design is designed to block access to the room. Despite the fact that there are many modern technologies, installations such as a combination mechanical lock, the production of which began in the last century, continue to be popular. Initially, they were installed on safes, and over time they were also used in installing doors in ordinary apartments, garages, entrances and private houses.

The design of combination locks is that they do not have a keyhole, due to which they become more reliable, wear-resistant and durable. The likelihood of hacking is significantly reduced. By installing a specific coding of the cylinders and rollers that make up the lock, you can customize the lock yourself, and installation can be carried out on doors made of various materials, for example: metal, plastic and wood. It is advisable that the door thickness be at least 3 cm, which will also complicate the burglary process for intruders.

The diagram for installing a lock on the front door with your own hands is very simple, since for this you need:

  • Select a door locking mechanism relative to the width and thickness of the structure;
  • Make a marking of the future location of the product;
  • Using a drill, drill holes in the door to install the lock body;
  • Install the code panel;
  • Assemble the locking mechanism;
  • Carry out installation and fixation of prefabricated parts of the mechanism;

Finally, you need to set up the code combination and check the functionality of the product.

How to make a combination lock: choosing a variety

To install a push-button door lock, you will first need to select its type. They are: overhead and mortise. To install a surface-type lock, simply install it on the surface of the door, and the bar with the bolt located in it on the jamb of the door frame. Installation will not require more than 15 minutes. Installing a mortise combination lock can cause a lot of trouble and this is where special attention and a competent approach are required.

As a rule, each magnetic door lock has instructions from the manufacturer, which must be followed as clearly as possible:

  1. A lock template is created, which is done by hand. Some manufacturers include it in the kit, and this greatly simplifies the installation process. Using chalk or a pencil, you need to apply markings to the door leaf. Thus, the location of the structure will be marked on the door on both sides.
  2. To make a niche on the door leaf for installing a lock, you can use a chisel or a special drill attachment.
  3. Next, holes are drilled to install the bolts.
  4. Where the crossbar of the lock structure is located, you need to make a recess, and the dimensions must completely correspond to the front plate.
  5. After completing such work, the combination lock is placed in its rightful place and securely bolted.
  6. The face plate is being installed.
  7. It is necessary to make markings on the door jamb for mounting the locking strip, into which the bolt will be placed. To carry out this process, it is enough to lubricate one of the crossbars with chalk, due to which a mark will be made on the jamb.
  8. A recess is made in the jamb for the plank, and you also need to make markings for the holes in order to install it. The installation process fully corresponds to the installation of the front strip.
  9. Finally, you need to secure the counter or locking part of the lock.

Judging by the steps described above, we can conclude that installing a mortise combination lock is similar to installing other types of locks in the same way.

Combination lock repair

To make repairs on a structure such as a digital combination lock, it will not require too much effort, since the main repair work consists of recoding the structure. In addition, preventative recoding is periodically required to increase the safety of the product.

To change the code on the lock, partial disassembly of the structure is required to gain access to the buttons from the inside, for which you need to unscrew the cover with the buttons.

Next, you need to pay attention to the plates located inside, when pressed, the locking mechanism is activated, and each of them has a specially made cut. Visually separate the working and unused plates. To replace the code, turn the required plates in the opposite direction or, in other words, make other buttons active.

DIY invisibility lock

An electronic invisible lock is an additional device that can be used to increase the security of an apartment, house or any other room. From the outside, the electric lock is completely invisible, but inside it is a reliable installation that can prevent intruders from entering. To make such an electromagnetic lock with your own hands, you can use the most ordinary car door actuator from the central locking, and it is controlled or, in other words, blocked by the most ordinary alarm system.

The essence of such an invisible thing is to block one keyhole bolt in the position when it is pushed forward:

  1. Due to the fact that the car anti-theft alarm device has enough wires, and a long type, it is possible to carry out competent and easy installation.
  2. It is necessary to select a place for subsequent installation of the actuator, since the pin that will be extended must fit exactly into the bolt when it is extended.
  3. Next, you need to make precise markings on the top strip of the door frame, and it is drilled. Then a mark will be made on the crossbar, along which an additional through hole will be drilled.
  4. When the bolt is drilled into the hole, a countersink is made so that the actuator pin fits there as accurately as possible.
  5. Using the strip that comes with the kit, you need to secure the actuator to the door frame.
  6. Next, a guide from 1 pin and a limit switch are installed on the door frame so that it is triggered to open the door.
  7. Installation of the alarm unit, as well as all related elements located in a decorative metal box, is required. The box is installed on the wall surface next to the door on the inside of the room.
  8. The box closes tightly.
  9. An LED indicator or, in other words, an alarm system is connected to the doorbell button.
  10. The structure is ready for use.

If a power connection is required, this can be done using a stabilized unit, which has an output voltage of 12 V and a current of at least 1 A. To increase the autonomy of the device relative to the network voltage, you can use a battery from a car to power such a lock, which will be located in pantry or on the balcony.

The lock is designed to accept a specific four-digit number from the panel. If desired, the number of characters can be increased, but as practice shows, four digits are usually always enough.

The circuit is very simple and, if assembled correctly, does not require adjustment.

Combination lock diagram

As you can see, everything is extremely simple: Buttons SB1... SB4, working to close, are used to dial the set code, and buttons SB5... SB8, working to open, are used to restore the device to its original state, for example, in the event of an erroneous code dialing or its selection.

The lock is activated only when all thyristors VS1...VS4 are opened simultaneously. This can be achieved by successively pressing the buttons SB4, SB3, SB2 and SB1. If you press these buttons in a different sequence, not all thyristors will be open and, therefore, it will not be possible to open the door.

The exception is the case when all four buttons SB1... SB4 are pressed simultaneously. If you press any of the buttons SB5...SB8, the power supply circuit of the electromagnet YA1 is interrupted and the device is returned to its original state. The same will happen when you press all code buttons SB1...SB8. Button SB9 is used to restore the lock to its original state after opening the door. The lock is powered from an AC voltage of 220 V through transformer T1 and full-wave rectifier VD2. To power the lock, any power supply with an output voltage of 12≈60 V can be used, depending on the type of electromagnet used.

An electronic combination lock is not only an effective security mechanism, but also a rather effective and stylish solution that can well decorate many modding projects made in the appropriate styles with its appearance. Of course, for design purposes you can make a fake electronic combination lock, but it would be much better to make a working solution. And since we are modders, we will do it ourselves.

Good day to all modders and not only! On the eve of writing this guide, I was unable to find any material on this topic online, so I set about writing my own theoretical article on creating an electronic combination lock. Such locks are quite simple to manufacture and can have a huge number of code options, with any number of characters, but they also have their disadvantages:

  • numbers cannot be repeated (theoretically they can, but in practice this does not make sense. Why - read on :)
  • the buttons are divided into “correct” and “incorrect”, which means that no matter how much you press the “correct” button (in any order), the rest of the correctly entered code will not go astray
  • You can guess the code by the sound of the relay (hide it away)

And just a request: if someone can figure out how to get rid of these shortcomings, write.

If you are satisfied with everything, then let's get started. We will need:

  • fiberglass (preferably falginated), although one of my friends managed to solder it on cardboard :)
  • thin wires
  • if fiberglass with metal, then you need a plastic, enamel or glass container, ferric chloride and nitro enamel
  • buttons (necessarily working for closing and opening)
  • reed switch relays (RES*** depends on the voltage, you need as many as the number of code characters)
  • solvent
  • drill + drill bit 1.5 mm
  • if the piece of fiberglass is too large, then use a jigsaw/dremel/guillotine
  • Printer
  • well, and as always, straight arms + head on shoulders
  • Sprint Layout 4.0

After all the preparations, you can move on to the stage of developing the circuit (if you are too lazy to create your own circuit, you can go straight to the end of point 1, there I will post the circuit diagrams for the lock with code 3846).

Creating a scheme for a combination lock

First you need to understand the principle of operation of the lock. Its main part is the reed relay (hereinafter referred to as the reed switch):

When voltage is applied to the coil, it switches the contact from one leg to the other and, accordingly, if the circuit opens, the contact returns back. This means that if you close a previously empty leg with one contact of the coil and make the system shown in the figure, then when you press the button the reed switch will switch the contact from one leg to another, and after
releasing the button, the circuit will not open (exception: if the circuit opens before “-in”, then the contact will return back and the entered code will be reset (that’s what we use)).

You can set up as many such groups as you like and put together the code using the puzzle method. Now, to get a full-fledged lock, we open the circuit in front of the first group and fill all the remaining buttons of the future keyboard with the same buttons, but working to open (i.e., so that when pressed they do not close the circuit, but open it). In the simplest case, something like this will come out:

Based on this, you can draw a diagram of a lock with any code. For those who are too lazy to create their own diagram, here is the diagram (normal and mirror, respectively) of the lock with code 3846:

* There are jumpers on the buttons - these are not tracks, these are legs that are initially closed
** You will have to draw all the details yourself, because... There are no macros needed
*** Wires are marked in red (to draw: press sides/active side/mask side (1))

Making a combination lock

So, we have a diagram, the required number of reed switches (as many as there are buttons for closing), the buttons themselves, material and tools. You can start manufacturing.

  • We print the diagram in two copies (and one is a mirror copy), and cut off the normal one.
  • Glue it to the unlined side with PVA glue.
  • We drill holes through the paper for the legs of the reed switches and buttons, after which it is better to wet and remove the paper. The faster everything happens, the easier it will be to remove the paper, but Don't rush when drilling!. More precision needed!
  • If your fiberglass laminate is not lined, you will have to solder the wires and skip steps 4-7.
  • We look at the mirror diagram and draw future paths on the falginated side with nitro enamel.
  • After the enamel has dried, place the board in a plastic/enamel/glass container and fill it with ferric chloride solution
  • We wait until the metal on the board is “eaten up.”
  • We take out the board, pour water over it, wipe off the enamel with solvent, wash it, dry it, check the tracks for contact.
  • We solder all the parts into place on the side without tracks, you may have to solder the wires (where it was not possible to add tracks)
  • If necessary, we make a case, connect the power and enjoy the result.

You can use different watch faces.


Three schemes of the simplest combination locks.

I will present to your invaluable attention a few simple schemes to protect your peace of mind. Currently, the amateur radio market is firmly flooded with devices that are used in warning and alarm systems. These devices, from the simplest to the most complex, are assembled, as a rule, according to standard classical designs. All the devices under consideration are available for repetition by novice radio amateurs - designers who do not have deep theoretical knowledge in electronics, and can be used to protect objects such as apartments, offices, dachas, etc. from unauthorized access.
A combination lock is generally a very convenient and practical thing. You don’t need to constantly carry a bunch of metal keys in your pocket to open this or that shed; to do this, you just need to remember the code recorded in your brain or in your mobile phone book; in general, combination locks, according to their characteristics, can be divided into several groups, but the most popular only two remain - mechanical and electronic. It’s up to you to decide which of these technological wonders to use; we will consider only some designs with electronic filling. Most electronic combination locks are made on microcircuits of the well-known K561TM2, KT3 triggers or on microcircuits specialized just for this purpose; especially sophisticated designs appear nowadays on microcontrollers and sensors.

So, our first peace of mind is a combination lock on the 4017 chip.
Yes, friends, the microcircuit is called 4017, there are many companies that produce these products based on this, the letters in front of the numbers may be slightly modified, for example, my microcircuit comes from China, but the descendants of Confucius boldly and unceremoniously stuck the PHILIPS logo on the black case in white and, therefore, the marking is as follows : HEF4017BP. But closer to the body.
The proposed scheme will help you assemble a simple combination lock with high encryption strength. To find a code that you forgot due to drunkenness or for other reasons, you will have to go through 10,000 options. In this case, the lock code consists of 4 digits pressed in a certain sequence. So, the diagram itself:

In my opinion, nothing complicated, soldered and hung. The operating principle of this device is no different from the operating principle of other electronic combination locks on microcircuits. Anyone who has been delving into the country of electronics for a long time already understands this, but for beginners I will explain.
The S6-S9 buttons in the diagram indicate the “correct” code numbers, the S1-S5 buttons indicate numbers that are not needed in the code at all.
Initially, there is voltage at the 3 ms pin (logical "1"). When the "S6" button is pressed, a logic "1" appears at the input of counter 14, and a logic "1" appears at pin 2. In the same way, after pressing the "S7" button, a logic "1" appears at output 4, and after pressing the button "S8" - at output 7. After pressing the last correct digit - "S9" - logical "1" appears at output 10, transistor VT2 opens, the relay is activated and connects the load with its contacts. Relay activation is indicated by an LED.
If you press any of the “incorrect” numbers (S1-S5), logical “1” will go to pin 15 (“Reset” - reset to its original state), and the selection of the code will have to start over. This is such a harmful dirty trick.

The next lock is based on the K561IE9 microcircuit and the KP501A field-effect transistor.
There are few fundamental differences in complexity from the previous scheme, in general, see for yourself:

In general, the chip itself is a four-digit Johnson counter. The principle of operation of this circuit is similar to the circuit described above, although there are more buttons on it.

The electrical circuit works as follows. At the initial moment, when power is applied, the circuit of capacitor C1 and resistor R1 generates a pulse to reset the triggers (there will be a log “0” at outputs 1 and 13 of the microcircuits). When you press the button of the first digit of the code (in the diagram - SB4), the moment it is released, trigger D1.1 will switch, i.e., a log will appear at output D1/1. "1", since there is a pog at input D1/5. "1". When you press the next button, if there is a log at input 0 of the corresponding trigger. "1", i.e. the previous one worked, then pog. "1" will also appear at its output. The last one to fire is trigger D2.2, and so that the circuit does not remain in this state for a long time, transistor VT1 is used. It provides a delay in resetting triggers. The delay is made due to the charging circuit of capacitor C2 through resistor R6. For this reason, the signal at output D2/13 is logic. "1" will be present for no more than 1 second. This time is quite enough for relay K1 or electromagnet to operate. The time, if desired, can easily be made significantly longer by using capacitor C2 of a larger capacity.
While dialing the code, pressing any incorrect digit resets all triggers.
Well, that's basically all.

The circuit of a simple electronic combination lock. The circuit is not complicated, you only need to flash the PIC microcontroller. For this circuit you need PIC 12F675 (629) - it won’t work.

The diagram itself is very simple and contains a minimum of details.
Lock diagram:


advertise for free
Keyboard layout:


The principle of operation is very simple: all buttons are connected through a chain of series-connected resistors. And each button has its own resistance (if button No. 1-1k, then button No. 2-2k, and so on). All these values ​​are written into the microcontroller when programmed, after which it responds only to them.

Programming the code is very simple: press the CODE button and hold until the LED lights up, then enter the code on the keyboard. All the new code is programmed (for those who don’t understand, watch the video of the operation at the bottom of the article)

The actuator (M) can be anything, in my case it is a low-power electric motor that will rotate the gearbox: so I connected it to the same power source as the circuit itself. If you have a powerful actuator: then it should be connect from an additional power source.

I found only a matrix keyboard, here it is in the photo

The problem was that. its connection looks like this:

I had to redo it, cut the tracks and soldered in resistors as in the diagram, this is what happened:


I did not connect one row of buttons (these are the letters A, B, C, D)
Only the letter (D) is connected as a power button (that is, the circuit only works if you hold down the button (D)) This reduces the probability of selecting the code to zero.
And the combination lock itself does not consume any current in standby mode.

I want to put this lock in the locker at work, which I often break into, and I don’t want to take out a bunch of keys every time. Since the standard lock will remain in place, I made a power supply from batteries (so that there would be no wires to the box), well, once every few months you can open the door with the keys and change the batteries.

First assembly of the circuit on the circuit board (to check its functionality)


Everything worked great. Next, I selected a suitable case, etched the board and connected everything. Due to the small number of parts, the board turned out to be quite compact and fit into a small case.