Things used in this project

Hardware components:
A000066 iso both
Arduino UNO & Genuino UNO
×1
rfid522a
×1
lcd 20*4
×1
microservo 9g
×1
00114 05
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 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

Create a PCB from Scratch with Upverter
Easy
  • 155
  • 4

Full instructions

This tutorial is intended as an example to carry out the Hackster live Meetup of May 2017, that is the creation of a PCB with Upverter.

LEDog Collar
Easy
  • 946
  • 10

Full instructions

The LEDog collar lights up when it gets dark, helping you locate your dog from far away.

Handheld Infinity Kaleidoscope Group Kit
Easy
  • 2,661
  • 30

Full instructions

Use the orientation sensor in your Arduino 101 to control a cool Petri dish infinity-mirror illusion. This project is great for groups.

Windows 10 IoT Core - Reading Heart Rate Pulses
Easy
  • 879
  • 8

Full instructions

In this short blog post, I will show you how to connect a Heart Rate Pulse Sensor to you Raspberry Pi running Windows 10 IoT Core.

Arduino Keyless Door Lock System with Keypad and LCD
Easy
  • 998
  • 12

Full instructions

Learn how to make an Arduino-controlled door lock system that uses a keypad!

Irrigation Sample
Easy
  • 39
  • 1

A sample tool to irrigate a plant by monitoring soil.

ProjectsCommunitiesTopicsContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login
Feedback