RFID Based gate Control System

As we are moving into the electronic dependent era so there should also a security lock which can identify you by some card. you don’t need keys anymore to open the door and gates around you for example in the metro, your house parking. have you ever think if you need to open the metro gate by the lock and key, but we are in the techno era of technology, we have different technologies for the security purpose such as fingerprint security, password security, and RFID based security. so here we are using RFID as a security lock. do you know  RFID card? it is used to enter the metro gate, shopping malls gate and parking gate.

RFID BASED DOOR LOCK

so, we are making a  tutorial on how to make the RFID based gate control system. in this tutorial, you will learn how to make the RFID based gate open and closed system using a microcontroller. here we are using an Arduino and servo motors. first, we will learn to work on the projects. you have to tap the RFID tag on to the particular area of the receiver system to read the information from the RFID Tag. inside the  RFID tag, there is some encoded information. which can read by the RFID Reader. and we can make the use these data into the code to make the conditions.

As you can see there are two components in the RFID module. Rfid Card reader and another is RFID tag. Rfid reader having a circuit which consists a microchip and some wires.  which connected to the Arduino or another microcontroller.it can be connected through the I2C protocol. Wireless communication occurs when the come near together.mutual induction principle used here to initiate the tag. both components having the conductor coil. when they come near an emf is induced in the RFID card(RFID tag). in that duration of time, the data transmit from Tag to the reader.

 

The RFID tag contains its own unique code. we have to take this code from the Tag and enter that unique code into the Arduino which should be matched. so according to our code, we have to add MFRC library which you can from the Github. and have to write the code. if you are interested to see what inside a card. put the card over the flashlight of the mobile phone and see the chip and coil inside the RFID tag. we have more projects on the Arduino projects and security system.

RFID Based gate open closed circuit diagram.

the circuit diagram is easy to make for this project because we have to connect only the RFID and Servo motor to the Arduino. watch the full video on Youtube

rfid based gate control circuit with arduino

 

Code for RFID based Gate Control system:-

#include “SPI.h”
#include “MFRC522.h”

#define SS_PIN 10
#define RST_PIN 9
#define SP_PIN 8

MFRC522 rfid(SS_PIN, RST_PIN);

MFRC522::MIFARE_Key key;

void setup() {
Serial.begin(9600);
SPI.begin();
rfid.PCD_Init();
}

void loop() {
if (!rfid.PICC_IsNewCardPresent() || !rfid.PICC_ReadCardSerial())
return;

MFRC522::PICC_Type piccType = rfid.PICC_GetType(rfid.uid.sak);

if (piccType != MFRC522::PICC_TYPE_MIFARE_MINI &&
piccType != MFRC522::PICC_TYPE_MIFARE_1K &&
piccType != MFRC522::PICC_TYPE_MIFARE_4K) {
Serial.println(F(“Your tag is not of type MIFARE Classic.”));
return;
}

String strID = “”;
for (byte i = 0; i < 4; i++) {
strID +=
(rfid.uid.uidByte[i] < 0x10 ? “0” : “”) +
String(rfid.uid.uidByte[i], HEX) +
(i!=3 ? “:” : “”);
}
strID.toUpperCase();

Serial.print(“Tap card key: “);
Serial.println(strID);

rfid.PICC_HaltA();
rfid.PCD_StopCrypto1();
}

 

Upload the Arduino Code into the Board and Make the connections.

Leave a Reply

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