➡️ Watch the full project demo here
An open-source, Arduino-based access control system designed for parking barriers using RFID technology. This project provides a solid foundation for a secure and automated vehicle entry system. It features an admin-card function for easy management of authorized users and utilizes an ultrasonic sensor to detect vehicle passage.
This project was originally developed by Emre Güler in 2018 as a university project. Now, it's open to the community for improvements and new features!
- RFID-Based Access: Secure access using 13.56 MHz RFID cards.
- Admin Card Functionality:
- Easily register new user cards.
- Wipe all registered cards from memory by scanning the admin card twice.
- Persistent Memory: Registered card UIDs are stored in the Arduino's EEPROM, so they are not lost when power is disconnected.
- Automated Barrier Control: The servo motor automatically opens the barrier for authorized cards.
- Vehicle Detection: An HC-SR04 ultrasonic sensor detects when a vehicle has passed, ensuring the barrier closes safely.
- LCD Display: A 16x2 LCD screen provides real-time feedback to the user (e.g., "WELCOME!", "UNAUTHORIZED CARD!").
- Night Mode: An LDR sensor deactivates the system in the dark to save power.
| Component | Quantity | Purpose |
|---|---|---|
| Arduino Nano V3 | 1 | The brain of the project (ATmega328P). |
| MFRC522 RFID/NFC Reader | 1 | Reads the 13.56 MHz RFID cards. |
| 16x2 I2C LCD Display | 1 | User feedback screen. |
| TowerPro SG90 Servo Motor | 1 | Operates the parking barrier. |
| HC-SR04 Ultrasonic Sensor | 1 | Detects vehicle presence and passage. |
| LDR (Photoresistor) | 1 | Senses ambient light for night mode. |
| Breadboard & Jumper Wires | - | For circuit assembly. |
The complete circuit diagram is available in the schematics folder. You can open the rfid_system.pdsprj file with Proteus Design Suite to view and simulate the circuit.
For a quick look, here is the basic wiring diagram:
- Arduino IDE: Make sure you have the Arduino IDE installed.
- Libraries: Install the following libraries through the Arduino IDE's Library Manager:
LiquidCrystal_I2Cby Frank de BrabanderMFRC522by GithubCommunity
- Clone the repository:
git clone [https://github.com/emregulerr/arduino-rfid-parking-access-control.git](https://github.com/emregulerr/arduino-rfid-parking-access-control.git)
- Upload the Sketch: Open the
rfid_parking_sketch/rfid_parking_sketch_EN.inofile in the Arduino IDE and upload it to your Arduino Nano. - Admin Card Setup: The first card you need is the Admin Card. Its UID is hard-coded in the sketch. You need to change the UID in the code to match your desired admin card before uploading.
- Registering User Cards:
- Scan the Admin Card. The LCD will display "CARD REG. MODE".
- Scan a new card you want to authorize. The LCD will confirm with "Card registered."
- To wipe all registered cards, scan the Admin Card twice in a row.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated. We welcome improvements of any scale!
Here are a few ideas to get you started:
- 3D Printed Case: Design a 3D printable enclosure for the components.
- Enhanced Security: Implement a mechanism to prevent RFID card cloning.
- Logging: Add functionality to log entry/exit times to an SD card.
- Web Interface: Create a web interface for managing users and viewing logs (e.g., using an ESP8266/ESP32 instead of a Nano).
- Code Refactoring: Improve the code structure, add more comments, or optimize for performance.
- Documentation: Enhance the documentation, add more detailed explanations, or translate it into other languages.
- Fork the Project: Click the 'Fork' button at the top right of this page.
- Create your Feature Branch:
git checkout -b feature/AmazingFeature
- Commit your Changes:
git commit -m 'Add some AmazingFeature' - Push to the Branch:
git push origin feature/AmazingFeature
- Open a Pull Request: Go back to the original repository and open a new pull request.
Please make sure your code is well-commented and follows the project's existing style.
This project is distributed under the MIT License. See LICENSE file for more information.
- Emre Güler - GitHub
We hope you find this project useful and fun!

