RFID Security System using Arduino

Required Components:

  1. Arduino Board
  2. RFID Module
  3. LCD (16 x 2) Display
  4. Potentio meter
  5. Servo Motor
  6. Bread Board
  7. Jumper Wires
  8. USB Cable

Schematic Diagram:

Program:

#include<Servo.h> 
#include<SPI.h>
#include<RFID.h>
LiquidCrystal lcd(7,6,5,4,3,2);//RS, E, D4, D5, D6, D7 pins
RFID FBSSS(10,9);//sdk pin, rst pin
//replace xxx with your FBSSS card details
byte fbs[5]={XXX, XXX, XXX, XXX, XXX};
Servo lock;
boolean card;
String name;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
SPI.begin();
FBSSS.init();
lock.attach(8);//servo pin
lock.write(0);
lcd.begin(16,2);
lcd.setCursor(0,3);
lcd.print(“FBSSS RFID”);
lcd.setCursor(1,0);
lcd.print(“Security System”);
}
void loop() {
// put your main code here, to run repeatedly:
if(FBSSS.isCard())
{
if(FBSSS.readCardSerial())
{
Serial.print(“Found ID: “);
Serial.print(FBSSS.serNum[0]);
Serial.print(“,”);
Serial.print(FBSSS.serNum[1]);
Serial.print(“,”);
Serial.print(FBSSS.serNum[2]);
Serial.print(“,”);
Serial.print(FBSSS.serNum[3]);
Serial.print(“,”);
Serial.print(FBSSS.serNum[4]);
}
if(FBSSS.serNum[0]==fbs[0]&& FBSSS.serNum[1]==fbs[1] && FBSSS.serNum[2]==fbs[2] &&FBSSS.serNum[3]==fbs[3]&&FBSSS.serNum[4]==fbs[4])
{
card =true;
}
else
{
card=false;
}
if(card==true)
{
Serial.println(“correct card”);
lock.write(20);
delay(2500);
lock.write(100);
lcd.print(“Correct Card”);
}
else
{
Serial.println(“Wrong Card”);
lcd.print(“Wrong Card”);
}
FBSSS.halt();
}
}

1 thought on “RFID Security System using Arduino”

Leave a Reply

Your email address will not be published. Required fields are marked *