FACULTY FOR HIGH QUALITY TRAINING GRADUATION THESIS ELELECTRONICS AND COMMUNICATION ENGINEERING TECHNOLOGY DESIGN AUTOMATIC VEHICLE TOLL SYSTEM THROUGH SCANNING QR CODE USING CAMERA
Trang 1FACULTY FOR HIGH QUALITY TRAINING
GRADUATION THESIS ELELECTRONICS AND COMMUNICATION ENGINEERING TECHNOLOGY
DESIGN AUTOMATIC VEHICLE TOLL SYSTEM THROUGH
SCANNING QR CODE USING CAMERA
LECTURER: M.Eng NGUYEN THANH NGHIA
SONSTUDENT: NGUYEN DANG KHOA PHAM VIET ANH
SKL 0 0 9 3 6 2
Ho Chi Minh City, May 2022
Trang 2FACULTY FOR HIGH QUALITY TRAINING
GRADUATION THESIS MAJOR: ELECTRONICS AND COMMUNICATION
ENGINEERING TECHNOLOGY
DESIGN AUTOMATIC VEHICLE TOLL SYSTEM THROUGH SCANNING QR CODE USING CAMERA
STUDENTS: NGUYEN DANG KHOA
Trang 3FACULTY FOR HIGH QUALITY TRAINING
STUDENTS: NGUYEN DANG KHOA
ENGINEERING TECHNOLOGY
DESIGN AUTOMATIC VEHICLE TOLL SYSTEM THROUGH SCANNING QR CODE USING CAMERA
Trang 4-
Ho Chi Minh City, July 29 th , 2022
ADVISOR’S EVALUATION SHEET
Student name: Pham Viet Anh Student ID: 17141001
Student name: Nguyen Dang Khoa Student ID: 17141013
Major: Electronics and Communication Engineering Technology
Project title: Design automatic vehicle toll system through scanning QR code using
camera
Advisor: Nguyen Thanh Nghia,
M.Eng
EVALUATION
1 Content of the project:
2 The content of the project is highly suitable for an undergraduate student’s final project
(Sign with full name)
Nguyễn Thanh Nghĩa
Trang 5ii
*** Ho Chi Minh City, July 29 th , 2022
PRE-DEFENSE EVALUATION SHEET
Student name: Pham Viet Anh Student ID: 17141001
Student name: Nguyen Dang Khoa Student ID: 17141013
Major: Electronics Communication Engineering
Thesis title: Design automatic vehicle toll system through scanning QR code using
2 Strengths:
3 Weaknesses:
4 Approval for oral defense? (Approved or denied)
Trang 6ii
-
Ho Chi Minh City, July 29 th , 2022
EVALUATION SHEET OF DEFENSE COMMITTEE MEMBER
Student name: Pham Viet Anh Student ID: 17141001
Student name: Nguyen Dang Khoa Student ID: 17141013
Major: Electronics and Communication Engineering Technology
Project title: Design automatic vehicle toll system through scanning QR code using camera
Advisor: M.Eng Nguyen Thanh Nghia
Name of Defense Committee Member:
EVALUATION
1 Content and workload of the project
2 Strengths:
3 Weaknesses:
4 Overall evaluation: (Excellent, Good, Fair, Poor)
Trang 7i
Education Faculty for High Quality training Independence - Liberty – Happiness
Ho Chi Minh City, July 29 th , , 2022
PROJECT ASSIGNMENT
Name of Members: Pham Viet Anh
Nguyen Dang Khoa
Student ID: 17141001 Student ID: 17141013 Training system: Regular university
Major: Electronics and communication engineering technology
Class: 17141CLA
I NAME OF PROJECT: DESIGN AUTOMATIC VEHICLE TOLL SYSTEM
THROUGH SCANNING QR CODE USING CAMERA
II ASSIGNMENT
1 Original data
- Automatic road toll collection without stopping is very popular in the world, many countries in the region with similar transport and social infrastructure to Vietnam (such as Malaysia, Indonesia, the Philippines) have implemented it before
2 The volume of implementation and the content of the topic
- Study and learn C# language, sensor, Arduino
- Learn and research applied models for solving current recognition-related problems
- Create a model of a whole application system
- Write a report
III DATE OF RECEIVING TASK:
IV DATE OF TASK COMPLETION:
V ADVISOR: Nguyen Thanh Nghia,
M.Eng
CHAIR OF THE PROGRAM
(Sign with full name)
ADVISOR
(Sign with full name)
Nguyễn Thanh Nghĩa
Trang 8vii
Trang 9vi
HCMC University of Technology and
Education Faculty for High Quality training
Socialist Republic of Vietnam
Independence - Liberty – Happiness
Ho Chi Minh City, July 29 th , 2022
PROJECT IMPLEMENT SCHEDULE
Name of Members: Pham Viet Anh
Nguyen Dang Khoa
Class: 17141CLA
Student ID: 17141001 Student ID: 17141013
Name of project: Design of an automatic fare collection system for buses based on RFIF technology
6th
(19/04-26/04)
Programming data transmission between Arduino UNO R3 and infrared sensor LM393 module
Trang 10Learning about programming language C#
in application Visual Studio
9th
(13/5-20/5)
Programming to create interface for system and transmitting information with the computer
Trang 11viii
COMMITMENT
We would like to sincerely express our deep gratitude to teacher Nguyen Thanh Nghia and the teachers who have directly guided and supported us during the completion of the graduation thesis Thanks to the knowledge and experience that the teachers shared, they helped us a lot in researching and implementing the graduation thesis
We also sincerely thank the teachers and teachers in the high-quality training department of Electronics Telecommunication Engineering Technology
at Ho Chi Minh City University of Technology and Education for their dedication
to imparting valuable knowledge for 4 years to study at university With the knowledge acquired during the study process, it is not only the foundation for the process of making the graduation thesis but also a valuable luggage to help us become somewhat more confident when entering the next gate of life
Finally, we would like to thank our family for giving time to care and supporting us spiritually throughout our life
STUDENTS
Pham Viet Anh Nguyen Dang Khoa
Trang 12vii
LIST OF CONTENTS
ADVISOR’S EVALUATION SHEET I PRE-DEFENSE EVALUATION SHEET II EVALUATION SHEET OF III PROJECT ASSIGNMENT IV PROJECT IMPLEMENT SCHEDULE V COMMITMENT VI LIST OF TABLES VII LIST OF FIGURES XI ABSTRACT XIICHAPTER 1: INTRODUCTION 1
1.1 OVERVIEW 1
1.2 TARGET OF PROJECT 3
1.3 METHODOLOGY 4
1.4 THESIS SUMMARY 5
CHAPTER 2 LITERATURE REVIEW 6
2.1 OVERVIEW OF ARDUINO 6
2.1.2 APPLICATION OF ARDUINO 6
2.1.3 SHIELD 7
2.1.4 SOFTWARE 8
2.2 INTRODUCTION TO THE LIBRARIES USED IN THE PROGRAM 8
2.2.1 INTRODUCTION ABOUT ZXING 8
2.2.2 INTRODUCTION ABOUT AFORGE.NET 9
2.3 QR CODE 9
2.3.1 WHAT IS QR CODE 9
2.3.2 HOW IS QR CODE DIFFERENT FROM TRADITIONAL BARCODE? .10
2.3.3 APPLICATION OF QR CODE ,10
CHAPTER 3: METHODOLOGY 12
Trang 13viii
3.1 REQUIREMENTS OF THE SYSTEM 12
3.2 HARDWARE CALCULATION AND DESIGN 12
3.2.1 BLOCK DIAGRAM 12
3.2.2 CIRCUIT DESIGN 13
3.2.3 CENTRAL PROCESSING BLOCK 15
3.2.3.1 ARDUINO UNO R3 MODULE 15
3.2.3.2 INFRARED SENSOR LM393 17
3.2.3.3 WEBCAM C270 HD LOGITECH 20
3.2.4 SYSTEM SPECIFICATION 22
3.2.4.1 SYSTEM SPECIFICATION 22
3.2.4.2 SYSTEM FEATURES 22
3.2.4.3 BLOCK DIAGRAM OF THE FARE COLLECTION SYSTEM 22
3.3 SOFTWARE DESIGN 24
3.3.1 PROGRAMMING SOFTWARE FOR VISUAL STUDIO……… 24
3.3.2 SERVER AND DATABASE SYSTEM 25
3.3.4 FLOWCHART 26
CHAPTER 4 EXPERIMENT RESULTS 29
4.1 MODEL IMPLEMENTATION 29
4.2 DATA COLLECTION PROCESS 31
4.2.1 DATA PROCESSING SYSTEM PROCESS 34
4.3 SYSTEM ASSESSMENT 36
CHAPTER 5 CONCLUSIONS AND RECOMMENDATIONS 38
5.1 MODEL IMPLEMENTATION 38
5.2 DATA COLLECTION PROCESS 38
REFERENCE 40
Trang 14conditions……….………36 Table 4.2 Performance results of the system when high light intensity
conditions……….………37 Table 4.3 Performance results of the system when lack of light
conditions……….…37
Trang 15x
LIST OF FIGURES
Figure 1 1 The electronic toll collection model does not stop ETC…….……… 2
Figure 2 1 The front of system model after completion……….…………6
Figure 2 2 Module of the system……….……… 7
Figure 2 3 QR code……….……… 10
Figure 2 4 QR Code and Traditional Barcode……… ……….10
Figure 3 1 Block diagram of system……….…………13
Figure 3 2 Sensor LM393……….………18
Figure 3 3 Schematic of sensor LM393……….………… 18
Figure 3 4 Visual Studio Interface……….………… 19
Figure 3 5 Webcam C270 HD Logitech……….……… 20
Figure 3 6 Hardware design……….……….21
Figure 3 7 Circuit of central processing……….……… 23
Figure 3 8 Visual Studio Interface……….……… 24
Figure 3 9 Schematic of power supply circuit……….……… 25
Figure 3 10 Flowchart of User Information Activity………… ……… 27
Figure 3 11 Flowchart of Arduino……….……… 28
Figure 4 1 Top view of node model……….……… 39
Figure 4 2 Sensor 1 detects the media and panel 1 at the interface changes.… 30
Figure 4 3 Camera scan QR and display information on screen……… ….30
Figure 4 4 Sensor 2 detects the media and panel 2 at the interface changes… 31
Figure 4 5 Interface of adding new vehicle……… ….32
Figure 4 6 SQL database……… ….32
Figure 4 7 Interface of editing user information……… ….33
Figure 4 8 Recharge interface……… …….34
Figure 4 9 Create QR code……… …… 34
Figure 4 10 Add new user……… …… 35
Figure 4 11 Main processing interface……… ……35
Figure 4 12 Database……….…… 36
Trang 16xi
Trang 17xii
ABSTRACT
The transportation has becomemore and more important in today’s road network and the manual toll collection system has become outdateddue to its number of drawbacks By employingautomated toll collection system, driver of vehicles neednot to stop at a window or and waste time for waiting in a long queue
to pay their toll This reduces theconsumption of fuel; reduce congestion, increase roadsafety An Automated Toll Collection System using QRcode system is basically designed for anuninterrupted toll collection, which has become animportant part of intelligent transportation system
In this project, we will design and build an automatic fare collection system for buses based on scan QR code to replace the traditional cash payment method
A user QR code containing personal information will be provided to each customer, then the customers will scan the QR code for each ride and the system will process the payment immediately through the amount of money in the QR code and store detailed information about the vehicle of each customer
Arduino UNO R3 will be in charge of the central processing system, which will have many connections to multiple devices at the same time Each QR code will be attached to customer information, this information will be stored in a central computer system
Trang 18Under the development of electronic engineering and automation and the advent of large-scale microchips, high programmability has brought about changes
in the electronics industry in general, the following is a topic about road fee collection station system design: “Design automatic traffic toll system applying RFID technology” Electronic Toll and Traffic Management (ETTM) allows electronic toll collection without the need for vehicles to stop and monitor traffic ETTM employs vehicles outfitted with a receiving and retransmitting system (electronic tags, transponders), wireless communications, sensors installed in the road or along the side of the road, and a computer system for data management, data collection, electronic toll collection, traffic monitoring, and data collection The ETTM system and infrastructure provide the essentials for future applications such as incident management, route guidance for vehicle owners, and travel demand management If implemented correctly, ETTM has the potential to reduce congestion, increase operational efficiency, improve travel times, reduce
Trang 192
environmental pollution, and improve the safety of road facilities and surrounding corridors
Figure 1 1 The electronic toll collection model does not stop ETC [2]
An important component of the ETTM system is the Electronic Toll Collection (ETC) ETC is a combination of engineering and technology, allowing vehicles to pass through toll booths without requiring any driver action (e.g., stopping to pay cash)
Under the development of electronic engineering and automation and the advent of large-scale microchips, high programmability has brought about changes
in the electronics industry in general Therefore, the demand for using electronic devices in people's daily life is also increasing Products with high applicability are preferred above all because they bring certain convenience, they are put into practice in production and business to increase labor productivity Applying these advanced technologies to makes payment and transaction processing much faster and more efficient, especially during the situation of the Covid-19 epidemic as complicated as it is now, automatic payment can avoid the problem of direct contact, meeting the needs of customers’s health protection
Trang 203
Therefore, the identification and selection of technologies suitable to Vietnam's economic conditions to serve as the basis for the construction of a convenient, safe, and effective toll collection process should be carried out immediately Based on that, deploying the unification and synchronization of technological equipment as well as the collection process on the entire network of national highway toll stations, especially important routes and foreign routes, helps collect tolls modern, civilized Vietnam In addition, it also creates conditions to put new technology applications into practice, modernizes toll collection, allows the application of a modern and convenient collection method for users, ensures traffic safety, and supports toll collection well managed tolls, preventing loss of revenue and reducing manpower
Therefore, my group decided to implement the topic of choosing a graduation topic: "DESIGN AUTOMATIC VEHICLE TOLL SYSTEM THROUGH SCANNING QR CODE WITH CAMERA."
1.2 TARGET OF PROJECT
A vehicle fare payment system based on QR code was designed and developed in this project Customer information is managed through database on SQL database which implements by a computer for create a "contactless" payment system in line with the current situation The QA code detection is also applied in this project to detect car information for payment
The project of designing and constructing a system will have a basic computer center to manage all activities of that toll station Including activities such as card identification, vehicle identification, electronic payment, data storage (vehicle owner, vehicle type, license plate, etc) All base computer centers are connected to the data management center
Trang 214
1.3 METHODOLOGY
When conducting the study, we used the following methods to research the topic:
1 Methods of analysis and synthesis of theories
Our purpose is to present a comprehensive overview and assessment
of the main approaches to research synthesis We use ‘research synthesis’ as a broad overarching term to describe various approaches
to combining, integrating, and synthesizing research findings
2 The method of document reference
The purpose of any reference must fit in with the argument you are making and with the kind of paper you are writing Otherwise the reference is an intrusion, distracting the reader from understanding and evaluating your main point
3 Experimental method
The experimental method involves manipulating one variable to determine if this causes changes in another variable This method relies on controlled research methods and random assignment of study subjects to test a hypothesis The scientific method forms the basis of the experimental method
4 Understanding Arduino Hardware
Arduino [3] is an open-source electronics platform based on use hardware and software Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a Twitter message - and turn
easy-to-it into an output - activating a motor, turning on an LED, publishing something online You can tell your board what to do by sending a set
of instructions to the microcontroller on the board To do so you use the Arduino programming language (based on Wiring), and the Arduino Software (IDE), based on Processing
5 Programming and completing the toll station model
Trang 225
Electronic toll collection (ETC) is a wireless system to automatically collect the usage fee or toll charged to vehicles using toll roads, HOV lanes, toll bridges, and toll tunnels It is a faster alternative which is replacing toll booths, where vehicles must stop and the driver manually pays the toll with cash or a card
Topic: "DESIGN AUTOMATIC VEHICLE TOLL SYSTEM THROUGH SCANNING QR CODE WITH CAMERA" As a practical application that is currently developing strongly, diversely, and vividly, it is widely applied in life
to reduce human labor
limitations
CHAPTER 2: LITERATURE REVIEW
Literature review introduce research status, research direction,
services and applications being used
CHAPTER 3: METHODOLOGY
Provides a general model of the system as a whole, the blocks of the system, the design and calculation of each block, and the devices used in these blocks
CHAPTER 4: EXPERIMENT RESULTS
Presenting the construction results of the system model
Trang 236
CHAPTER 5: CONCLUSIONS AND FUTURE WORK
Draw conclusions, strengths and weaknesses Present the plan of the topic in the future
Trang 24in C or C++ [4]
Figure 2 1 Actual image of ARDUINO
It is estimated that by mid-2011, more than 300,000 official Arduino boards had been produced commercially, and in 2013, about 700,000 official circuits were released into the hands of users
2.1.2 APPLICATION OF ARDUINO
This application makes use of the Arduino Uno board, Bluetooth interface for connectivity, and smartphones Software loaded boards are connected to the home devices like lamps, A/C, TV, Refrigerator, and Bluetooth software is interfaced with the
Trang 257
board The app loaded in the smartphone talk to the processor through Bluetooth connectivity and inputs from the phone are used to control the operation of the devices Operations like switch on, switch off, increasing or decreasing the intensity, volume, and other operating of parameters of these devices Remote monitoring and operation is also enabled These applications simplify the operation of household gadgets and enables better control
Figure 2 2 Top 10 Arduino uses of 2021 [5]
Multiple shields can be stacked In this example, the shield at the top contains an unsoldered breadboard
This shield uses screwed dominoes to connect the wire ends The Shield Adafruit Motor has dominoes used to connect to the motor Shield Adafruit Datalogging with an SD card slot and a Real-Time Clock chip
Trang 268
2.1.4 SOFTWARE
The Arduino integrated development environment (IDE) is a cross-platform application written in Java, and this IDE will be used for the Processing programming language It includes a code editor with functions like syntax highlighting, autobrace matching, and auto-aligning, as well as 1-click compilation and upload of programs to the board A program or code written for Arduino is called a sketch
2.2 INTRODUCTION TO THE LIBRARIES USED IN THE PROGRAM 2.2.1 INTRODUCTION ABOUT ZXING
Zxing [6] (short for “zebra crossing”) is an open source library that handles a variety
of 1-D and 2-D QR code formats, implemented in Java The purpose of this library is to use the camera on a mobile phone to capture and decode the barcodes on the device, without the need to connect to a server Currently the library supports the following barcode formats:
UPC-A and UPC-E
EAN-8 and EAN-13
Javase: client for J2SE
Android: client for Android
Trang 279
Androidtest: demo program on Android
Android-integration: library to support integration of Barcode Scanner (barcode scanner) via Intent for Android
Zxingorg: source code of the site http://zxing.org/w
zxing.appspot.com: source code of the barcode generator site http://zxing.appspot.com/
The following modules are contributed and developed infrequently:
Javame: client for JavaME
Csharp: library for C#
Cpp: library for C++
Rim: client for RIM/Blackberry
Iphone: client for iPhone (only supports QR codes)
Bug: client for BugLabs's BUG
symbian: library for Symbian
2.2.2 INTRODUCTION ABOUT AFORGE.NET
AForge.NET is an open source C# framework designed for developers and researchers in the fields of Computer Vision and artificial intelligence - image processing, neural networks, genetic algorithms, fuzzy logic, machine learning, robotics,
2.3 QR CODE
2.3.1 WHAT IS QR CODE?
Our team chose to use LED chip 2835 because it can light more efficiently and consume less power than other types of LED chips LEDs 2835 are optimized for low-density lighting applications where efficiency is high Chip LEDs have a compact design
of 2.8 x 3.5 x 0.7mm, have a typical forward voltage of 5V, maximum current of 240mA LEDs operate at 0.5W power, and test current at 150mA, have a temperature test of 25 degrees Celsius [7]
Trang 28This allows more information to be transmitted, better supporting users, especially business enterprises who want to send messages to their customers [8]
Figure 2 4 QR Code and Traditional Barcode
2.3.3 APPLICATION OF QR CODE
Convenient access to product information and online payment
Trang 2911
You may often see this code on the products you use Businesses often place QR Codes so that users can scan the code and retrieve information about the product, such as the place of manufacture, product type, product composition, related categories, etc Not only that, the date Now, QR codes are also used to make online payments very conveniently
Quick exchange of contact information
QR Codes can also be used to exchange information and methods of communication You just scan the code and see the description of a business or the phone number or address of someone For example, you can completely search for friends on social networks such as Facebook, Line, quickly through the QR code that the platform developers provide to you