DIY RFID Door Lock System Using Arduino
by Yogeshwaran in Circuits > Arduino
557 Views, 10 Favorites, 0 Comments
DIY RFID Door Lock System Using Arduino
.png)
Have you ever seen those cool card-swipe door systems in offices and wondered how they work? Well, you can create your own RFID-based door lock system using an Arduino, an RFID reader, and a solenoid lock. All from the comfort of your home! This project is simple, affordable, and a great way to dive into the world of smart home automation.
If you want to know detailedly, how to make RFID Door lock using Arduino, check there where I explained everything from top to bottom.
Supplies
.png)
- Arduino UNO R3 Development Board
- RC522 RFID Reader
- RFID Cards or Tags
- Solenoid Door Lock
- Single Channel Relay Module
- 16x2 I2C LCD Display
- Jumper Wires
- Power Supply Adaptor
Draw Circuit Diagram for Arduino RFID Door Lock System

The above RFID Door Lock System circuit diagram represents how an Arduino, RFID Module, Relay module, Solenoid Lock, and LCD display are connected to create a secure and automated door lock system.
If you are a passionate hardware guy, just jump here, where I explained the working of this Arduino RFID Door Circuit Diagram in clear way.
Still get confused with the wiring connection like, In which pin do I want to connect which one? No worries, check out Pinout Connection Tabulation, where I mentioned one to one pinout connection in easily understandable way.
Make Your Hands Get Dirty While Setting Up Our Hardware
.jpg)
For complete video guide for setup and working demonstration, check out this link - https://www.youtube.com/watch?v=PeGIjCImpE0
As you can see the hardware connections are pretty easy and straightforward. This set-up is powered buy a 12V lithium battery pack making the project portable and easy to install, For practical purpose, you can opt for 12V adapter.
We have built a lot of RFID based projects previously, if you are completely new RFID and would like to understand the basics of RFID and how it works with Arduino you can read our Arduino RFID tutorial before proceeding with this project.
Write Some Code for Our Arduino RFID Door Lock System



Before moving on to this below code that I provided, you first want to know about the yours Authorized RFID Tag UID value. Which is essential, so that our RFID Door lock can distinguish the Authorized RFID Tag from the group of unauthorized RFID Tags.
To get to know the UID details of your Authorized RFID Tag, check this RFID Tag UID Scan Code. After dumping this RFID UID Scan code, you can able to see the scanned RFID Tag UID values on the Serial monitor as well as in the Display as shown in the above images. Just copy that UID value and replace it on the below code's "byte authorizedUID[] = {0x69, 0xA9, 0x81, 0x5A}; " Variable as shown in the above image.
This is the actual main code for our RFID Door Lock System, just make sure that you replace the UID with your Authorized Tag UID value in it. If you want step by step walkthrough of RFID Door Lock code, check there.
Upload the Above Code Into Arduino

After replacing the "byte authorizedUID[] = {0x69, 0xA9, 0x81, 0x5A}; " with your's authorized RFID Tag UID Value. Lets dump the above code into your Arduino.
If you face any issue, while dumping the code into Arduino.Check this Arduino Troubleshooting Tutorial.
Lets Test Our RFID Door Lock System


At last, we've entered the most exciting phase, i.e final testing of our RFID Door Lock System using Arduino!. In the above images, you can see that, after scanning the Authorized RFID tag, it granted access and make the solenoid Door lock to get Unlocked.
No matter if you're a beginner or an experienced maker, this DIY RFID Door Lock System makes learning about RFID readers in both fun and simple. Ready to build your own?
Want to discover more cool projects? Dive into our collection of Arduino IoT Projects | Arduino Robotics Projects | Arduino AI Projects | Arduino Home Automation Projects | Raspberry Pi Projects | ESP32 Projects to inspire your next build!