0% found this document useful (0 votes)
5 views

arduino

arduino

Uploaded by

haziq hafiz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

arduino

arduino

Uploaded by

haziq hafiz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

ARDUINO WITH RFID SYSTEM CAR PARKING

FINAL YEAR PROJECT

MUHAMMAD HAZIQ HAFIZ BIN TAHA

E20211028592

1
ACKNOWLEDGEMENTS

I would like to express my sincere thanks and appreciation to my supervisors, Dr. Abu Bakar Bin Ibrahim

who has given me this bright opportunity to engage in a RFID based project, while advise me alongside

with the development of this project. A million thanks to you.

2
ABSTRACT
Not finding a parking space for you sometimes is indeed a critical issue. An important appointment might

be missed. Time will be wasted and more money will be spent. Criticism and inconvenience are more

likely to happen. So, parking monitoring is an important solution. It has many practical advantages. It can

arrange the passage of vehicles inside the parking area in addition to avoiding contention. It can reduce

the suffering of sick and disabled people looking for a parking space. It is a good denote to such part of

the society. It is like providing them with the smile and hope that helps them to overcome their disability.

This project can provide information about the future need to make more parking spaces, also has many

uses such as security issues and data base.The project consists of four mainsubsystems, the first

subsystem is designing the power supply, in addition, the sensor subsystem circuit which includes RFID

and IR sensor. Moreover, the received signal by RFID will be processed using Arduino controller

subsystem. Furthermore, the output of the controller will be processed by PC to handle data base using C.

3
TABLE OF CONTENTS

ARDUINO WITH RFIS SYTEM CAR PARKING

ACKNOWLEDGEMENTS ............................................................................................i

ABSTRACT...................................................................................................................... ii

LIST OF TABLES ......................................................................................................... viii

LIST OF FIGURES ......................................................................................................... ix

LIST OF ABBREVIATIONS .......................................................................................... x

CHAPTER 1: INTRODUCTION.................................................................................... 6-8

1.1 Inroduction.................................................................... 6

1.2: Background study.......................................................................................................... 6

1-3: Project Objectives.................................................................................................. 6

1-4: System functionalities............................................................................................... 7

1-5: Methodology...................................................................................... 7

1-6: Gantt chart............................................................................................. 8

CHAPTER 2: REQUIREMENT ANALYSIS AND SPECIFICATION.............................. 9-10

2.1 Arduino Microcontroller.................................................................... 9

2.2 Microcontroller Definition…………………………………………………9

2.3 RFID SYSTEM.................................................................................................. 10

CHAPTER 3: SYSTEM DESIGN AND DEVELOPMENT…………………………11-20

3.1.FLOWCHART AND PROTOTYPE SYSTEM………………11-12

4
3.2 SYSTEM COMPONENT..........................................................................................................

3.3 SOFTWARE FOR THE SYSTEM…………………………………………………………..

3.4 PROGRAMING AND CODING...............................................................................................

3.5 OVERVIEW OF THE PROJECT......................................................................................

CHAPTER 4: TESTING.................................................................................... 21-23

4.1 Testing………………………………………………………………………..

CHAPTER 5: DISCUSSION AND CONCLUSION……………………………………..24

5.1 Conclusion………………………………………………….1

5.2 Future work………………………………………………………… 2

5
CHAPTER 1 : INTRODUCTION

1.1Introduction
This research proposal will look into Arduino and how they can be applied in RFID.This

introduction has been apportioned into various parts as follows the first part is the background to

the research, the second is the problem statement, the third is the major purpose of the research,

fourth is the justification lastly but not least is the aim and objective of the proposed research.

1.2 Background study


The problem that always happens is that students park their vehicles in the staff parking lot.

So in this project we try to create RFID system using Arduino at the staff parking lot. RFID means

radio-frequency identification. RFID uses electromagnetic fields to transfer data over short

distances. RFID is useful to identify people, to make transactions and others.

1.3 Objective

 To program a RFID system to make ease for every staff

 To understand how RFID system working

6
1.4 System functionalities
RFID is a technology that digital data is encoded to “RFID tags” or smart labels can be read

by an RFID reader, using electromagnetic fields RFID tag reading procedure has four steps.

Data stored in the RFID tag, waits an electromagnetic signal. RFID tags antenna receives

electromagnetic energy emitted from RFID readers antenna. Then using the power from readers

electromagnetic field, sends the data as radio signals to the reader. RFID reader receives the radio

signals and turns them into usable data.

1.5 Methodology
This project using waterfall methodology.

7
1.6 Gantt chart
Arduino with RFID system

8
CHAPTER 2: REQUIREMENT ANALYSIS AND SPECIFICATION
2.1 Arduino Microcontroller
It's an open-source physical computing platform based on a simple microcontroller board,

and a development environment for writing software for the board. Arduino can be used to

develop interactive objects, taking inputs from a variety of switches or sensors, and

controlling a variety of lights, motors, and other physical outputs.

2.2 Microcontroller Definition


A microcontroller (sometimes abbreviated µC, uC or MCU) is defined as a small computer

on a single integrated circuit containing a processor core, memory, and programmable I/O

peripherals. Program memory in the form of NOR flash or OTP ROM is also often included

on chip, as well as a typically small amount of RAM Microcontrollers are designed for

embedded applications.

9
2.3 RFID SYSTEM
RFID Sensor: RFID is a form of automatic identification that uses electric or magnetic

fields at radio frequencies to transmit information. Every RFID system includes a radio

frequency (RF) subsystem, which is composed of tags and readers. This technology has

been described as a major enabling technology for automated, contactless, and wireless

data collection.

10
CHAPTER 3: SYSTEM DESIGN AND DEVELOPMENT
3.1.FLOWCHART AND PROTOTYPE SYSTEM

Figure 3.1
The system flow of this project will be represented in a flowchart form. From the

flowchart, it emulates a situation where the start RFID reader will scan the vehicle every

time the vehicle pass through it. Then, the gate will open up if RFID scan the right access card.If student

try to touch their card,buzzer will sound up and red light will light up to inform that the card not

recognized.

11
Prototype Project

12
3.2 SYSTEM COMPONENT
3.2.1 Arduino Uno
The Arduino Uno is the heart of the entire system. It is capable to receive input
from the RFID readers and produce result as output after process. Besides, it is reasonable
in pricing and easy to get.

3.2.2 Mifare RC522


Mifare RC522 is the high integrated RFID card reader which works on non-contact
13.56mhz communication, is designed by NXP as a low power consumption, low cost and
compact size read and write chip, is the best choice in the development of this project.

13
3.2.3 ISO14443A smart IC cards
The MIFARE Classic® family is the most widely used contactless smart card ICs
operating in the 13.56 MHz frequency range with read/write capability and ISO/IEC
14443A compliance.

3.2.4 Buzzer
A buzzer will sound up when the staff scan their access card.

14
3.2.5 LED
Led will light up when the gate was open up.Green light for access card and red light for denied card.

15
3.3 SOFTWARE FOR THE SYSTEM
Arduino Software (IDE)

Arduino IDE is an open-source cross-platform application that make user easy to


write code and upload the code to the Arduino board. This application is written in java
language but the script that write to run this project is C++ language.

C++ language
C++ is a middle-level language and is an extension of the C language. C++
language support multiple platform such as Windows, MAC OS and various versions of
UNIX. In this project, a C++ script is created and uploaded to the Arduino Uno board
through Arduino IDE.

Libraries Used
There is a list of libraries that used in this project.
RFID library allows the Arduino Uno to read data from tag by using the two RFID readers.
SPI library allows the Arduino Uno to communicate with the SPI device, with the Arduino
Uno as a master device.
LiquidCrystal library allows the Arduino Uno board to control LCD.
GSM library allows the Arduino Uno board to send message to the mobile phone.

16
3.4 PROGRAMING AND CODING

#include "SPI.h"
#include "MFRC522.h"
#include <Servo.h>

#define SS_PIN 10
#define RST_PIN 9

Servo myservo;

int yellow_led = 4;
int red_led = 5;

int mic = 8;

MFRC522 rfid(SS_PIN, RST_PIN);

MFRC522::MIFARE_Key key;

void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
SPI.begin();
rfid.PCD_Init();
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(8, OUTPUT);
myservo.attach(6);
myservo.write(0);

Serial.println("waiting for card...");


}
void loop() {
// put your main code here, to run repeatedly:
if (!rfid.PICC_IsNewCardPresent() || !rfid.PICC_ReadCardSerial())
return;

// Serial.print(F("PICC type: "));


MFRC522::PICC_Type piccType = rfid.PICC_GetType(rfid.uid.sak);
// Serial.println(rfid.PICC_GetTypeName(piccType));

// Check is the PICC of Classic MIFARE type


if (piccType != MFRC522::PICC_TYPE_MIFARE_MINI &&
piccType != MFRC522::PICC_TYPE_MIFARE_1K &&

17
piccType != MFRC522::PICC_TYPE_MIFARE_4K) {
Serial.println(F("Your tag is not of type MIFARE Classic."));
return;
}
String strID = "";
for (byte i = 0; i < 4; i++) {
strID +=
(rfid.uid.uidByte[i] < 0x10 ? "0" : "") +
String(rfid.uid.uidByte[i], HEX) +
(i != 3 ? ":" : "");
}
strID.toUpperCase();
//Serial.print("Tap card key: ");
//Serial.println(strID);
delay(500);

if (strID.indexOf("F3:2C:0F:0E") >= 0) { //put your own tap card key;

Serial.println("**Authorised acces**");

digitalWrite(4, HIGH);
digitalWrite(5, LOW);
digitalWrite(8, LOW);
myservo.write(70); //motor moves 70 degree
}
else
{

Serial.println("**Acces denied**");
digitalWrite(5, HIGH);
digitalWrite(4, LOW);
myservo.write(0);
digitalWrite(8, HIGH);
delay(2000);
digitalWrite(8, LOW);
}

This is the coding for this project.It was be write in Arduino software (IDE).All of this coding will upload
into Arduino uno board to run the system.

18
And this is dumpinfo that we use to know the key of access card.The key will be write in the coding to
give access to the RFID reader.

19
3.5 OVERVIEW OF THE PROJECT

This the overview of the project after completely connect all component.

20
CHAPTER 4: TESTING
4.1 Testing
In this section,the testing was approved by my other friend.

First step,connect the Arduino board to the computer and upload the coding.

21
Second,touch the access card to he RFID reader to open up the gate.

22
Last,if we touch the denied card the red light will light up and the buzzer will sound up.

23
CHAPTER 5: DISCUSSION AND CONCLUSION
5.1 Conclusion
At the end of this project, a working full prototype system was developed. In this

prototype system, the RFID readers can scan the staff ‘s access card to get in the parking.There is

imposible for student to get in the staff parking at Campus Sultan Abdul Jalil Shah.With this system it

will secure the staff parking for be take by student. Finally, a buzzer will sound up to alert the driver if

they scan a card that not be recognized.

Nevertheless, the evolution of IoT technologies is growing fast nowadays. The potential of this project is

so helpful that it can reduce the issue about staff ‘s parking in Campus Sultan Abdul Jalil Shah,UPSI.

5.2 Future work.


There are still many improvements and enhancements can be done in this project.Firstly,we will create

another system that will inform staff how many parking lot left and they will book the parking lot in the

system.And the other features that will be add is the attendant will be tick in the system when the staff

scan the access card.So, they no need no punch card in office.

24
REFERENCES

25

You might also like