Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Electronic code lock circuit

Roll no. 18BEC043

Introduction:

This circuit has 4 digit security code that is hardware selectable. It can have as many wrong inputs but
only 4 correct digits. One digit cannot be more than once in the code. Four D flip flops are serially
connected. Each correct key press will activate/set the D flip flop. When the fourth flip flop is set, the
relay will be armed through the PNP transistor. Whenever a wrong key is pressed all the four flip flops
will RESET and the code must be entered from the beginning. This takes advantage of the asynchronous
set-reset in the IC as irrespective of any inputs to the IC whenever SET or RESET is applied output
changes accordingly.

Table 1 components

Integrated circuits 2 dual D flip flop ic 4013


Resistors 4 10k ohm, 1 1k ohm, 1 18k ohm resistor
Push buttons 8 push buttons
LED LED
Battery 9V
Transistor BC557
Relay 12 ohm,150V, SPDT relay
Block diagr

Circuit Diagram:
Verilog Code:

module ckt(a,b,c,d,e,f,g,h,o);

input a,b,c,d,e,f,g,h;

output reg o;

always @(*)

begin
if(a==1) //comparing for correct password keys

begin

if (c==1)

begin

if (e==1)

begin

if (g==1)

begin

o=1; //displaying output when correct password entered in sequence

end

end

end

end

else if (b==1 || d==1| | f==1| | h==1)

o=0;

end

endmodule
Conclusion:

The purpose of this project was to make code lock circuit that could take real time inputs from the
keypad and indicate if the system is unlocked.

References:

http://pcbheaven.com/circuitpages/Simple_Keycode_Lock

www.tesla-institute.com

http://www.circuitstoday.com/digital-code-lock

https://www.mousa-simple-projects.com/2015/03/how-to-run-electric-device-by-password.html?m=1

You might also like