Electronic Lock

Electronic Lock Featured Image

Here is a modified and improved electronic lock design .It is largely based on Digital Lock article, however this time in order to demonstrate circuit operation a real electronic lock was used instead of a solenoid. The code is a 4 digit number and is stored in PIC16F876A memory. In order to open the lock all 4 digits must be entered in correct order. These digits are also shown in  7-Segment LED Display. BD139 NPN transistor and 5V relay were used to energize the lock. In the next figure you can see an actual lock that was implemented in current design.

Electronic Lock Unit

I don’t know the manufacturer of the lock the only marking available is its voltage rating between 6-12V .This lock  requires about 300mA to properly open as was measured at 12V supply voltage. Enter correct code, default is 1-2-3-4 and the lock will open for about 4 sec, you can increase this time by adding additional delay, see attached assembly code at the bottom of the page.Here is the design schematic.PIC programming header is not shown.

Electronic Lock Schematic

A short video showing electronic lock prototype design is available in a link below. Assembly source file can be downloaded here.

Posted in PIC16F87X Projects
Make a Donation Button