Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 63 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
63
Dung lượng
8,36 MB
Nội dung
MINISTRY OF EDUCATION AND TRAINING HCMC UNIVERSITY OF TECHNOLOGY AND EDUCATION FINAL REPORT STUDENT'S SCIENTIFIC RESEARCH TOPIC DESIGN AND CONSTRUCTION OF BUS FEES PAYMENT MODEL S K C 0 9 TOPIC NUMBER: SV2022-162 PROJECT LEADER: NGUYEN VAN DUC SKC008075 Ho Chi Minh City, October, 2022 HCMC UNIVERSITY OF TECHNOLOGY AND EDUCATION FACULTY FOR HIGH QUALITY TRAINING - SCIENTIFIC RESEARCH ELECTRICAL AND ELECTRONICS ENGINEERING TECHNOLOGY TOPIC: DESIGN AND CONSTRUCTION OF BUS FEES PAYMENT MODEL Advisor: M.Eng.NGUYEN THANH NGHIA Name: NGUYEN VAN DUC Student ID: 18142282 Name: NGUYEN HUY HOANG Student ID: 18142022 Name: LE THANH TAN Student ID: 18142064 Name: NGUYEN HUU LOC Student ID: 18142040 Name: NGUYEN DUC HUY Student ID: 18142025 Ho Chi Minh City – 10/2022 THE SOCIALIST REPUBLIC OF VIETNAM Independence – Freedom– Happiness -Ho Chi Minh City, July 11th, 2022 SCIENTIFIC RESEARCH REPORT Student's name (Representative): Nguyen Van Duc Major: Electrical and Electronics Engineering Technology Major code: 142 Type of traning: Formal University Class: 18142CLCA Code: 18142282 I TOPIC: DESIGN AND CONSTRUCTION OF BUS FEES PAYMENT MODEL II MISSION Initial figures: - - - - Nguyen Thi Huyen Trang, “Research on IoT trends and applications to traffic management problems in Hanoi”, Graduation Project, Hanoi University of Technology, 2017 Ha Duyen Trung, Nguyen Huu Trung, Internet of Things, STINFO magazine, issue 7, million, 2017 Nguyen Thanh Hoang, Nguyen Khoa Nam “Design and construction of heart rate bracelet using IoT technology”, Graduation project, University of Technical Education, 2019 Truong Thi Ngoc Ngoc Phuong (2014), "Android programming textbook", Ho Chi Minh City National University Publishing House Nguyen Dinh Phu – Phan Van Hoan – Truong Ngoc Anh (2017), “Textbook of PIC microcontrollers”, Vietnam National University Publishing House, Ho Chi Minh City Phan Van Ca – Truong Quang Phuc (2017), “The Basic Textbook and Internet of Things Application”, Ho Chi Minh City National University Publishing House - Ha Quang Phuc - Pham Quang Huy (2020), "Programming the controller on Arduino for the connected system of things (IoT)", Thanh Nien Publishing House.2 Implementation content: - Learn the principle and operation of the RC522 RFID module - Learn the SPI, I2C communication standards - Learn POST data transfer method - Design and construction of models including: Identification of customer cards, payment of fees according to each card type - Write the code for the Arduino, load the code and run the test Adjust and finalize the model - Programming and designing Web server to create user information management interface - Design Android interface for users to track and manage personal information - Performance evaluation - Report writing - Make a thesis defense report III ASSIGNMENT DATE: 24/03/2022 IV TASK COMPLETE DAY: 10/08/2022 V FULL NAME OF INSTRUCTION OFFICERS: M.Eng.Nguyen Thanh Nghia INSTRUCTION OFFICERS INDUSTRIAL ELECTRONICS – BIOMEDICAL ENGINEERING THE SOCIALIST REPUBLIC OF VIETNAM Independence – Freedom– Happiness -Ho Chi Minh City, July 11th, 2022 SCIENTIFIC RESEARCH SCHEDULE Student's name (Representative): Nguyen Van Duc Class: 18142CLCA CODE: 18142282 DESIGN AND CONSTRUCTION OF BUS FEES PAYMENT MODEL Topic name: Confirmed by the instructor Week/day Content Week Meet with the teacher to listen to the requirements of the project, select the topic (24/3 - 31/3) Week (1/4 - 8/4) Week (9/4 - 16/4) Week (17/4 - 24/4) Week (25/4 - 2/5) Week (3/5 – 10/5) Week (11/5 - 18/5) Week (19/5 -26/5) Write a detailed outline of the topic Conduct block diagram explain block function design, Learn RFID technology, Arduino, communication standards Learn the principle of transmitting and receiving data between Arduino and RFID Calculation of necessary parameters and selection of components Programming data transmission between Arduino and RFID module Learn about website and android programming Weeks (27/5 - 17/6) Weeks (18/6 - 16/7) Weeks (17/7 - 7/8) Week s (8/8 - 22/8) Week (23/8 – 20/9) Week (21/9 - 28/9) Week (29/9 - 10/10) Programmatically create the interface for the website and transmit and receive information with the computer Programming apps on android Carrying out model construction Finish the model Install parts into the model, fine-tune the optimal program Write a report Meet with your instructor to edit and finalize the report Make slides, report to instructor INSTRUCTOR (Sign and write full name) COMMIT I hereby declare that this thesis is my own work based on some previous documents and under the guidance of the Instructor Project manager Nguyen Van Duc ACKNOWLEDGEMENT First and foremost, I would like to thank my deep gratitude to the teachers in the faculty of high quality training in general as well as the teachers in the field of Electrical and Electronic Engineering in particular I am extremely grateful to you for supporting and understanding me during the past time, thank you to all the teachers who have enthusiastically guided, guided and imparted a lot of valuable knowledge to help me learn and accumulate a lot of things I would like to express my sincere thanks to Mr Nguyen Thanh Nghia, the teacher who guided me in this graduation project Without his assistance and dedicated involvement in every step throughout the process, this paper could have never been accomplished Thank you for sharing, sincere comments and always creating conditions for me to complete my thesis in the best way Finally, I would like to thank my family members, who have always supported and encouraged me throughout the course of my thesis Thank you for your love and support Sincerely thank! Project manager Nguyen Van Duc Table of Content COMMIT ACKNOWLEDGEMENT .7 Table of Content List Figures 10 ABSTRACTS 12 Chapter OVERVIEW 1.1 PROBLEM 1.2 TARGET 1.3 CONTENTS .5 1.4 RESEARCH METHODOLOGY 1.5 SCOPE OF RESEARCH 1.6 LIMITS OF THE TOPIC Chapter THEORETICAL BASIS .4 2.1 OVERVIEW OF BUS FARE PAYMENT SYSTEM .4 2.1.1 Learn about bus fare payment systems 2.1.2 Overview model .4 2.2 INTERNET OF THINGS OVERVIEW 2.2.1 Internet of Things (IoT) 2.2.2 Requirements of an IoT system 2.2.3 Applications of IoT 2.3 RFID RADIO WAVE TECHNOLOGY 2.3.1 RFID technology 2.3.2 Pros and cons of RFID technology 10 2.4 DATA TRANSMISSION COMMUNICATION STANDARDS 11 2.4.1 I2C communication standard 11 2.4.2 SPI Protocol 12 2.5 OVERVIEW OF WEBSITE, WEB SERVER AND PHP .13 2.5.1 About the Website 13 2.5.2 Introduction to Firebase 14 2.5.3 Introduction to programming Java 15 2.6 ABOUT ANDROID .15 2.7 WIFI NETWORK OVERVIEW 16 Chapter CALCULATION AND DESIGN 20 3.1 DESIGN REQUIREMENTS 20 3.2 BLOCK DIAGRAM OF THE SYSTEM 20 3.2.1 Card reading block 21 3.2.2 Central processing block .23 3.2.3 Display blocks 24 3.2.4 Information management block 27 3.2.5 Power block 27 3.2.6 Full-circuit wiring diagram .28 Chapter CONSTRUCTION SYSTEM .30 4.1 PROGRAMMING SOFTWARE FOR COMPUTER 30 4.1.1 Programming software for websites 30 4.1.2 Programming software for mobile applications .30 4.2 SYSTEM ALTERNATIVE Flowchart 31 4.3 MODEL CONSTRUCTION .34 5.1 RESULTS 36 5.1.1 Apps for users on Android phones 36 5.1.2 Management page on web server: 41 5.1.3 Website for User: 44 5.1.4 System Operation 48 5.2 COMMENTS – REVIEW 50 Chapter CONCLUSIONS AND DEVELOPMENT ORIENTATIONS 51 6.1 CONCLUSION: 51 2.2 6.2 DEVELOPMENT DIRECTIONS 51 REFERENCES 50 CHAPTER RESULTS, COMMENTS AND ASSESSMENTS If there is an error or mistake, the user can directly change the personal information and save it on the database or can cancel if desired e Change password screen When the user wants to change the password, the app will ask to re-enter the old password before allowing the new password to be created If any field is wrongly filled, warning message will appear Figure 5.31 Change passsword screen Figure 5.32 Password reset screen When the user change password successfully, the app will redirect to another screen to notify the user f Payment history screen This interface will store the user's payment history when paying for bus fare by RFID card, in this interface, there are two parts: Payment time part, bus part making payment and amount paid 40 CHAPTER RESULTS, COMMENTS AND ASSESSMENTS Figure 5.33 Payment history screen The time section includes the date, year, and minute information, while the transaction bus section displays the number of the bus the user used This piece of information will be used as a transaction document when customers pay the bus fare with an RFID card as well as help users manage their travel 5.1.2 Management page on web server: In this project, students create login, logout, add new users, recharge, manage users and pages containing the basic information to create a complete website The website is designed as follows: a Login page for admin This is the page that displays the login interface to the system linked to thedatabase containing the admin's login information including username and password Infact,the Admin login account is created by the programmer and only the information technology 41 CHAPTER RESULTS, COMMENTS AND ASSESSMENTS staff is granted this Admin account, so there will be no registration entry for the Admin After successful login, the system will move to the main interface of the website for Admin Figure 5.34 Login page for admin b Admin website homepage: Figure 5.35 Admin homepage after successful login After logging into the admin account and having the account identity verified from Firebase's Authenication database, the admin will be able to access the homepage with the registered email appearing as above 42 CHAPTER RESULTS, COMMENTS AND ASSESSMENTS c Customer deposit page: Figure 5.36 Online credit card for customers Figure 5.37 Other account balance entries on Firestore Database when Admin tops up successfully 43 CHAPTER RESULTS, COMMENTS AND ASSESSMENTS Figure 5.38 Other account balance entries on Firestore Database after Admin successfully topup The customer's card balance will be loaded online through the database in Firebase under “remain” 5.1.3 Website for User: A website only for users who are registered by the admin when they are given a card code that has been paid via cash or online a Website homepage for Users Figure 5.39 Website homepage for users who are not logged in With this website design, users can monitor and update personal information This is convenient for admins to statistic user information, reliable security, and to monitor which station the customer has used the card at At the same time, it helps users to pay quickly without having to use cash, saving manpower and time for bus staff b User registration page: 44 CHAPTER RESULTS, COMMENTS AND ASSESSMENTS This page helps users to register their email account and password with an easy to use, friendly interface Figure 5.40 Website account registration page for User Information data will be updated to the database with “Authentication” function on Firebase Figure 5.41 Email and password are stored on Authentication on Firebase Database c Website login page for User: 45 CHAPTER RESULTS, COMMENTS AND ASSESSMENTS Figure 5.42 Website account login page for User d User information home page after successful login: Figure 5.43 User information after successful login e Update information, as well as modify information on the user's homepage: Sau When clicking the "EDIT DETAIL" button, the website will appear to update user information, including: avatar, email, name, contact phone number, address, ID card, bus card code 46 CHAPTER RESULTS, COMMENTS AND ASSESSMENTS Figure 5.44 User information registration fields Figure 5.45 User information after updating information At the same time, user information data is installed to the Realtime Database section on Firebase, making it convenient for Admins to track users 47 CHAPTER RESULTS, COMMENTS AND ASSESSMENTS Figure 5.46 User information after updating information is updated to Realtime Database on Firebase 5.1.4 System Operation The model of the system is shown in the figure below: Figure 5.47 Model of the system The model of the system located at the boarding gate of the bus consists of two parts: a card reader and a display for payment notifications Passengers board the vehicle 48 CHAPTER RESULTS, COMMENTS AND ASSESSMENTS by the front door and scan the card at the card reader Because of the limited topic, the students only simulated readers for different bus routes Figure 5.48 Unregistered customer If the customer card has not been registered, when scanning the card at the reader will receive a message on the LCD screen In case the customer has registered a card, but the balance in the account is not enough to pay for the trip, the system will retrieve and send a response to the LCD asking for more money to be added to the card Figure 5.49 Insufficient card balance When the information on the card matches the data on the server, and the balance in the card is valid, then the system will make payment and deduct fees for each corresponding card After that, the data will be updated to the server to connect the data to the website and mobile application Finally, the system will show successful payment to end the process 49 CHAPTER RESULTS, COMMENTS AND ASSESSMENTS Figure 5.50 Payment success When internet connection is lost in both the bus system and the website management system, passengers will not receive payment status notifications at the display on the bus Instead, passengers will be transferred to direct cash payment until the problem is rectified However, to minimize internet problems as above, in addition to using wifi transmitters on the bus, the system can also connect to the internet instead of 3G or 4G 5.2 COMMENTS – REVIEW During the period of studying the topic from March 24, 2022 to October 10, 2022 (23 weeks), students have learned and improved a lot of knowledge related to expertise as well as specific specialized skills can be as follows: - Learn the operating principle of the RFID card reader module - Learn and use Arduino board with integrated ESP8266 module - Learn about web programming and data transfer protocols in web programming - Learn about wifi networks - Learn about android programming and build an android application linked to the server's database - Learn and practice about the SPI communication standard between the RFID module and the Arduino board - Access and use many programming software such as arduino IDE, Visual Studio code, Android Studio and Fritzing circuit simulation software - Calculate, design and select components to complete the main circuit board according to the requirements of the project The hardware circuit has been running stably, achieving the set requirements, that is, making automatic bus fare payment using RFID cards, sending user data to the web server via wifi managed by the account system management account In addition, users 50 CHAPTER RESULTS, COMMENTS AND ASSESSMENTS can also use an application on their mobile phones to manage their account information However, it is also affected by interference when placed in an environment with many network waves, the system uses wifi, so there is a phenomenon of slow response when the wifi network signal is unstable Tested the system for about an hour and it was fine However, because students have not had the test conditions for a longer time, it is not possible to draw conclusions about the stability of the system Management software and applications on mobile phones meet the requirements of the topic Besides, the bus app only works on phones with Android operating system 51 CHAPTER CONCLUSIONS AND DEVELOPMENT ORIENTATIONS Chapter CONCLUSIONS AND DEVELOPMENT ORIENTATIONS 6.1 CONCLUSION: As follows: • Construction results complete the model in accordance with the set goals • The system runs relatively stable • User-friendly web interface and android application • The product is easy to use with user Students carry out the topic with the aim of changing the previous form of direct payment into an automatic form while keeping the cost of a bus ride per user This is quite similar to the old form, the model does not have a big leap, causing a feeling of alienation and difficulty in accessing technology for a part of customers This can also be seen as a way for users to familiarize themselves with the new payment method before receiving and implementing smart bus cards 2.36.2 DEVELOPMENT DIRECTIONS In order for the system to be better, more stable and highly applicable in life, the team recommends a number of development directions: Promote it more widely so that people and students can access it easily and quickly on social networks Change the fare calculation from default to deducting distance traveled or number of stations traveled for long-haul REFERENCES REFERENCES [1] Utility from smart bus card (https://mt.gov.vn/vn/tin-tuc/59762/tien-ich-tu-the-xe-buyt-thong-minh.aspx) [2] An overview of RFID technology in the 4.0 era (https://haphan.com/News/17500/tong-quan-cong-nghe-rfid-trong-thoi-dai-40) [3] Introduction to Android OS (https://androidcoban.com/gioi-thieu-ve-dieu-hanh-android.html) [4] Nguyen Thi Huyen Trang, "Research on IoT trends and applications to traffic management problems in Hanoi", Graduation Project, Hanoi University of Technology, 2017 [5] Ha Duyen Trung, Nguyen Huu Trung, Internet of Things, STINFO magazine, no 7, 8tr, 2017 [6] How Smart City Barcelona Brought the Internet of Things to life, http://datasmart.ash.harvard.edu/news/article/how-smart-city-barcelona-broughtthe- internet-of-things-to-life-789 [7] J.Paul, S.Dale, Baljeet Malhotra, Meng Qiang (2013), RFID based vehicular networks for smart cities [8] Laisheng Xiao (2011), Internet of Things: A new application for Intelligent Traffic Monitoring System, Journal of Networks [9] Https://www.pololu.com/product/772/specs S K L 0