
We've built a simple presence-triggered parking barrier before using an ultrasonic sensor. This project builds a more capable version: an RFID-based access barrier that only opens for authorized cards, with an OLED display confirming whether entry was granted or denied.
How it's different from our ultrasonic barrier project
Our earlier automatic parking barrier opened for anything that got close enough — it had no concept of who or what was approaching. This project adds actual access control: a card has to match a list of authorized IDs before the barrier moves at all, making it suited to controlled entry rather than simple proximity detection.
Components needed
An Arduino Uno, an MFRC522 RFID reader module, an OLED display, two servo motors for the barrier arm, and jumper wires.
Wiring it up
The RFID module communicates over SPI (pins 9–13) and needs 3.3V specifically, not 5V. The OLED shares the I2C bus on A4/A5. The two servos connect to pin 6, working together to raise and lower the barrier arm.
The access control logic
The sketch continuously watches for a card near the reader. When one is detected, it reads the card's unique ID and checks it against a list of pre-authorized IDs stored in the code. A match raises the servos to open the barrier for about a second before lowering it again, while the OLED displays "ACCESS GRANTED." A non-matching card triggers "ACCESS DENIED" on the OLED, and the barrier stays down.
Where this is used
The same architecture that controls a parking barrier here works equally well for an access-controlled door, a gated community entrance, or any restricted area where only specific pre-registered cards should be let through — the RFID authentication logic doesn't change, only what the servo ends up moving.
You can find MFRC522 RFID modules and OLED displays at Juthour Tech.
Leave your comment