» Electronics »Simple DIY electronic lock

DIY electronic lock

Greetings the inhabitants of our site!
Today, together with Alex Guyver (YouTube channel "AlexGyver") we will make the simplest remote electronic Castle.

Our electronic lock will be without a microcontroller. Let’s take such wonderful Chinese relay modules.

The essence of these modules is very simple: we connect power to them, in this case 12V from the power supply, and with the help of the remote control we can control the state of the relay. Three modules, three different remotes: infrared, like a remote control from a TV set, a radio, and a remote control key fob is also a radio.


I hope that the relay does not need to be told. So we want the lock to open from the remote control. For example, you have a house with a fence, a friend comes to visit you, rings the bell, and you, knowing that it is he, open the gate to him while sitting on the terrace.
The simplest, generally the simplest version of such a lock is an electrocheck. We supply voltage to the latch, for example, the same 12V, it opens.


Take the same 12V, from which the remote relay is powered, and connect this whole thing. Who did not understand, the scheme will be like this, everything is very simple:

At the touch of a button, we can open the heck. If you keep it open for a long time, it will start to bask. In fact, she does not care, it's a piece of iron. In the simplest case, the heck is put on a jamb and that's it. Well, a socket somewhere nearby should be.

If you take the radio remote, it will literally be the key to the door, which allows you to open it from the back. Actually, they opened, released the heck, and slam it. You can safely deal with all sorts of obscenities, for example, play cool games on a mobile phone.

And now let's continue the electric lock surveys and try to manage a more complex thing: a car door lock drive. Many of you are familiar with this powerful drive anyway. When powered by 12 volts, this device eats 4 amperes and pulls the stock with a force of 4 kilograms.



A very serious force is hidden in its plastic case. But in fact there is only a powerful motor and gear rack.

With this drive you can easily open massive heck, for example, like this:

Let’s do it. So that the drive does not overheat and does not melt, its control must have 3 states: voltage is applied in one direction, voltage is supplied in the other direction, and voltage is not applied at all.



Since we have agreed not to use microcontrollers, we will have to resort to other methods, for example, to build the logic of work on the reels.The classic engine control circuit using two relays looks like this:

Try to track how the motor will behave at different positions of the relay. Here is a module for 2 relays with optical isolation and blocking diodes, the Chinese cost a little more than 50 rubles.

We need exactly the 12-volt version, since the voltage in the system will be 12V. You will find all the necessary links on project page, there will be all the schemes.

Now the most important thing is how do we make sure that the drive turns on exactly for such a time that it opens the latch and nothing more, because a constant load can lead to breakage of the teeth. The author took the version of the drive with end buttons for a reason, as you can see, here, in addition to the power supply, there are 3 more wires.

And here they are not. Such a drive does not suit us.

So inside the drive there are buttons that close in the extreme positions, such buttons are called limit switches. Due to the presence of limit switches, we can implement the correct control of the drive, and we will start with the buttons. Close button and open button.

They are connected in this way:

And they do the following: the button closes the control signal, in our case zero, to the relay through the limit switch. If you mix the wires, the circuit will not work.

And so it turns out, we have a “open” button and a “close” button, they carry out the expected actions. The most interesting thing is that until the drive reaches its final position, current will be supplied to it, that is, without closing the latch the first time, it will try to do further. And vice versa.

The most difficult thing remains, how to solve the problem of switching contacts using a remote relay? The author thought, experimented, and did not find anything easier than using another relay, two-channel with two groups of independent contacts.


Many will say now, damn it, dude, you want to control the drive using 1 2 3 4 relays! Why not? Our goal is the simplest electronic lock, with the simplest circuitry and affordable components.

The bottom line is simple: the remote relay will feed or remove 12V from the double relay. The double relay in turn simply replaces the buttons for us, connecting the leads from the relay module through the limit switch to the ground. And that’s it.

The capacitor in the circuit is needed in order to smooth out the voltage drop due to the large load created by the drive. It is not necessary to put it, but if it is lying around where - put it necessarily. Let's try.

Well, we get a powerful remotely controlled drive, with its own logic of operation and limit switches. Fix this matter to our deadbolt.

Yes, the thing turns out to be very cumbersome, but very reliable, it can be safely put on any door. What other options are there besides the proposed modules. You can leave the circuit with the buttons, and place the close button on the door so that it closes when the door is closed. We get an automatically closing lock. Instead of a remote relay, you can take a bistable relay, this is a relay that is switched with one button and remembers its state. Unfortunately, it is 5 volts and a converter is needed.


What we get, drive control with a single button, pressed opened, pressed closed. It’s also fun. The button, by the way, can be taken out separately on the wires. In general, it does not have to be a button, it can be a reed switch. In this case, we get a secret lock that opens and closes with a magnet.

There are also sound sensors, light sensors, an obstacle sensor in the end. From the finished Chinese components, you can get a huge number of options for opening an electronic lock. As for the power supply, the autonomy of this thing is very controversial, because the radio-controlled relay and some passive components on the boards eat something in the region of 4 0mA, that is, the car battery at 60Ah the system will discharge in 1500 hours or 62 days, or 2 months.


Well, by the way, not bad.By attaching even the weakest charge for lead, you can organize a kind of UPS for the lock, and you can even take a smaller battery in this case, from a scooter, for example. You can put such a lock, for example, in a gate, in a room, you can come up with an unlimited number of caches behind hidden panels that can only be opened using a remote control or magnet. Thank you for attention. See you soon!

Author's video:
7.3
7.3
7

Add a comment

    • smilesmilesxaxaokdontknowyahoonea
      bossscratchfoolyesyes-yesaggressivesecret
      sorrydancedance2dance3pardonhelpdrinks
      stopfriendsgoodgoodgoodwhistleswoontongue
      smokeclappingcraydeclarederisivedon-t_mentiondownload
      heatirefullaugh1mdameetingmoskingnegative
      not_ipopcornpunishreadscarescaressearch
      tauntthank_youthisto_clueumnikacuteagree
      badbeeeblack_eyeblum3blushboastboredom
      censoredpleasantrysecret2threatenvictoryyusun_bespectacled
      shokrespektlolprevedwelcomekrutoyya_za
      ya_dobryihelperne_huliganne_othodifludbanclose
4 commentary
outcalls
>> Today we are together with ...

= \ I did nothing ... stupidly copied it!
Eating 4 Ohms is like weighing 8 km / h.
And what the hell to breed this tyagomotin with trailer and ext. relyuyami, if these whale modules are programmed into 8 different modes, including the operation of the relay only when the button is pressed. At me so e / heck 4th year plows.
Guest Denis
No, I haven’t seen such a stupid copy-paste. "Today we are together ..." - WITH WHOM TOGETHER? You did nothing but press buttons.
Guest next
Another constructor from Chinese modules :(

We advise you to read:

Hand it for the smartphone ...