Digital Door-lock System With Keypad

by dhilbad in Circuits > Electronics

3663 Views, 4 Favorites, 0 Comments

Digital Door-lock System With Keypad

Screen Shot 2022-02-03 at 19.53.30.png
Digital Door Lock System with Keypad

In this project, we will create a Digital Door-lock System With Keypad. This system can be applied to many things such as doors, cases, etc.


Supplies

Few components are needed in this project...


  • 4013 IC (Dual D-Type Flip-Flop)
  • 4043 IC (Quad R/S Latch)
  • 7447 IC (BCD To Seven Segment Decoder/Driver)
  • 7485 IC (4-bit Magnitude Comparator)
  • 74194 IC (4-bit Bidirectional Shift Register)
  • 4555 IC (Dual 1-to-4 Line Decoder/Demultiplexer)
  • Two Inputs AND Gate
  • Four Inputs AND Gate
  • Buffer
  • Button
  • Buzzer
  • L293D (Push-Pull Four-Channel Driver)
  • LED (Green & Red)
  • Motor
  • Two Inputs OR Gate
  • Four Inputs OR Gate
  • Five Inputs OR Gate
  • Eight Inputs OR Gate
  • Common Anode Seven Segment

Software Used

Logo Proteus1.jpg

In this project, the software that we are going to use is Proteus.

Gathering the Components

Screen Shot 2022-02-03 at 20.22.19.png

The first thing that we need to do is to gather the components needed for this project. You can do this simply by pressing the 'components mode' and selecting 'P' (located to the left of 'DEVICES') which then will lead you to the component search window. In that window, you just need to input the component's name in the 'keywords' section. When you found the desired component, select by double-tapping it and it will automatically show up in the 'DEVICES' section.

Keypad

Screen Shot 2022-02-03 at 20.32.18.png
Screen Shot 2022-02-03 at 22.28.42.png

After gathering the needed components, the next thing that we need to do is create the keypad.

Components:

  • 9x Buttons
  • 1x Two Inputs OR Gate
  • 3x Four Inputs OR Gate
  • Power Source
  • 4043 IC


The keypad is made up of buttons and these buttons will be connected to a power source and OR gates. The numbers that will represent each button are from 1-9. The keypad will have outputs in a 4-bit format. For example, when you press the '7' button then the output from OR gates will be '0111'. Construct the keypad by following the attached picture above.


After the keypad is constructed, connect the outputs from the OR gates into 4043 IC. The outputs must be connected to pins with 'S'. Pins with the letter 'R' will be connected to a power source. We use two separate 4043 ICs to differ the inputs for the 'authentication' password and password that will be entered by the user for unlocking. Also, the 'E' (Enable) pin must be connected to a power source in order to activate the IC.

Shift Resgister

Screen Shot 2022-02-03 at 23.36.05.png
Screen Shot 2022-02-03 at 23.36.21.png
Screen Shot 2022-02-03 at 23.39.43.png

In this part, we will build the shift register which will act as the memory where the user will save their password. The shift register will be divided into two, the saved password and the user input.


Components:

  • 8x 74194 IC
  • 2x 4555 IC
  • 4x 4013 IC

74194 IC: This shift register will save the user's password or user input.

  • D0-D3 = connected to Q0-Q3 from 4043 IC
  • CLK = clock will all be connected to the output of OR gate (connected to Q0-Q3)
  • S0 & S1 = Connected to demultiplexer (4555 IC)
  • MR = step 7

4555 IC: This demultiplexer will work as a 'switch' for each shift register. When the user pressed a button, this demultiplexer will automatically switch the destination of the user's input to the correct shift register.


4013 IC: This D-type flip-flop will be constructed into a counter so that the demultiplexer can automatically switch when the user pressed a button.

  • CLK: connected to the OR gate from output of 4043 IC

Comparator

Screen Shot 2022-02-04 at 00.50.26.png

The comparator will compare the saved password and the user input to authenticate whether the entered password is true or false.


Components:

  • 8x 7485 IC


7485 IC: This IC is in charge of authenticating the saved password and the user input. Each of these IC will compare according to the place value of the saved password and the user input. The output that will be used as correct is QA=B. QA<B & QA>B will be considered incorrect.

  • 'A' = user input
  • 'B' = saved password


Seven Segment

Screen Shot 2022-02-04 at 13.45.00.png

The seven-segment will be used as an indicator of the user's input.

Components:

  • 4x Common Anode Seven Segment
  • 4x 7447 IC

7447 IC: This IC is in charge of decoding the binary value into the seven-segment

  • A = connected to Q3
  • B = connected to Q2
  • C = connected to Q1
  • D = connected to Q0

Seven Segment:

  • VCC = connected to a power source





User Reset

Screen Shot 2022-02-04 at 13.56.25.png

The user reset button will allow the user to reset the user input.


Components:


  • 1x Button
  • 1x Ground


Button:

  • The button will be connected to 'ground' and the other end will be connected to 'MR' (Master reset) of the user input shift register (74194 IC).

Enter Button

Screen Shot 2022-02-04 at 14.34.32.png

This enter button is used for confirming the user input. By pressing this button, it will switch the input destination from password saving mode to password input mode.


Components:

  • 1x Button
  • 1x Power Source
  • 4555 IC


Button: The button is connected to 'A' in the 4555 IC


4555 IC:

  • Q0 = connected to demultiplexer of user input enable pin
  • Q1 = connected to demultiplexer of saved password enable pin

Features

Screen Shot 2022-02-04 at 15.33.28.png

In this section, we will build the features such as Motor, LED, and Buzzer.


Components:

  • 4 Inputs AND Gate
  • 4 Inputs OR Gate
  • 8 Inputs OR Gate
  • 2x AND Gate
  • 2x 10k Resistor
  • Red LED
  • Green LED
  • Buzzer
  • L293D Driver
  • Motor


The first thing that we need to do is to create a logic that will ensure the features will work after the last digit of user input is inserted. We need AND gates and OR gates.


4 Inputs OR Gate: Connected to the last shift register of user input

4 Inputs AND Gate: Connected to A=B of the comparators

8 Inputs OR Gate: Connected to A>B & A<B of the comparators

#1 AND Gate (true password): Connected to 4 Inputs AND Gate & 4 Inputs OR Gate

#2 AND Gate(false password): Connected to 8 Inputs OR Gate & 4 Inputs OR Gate


Correct Password


Green LED: Connected to #1 AND Gate with 10k resistor

L293D: This is the driver that will drive the motor

  • IN1 = connected to #1 AND Gate
  • IN2 = connected to Ground
  • EN2 = connected to Ground
  • GND = connected to Ground
  • VSS = connected to a power source
  • VS = connected to a power source
  • OUT1 = connected to the motor
  • OUT2 = connected to the motor


Incorrect Password


Red LED: Connected to #2 AND Gate with 10k resistor

Buzzer: Connected to #2 AND Gate and ground