Combination lock with their own hands

Simple electronic combination lock

The device, which I describe in this article, is called the combination lock. But it is unlikely it can be used to protect against unauthorized access anywhere in real life. The article is designed to help beginners understand the logic chip standard, one of which is used in this scheme. The scheme is extremely easy to understand and produce, the main unit consists of only one chip, and five identical resistors. Also, for manufacturing the device will require ten push-buttons, power source and actuator (e.g., relay or diode).

So, the full list:

  1. chip K155LA3
  2. 100 ohm resistor - 5 pcs
  3. Push buttons - no less than 5 pieces
  4. Power supply - 6
  5. Controlled device - LED, relays, etc...

Schematic diagram of the device depicted below, parallel to S5 can be placed infinitely many keys.

The scheme seems difficult, but it is not. If you explain in a nutshell, the 11 output is a logical zero if and only if the S1-S4 buttons are closed and S5, and parallel to it are open. Why is that? The chip includes 2I 4-NO element. When S1-S4 are closed, the outputs 3 and 6 of the first two logic elements will be logical zeros, which are installed at the inputs 9 and 10 of the third logic element. This creates a logic one at the output 8. It is transmitted to the input 12 of the fourth element. If S5 is not closed, the output is a logical one, and if closed, then zero. For those who are even slightly familiar with the algebra of logic, I think everything is clear.

  • technical competence

Average article: 0 Votes: 0 friends.

Comments (6) | I gathered (0) | Subscribe

To add your assembly requires registration

- If S5 is open, the output 11 will never be a logical zero, there will always be one;

- logic zero at the output 11 appear in the following cases: when circuit contacts S1 + S2 + S5 or S3 + S4 + S5, or S1 + S2 + S3 + S4 + S5.

In dogonku: generally zero at the exit 11 when you press any button S5 + of S1-S4, two or one, three, or all at once.

Certificate of Registration Media EL FS number 77 - 59178 of 09.03.2014 issued by Roskomnadzor

When using materials from the site is obligatory

Electronic lock with your own hands

Once one has bothered me the lock on the front door of my home. So I decided to make an electronic combination lock with their own hands, despite the fact that the mechanical door lock is still the most popular, I wanted something - something more "intelligent" - such as to cover itself, revealed to not have to always carry with them the keys from the house.

To begin, consider some of the solutions that we can offer this modern and crazy world.

Touch memory - electronic cards and keys. This option I immediately fell off, as mentioned above, I did not want to carry with you anything that can be lost or forgotten. And this problem is very urgent for me, as my distraction tends to infinity.

Code panel. I scored code and went - what could be easier? Is it just to remember the code - but it is in principle not difficult to remember 6 or 9 digits.

Retinal scanners. Quite expensive devices, I can not afford.

Fingerprint readers. Now that's a different matter, and for the price, and on the properties. Nothing to forget or lose necessarily, because your fingers are always with him, though.

So, from the above events have attracted me more fingerprint reader and the code panel. Of these two options, I chose the bar code. Why - it's hard to say, perhaps because the panel is still cheaper than the reader.

Make the panel itself - this idea immediately disappeared. Of course, at home it is extremely difficult to make a beautiful and strong panel. So ridiculous plastic parody acquired I was out of work, but nothing - may be useful for the evaluation board.

Therefore the CBD-10B was acquired. This code Flush panel. I immediately installed it on the door.

Inside her, by the way, turned out to be our old friend microcontroller Attiny 2313.

Between the pushers of buttons and the buttons themselves - prokadka of rubber and metal plate with holes. Probably not allow water to penetrate.

And almost nothing interesting - board with buttons, switch, controller and all.

Two words about the installation - at the door cut corresponding rectangular hole into which crawls inside of the panel. It is attached with two screws, in which it is advisable to cut a notch. I bought two thumbscrews and sawed them all superfluous.

the algorithm is very simple - recorded 6 digit master code, then input the code, then the time to open the lock. There are normally closed and open contacts for different kinds of locks. It is powered by 12 volts, the current consumption in standby mode about 5 mA. entry code and six-digit. There is an exit on the exit button, sorry for the tautology.

So now there is a reason to think about the castle. Such as on the door - the solenoid will not work, since the current consumption rather big. So that if the network suddenly disappears, the door will be opened. I need a lock with either the motor or magnet, which pushes the bolt in the opening time. Whatever it was, I found on the internet solution - take the drive to open the doors of the car and connect it with the bolt, with a spring ensuring its return stroke. By the way, the effort in this drive just horrible - I could not keep your fingers! But, as the saying goes, better to see once.

No additional circuitry is not required, as I have already written in the panel have the relay, so I think that is quite obvious, as it was possible to make friends with these two units.

So, all in the collection:

To supply this cavalcade was also collected from the pulsed power supply unit, a battery and a circuit that connects the battery during a power outage with a block.

Maybe someone will ask why, they say, I'm a joker, I could not solder the power supply itself? Firstly, because in the case of computer bp little space for the transformer 50 Hz, and, secondly, would need a power supply for at least 2 A and 12 B, and that no subsidence. Chinese bought Halturina provided such parameters.

A curtain. Intermission. The second part.

This castle I have worked flawlessly for 3 months, and would work itself further, if I did not want to lock still be pressed himself the door to the jamb and the door would be closed no timer, but as soon as I it is closed (the door sensor). To do this, we need not bolt, and a good, smooth rectangular transom, sharpened at an angle on the other side, he looks out into the entrance. In short, to the extent of entering the bolt hole in the jamb, the door would be tight to that meter. To do this, you need to push the bolt with excessive force.

So, in front of me suddenly popped two of the casket. One would be the old door lock and the other - the stepper motor from an old printer, since the gear. I am sure that if I gave them an opportunity to connect, nothing would come of it came out, so I'll set to work. I think the photo is better tell and show:

I will try to describe the joining process: I removed all the excess out of the castle, leaving only the crossbar. Then I extended the shaft gear, and pinned him something such as a screwdriver. This screwdriver has played the same role as that of a screwdriver in the keyhole, which rotates and opens / closes the lock. The only difference was that in the keyhole screw driver enters the lock from the outside, and we have a screwdriver on the gear comes from within. The upper photograph shows the castle without a lid. On this cover is rotatable sleeve with Circuits which turns the bolt, and in that the sleeve has a slot for a screwdriver. Funny it would be if this engine would be standing outside, then vzomschik would have probably thought long and was not able to break into this castle. As stated Krylov - "a casket just opened."

I do not know, I clearly explained, but the next photo may bring more clarity.

In general, the new opener almost assembled, we only have to put it on the door and plug. This will require two schemes - a driver for stepper motor (I got it a couple of L297 and L298), and a controller that sets the logic of the lock operation.

I chose Attiny2313. Scheme I will not draw the driver itself, it can be easily found on the Internet, I can only say that the driver works in my polushagovom mode. In principle, there is no particular difference, simply total step mode, my motor produces some - unpleasant sounds.

The logic works like this: the green LED is flashing in standby mode. Pressing the exit button, or a set of code, the controller receives a signal from the bar code (normally closed contacts open, at the foot occurs 5 volts), an interrupt occurs to the front pulse. this interrupt function sets the appropriate logic levels to driver inputs:

1) resets the driver momentarily takes the log. 0 RESET output

2) exposes the outlet DIRECTION log. 0 (engine rotation napravenie)

3) permits rotation (log. 1-ENABLE output)

4) delivers periodic pulses to the output CLOCK until until closes limit switch mounted in the lock (pictured)

5) prohibits rotation (log. 0 on the output ENABLE)

Once the door is open, the controller enters the standby mode of the door.

Beeping buzzer and red LED flashes as long as the door sensor does not work (see photo below). An interrupt occurs and the controller closes the lock. The same effect as when the door is opened, with the only difference being that the DIRECTION changes to logic 1, and the rotation is stopped at operation of a different limit switch.

This begs the question: why did use the exact stepper motor, if the design is still used by the limit switches?

First I would like to do without them, to calculate the exact number of steps that is required for the opening, and it worked, but I found it unreliable, because if there is any obstacle to the movement of the bolt (sitting mosquito, air currents, and so on. D.), the controller a count down steps, but some of them will be omitted, and the latch will not reach the endpoint. The latter, incidentally, grind off as I wanted in the beginning. The door is pressed firmly, the bolt comes with a titanic effort. However, anything can happen, so it's a little harder perebdet and design.

Below, in the photo - controller card and drivers installed in the casing, which has already appeared in the photograph at the beginning of the article.

The resistor is needed for the drive for the bolt, which is included in series with it to reduce capacity. Driver board made loot, the controller is placed on maketke.

Next - door sensor and lock with the engine mounted on the door.

Wiring harness under the hood.

Finally, the overall appearance of the finished design. I disconnected the bolt on the drive. Subsequently, it will be possible to opt out of it.

So far, everything is working perfectly. Oh, I forgot to say: The resulting hole in the door at the well I closed the thick sheet iron, with the help of self-tapping screws screwed inside. Pre-sheet to this I attached a little sawed keyhole, so that from the outside it looks exactly the same as before.

A little later I changed the lock control circuit, a bit to improve it.

Changes affected the whole circuit, the lock, and of the appearance of natural.

All the elements were placed in two metal casing, welded directly to the door.

The control electronics is located in a former metal junction box with a flip lid.

Under the hood is a great KEMZ Castle, which I also supplied by the same engine.

More details about the new schemes, as well as the alteration of the new lock can be read here.

This article of mine was published on the website from my profile

Dr. Spear, 2014-03-17 21:20:28

More Articles Related

irenica, 2014-12-10 19:35:55

admin, 2014-12-10 21:24:03

daniiiil112, 2014-12-27 12:56:37

admin, 2014-12-27 21:43:56

Laboratory of Dr. Spear / Laboratory Knowledge doctor poke - 2013-2017 copy

Combination lock with their own hands

Three schemes of simple code lock.

Sent Nifashev Dmitry.

I will present to your attention a few simple priceless skhemok to protect your peace of mind. Currently, radio amateur market firmly flooded devices that are used in the alarm systems and alarm systems. These devices, from simple to complex, are collected, usually by standard classical schemes. All considered devices are available to repeat the novice amateur radio operators - designers that do not have deep theoretical knowledge in electronics, and can be used to protect facilities such as apartments, offices, cottages, etc. from unauthorized access.

Code lock in general very convenient and practical thing. You do not need to constantly carry a bunch of metal keys in his pocket to open one or the other barn, to do this, simply recall the code written to you in the brain or in the book of your mobile phone, all combination locks on their characteristics can be divided into several groups, but the most popular there are only two - mechanical and electronic. Which of these wonders of technology you decide to use, we also look at just some of the design in the electronics. Most electronic code locks performed on the chips are well known to you K561TM2 triggers KT3 or specialized just for the case of chips, especially sophisticated design appear today on microcontrollers and sensors.

Yes friends chip is called 4017, there are many companies producing these products on the basis of this letter to the figures may be slightly modified, for example, my chip is originally from China, but Confucius descendants safely and unceremoniously white on black body slapped PHILIPS logo and, therefore, marking the next : HEF4017BP. But closer to the body.

The proposed scheme will help you put together a simple combination lock with high shifrostoykostyu. To pick up a forgotten you drunk or for other reasons, the code will have to go through 10,000 options. When this lock code consists of 4 digits pressed in sequence. Thus, the scheme itself:

In my opinion, nothing complicated, soldered, hung. The operating principle of this device is different from the principle of operation of other electronic code locks on microchips. Who for a long time delves into electronics the country already this fumbles, but for beginners I shall explain.

Use S6-S9 in the diagram marked "correct" code figures, buttons S1-S5 - figures that are not needed at all in the code.

Initially, the terminal 3 ms present voltage (logic "1"). When "S6" button is pressed, a logical "1" is input to the counter 14, and logic "1" appears at terminal 2. In the same way, after clicking "S7" logical "1" button appears on the output 4, and after clicking "S8" - the output 7. After clicking the last correct figures - "S9" - a logical "1" appears at the output 10, transistor VT2 is opened, the relay is activated and its contacts are connected load. Operation of the relay is indicated by LED.

In the case of pressing any of the "wrong" digits (S1-S5) a logical "1" at output 15 will go ( "Reset" - reset to the initial state), and selection of the code will start again. Here is a mischievous nasty.

Fundamental differences in the complexity of the previous scheme a little, in general, see for yourself:

Generally chip itself is a four Johnson counter. The principle of operation of this scheme is similar to scheme painted above, although it and more buttons.

The lock on the chip K561TM2.

More precisely on the two chips.

Circuitry operates as follows. At the initial moment, when energized, the circuit of capacitor C1 and resistor R1 generates a reset pulse triggers (at outputs 1 and the chips 13 will log "0"). Pressing the first digit (in Scheme - SV4), at the time of releasing the trigger switch D1.1, ie at the output D1 / log 1 will appear... "1", since the input D1 / 5 is rm. "1". Pressing the button once, if the input 0 has a corresponding trigger log. "1", ie. E. The previous load, the pog. "1" will appear at the output. Latest works D2.2 trigger, and that the scheme did not remain in this state for a long time, used the transistor VT1. It provides a zero delay trigger. The delay circuit is formed due to the charging of capacitor C2 through resistor R6. For this reason, the output D2 / 13 log signal. "1" will be present not more than 1 second. This time is sufficient for the operation of the relay K1 or an electromagnet. Time, if desired, can easily be made considerably longer, using larger capacity capacitor C2.

The code set during pressing any incorrect digits resets all flip-flops.

Well, that's basically all.

Note expensive edition.

To increase resistance to breaking number of "unnecessary" buttons can be increased. To any amount - it all depends on the degree of neglect of your paranoia. But do not forget also that in time "necessary" button begin to deteriorate, and different from everyone else. So do not forget from time to time to swap keys in order to ensure even wear. So drink a cure for multiple sclerosis.

Questions, as usual, down here.

How do you like this article?

It earned whether the device you have?

Site Serviceability checked in browsers:

IE8.0, Opera 9.0, Netscape Navigator 7.0, Mozilla Firefox 5.0

Adapted for use with screen resolutions of 1280x1024 and higher.

At lower resolutions may cause horizontal scrolling.

Leave a Reply

Your email address will not be published. Required fields are marked *

7 + 1 =