Make Arduino RFID Barrier System With OLED Display

by ROBO HUB in Circuits > Arduino

7314 Views, 46 Favorites, 0 Comments

Make Arduino RFID Barrier System With OLED Display

arduino rfid tax barrier.JPG
toll.gif

Hi readers, in this instructables i have come up with some interesting project! Yes, This is an Arduino-based RFID-powered toll tax barrier system with an OLED display.

If you are seeking a mini project for high school or engineering junior I would highly recommend you to try this project.

With the help of my step-by-step instructions, Circuit diagram, and codes you can build this project with ease.

Note that since it's a valuable project(considering students) I will be explaining things in depth, so buckle up to get educated on the things that you might not heard of before( this statement is for beginners only!!)

To begin with, let me go through the purpose of this project

The sole purpose was to spread the knowledge of toll tax system, you might have seen them in daily life if you live in urban areas but have you really thought about how these really work?

I wanted to make things easily understandable for any average student, so I came up with a working model that would demonstrate the working as similar to a real toll tax system instead of barely explaining theoretically.

Working Principle

This works similarly to the actual toll system, the only change here is instead of the money/credits we are just using the access permission for eligible tag users.

Also, we don't use any cloud storage, the rest of the things remain the same, to make it easily understandable I will explain taking account of individual functions in a system

RFID Tag Registration: Before using the system, each user must register their RFID tag in the system's database (arduino). The RFID tag is associated with the users account.

Initialization: When the system is powered on, the Arduino initializes the RFID module, OLED display, and micro servos.

RFID Tag Detection: The system constantly monitors the RFID reader for any RFID tags in its range.

Tag Validation: When a tag approaches the toll barrier and the RFID module detects an RFID tag, it reads the unique ID from the tag.

Database Lookup: The Arduino then checks the received RFID tag ID against the registered tags stored in its database. If a match is found, the tag is considered valid.

Barrier Control: Upon successful tag validation, the Arduino activates the micro servos, causing the barrier arm to open.

Passage Timing: To allow the vehicle to pass through, the barrier arm remains open for a predetermined amount of time. This allows the vehicle to pass through the toll gate.

Barrier Closure: After the passage time has elapsed, the Arduino triggers the micro servos again, causing the barrier arm to close, thus preventing unauthorized access.

Display Information: The OLED display can show relevant information such as "scan your tag, access granted or access denied" during the opening process.

Invalid Tags: If the RFID tag does not match any registered tag in the database, the system will not open the barrier. Instead, it displays the message "access denied" indicating that the tag is invalid.


Supplies

1t.png
5t.png
4t.png
3t.png
6t.png
2t.png
7t.png
5.png
18t.png

These are the components necessary to build this project

Arduino uno board from amazon

RC522 RFID module

OLED display module

Two micro servos got it here

Breadboard and jumper wires

RFID cards/tags

Black sheet of paper and a few white strips to make the road

Cardboard sheet to hold all the components

Note that few are affiliate products and I may earn from qualifying purchases at no extra cost to you.

Circuit Diagram

rfid with display gate system.jpg
8t.png
9t.png
10t.png
11t.png
12t.png
13t.png
rigid pcb.jpg
rigid flex pcbs.jpg
assembly capacity.jpg

To make the circuit connections I will explain the wiring considering each component.

RFID Module:

SDA to Arduino's digital pin 10

SCK to Arduino's digital pin 13

MOSI to Arduino's digital pin 11

MISO to Arduino's digital pin 12

IRQ (not used, leave unconnected)

GND to Arduino's GND

RST to Arduino's digital pin 9

3.3V to Arduino's 3.3V

OLED Display Module:

SDA to Arduino's A4

SCL to Arduino's A5

GND to Arduino's GND

VCC to Arduino's 5V

Micro Servo 1:

Signal yellow wire to Arduino's digital pin D6

VCC OR red wire to Arduino's 5V

GND black or brown wire to Arduino's GND

Micro Servo 2:

Repeat the same connections as Micro Servo 1 but use a SAME digital pin D6

After the circuit connections are complete we can head over to programming the board.

Want to simplify this circuit? Buy PCBs for your electronic projects from PCBWay.

Why them? They have provided me with the best PCB and The quality is just amazing compared to other providers in the market

A revolutionary solution that combines the best of both rigid and flexible circuitry to elevate your electronic projects to new heights.

With their expertise in advanced manufacturing techniques, they offer a seamless integration of rigid and flexible components, ensuring enhanced reliability, durability, and space-saving benefits

Check Here for Rigid-flex Pcbs

I bet you have not seen anywhere such assembly capabilities, Check here to know their best in-industry assembly techniques

Arduino Code

1ss.jpg
2ss.png
15t.png
17t.png
16t.png

If you are using the Arduino ide for the first time, Before uploading the code you'll need to install the necessary libraries for the RFID module and the OLED display.

To install them, follow these steps:

Open the Arduino IDE on your computer.

Go to "Sketch" > "Include Library" > "Manage Libraries."

In the Library Manager, search for "MFRC522" and install the library by "Jerome Luckenbach."

Also, search for "Adafruit SSD1306" and install the library by "Adafruit."

Now, connect your Arduino board to your computer, compile the code, and upload it to the Arduino.

Open the serial monitor and Tap your registered RFID tag on the RFID module, and you will get the UID of your TAG.

In the code edit the default uid with your uid and reupload the code.

Now test the circuit by tapping on the registered tag, the servo should open and close accordingly.

OLED display will show messages like "scan your tag here", "access granted" or "access denied" based on the RFID tag scanned.

After this we have a circuit ready for use, we have to put it up in a proper form.

Placing the Components

19t.png
20t.png
1.png
2.png
3.png
4.png

To keep everything in place I will be using a piece of cardboard, the choice of size depends upon you.

But make sure the size of cardboard you are using can fit all the components and also some space left like in my case.

Start by placing Arduino and breadboard, followed by adding stands(made or rough cardboard strips) to support OLED and RFID.

Use a tiny amount of hot glue to keep these components glued to the supports.

Allow some time to dry, later we will move on to set the servos in place.

Finishing

6.png
7.png
8.png
9.png
10.png
11.png
12.png

Since the servos are moving part of our project it has to be supported with a strong base and with some elevation.

I used 3D-printed blocks that served the purpose for me.

Add a drop of hot glue and fix it on cardboard later glue the servos.

Repeat the same for other servos too.

I made a road-like object using black paper and white strips.

Glue the road to the cardboard base, and give the project a final touch by attaching the barricade to the micro servo horns

To make the barricade you can cut strips of cardboard, paint it with black marker and add strips of yellow paper.

By the end of this step our project is ready for testing

How to Use

16.png
14.png
17.png
15.png
18.png
13.png

I used a USB power supply to power this project, connect to a power bank, and wait for the OLED to display the message "Scan Your Card"

As I mentioned earlier when you tap the RFID reader with the registered tag, Servo moves resulting in the gates open

The gate remains open for a certain time and later it closes automatically, you can also change this time(just make changes in the servo delay part of the code)

As we have seen the complete making of this project i would like to say that

RFID tag authentication and real-time feedback through the OLED display, contribute to a smooth and efficient working process when a large number of vehicles are flowing on the road.

Conclusion of this project

Arduino's toll tax barrier system presents a cost-effective and efficient solution for toll collection and access control.

The usage of RFID technology, OLED display, and micro servos demonstrates Arduino-based projects in real-world applications.

Future upgrades

There are areas of improvement that I would like to implement to this project in the future like keeping a record of number of vehicles passing through, revenue generated, and any potential issues with RFID tag detection.

Working Video

How to make Arduino RFID toll tax system with Display | Arduino

Don't miss to check out this working video that will amaze you! Here is the video link to play in different browser https://youtu.be/lNC3GPvLUX0

Hope you enjoyed this idea and the project, if you have any questions you can ask me in the comments, Thank you for reading