
Digital Electronics
Design and Implementation of a Digital Lock Using FSM-Based Password Sequence Detector
Abstract:
This project focuses on designing a digital lock using a Finite State Machine (FSM)-based sequence detector. The system identifies a predefined binary password by processing input bits in a specific sequence. When the correct password is entered, the controller generates an unlock signal to activate an LED or electronic locking mechanism. The design demonstrates sequential circuit operation, state transitions, and digital access-control concepts.
Project Description:
The project implements a digital password detector using sequential logic circuits or Verilog HDL. A binary password, such as 1011, is used as the example input sequence.
The controller consists of input logic, state registers, next-state logic, and output logic. Each incoming bit updates the FSM state according to the detected sequence. When the complete password sequence is matched, the unlock output becomes active. If an incorrect sequence is entered, the controller returns to an appropriate state or restarts the detection process.
A keypad, DIP switches, or push buttons can provide the binary input. LEDs indicate locked and unlocked conditions. An optional relay can control a low-voltage electronic lock.
Working Principle:
1. The controller initializes in the starting state after reset.
2. The user enters binary password bits through switches or a keypad.
3. The FSM receives each input bit in synchronization with the clock.
4. The next-state logic compares the input with the expected password sequence.
5. The state register updates according to the detected sequence.
6. When the complete password 1011 is detected, the unlock output is activated.
7. An LED indicates the unlocked condition or an optional relay operates the locking mechanism.
8. An incorrect sequence keeps the system locked and resets or updates the FSM state according to the selected detector design.
Notes:
- Use a clearly defined FSM with state registers, next-state logic, and output logic.
- The example password sequence is 1011 and can be modified in the design.
- Use D flip-flops to store the FSM states.
- A clock signal synchronizes the incoming password bits.
- Implement the sequence detector using a Moore or Mealy FSM architecture.
- Define whether overlapping sequence detection is supported.
- Include a reset button to return the controller to the initial state.
- Add input debouncing when using physical push buttons.
- Use suitable logic ICs such as 74LS74 and 74LS86 for hardware implementation.
- Simulation tools include Logisim, CircuitVerse, Proteus, ModelSim, and Vivado.
- Optional upgrades include a keypad interface, multiple passwords, incorrect-attempt counter, alarm buzzer, and automatic relocking.
- A simple binary sequence detector is an educational prototype, not a secure commercial access-control system. Practical locks require stronger authentication, protected password storage, and resistance to repeated guessing.
Expected Outcome:
The expected outcome is a functional FSM-based digital lock that detects a predefined binary password sequence and generates an unlock signal when the correct sequence is entered. It demonstrates sequence detection, state transitions, flip-flop operation, combinational logic, and digital output control. The project provides practical knowledge of sequential circuit design and its applications in electronic locks, access-control systems, and digital security prototypes.
All Projects




