Electronic Lock

Introduction

An Electronic Lock is a security system that uses electronic components instead of a traditional mechanical key. Access is granted only when the correct input such as a password, key sequence, or signal is provided. Electronic locks are widely used in homes, offices, lockers, and industrial security systems.

This project demonstrates a basic electronic locking mechanism.


Objective of the Project

The objectives of this project are:

  • To design a secure electronic locking system.
  • To restrict unauthorized access.
  • To understand electronic security concepts.
  • To control a lock using electronic logic.

Working Principle

The electronic lock works on the principle of input verification and control.

Basic Operation

  1. User enters a correct key sequence or password.
  2. The control circuit verifies the input.
  3. If the input is correct, the relay or solenoid is activated.
  4. The lock opens.
  5. Wrong input keeps the lock closed and may trigger an alarm.

Components Required

Basic Electronic Lock (Keypad Based)

  • Push Buttons / Keypad
  • Logic ICs / Comparator
  • Transistor
  • Relay / Solenoid Lock
  • Buzzer (optional)
  • Resistors
  • Power Supply (12V)

Arduino-Based Electronic Lock

  • Arduino Uno
  • 4×4 Keypad
  • Relay Module / Solenoid Lock
  • Buzzer
  • Jumper wires

Circuit Diagram

Basic Circuit

Keypad --> Control Logic --> Relay --> Lock

Arduino-Based Circuit

Keypad Rows/Cols --> Arduino Pins
Relay IN ---------> D8
Buzzer ----------> D9
GND -------------- Common Ground

Arduino Code (Optional)

#include <Keypad.h>

const byte rows = 4;
const byte cols = 4;
char keys[rows][cols] = {
  {'1','2','3','A'},
  {'4','5','6','B'},
  {'7','8','9','C'},
  {'*','0','#','D'}
};

byte rowPins[rows] = {9,8,7,6};
byte colPins[cols] = {5,4,3,2};

Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, rows, cols);
String password = "1234";
String input = "";

int relayPin = 10;

void setup() {
  pinMode(relayPin, OUTPUT);
}

void loop() {
  char key = keypad.getKey();
  if (key) {
    if (key == '#') {
      if (input == password) {
        digitalWrite(relayPin, HIGH); // Unlock
        delay(3000);
        digitalWrite(relayPin, LOW);  // Lock
      }
      input = "";
    } else {
      input += key;
    }
  }
}

Code Explanation

  • User enters password using keypad.
  • Arduino compares input with stored password.
  • Relay activates if password is correct.
  • Lock opens for a fixed duration.

Advantages

  • Enhanced security
  • No physical keys required
  • Easy to operate
  • Can be upgraded easily

Applications

  • Door security systems
  • Lockers and safes
  • Offices and homes
  • Industrial security

Conclusion

The Electronic Lock project is an effective security solution using electronics. It introduces access control concepts and can be enhanced using RFID, fingerprint, IoT, or mobile app integration.

Leave a Reply

Shopping cart

0
image/svg+xml

No products in the cart.

Continue Shopping