In today's world, where security and automation are becoming essential, RFID-based access systems provide a reliable and convenient solution. The RFID Lock System using Arduino is a beginner-friendly project that teaches how to build a basic security mechanism using an RFID card reader, a servo motor, and a microcontroller. This project is ideal for applications like smart doors, lockers, or personal safes.
Components RequiredArduino Uno – 1
- Arduino Uno – 1
- RFID Reader (MFRC522) – 1
- RFID Tags/Cards – 2 or more
- Servo Motor (SG90 or similar) – 1
- 16x2 LCD Display (with I2C module) – 1
Green LED – 1
- Green LED – 1
Red LED – 1
- Red LED – 1
Buzzer – 1
- Buzzer – 1
Breadboard and jumper wires
- Breadboard and jumper wires
Power supply or USB cable for Arduino
- Power supply or USB cable for Arduino
The system works by reading RFID tags through the MFRC522 module. Each RFID tag or card has a unique identifier (UID). The Arduino reads the UID of the scanned card and compares it with pre-defined authorized UIDs stored in the code. If the UID matches, access is granted, and the servo motor rotates to unlock the door or mechanism. If the UID does not match, access is denied, and a red LED and buzzer provide a warning signal.
The LCD display gives real-time feedback to the user by showing messages like “Scan your card”, “Access Granted”, or “Access Denied”. This user-friendly interface improves interaction and clarity.
Circuit OverviewThe RFID module communicates with the Arduino through SPI interface:
SDA → Pin 10
- SDA → Pin 10
SCK → Pin 13
- SCK → Pin 13
MOSI → Pin 11
- MOSI → Pin 11
MISO → Pin 12
- MISO → Pin 12
RST → Pin 9
- RST → Pin 9
- The RFID module communicates with the Arduino through SPI interface:SDA → Pin 10SCK → Pin 13MOSI → Pin 11MISO → Pin 12RST → Pin 9
Servo Motor signal pin is connected to pin 3
- Servo Motor signal pin is connected to pin 3
Green LED connected to pin 5
- Green LED connected to pin 5
Red LED connected to pin 7
- Red LED connected to pin 7
Buzzer connected to pin 6
- Buzzer connected to pin 6
LCD display uses I2C, connected to A4 (SDA) and A5 (SCL)
- LCD display uses I2C, connected to A4 (SDA) and A5 (SCL)
Once the system is powered on, the LCD displays “Scan your card”. When a user presents an RFID card near the reader, the system reads its UID and checks it against the list of authorized users in the code.
If matched, the green LED turns on, the servo rotates to unlock (typically 90°), and the LCD shows “Access Granted”.
- If matched, the green LED turns on, the servo rotates to unlock (typically 90°), and the LCD shows “Access Granted”.
After a short delay, the servo returns to its original (locked) position.
- After a short delay, the servo returns to its original (locked) position.
If the card is unauthorized, the red LED lights up, the buzzer sounds, and the LCD shows “Access Denied”.
- If the card is unauthorized, the red LED lights up, the buzzer sounds, and the LCD shows “Access Denied”.
This simple mechanism provides a secure and touchless way to control access.
ApplicationsHome and office door locks
- Home and office door locks
School or library lockers
- School or library lockers
Personal safes or vaults
- Personal safes or vaults
DIY security systems for projects and robotics
- DIY security systems for projects and robotics
Easy to build and program
- Easy to build and program
Contactless operation using RFID
- Contactless operation using RFID
Real-time user feedback via LCD, LED, and buzzer
- Real-time user feedback via LCD, LED, and buzzer
Expandable for multiple users and features like logging or remote access
- Expandable for multiple users and features like logging or remote access
- Conclusion
The RFID Lock System using Arduino is a great starting point for those interested in automation and security. It combines basic electronics with RFID technology to create a smart and secure locking system. With a few modifications, this project can be scaled up for real-world applications, making it both educational and practical.
Comments