0% found this document useful (0 votes)
12 views4 pages

Study of RFID System

The document outlines a study of an RFID system using the RC522 RFID Reader/Writer module and Arduino Uno. It includes objectives such as understanding the pin-out structure of the Arduino and writing a program to accept or deny RFID cards. The document also provides detailed pin connections, programming procedures, and a sample code for implementing the RFID system.

Uploaded by

gangurdesahil52
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views4 pages

Study of RFID System

The document outlines a study of an RFID system using the RC522 RFID Reader/Writer module and Arduino Uno. It includes objectives such as understanding the pin-out structure of the Arduino and writing a program to accept or deny RFID cards. The document also provides detailed pin connections, programming procedures, and a sample code for implementing the RFID system.

Uploaded by

gangurdesahil52
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Study of RFID system

Aim: Study of RFID system using RC522 RFID Reader/Writer module.

Objectives:
a. To understand the basic Pin-out structure of Arduino Uno Board.
b. To study the basics of RC522 RFID Reader/Writer module.
c. To write a Arduino Uno program for Accepting or Denying RFID Card with
interfacing its RFID Reader using Arduino.

Circuit/ Block Diagram:

1
Pin Connection for RFID and LCD:

MFRC522 Arduino Uno/101


Reader/ PCD
Signal Pin Pin
RST/Reset RST 9
SPI SS SDA(SS) 10
SPIMOSI MOSI 11/ ICSP-4
SPIMISO MISO 12/ ICSP-1
SPISCK SCK 13/ ICSP-3

Procedure:

Arduino Uno Programming: Arduino Uno IDE

a. Open a new sketch from “File” Menu of Arduino Software.


b. Write a program for RFID system with Ardunio Uno and save it as “rfidsys.ino”.
c. Select your board type and port.
d. You'll need to select the entry in the Tools > Board menu that corresponds to your
Arduino board. Select the serial device of the board from the Tools| Serial Port
menu. This is likely to be COM3 or higher (COM1 and COM2 are usually
reserved forhardware serial ports). To find out, you can disconnect your board and
re-open the menu, the entry that disappears should be the Arduino board.
Reconnect the board and select that serial port.
e. Verify and Upload the program.
Now, simply click the "Upload" button in the environment. Wait for few seconds
– you should see the RX and TX led‟s on the board flashing. If the upload is
successful, the message "Done uploading" will appear in the status bar.

* Typical pin layout used:


* -----------------------------------------------------------------------------------------
* MFRC522 Arduino Arduino Arduino Arduino Arduino
* Reader/PCD Uno/101 Mega Nano v3 Leonardo/Micro Pro Micro
* Signal Pin Pin Pin Pin Pin Pin
* -----------------------------------------------------------------------------------------
* RST/Reset RST 9 5 D9 RESET/ICSP-5 RST
* SPI SS SDA(SS) 10 53 D10 10 10
* SPI MOSI MOSI 11 / ICSP-4 51 D11 ICSP-4 16
* SPI MISO MISO 12 / ICSP-1 50 D12 ICSP-1 14
* SPI SCK SCK 13 / ICSP-3 52 D13 ICSP-3 15

2
Program:
#include <SPI.h>
#include <MFRC522.h>

#define SS_PIN 10
#define RST_PIN 9
MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance.

void setup()
{
Serial.begin(9600); // Initiate a serial communication
SPI.begin(); // Initiate SPI bus
mfrc522.PCD_Init(); // Initiate MFRC522
Serial.println("Approximate your card to the reader...");
Serial.println();

}
void loop()
{
// Look for new cards
if ( ! mfrc522.PICC_IsNewCardPresent())
{
return;
}
// Select one of the cards
if ( ! mfrc522.PICC_ReadCardSerial())
{
return;
}
//Show UID on serial monitor
Serial.print("UID tag :");
String content= "";
byte letter;
for (byte i = 0; i < mfrc522.uid.size; i++)
{
Serial.print(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " ");
Serial.print(mfrc522.uid.uidByte[i], HEX);
content.concat(String(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " "));
content.concat(String(mfrc522.uid.uidByte[i], HEX));
}
Serial.println();
Serial.print("Message : ");
content.toUpperCase();
if (content.substring(1) == "F0 60 AB A3") //Change this UID
{
Serial.println("Authorized access");
Serial.println();
delay(3000);
}
3
else {
Serial.println(" Access denied");
delay(3000);
}
}
view rawInterfacing RFID with Arduino For Access Card.ino hosted with ❤ b

Steps to execute Program


1. Make connections as given above.
2. Open „rfidsys.ino‟ file in Arduino IDE
3. Compile and upload the program.

You might also like