Arduino RFID Solenoid Lock

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Arduino RFID Solenoid Lock

Introduction
The RFID Door Lock is a lock that is simple to install and allows the user to easily lock and
unlock doors. It will contain a RFID reader/writer and a magnetic door lock for simple use. All
the user will need is an RFID tag to be able to unlock and lock the door. A LED will be used to
let the user know when the door is in fact locked. The components included in the module are
small and compact.
Additionally, the door lock is simple and easy to install. It does not require the user to
disassemble the door or doorframe as the door lock are merely attachments. This is also leaves
the user with the option of using their original lock and key if they so choose. All in all, this RFID
door lock should be a simple and cost-effective upgrade to the average consumer’s security and
convenience

Objectives
1. The goal is to open a door by using a specific tag that functions as an access badge. If
the wrong tag is scanned, the door will stay closed and set off a buzzer.
2. To control the door lock, we'll be using a relay module interfaced with an Arduino which
controls a solenoid engine.
3. Allow access only to authorized people to enter a room.
4. Uniquely Identify the authorized person data and store ID and name

Methodology
Project Design
Submission
Formulation and Purchase of Fabrication of
of Project Presentation materials
Start Canvas of the Project
proposal of project
materials
proposal
(Costing)
Project Output

Submission of
finished output
and defense

Materials End
 Arduino UNO
 Relay module
 RFID Sensor
 Solenoid lock
 LED
 Buzzer
 Breadboard
 Jumper
Circuit

Code:
#include <SPI.h>
#include <MFRC522.h>

#define SS_PIN 10
#define RST_PIN 9
#define LED_G 5 //define green LED pin
#define LED_R 4 //define red LED
#define RELAY 3 //relay pin
#define BUZZER 2 //buzzer pin
#define ACCESS_DELAY 2000
#define DENIED_DELAY 1000
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
pinMode(LED_G, OUTPUT);
pinMode(LED_R, OUTPUT);
pinMode(RELAY, OUTPUT);
pinMode(BUZZER, OUTPUT);
noTone(BUZZER);
digitalWrite(RELAY, LOW);
Serial.println("Put 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) == "83 23 38 BB") //change here the UID of the card/cards that
you want to give access
{
Serial.println("Authorized access");
Serial.println();
delay(500);
digitalWrite(RELAY, HIGH);
digitalWrite(LED_G, HIGH);
delay(ACCESS_DELAY);
digitalWrite(RELAY, LOW);
digitalWrite(LED_G, LOW);
}

else {
Serial.println(" Access denied");
digitalWrite(LED_R, HIGH);
tone(BUZZER, 300);
delay(DENIED_DELAY);
digitalWrite(LED_R, LOW);
noTone(BUZZER);
}
}
Block Diagram
Topics
 Control Systems
 Block diagrams

Conclusion

The Arduino RFID Solenoid Lock is a very cheap and affordable design that allows convenience
and security for users. The design is relatively small and easy enough to install with just a
couple of screws. Of course, there are additional features that can be added in order to improve
the system as a whole. However, it is important to note the cost of the improvement should be
taken into consideration. The following are a few ideas that can be implemented without adding
much cost to the design as a whole. These are just a few of the ideas for the RFID Door Lock in
which improvements can be made to further improve both the security and convenience of the
product.
References
[1] R. Want, “An Introduction to RFID Technology”, IEEE Pervasive Computing, vol. 5, iss. 1, pg
25-33, 2006.

Provides and easy to understand overview of RFID and how it is used. This is a reliable source,
cited 769 times according to Google Scholar. This is a journal.

[2] A. Juels, “RFID Security and Privacy: A Research Survey”, IEEE Journal on Selected Areas
of Communication, vol. 24, iss. 2, pg381-394, 2006.

Because my project is about a reprogrammable door lock, I figure the research done in security
is important. The most important part thing I’m gathering from this article is the integrity of RFID
systems. The privacy issue is a nice bonus. According to Google Scholar, this has been cited
1222 times. This is a journal as well.

You might also like