Electronic Code Lock System Using IC

by Team Panama in Circuits > Electronics

87 Views, 0 Favorites, 0 Comments

Electronic Code Lock System Using IC

2.png

Introduction

Hello everyone, this project is about creating a Electronic code lock System With Keypad. The Code lock system was designed using Proteus.

This Code lock system will use the keypad to input the password as a combination of numbers to operate. This system can be applied to many applications.

Features of the Electric code Lock

An electric code lock typically offers features such as:

  1. Keypad Entry: Users input a specific code to unlock.
  2. Security: Limits access to authorized users by requiring a password.
  3. Convenience: No physical keys are needed, reducing the risk of losing keys.
  4. Durability: Often designed for both indoor and outdoor environments.
  5. Multiple User Codes: Allows the entry of multiple codes for different users.

These locks are commonly used for doors, safes, and other secure locations.

How It Works: Electric Code Lock System

  1. Locking Process: When the correct code is entered and the lock button is pressed, the system latches the code and triggers the locking mechanism, which is indicated by a LED. A limit switch prevents further attempts until the unlock mechanism is activated.
  2. Unlocking: The correct unlock code and button press will trigger the unlock mechanism, which also lights an LED to indicate success.
  3. Incorrect Attempts: If the wrong password is entered, a warning condition activates a buzzer and LED, blocking both locking and unlocking mechanisms.
  4. Reset: To clear the warning, a master code must be entered along with pressing the reset button.

This sequence ensures high security, preventing unauthorized access and multiple failed attempts.



Supplies

This electric code lock is built entirely using logic ICs—no programmable microcontrollers or advanced digital processors are involved. The design relies on basic combinational and sequential logic circuits, providing a straightforward, hardware-based solution. This approach ensures simplicity, reliability, and ease of replication, making it ideal for educational purposes or projects focused on understanding fundamental digital logic principles.

This electric code lock system is designed using four functional blocks to streamline its operation and simplify the schematic:

  1. Block 1: Keypad & Seven-Segment Operating Unit
  2. Captures user input via a keypad and provides visual feedback through a seven-segment display.
  3. Block 2: Clock Pulse & Counter Unit
  4. Generates timing pulses and tracks user inputs to ensure correct code sequencing.
  5. Block 3: Pushbuttons & Indicators
  6. Comprises lock, unlock, and reset buttons, limit switches, status LEDs, and a buzzer for alerts.
  7. Block 4: Main Logic & Mechanisms
  8. Implements the core logic for locking/unlocking operations and handles reset functionality.

Schematic Design Block-1

Block 1.jpg

This modular architecture simplifies the schematic, ensuring clarity and ease of understanding.

This block is responsible for capturing and displaying the user’s input using a 4x4 keypad and a seven-segment display. Here's how it works in detail:

Components

  1. 74C922 Encoder IC
  2. 74LS47 BCD-to-Seven Segment Decoder/Driver IC
  3. 4x4 Keypad
  4. Seven-Segment Display
  5. 4027 JK Flip-Flop
  6. Supporting components: Resistors, Capacitors (as required for stable operation)


  1. Keypad Input Encoding:
  2. When a key is pressed, the 74C922 encoder IC converts the keypad's row and column signal into a 4-bit binary code corresponding to the pressed key.
  3. Binary to Segment Display Conversion:
  4. The encoded 4-bit output is sent to the 74LS47 decoder/driver IC, which drives the seven-segment display to show the corresponding numeric value.
  5. Digit Shifting with 4027 JK Flip-Flop:
  6. A 4027 JK flip-flop is used to manage the digit shifting on the display.
  7. When the Data Available (DA) pin of the 74C922 encoder is activated (indicating a valid keypress), the JK flip-flop shifts the data to update the display. This ensures the display reflects the most recent input accurately.
  8. Sequential Display Updates:
  9. Each new keypress triggers the 74C922's DA signal, which in turn causes the flip-flop to clock the new data into the display circuit.
  10. The seven-segment updates dynamically with each keypress, showing the digits sequentially.

This block plays a crucial role in converting raw keypad input into visually comprehensible numeric feedback on the display, ensuring smooth operation and user interaction.



Schematic Design Block-2

Block 2.jpg

This block handles the counting of incorrect password attempts and generates clock pulses required for the counter.

Components

  1. NE555 Timer IC (configured in astable mode)
  2. 4027 JK Flip-Flops (2 units for the 2-bit counter)
  3. Supporting components:
  4. Resistors and Capacitors (for the NE555 timer circuit)
  5. Pull-down resistors for flip-flop inputs
  6. Clock synchronization components (if required)


  1. Counter Circuit:
  2. A 2-bit counter is implemented using two JK flip-flops, which increment on each wrong password entry.
  3. However, the warning path is triggered early by combining the Q̅ outputs of the flip-flops. This ensures the system activates the warning after only one wrong attempt instead of waiting for a full count cycle.
  4. Clock Pulse Generator:
  5. A stable clock pulse is generated using an NE555 timer IC, configured in astable mode.
  6. This pulse drives the counter, synchronizing its operation with the wrong attempt inputs.

This block ensures precise counting and timely activation of the warning system.

Schematic Design Block-3

Block 3.jpg

This block is responsible for managing user interactions and providing visual and audible feedback.

Components:

  1. Pushbuttons:
  2. Lock Button: Triggers the locking mechanism.
  3. Unlock Button: Activates the unlocking mechanism.
  4. Reset Button: Clears warning conditions and resets the system.
  5. Indicators:
  6. LEDs: Three separate LEDs indicate the status of the lock, unlock, and warning conditions.
  7. Warning System:
  8. Buzzer: Sounds an alert during a warning condition.

This block ensures clear user interaction and system status visibility.

Schematic Design Block-4

Block 4.jpg

This block manages the lock, unlock mechanisms, and warning function.

  1. Path Control:
  2. using 74HCT244 ICs for path direction control and other components for operation.
  3. Initially, the first 74HCT244 IC connects the path for lock/unlock operations through a 74125 buffer.
  4. Data Latching & Comparison:
  5. The 4-bit encoded data from the 74C922 IC is passed to a 74373 latch IC.
  6. Pressing the lock pushbutton activates the latch, which stores the data and sends it to a 7485 comparator to operate the lock mechanism.
  7. For unlocking, the same process occurs: the unlock pushbutton triggers the second 74373 latch IC, sending data to the 7485 comparator.
  8. If the entered code matches the preset code, the unlock mechanism is triggered. Otherwise, a warning mechanism is activated, blocking further attempts.
  9. Limit Switch & Blocking:
  10. Once the lock mechanism is triggered, a limit switch is activated, preventing any further locking attempts until the unlock mechanism is triggered.
  11. Warning Mechanism & Master Code:
  12. once the warning mechanism activates The  74125 blocks will disconnect the enable pin of 74HCT244 blocking the lock/unlock paths
  13. Another 74126 will activate a second 74HCT244 for warning mechanism.
  14. A predefined 4-bit master code is stored in another 7485 comparator.
  15. Upon entering the correct master code, the system sends the code to the 7485 comparator for comparison and resets the warning mechanism when the reset button is pressed.

This block ensures secure lock/unlock functionality, along with robust control for warning conditions and reset operations.

PCB Design

Block 1.jpg
Block 2.jpg
Block 3.jpg
Block 4.jpg
Block 4 Back.jpg
Block 1 Back.jpg
Block 2 Back.jpg
Block 3 Back.jpg

PCB Design Using the Toner Transfer Method

The toner transfer method can effectively create PCBs using a layout designed in Proteus. Here's how:

  1. Export the Design:
  2. Create your PCB layout in Proteus and export it as a mirrored image. Print the layout onto glossy photo paper using a laser printer, ensuring the design is clear and well-aligned to your copper-clad board.
  3. Prepare the Copper Board:
  4. Sand the copper surface with fine sandpaper or steel wool to remove oxidation. Clean it with a metal polish like "Brasso," then wash it with detergent and dry it completely.
  5. Transfer the Toner:
  6. Place the printed design face-down on the copper board. Heat a household iron (no steam) and firmly press the paper onto the copper surface for 5–10 minutes, ensuring even pressure, especially on edges and fine lines.
  7. Remove the Paper:
  8. Let the board cool slightly, soak it in warm water for 5–10 minutes, and gently rub off the paper, leaving the toner adhered to the copper.
  9. Etch the PCB:
  10. Immerse the board in a Ferric Chloride solution, gently agitating it until the exposed copper dissolves. Rinse the board thoroughly with water to stop the etching process.
  11. Clean Off the Toner:
  12. Use acetone or nail polish remover to strip the toner, exposing clean copper traces.
  13. Drill Component Holes:
  14. Use a 0.8–1mm drill bit to create holes for through-hole components, ensuring alignment with your design.
  15. Inspect and Test:
  16. Verify the PCB with a multimeter for continuity and fix any broken traces using a conductive pen or soldering.

This method provides a simple, cost-effective approach to create high-quality PCBs directly from your Proteus designs.

BMS and Voltage Regulator

WhatsApp Image 2024-11-30 at 22.55.41.jpeg
WhatsApp Image 2024-11-30 at 22.55.44.jpeg
WhatsApp Image 2024-11-30 at 22.55.45.jpeg
WhatsApp Image 2024-11-30 at 22.55.43.jpeg

To ensure uninterrupted power for the latch mechanism, a robust backup power setup was implemented. Here's how it works:

Components

1. Battery Management System (BMS):

  1. 3S 40A BMS: Manages charging, discharging, and protection of the batteries.

2. Batteries:

  1. 2x 18650 Lithium-Ion Batteries: Provides backup power.

3. Voltage Regulation Circuit:

  1. 7805 Voltage Regulator: Ensures a steady 5V output.
  2. Heat Sink (optional): For the 7805 to prevent overheating.
  3. Capacitors: Typically 0.33µF (input) and 0.1µF (output) for smoothing.

4. Power Supply:

  1. 12V DC Supply: Charges the BMS and powers the circuit.

This component setup guarantees smooth operation and reliable backup power.

  1. Battery and BMS:
  2. A 3S 40A Battery Management System (BMS) was used with two 18650 lithium-ion batteries to provide backup power.
  3. The BMS manages battery charging, discharging, and protection against overcurrent, overvoltage, and short circuits.
  4. Power Supply:
  5. The BMS is charged using a 12V power source.
  6. Voltage Regulation:
  7. A 7805 voltage regulator is connected to the BMS output to provide a stable 5V power supply.
  8. This ensures precise and reliable voltage for the system.
  9. Purpose:
  10. The BMS and backup battery keep the latch mechanism functional in case of a main power supply failure, enhancing system reliability and security.

This configuration ensures consistent and uninterrupted operation for critical components.

Thank You

Creating a PCB using the toner transfer method is a rewarding DIY process that combines creativity with technical skills. By designing your layout in Proteus and carefully following each step, you can produce a functional, professional-looking circuit board without relying on expensive tools or services. This method not only saves costs but also provides valuable insight into the fundamentals of PCB fabrication.