Its peaceful enjoyable to work with RFID based ventures! In the past article, we perceived how to interface RFID with Arduino. Interfacing is the initial step to make any valuable undertaking. So why don't we make a RFID based Access Control System or a RFID based Door Lock utilizing Arduino? The framework I have planned here is a basic variant of the undertaking. This task can be upgraded with a considerable measure of elements (which I will be doing in the following form of this undertaking – Advanced RFID based Door Lock). So lets start!

Note:- You must read and do Interfacing RFID Reader with Arduino before continuing with this task!

The circuit chart to construct this Simple RFID based Door Lock is given underneath. It's the same circuit we utilized for interfacing instructional exercise. We will be upgrading this venture with a LCD Module Display towards the end of this article. Until further notice we will utilize Serial Monitor to show yield


btechelect.blogspot.com

So that is the circuit chart! You don't need anything more than this when you utilize Serial Monitor for yield show. We require a LCD Display to make this venture remain solitary. So we will be wiring the LCD towards end of this article. 

About the System Design 

A RFID construct Door Lock is situated in light of some basic ideas. We store an arrangement of RFID card information in our framework, say 3 or 10 RFID card information. At the point when the individual with the privilege RFID card (perfect to information preloaded in our project/framework) come and swipes his RFID label, access will be conceded. At the point when the individual with the wrong RFID card (whose information is not stacked in our framework) swipes his RFID label, access will be denied. I trust you comprehend the framework idea of RFID based Door Lock.


The Program:

#include<SoftwareSerial.h>
SoftwareSerial mySerial(9,10);
int read_count=0;
int j=0,k=0; // Variables to iterate in for loops
char data_temp, RFID_data[12];
char Saved_Tags[3][12]={
                       {'1','8','0','0','8','E','0','4','8','D','1','F'},
                       {'1','8','0','0','8','D','C','0','2','E','7','B'},
                       {'1','8','0','0','8','F','G','6','7','W','2','A'}};
boolean tag_check,tag_status,entry_control;
void setup()
{
mySerial.begin(9600);
Serial.begin(9600);
}

void loop()
{
RecieveData();
CheckData();
AccessCheck();
}

void RecieveData()
{
if(mySerial.available()>0)
{
data_temp=mySerial.read();
RFID_data[read_count]=data_temp;
read_count++;
}}

void CheckData()
{
if(read_count==12)
{
entry_control=true;  
for(k=0;k<3;k++)
{
for(j=0;j<12;j++)
{
  if(Saved_Tags[k][j]==RFID_data[j])
 {
  tag_check=true;
  }
  else
  {
  tag_check=false;
  break;
  }
}
if(tag_check==true)
{
tag_status=true;
}}
read_count=0;
}}

void AccessCheck()
{
if(entry_control==true)
{
if(tag_status==true)
{
Serial.println("Access Granted");
}
else
{
Serial.println("Access Denied");
}
entry_control=false;
tag_status=false;
}}

About the Program 

Note:- I have reused numerous parts from the interfacing RFID with Arduino instructional exercise. This will assist you with understanding the system better! 

Lets start with variables utilized as a part of the system. 

The variables data_temp, read_count and one dimensional cluster RFID_data[] fill the same need in interfacing RFID with Arduino instructional exercise. 

Saved_Tags – is our 2 Dimensional cluster which holds preloaded RFID card information. In this case, I have stacked this cluster with information of 3 RFID cards. 

tag_check – is a boolean variable used to hold the status of for internal for circle emphasis (of CheckData() capacity). The correlation between preloaded information and the swiped card information happens inside CheckData() capacity. The swiped card information is accessible in one dimensional exhibit RFID_data[]. The information in this exhibit is contrasted and every card esteem inside our 2 Dimensional cluster (preloaded card information). The internal for circle performs this correlation of every column information of 2 D exhibit with information inside RFID_data. With each fruitful examination of components, tag_check will keep up genuine worth. In the event that a correlation between components come up short, tag_check will be moved to false esteem. 

tag_status – is another boolean variable utilized hold status of a finished examination. This variable status is changed after one complete execution of the internal for circle. In the event that the estimation of tag_check stays valid after one complete cycle of inward for circle, it implies the swiped card is a legitimate one and access can be conceded. So we set this variable tag_status to consistent with make utilization of it in AccessCheck() capacity. 

So that's it in a nutshell! Presently lets add a LCD module to this entryway bolt and show lock status on LCD. 

Straightforward RFID based Door Lock with LCD Display 

The circuit outline of our straightforward RFID based Door Lock utilizing Arduino and LCD Display is given directly underneath! You may wire up as appeared in the 
btechelect.blogspot.com

The Picture of the done circuit



Post a Comment

 
Top