0% found this document useful (0 votes)
37 views8 pages

RFID Driving License Verification System

The document outlines a project for an RFID-based driving license verification system using an Arduino Uno and various components. It includes circuit connections, code for verifying RFID tags, and functionality for vehicle ignition control based on authorized cards. Additionally, it briefly describes line following and object following functionalities with corresponding code snippets.

Uploaded by

shivam.stembotix
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views8 pages

RFID Driving License Verification System

The document outlines a project for an RFID-based driving license verification system using an Arduino Uno and various components. It includes circuit connections, code for verifying RFID tags, and functionality for vehicle ignition control based on authorized cards. Additionally, it briefly describes line following and object following functionalities with corresponding code snippets.

Uploaded by

shivam.stembotix
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

RFID-Based Driving License Verification System

🛠 Components Required:

1. Arduino Uno

2. RFID Module (MFRC522 - 13.56MHz)

3. RFID Tags (Driving License Simulation)

4. 16x2 LCD Display (Optional - for status display)

5. Buzzer & LED (For status indication)

6. Relay Module (For vehicle ignition control)

7. 12V Power Supply

8. Jumper Wires

📡 Circuit Connections:

🔹 RFID Module (MFRC522) to Arduino Uno:

RFID Pin Arduino Pin

VCC 3.3V

RST D9

GND GND

MISO D12

MOSI D11

SCK D13

SS (SDA) D10

🔹 Relay Module (For Ignition Control)

Relay Pin Arduino Pin

VCC 5V

GND GND

IN D8

🔹 Buzzer & LED (For Status Indication)


Component Arduino Pin

Buzzer D7

LED D6

📝 Code for RFID Driving License Verification

cpp

CopyEdit

#include <SPI.h>

#include <MFRC522.h>

#define SS_PIN 10

#define RST_PIN 9

#define RELAY_PIN 8

#define BUZZER_PIN 7

#define LED_PIN 6

MFRC522 mfrc522(SS_PIN, RST_PIN);

// Predefined authorized RFID tag (Driving License)

String authorizedCard = "3C BA 7D 89"; // Replace with your card's UID

void setup() {

Serial.begin(9600);

SPI.begin();

mfrc522.PCD_Init();

pinMode(RELAY_PIN, OUTPUT);

pinMode(BUZZER_PIN, OUTPUT);
pinMode(LED_PIN, OUTPUT);

digitalWrite(RELAY_PIN, LOW); // Keep vehicle off initially

Serial.println("Place your RFID card...");

void loop() {

// Check if an RFID card is present

if (!mfrc522.PICC_IsNewCardPresent() || !mfrc522.PICC_ReadCardSerial()) {

return;

// Read UID from the card

String cardUID = "";

for (byte i = 0; i < mfrc522.uid.size; i++) {

cardUID += String(mfrc522.uid.uidByte[i], HEX) + " ";

cardUID.trim();

Serial.print("Card UID: ");

Serial.println(cardUID);

// Verify if the card is authorized

if (cardUID == authorizedCard) {

Serial.println("Access Granted! Vehicle Ignition ON");

digitalWrite(RELAY_PIN, HIGH); // Turn ON vehicle

digitalWrite(LED_PIN, HIGH);

tone(BUZZER_PIN, 1000, 200);


delay(5000); // Keep ignition ON for 5 seconds

digitalWrite(RELAY_PIN, LOW); // Turn OFF vehicle

digitalWrite(LED_PIN, LOW);

} else {

Serial.println("Unauthorized Card! Access Denied");

digitalWrite(LED_PIN, LOW);

for (int i = 0; i < 3; i++) {

tone(BUZZER_PIN, 1000, 200);

delay(300);

mfrc522.PICC_HaltA(); // Stop communication with RFID tag

🔧 How It Works:

1. The RFID reader scans the driver's license (RFID card).

2. The Arduino checks if the card UID matches the authorized list.

3. If authorized, the relay turns ON, allowing vehicle ignition.

4. If unauthorized, the buzzer sounds, and access is denied.

5. The ignition stays ON for 5 seconds before turning off automatically.

Line following
#define leftSensor 2

#define rightSensor 3

#define motorLeft1 4

#define motorLeft2 5

#define motorRight1 6

#define motorRight2 7

void setup() {

pinMode(leftSensor, INPUT);

pinMode(rightSensor, INPUT);

pinMode(motorLeft1, OUTPUT);

pinMode(motorLeft2, OUTPUT);

pinMode(motorRight1, OUTPUT);

pinMode(motorRight2, OUTPUT);

void loop() {

int left = digitalRead(leftSensor);

int right = digitalRead(rightSensor);

if (left == 0 && right == 0) {

// Move Forward

digitalWrite(motorLeft1, HIGH);

digitalWrite(motorLeft2, LOW);

digitalWrite(motorRight1, HIGH);

digitalWrite(motorRight2, LOW);

else if (left == 1 && right == 0) {


// Turn Right

digitalWrite(motorLeft1, HIGH);

digitalWrite(motorLeft2, LOW);

digitalWrite(motorRight1, LOW);

digitalWrite(motorRight2, LOW);

else if (left == 0 && right == 1) {

// Turn Left

digitalWrite(motorLeft1, LOW);

digitalWrite(motorLeft2, LOW);

digitalWrite(motorRight1, HIGH);

digitalWrite(motorRight2, LOW);

else {

// Stop

digitalWrite(motorLeft1, LOW);

digitalWrite(motorLeft2, LOW);

digitalWrite(motorRight1, LOW);

digitalWrite(motorRight2, LOW);

Object following
#define trigPin 9

#define echoPin 10

#define motorLeft1 4
#define motorLeft2 5

#define motorRight1 6

#define motorRight2 7

void setup() {

Serial.begin(9600);

pinMode(trigPin, OUTPUT);

pinMode(echoPin, INPUT);

pinMode(motorLeft1, OUTPUT);

pinMode(motorLeft2, OUTPUT);

pinMode(motorRight1, OUTPUT);

pinMode(motorRight2, OUTPUT);

long getDistance() {

digitalWrite(trigPin, LOW);

delayMicroseconds(2);

digitalWrite(trigPin, HIGH);

delayMicroseconds(10);

digitalWrite(trigPin, LOW);

return pulseIn(echoPin, HIGH) * 0.034 / 2;

void loop() {

long distance = getDistance();

Serial.print("Distance: ");

Serial.println(distance);
if (distance > 15 && distance < 50) {

// Move Forward

digitalWrite(motorLeft1, HIGH);

digitalWrite(motorLeft2, LOW);

digitalWrite(motorRight1, HIGH);

digitalWrite(motorRight2, LOW);

else if (distance <= 15) {

// Stop (Too close)

digitalWrite(motorLeft1, LOW);

digitalWrite(motorLeft2, LOW);

digitalWrite(motorRight1, LOW);

digitalWrite(motorRight2, LOW);

else {

// Stop (No object detected)

digitalWrite(motorLeft1, LOW);

digitalWrite(motorLeft2, LOW);

digitalWrite(motorRight1, LOW);

digitalWrite(motorRight2, LOW);

delay(100);

You might also like