ZenoModiff
Published © CC BY-ND

Rfid Lock System

In This project we gonna make an RFID Lock Easy & Simple !

IntermediateFull instructions provided1 hour200
Rfid Lock System

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
RFID reader (generic)
×1
Relay (generic)
×1
I2C 16x2 Arduino LCD Display Module
DFRobot I2C 16x2 Arduino LCD Display Module
×1
5 mm LED: Red
5 mm LED: Red
×1
Breadboard (generic)
Breadboard (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×1
DC 12V Solenoid Electromagnetic Cabinet Door Lock
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Hot glue gun (generic)
Hot glue gun (generic)

Story

Read more

Schematics

Schematics

RFID Lock System Schematics

Code

Arduino Code

C/C++
RFID Lock system Arduino Code
//feel free to contact
//sreeramaj53@gmail.com
//www.youtube.com/ZenoModiff

#include <SPI.h>
#include <Wire.h> 
#include <MFRC522.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);
 
#define SS_PIN 10
#define RST_PIN 9
#define LED_G 5 
#define LED_R 4
#define RELAY1 6

MFRC522 mfrc522(SS_PIN, RST_PIN);  

 
void setup() 

{
  lcd.begin();
  lcd.backlight();

  lcd.print("ZENO MODIFF"); 
  lcd.setCursor(0, 1);
  lcd.print("RFID LOCK");
  delay(1000);
  lcd.clear();
  
  SPI.begin();   
  mfrc522.PCD_Init();  
  pinMode(LED_G, OUTPUT);
  pinMode(LED_R, OUTPUT);
  pinMode(RELAY1, OUTPUT);
 

}
void loop() 
{
lcd.clear();
lcd.print("PLACE YOUR");
lcd.setCursor(0, 1);
lcd.print("RFID TAG");
delay(1000);
lcd.clear();




  // Look for new cards
  if ( ! mfrc522.PICC_IsNewCardPresent()) 
  {
    return;
  }
  // Select one of the cards
  if ( ! mfrc522.PICC_ReadCardSerial()) 
  {
    return;
  }
  String content= "";
  byte letter;
  for (byte i = 0; i < mfrc522.uid.size; i++) 
  {
    
     content.concat(String(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " "));
     content.concat(String(mfrc522.uid.uidByte[i], HEX));
  }
  content.toUpperCase();
  if (content.substring(1) == "2A 17 6E 3C") 
  {
    
   lcd.clear();
   lcd.print("AUTHORIZED ACCESS"); 
   lcd.setCursor(0, 0);
   delay(2000);
   lcd.clear();
   
    digitalWrite(RELAY1, HIGH);
    digitalWrite(LED_G, HIGH);
    delay(6000);
    digitalWrite(RELAY1, LOW);
    digitalWrite(LED_G, LOW);
    delay(1000);
  }
 
 else   {

   lcd.print("UN AUTHORISED"); 
   lcd.setCursor(0, 0);
       digitalWrite(LED_R, HIGH);
    delay(2000);
           digitalWrite(LED_R, LOW);
              lcd.clear();
    delay(2000);

  }
}

Credits

ZenoModiff

ZenoModiff

14 projects • 10 followers

Comments