Things used in this project

Hardware components:
A000066 iso both
Arduino Arduino UNO & Genuino UNO
×1
rfid522a
×1
lcd 20*4
×1
microservo 9g
×1
00114 05
SparkFun SparkFun Breadboard Power Supply 5V/3.3V
×1
Mfr 25fbf52 221r sml
Resistor 221 ohm
×2
09939 01
Rotary potentiometer (generic)
×1
Adafruit industries ada1536 image
Buzzer
×1
09590 01
LED (generic)
×2
11026 02
Jumper wires (generic)
×30
12002 04
Breadboard (generic)
×1
Software apps and online services:
Ide web
Arduino Arduino IDE

Schematics

circuit diagram
Untitled qaldfherth

Code

arduino codeArduino
#include <LiquidCrystal.h> //lcd library
/*Thudangi*/
#include <Servo.h> //servo library
int servoPin = 9; 
Servo Servo1;

LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

int red=A0;
int green=A1;

#include <MFRC522.h> // RFID Library
#include <SPI.h> // For communication via SPI with the Module



#define SDAPIN 10 // RFID Module SDA Pin is connected to the UNO 10 Pin
#define RESETPIN 8 // RFID Module RST Pin is connected to the UNO 8 Pin
byte FoundTag; // Variable used to check if Tag was found
byte ReadTag; // Variable used to store anti-collision value to read Tag information
byte TagData[MAX_LEN]; // Variable used to store Full Tag Data
byte TagSerialNumber[5]; // Variable used to store only Tag Serial Number
byte GoodTagSerialNumber[5] = {0x0E, 0x4A, 0x79, 0x21}; // The Tag S/N. give your rfid tag identity code here

MFRC522 nfc(SDAPIN, RESETPIN); // Init of the library using the UNO pins declared above

void setup() {
Servo1.attach(servoPin);
pinMode(A0, OUTPUT);
pinMode(A1, OUTPUT);
pinMode(A2, OUTPUT);
lcd.begin(20, 4);
  // Print a message to the LCD.
lcd.setCursor(0,0);
lcd.print("RFID SECURITY SYSTEM"); // give here the comments you need show the display
delay(200);
lcd.setCursor(2,1);
lcd.print(" PROJECT DONE BY   ");  // give here the comments you need show the display
delay(200);
lcd.setCursor(0,3);
lcd.print("  S6 ELS 2014-2017");    // give here the comments you need show the display
delay(1000);
lcd.setCursor(0,2);
lcd.print("    LIJIN ASHOK  ");   // give here the comments you need show the display
delay(2000);
lcd.setCursor(0,2);
lcd.print("     MIDHUN M S");   // give here the comments you need show the display
delay(2000);
lcd.setCursor(0,2);
lcd.print("    PRABHU Y RAJ");   // give here the comments you need show the display
 delay(2000);
lcd.setCursor(0,2);
lcd.print("      SARATH P  ");   // give here the comments you need show the display
delay(2000);
lcd.setCursor(0,2);
lcd.print("    SREEJITH R S  ");   // give here the comments you need show the display
delay(2000);
pinMode(red, OUTPUT);
pinMode(green, OUTPUT);
SPI.begin();
Serial.begin(9600);

// Start to find an RFID Module
Serial.println("Looking for RFID Reader");
nfc.begin();
byte version = nfc.getFirmwareVersion(); // Variable to store Firmware version of the Module

// If can't find an RFID Module 
if (! version) { 
Serial.print("Didn't find RC522 board.");
while(1); //Wait until a RFID Module is found
}

// If found, print the information about the RFID Module
Serial.print("Found chip RC522 ");
Serial.print("Firmware version: 0x");
Serial.println(version, HEX);
Serial.println();
}

void loop() {
 Servo1.write(0);
 delay(300);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("RFID SECURITY SYSTEM");
lcd.setCursor(4,3);
lcd.print("SHOW YOUR ID");
lcd.noDisplay();
delay(200);
lcd.display();
delay(250);
String GoodTag="False"; // Variable used to confirm good Tag Detected

// Check to see if a Tag was detected
// If yes, then the variable FoundTag will contain "MI_OK"
FoundTag = nfc.requestTag(MF1_REQIDL, TagData);

if (FoundTag == MI_OK) {
delay(200);

// Get anti-collision value to properly read information from the Tag
ReadTag = nfc.antiCollision(TagData);
memcpy(TagSerialNumber, TagData, 4); // Write the Tag information in the TagSerialNumber variable

Serial.println("Tag detected.");
Serial.print("Serial Number: ");
for (int i = 0; i < 4; i++) { // Loop to print serial number to serial monitor
Serial.print(TagSerialNumber[i], HEX);
Serial.print(", ");
}
Serial.println("");
Serial.println();



// Check if detected Tag has the right Serial number we are looking for 
for(int i=0; i < 4; i++){
if (GoodTagSerialNumber[i] != TagSerialNumber[i]) {
break;
}
if (i == 3) {
GoodTag="TRUE";
} 
}
if (GoodTag == "TRUE"){
 lcd.clear();
 lcd.setCursor(0,0);
lcd.print("RFID SECURITY SYSTEM");
 lcd.setCursor(3, 1);
 lcd.print("ACCESS GRANTED");
 lcd.setCursor(0,3);
 digitalWrite(A1, HIGH);
 lcd.print(" +----WELCOME----+");
 digitalWrite(A2, HIGH);
 delay(300);
digitalWrite(A2, LOW);
 delay(300);
 digitalWrite(A2, HIGH);
 delay(300);
 digitalWrite(A2, LOW);
 delay(300);
 digitalWrite(A2, HIGH);
 delay(300);
 digitalWrite(A2, LOW);
 delay(300);
 digitalWrite(A2, HIGH);
 delay(300);
 digitalWrite(A2, LOW);
 delay(300);
 digitalWrite(A2, HIGH);
 delay(300);
 digitalWrite(A2,LOW);
 Servo1.write(180);
delay(7000);
Servo1.write(0);
digitalWrite(A1, LOW);
}
else {
 lcd.clear();
 lcd.setCursor(0,0);
lcd.print("RFID SECURITY SYSTEM");
 lcd.setCursor(3, 1);
 lcd.print("ACCESS DENIED");
digitalWrite(A1,LOW);
delay(100);
 lcd.setCursor(0,3);
 lcd.print(" UNAUTHORIZED ENTRY");
 digitalWrite(A2, HIGH);
 delay(150);
digitalWrite(A2, LOW);
 delay(150);
 digitalWrite(A2, HIGH);
 delay(150);
 digitalWrite(A2, LOW);
 delay(150);
 digitalWrite(A2, HIGH);
 delay(150);
 digitalWrite(A2,LOW);
 delay(150);
 digitalWrite(A2, HIGH);
 delay(150);
 digitalWrite(A2, LOW);
 delay(150);
 digitalWrite(A2, HIGH);
 delay(150);
 digitalWrite(A2,LOW);
digitalWrite(A0, HIGH);
delay(3000);
digitalWrite(A0, LOW);
}
delay(200); 
}
}

Credits

13260248 523451924504617 885608194180507364 n
Sarath P

nothing

Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

Using CA and CC RGB LED by Current Sourcing and Sinking!
Easy
  • 352
  • 23

Protip

RGB LEDs are of two types, common cathode and common anode which behave differently with same Arduino code; how to resolve this.

Arduino Amiga Floppy Disk Reader
Easy
  • 2,242
  • 5

Work in progress

An Arduino powered floppy disk controller and reader for making disk images from old AmigaDOS floppy disks.

Quadrature Encoder Demo
Easy
  • 15
  • 1

Full instructions

Use a 3D printed encoder wheel, LED, and 2 photocells to demonstrate how a quadrature encoder works.

Micro:bit Moisture sensor
Easy
  • 158
  • 4

Protip

In this quick and easy project, you build a micro:bit moisture sensor

3D-Printed, Internet-Controlled, Self-Balancing FPV Robot
Easy
  • 1,612
  • 22

Full instructions

Open source telepresence robot that keeps its balance on two wheels. Controlled from UI in the web browser.

Arduino Controlled USB Trackpad
Easy
  • 2,598
  • 4

Full instructions

I really want to make a Raspberry Pi laptop but just can't find the right size trackpad so in this project we will be salvaging an old one.

ProjectsCommunitiesTopicsContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login