The Design and Construction of A 2-Digit Electronic Lock System Using Simple Circuit Elements and Digital Electronic Logic Gates
The Design and Construction of A 2-Digit Electronic Lock System Using Simple Circuit Elements and Digital Electronic Logic Gates
The Design and Construction of A 2-Digit Electronic Lock System Using Simple Circuit Elements and Digital Electronic Logic Gates
net/publication/317305160
CITATIONS READS
0 7,383
3 authors, including:
Some of the authors of this publication are also working on these related projects:
EXPERIMENTAL INVESTIGATION AND MODELLING OF DRYING RATES OF SOLAR PHOTOVOLTAIC AND THERMAL DRYERS View project
All content following this page was uploaded by Adedeji Michael on 02 June 2017.
Abstract: The design, construction and implementation of a 2-digit electronic locking system for crime and intrusion
prevention is reported in this work. The electronic locking system was designed and constructed using simple
circuit elements and implemented with digital electronic logic gates. Like a conventional key, the electronic lock
accepts a 2-Digit code, compares it to the stored code in its memory via a comparator and switches on or off any
device connected to it if both codes match or mismatch. The device makes use of a keypad for data entry achieved
with a Binary Coded Decimal (BCD) Encoder IC (74C922), a set of shift register ICs (4035B) for memory and a
set of 4001 quad NOR and 4070 quad EX-OR logic gates for comparing and a relay for switching. During testing,
the result showed that the device switches ON or OFF any electronic device connected to it if both codes match or
mismatch.
Keywords: Binary coded decimal, comparators, electronic locks, logic, registers, switching
XOR gates output a 'HIGH' signal if the input signals are not common sides of the diodes will provide a 'LOW' signal state
of the same logic state. The eight XOR gates output terminals to the NOR logic. The NOR logic therefore lights-up the
were connected through a diode network which functions as Green LED when the output of the XOR gate is 'LOW' and
an 8-input OR gate. If any of the eight XOR gates outputs a turns-up the Red LED if the output of the XOR gate is 'HIGH'
'HIGH' signal meaning that the entered code and the key code (Fig. 7a). The relay (Fig. 7b) is connected to the output of the
are not identical, then the 'HIGH’ signal will be passed to the NOR gate connected to the green LED by means of two
NOR logic gates (in 4001Quad NOR gate IC – Fig. 6). If the transistors which amplifies the current output of the NOR
pair of the two 4-bit codes are identical, the XOR gate outputs gate. The relay thus energize only when the codes match.
will be 'LOW' and the pull-down resistor connected to the
258
FUW Trends in Science & Technology Journal, www.ftstjournal.com
e-ISSN: 24085162; p-ISSN: 20485170; April, 2017: Vol. 2 No. 1A 257 - 260
Construction of a 2–digit Electronic Lock System
Fig. 7b
Fig. 7a & b: Circuit diagram of the comparator. D1 – D9 are
IN4148 signal diodes; R7 and R8 are 10k ohms resistors
Discussion
The device was tested and demonstrated as follows. A two-
digit code was entered by pressing the first digit, press the
Fig. 5: 4070 Quad EX-OR gate IC enter key for the second digit. The two digits entered are
stored in the shift registers and the device changes state to the
lock mode. The relay breaks connection and the RED LED
indicator comes ON. To unlock the device, the same two
digits must be entered one after the other as was done the first
time. In this case, the relay makes connection and the GREEN
LED indicator comes ON.
When a key is pressed on the keyboard, the four outputs of
the encoder go HIGH or LOW as shown in Table 1. For
example if ‘3’ is pressed, A and B are HIGH while C and D
are LOW. The binary output from the keypad is applied to the
input of the four shift registers. The clock input (pin 6) on the
shift register is normally LOW since they are all connected to
the negative through 10K resistors. When the entered key for
a register is pressed, the resulting rising edge from 0 – 9V
causes the HIGH or LOW states of the four input on the
register to be shifted to the output. The output states of the
register are therefore; A=1, B=1, C=0 and D=0. But the other
Fig. 6: 4001Quad NOR gate IC outputs of the other shift registers remain 0 or in their
previous state unless their ‘Enter’ button is pressed before
they assume the state of the key pressed on the keypad.
Fig. 7a
Table 1: Binary output from the Keypad of X row and Y column switch matrix Adapted from Tom (1993)
X1 X2 X3 X4 X1 X2 X3 X4 X1 X2 X3 X4 X1 X2 X3 X4
Y1 Y1 Y1 Y1 Y2 Y2 Y2 Y2 Y3 Y3 Y3 Y3 Y4 Y4 Y4 Y4
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
A (LSB) 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
B 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
C 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
D(MSB) 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
Since only 3 (0011) was pressed and the other inputs are 0 and perfect means of controlling access to electronic devices,
(0000), the EX-OR gate gives a HIGH output which is passed machines and physical facilities as well as provides a good
to the NOR gate which makes the mismatch pin HIGH and teaching resource for digital electronics. The strength of the
RED LED comes ON and the relay breaks connection until lock can be increased by including more digits which can be
another 3 is entered and it goes through the previous process achieved by adding more bit comparators. This will however
as the previous digit and the circuit will now indicate code lead to an increase in the circuit’s size as well as the total
match by switching on the GREEN LED and the relay makes number of components. The long presented in this report is
connection. The input data can be reset or cleared by pressing comparably cheaper than locks of similar complexity made by
the reset (pin 5) on the shift register which is kept LOW by a other methods.
10K resistor connected to the negative to load the registers.
References
Adamu MZ2014. An Electronic Digital Combination Lock: A
Precise And Reliable Security System, School of Electrical
and Electronic Engineering, University of Nottingham,
Selangor Darul-Ehsan, Malaysia, pp. 2-5.
All About Circuits 2012. Simple Combination Lock.
Retrieved from
http://www.allaboutcircuits.com/textbook/experiments/chpt-
7/simple-combination-lock/, on Oct., 1st, 2016
FISE2014. Mechanical versus Electronic locks: Security
implications of the two paradigms, downloaded from
www.securityevaluators.com;on Oct., 1st, 2016, pp. 2-4.
Koenig JA & Taylor L 1998. Perimeter Security Sensor
Technology Handbook. Electronic Security Systems
Engineering Division, North Charleston, USA, pp. 67-86.
Rashid MA 1986. Power Electronic Circuits, Devices and
Applications, Longman, England, 1986, pp. 245-248.
Tom D 1993. Adventure with Digital Electronics, John
Murray Publisher, England, pp. 58-61
Weber R& Thad L 1985. Alarm Systems and Theft
Fig. 8: Picture of the electronic lock Protection; 2nd edition, Stoncham, MA: Uutterworth, pp. 7-8.
Zungeru AM, Kolo JG& Olumide I 2012a. A simple and
Conclusion reliable touch sensitive security system. Int. J. Network
The 2-digit lock (Fig. 8) designed and constructed performed Security & Its Applic. (IJNSA), 4(5):149–165.
as expected and the intended aim of using basic digital Zungeru AM, Maidawa KD, Ambafi JG& Omokhafe JT
electronics to design a complex electronic lock was achieved. 2012b. Design and implementation of a low cost digital bus
Components for the device are readily available in the market passenger counter. Innov. Sys. Design &Engr., 3(4): 29–41.
and hence can be easily purchased and implemented by
students and academics for illustrating digital electronic
principles. The designed electronic lock provides an efficient