Đồ án: Thiết kế hệ thống hiển thị thông số xe qua cổng OBDII trên smartphone

Đồ án tốt nghiệp thiết kế hệ thống hiển thị thông số kỹ thuật xe qua cổng OBDII trên smartphone, giải mã tín hiệu CAN và xây dựng ứng dụng di động.

Người đăng

Ẩn danh

Thể loại

Graduation Project

2024

89
0
0

Phí lưu trữ

30 Point

Tóm tắt

I. Giới thiệu về hệ thống OBDII và ứng dụng trên điện thoại

Hệ thống OBDII (On-Board Diagnostics II) là một tiêu chuẩn quan trọng trong ngành công nghiệp ô tô hiện đại. Hệ thống này cho phép hiển thị thông số xe một cách trực tiếp và chính xác thông qua cổng OBDII trên các thiết bị di động. Công nghệ này đã trở thành xu hướng phổ biến, giúp người lái xe theo dõi tình trạng động cơ, tiêu hao nhiên liệu và các thông số kỹ thuật khác. Việc kết nối ứng dụng điện thoại với OBDII không chỉ nâng cao trải nghiệm người dùng mà còn hỗ trợ bảo dưỡng xe một cách chủ động. Hệ thống này sử dụng giao tiếp CAN để truyền dữ liệu nhanh chóng và an toàn, đảm bảo độ tin cậy cao trong quá trình vận hành.

1.1. Khái niệm cơ bản về OBDII

OBDII là viết tắt của On-Board Diagnostics II, một tiêu chuẩn chẩn đoán phương tiện được phát triển để giám sát các thông số hoạt động của động cơ. Hệ thống này ghi nhận dữ liệu từ các cảm biến trên xe và lưu trữ mã lỗi khi phát hiện vấn đề. Cổng OBDII được tiêu chuẩn hóa trên hầu hết các xe hiện đại, cho phép kết nối dễ dàng với các thiết bị chẩn đoán. Việc sử dụng hiển thị thông số xe qua OBDII giúp người dùng nắm bắt tình trạng sức khỏe của phương tiện một cách chi tiết và kịp thời.

1.2. Ứng dụng điện thoại trong quản lý ô tô

Ứng dụng điện thoại đã nổi lên như một công cụ quan trọng trong quản lý ô tô thông minh. Bằng cách kết nối với cổng OBDII, người dùng có thể theo dõi thông số xe từ xa một cách tiện lợi. Các ứng dụng OBDII cung cấp giao diện thân thiện, cho phép xem tốc độ, số vòng tua động cơ, nhiệt độ làm mát, mức tiêu hao nhiên liệu và nhiều dữ liệu khác. Công nghệ này hỗ trợ bảo dưỡng phòng ngừa và phát hiện sự cố sớm, giúp tăng tuổi thọ xe.

II. Công nghệ CAN communication trong truyền tải dữ liệu

Giao tiếp CAN (Controller Area Network) là nền tảng của việc truyền tải dữ liệu trong hệ thống OBDII hiện đại. CAN là một giao thức truyền thông hiệu quả, cho phép các thiết bị điều khiển trên xe trao đổi thông tin mà không cần đến bộ xử lý trung tâm. Hệ thống này hoạt động dựa trên mô hình mạng lưới, nơi tất cả các nút có thể nhận và truyền dữ liệu một cách độc lập. Việc sử dụng CAN protocol đảm bảo tốc độ truyền dữ liệu cao, độ tin cậy tuyệt đối và khả năng chống nhiễu tốt. Quá trình mã hóa và giải mã tín hiệu CAN là rất quan trọng để chuyển đổi dữ liệu thô thành các thông số ô tô dễ hiểu cho người dùng trên ứng dụng điện thoại.

2.1. Nguyên tắc hoạt động của CAN bus

CAN bus hoạt động theo nguyên tắc truy cập ngẫu nhiên với xung đột phát hiện (CSMA/CD). Các thiết bị trên xe được kết nối theo chuỗi nối tiếp, cho phép chúng gửi và nhận dữ liệu song song. Mỗi thông điệp trên CAN network được gắn một định danh độc nhất, giúp các nút khác biệt loại dữ liệu được nhận. Giao thức CAN đảm bảo rằng dữ liệu được truyền đúng lúc, không bị mất mát hoặc hỏng hóc, điều này cực kỳ quan trọng cho hệ thống hiển thị thông số xe.

2.2. Quy trình giải mã tín hiệu CAN

Giải mã tín hiệu CAN là bước quan trọng để chuyển đổi dữ liệu thô từ CAN bus thành các giá trị có ý nghĩa. Mỗi thông điệp CAN chứa các trường thông tin được mã hóa theo định dạng cụ thể được định nghĩa trong tài liệu kỹ thuật của hãng xe. Thuật toán giải mã sử dụng công thức chuyển đổi để tính toán các giá trị thực từ dữ liệu nhị phân. Quá trình này cho phép ứng dụng điện thoại hiển thị các thông số ô tô như RPM, tốc độ, nhiệt độ một cách chính xác và real-time.

III. Thiết kế và phát triển hệ thống OBDII trên điện thoại

Thiết kế hệ thống OBDII yêu cầu sự kết hợp giữa phần cứng và phần mềm để tạo ra một giải pháp toàn diện. Phần cứng bao gồm một module OBDII được kết nối với cổng OBD của xe, thường sử dụng kết nối Bluetooth hoặc WiFi để truyền dữ liệu đến ứng dụng điện thoại. Phần mềm được phát triển để xử lý dữ liệu từ cảm biến ô tô, giải mã tín hiệu CAN và hiển thị các thông số xe một cách trực quan. Giao diện ứng dụng được thiết kế thân thiện, cho phép người dùng dễ dàng theo dõi tình trạng xe. Quá trình nghiên cứu và phát triển bao gồm mô phỏng, thiết kế, chế tạo và kiểm thử nghiêm ngặt để đảm bảo sản phẩm hoạt động ổn định.

3.1. Kiến trúc hệ thống phần cứng

Kiến trúc phần cứng của hệ thống bao gồm module OBDII reader để đọc dữ liệu từ cổng OBD, bộ xử lý vi điều khiển để xử lý tín hiệu, và module truyền thông (Bluetooth/WiFi) để giao tiếp với điện thoại. Module OBDII được thiết kế compact, tiêu thụ ít điện năng và có khả năng hoạt động ổn định trong môi trường xe. Các cảm biến trên xe được kết nối trực tiếp hoặc qua bus CAN, đảm bảo việc truyền tải dữ liệu chính xác. Hệ thống được trang bị pin dự phòng hoặc kết nối với nguồn điện xe để hoạt động liên tục.

3.2. Phát triển ứng dụng di động

Ứng dụng điện thoại được phát triển sử dụng các framework hiện đại như Android hoặc iOS để đảm bảo tương thích rộng rãi. Ứng dụng cung cấp giao diện hiển thị thông số xe rõ ràng, với các chỉ số tốc độ, RPM, nhiệt độ động cơ được biểu diễn trực quan. Hệ thống lưu trữ dữ liệu cho phép người dùng xem lịch sử hoạt động của xe, giúp phát hiện các xu hướng bất thường. Ứng dụng hỗ trợ cảnh báo tự động khi phát hiện các lỗi hoặc tham số ngoài giới hạn, nâng cao độ an toàn vận hành.

IV. Ứng dụng thực tế và lợi ích của hệ thống

Hệ thống OBDII trên điện thoại mang lại nhiều lợi ích thực tế cho người dùng và nhà quản lý đội xe. Người lái xe có thể theo dõi thông số ô tô trong thời gian thực, giúp phát hiện các vấn đề sử dụng không đúng cách hoặc sự cố kỹ thuật sớm. Ứng dụng quản lý xe cho phép ghi nhận dữ liệu tiêu hao nhiên liệu, hành trình, và các sự kiện đặc biệt để phục vụ bảo dưỡng định kỳ. Đối với các doanh nghiệp vận tải, hệ thống này hỗ trợ giám sát đội xe từ xa, cải thiện hiệu quả hoạt động và an toàn giao thông. Việc sử dụng công nghệ OBDII cũng giúp giảm chi phí bảo dưỡng bằng cách thực hiện bảo dưỡng phòng ngừa dựa trên dữ liệu thực tế. Ngoài ra, dữ liệu thu được có thể được tích hợp vào các hệ thống quản lý trung tâm để phân tích hiệu suất tổng thể.

4.1. Bảo dưỡng phòng ngừa dựa trên dữ liệu

Bảo dưỡng phòng ngừa là một trong những ứng dụng quan trọng của hệ thống OBDII. Bằng cách theo dõi thông số ô tô như nhiệt độ động cơ, áp suất dầu, trạng thái pin, người dùng có thể dự đoán thời điểm bảo dưỡng cần thiết. Ứng dụng điện thoại sẽ gửi cảnh báo tự động khi phát hiện các chỉ số bất thường, cho phép người dùng chủ động sắp xếp bảo dưỡng. Phương pháp này giảm đáng kể rủi ro hỏng hóc đột ngột và kéo dài tuổi thọ của phương tiện.

4.2. Quản lý đội xe và giám sát từ xa

Hệ thống quản lý đội xe sử dụng công nghệ OBDII để giám sát thông số ô tô của tất cả các phương tiện trong công ty. Dữ liệu được truyền tới hệ thống trung tâm cho phép người quản lý theo dõi tình trạng hoạt động, tiêu hao nhiên liệu và tuân thủ quy tắc an toàn. Ứng dụng này đặc biệt hữu ích cho các doanh nghiệp logistics, taxi, và dịch vụ vận tải. Việc hiển thị thông số xe liên tục giúp phát hiện sớm các sự cố, tối ưu hóa lộ trình, và cải thiện hiệu suất hoạt động tổng thể.

18/12/2025

Trích đoạn nội dung tài liệu

MINISTRY OF EDUCATION AND TRAINING HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY AND EDUCATION GRADUATION THESIS AUTOMOTIVE ENGINEERING TECHNOLOGY DESIGN A SYSTEM TO DISPLAY VEHICLE PARAMETERS VIA OBDII PORT ON SMARTPHONES INSTRUCTOR: ASSOC. DO VAN DUNG STUDENT: NGUYEN MINH PHU NGO TAN TRUNG SKL012847 Ho Chi Minh City, May 2024 HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY AND EDUCATION FACULTY OF INTERNATIONAL EDUCATION GRADUATION PROJECT DESIGN A SYSTEM TO DISPLAY VEHICLE PARAMETERS VIA OBDII PORT ON SMARTPHONES NGUYEN MINH PHU Student ID: 20145426 NGO TAN TRUNG Student ID: 20145443 Major: AUTOMOTIVE ENGINEERING Supervisor: ASSOC. DO VAN DUNG Ho Chi Minh City, May 2024 THE SOCIALIST REPUBLIC OF VIETNAM Independence – Freedom– Happiness -------- Ho Chi Minh City, January 20, 2023 GRADUATION PROJECT ASSIGNMENT Student name: _________________________ Student ID: ___________________ Student name: __________________________ Student ID: ___________________ Student name: __________________________ Student ID: ___________________ Major: ________________________________ Class: ________________________ Supervisor: ____________________________ Phone number: _________________ Date of assignment: _____________________ Date of submission: _____________ 1. Initial materials provided by supervisor: ___________________________________ 3.

Content of the project: _________________________________________________ 4. Final product: ________________________________________________________ CHAIR OF THE PROGRAM SUPERVISOR (Sign with full name) (Sign with full name) THE SOCIALIST REPUBLIC OF VIETNAM Independence – Freedom– Happiness -------- ---- SUPERVISOR’S EVALUATION SHEET Student name:. Content of the project:. Approval for oral defense? (Approved or denied).

Ho Chi Minh City, month day, year SUPERVISOR (Sign with full name) THE SOCIALIST REPUBLIC OF VIETNAM Independence – Freedom– Happiness -------- PRE-DEFENSE EVALUATION SHEET Student name:. Name of Examiner:. Content and workload of the project. Approval for oral defense? (Approved or denied) .) Ho Chi Minh City, month day, year EXAMINER (Sign with full name) THE SOCIALIST REPUBLIC OF VIETNAM Independence – Freedom– Happiness -------- EVALUATION SHEET OF DEFENSE COMMITTEE MEMBER Student name:.

Name of Defense Committee Member:. Content and workload of the project .) Ho Chi Minh City, month day, year COMMITTEE MEMBER (Sign with full name) ACKNOWLEDGEMENTS I would like to express my deepest gratitude to all those who have contributed to the completion of this project, "DESIGN A SYSTEM TO DISPLAY VEHICLE PARAMETERS VIA OBDII PORT ON SMARTPHONES". First and foremost, I extend my heartfelt thanks to Assoc. Do Van Dung and PhD.

Nguyen Trong Thuc, for their invaluable guidance, support, and encouragement throughout this endeavor. Their expertise and insights have been instrumental in shaping the direction of this project. I am immensely grateful to the partner of my project team for his unwavering dedication and collaborative spirit. He brought unique skills and perspectives to the table, enriching our discussions and enhancing the quality of our work.

I am indebted to Faculty of Vehicle and Energy Engineering, for providing access to resources and facilities essential for the execution of this project. Their assistance has been crucial in overcoming various challenges along the way. I would also like to thank my family and friends for their unwavering support and encouragement throughout this journey. Their patience, understanding, and belief in my abilities have been a constant source of motivation.

Thank you to everyone who has played a part, no matter how big or small, in making this project a reality. Your contributions have been truly appreciated. i ABSTRACT The thesis "DESIGN A SYSTEM TO DISPLAY VEHICLE PARAMETERS VIA OBDII PORT ON SMARTPHONES" was completed with our efforts and dedication. In this thesis, we have focused on carefully analyzing CAN communication methods on vehicles, especially through simulation of CAN signals.

From the results obtained from simulation, we have built an algorithm diagram to decode CAN signals in the most effective way. Not just stopping at the theoretical level, one of the notable points of the thesis is the process of researching and actually implementing a real product. It is the process of researching, designing, manufacturing, and testing both the hardware and software of the product. We have invested a lot of effort and time to ensure the product operates stably and effectively.

One of our team's proud achievements is the integration of our system into a mobile application. This application has been created by us with the aim of simplifying the process of collecting and transmitting information from our system to the end user. The results we have achieved from our team's project provide a solid basis for developing applications that monitor vehicle conditions at long distances and send information to the host system. This not only helps users easily check the status of their vehicle, but also helps them feel more secure when they are not around the vehicle.

We are proud of our contribution to this field and hope that it will bring practical benefits to the car user community. ii TABLE OF CONTENTS ACKNOWLEDGEMENTS .ii TABLE OF CONTENTS. iii LIST OF ABBREVIATIONS. vi LIST OF FIGURES.

vii LIST OF TABLES. ix Chapter 1 : INTRODUCTION. Reason for choosing topic. The urgency of the subject.

Objective of the study. Mission of the study. Scope and Limitation of the study. Thesis implementation plan.

4 Chapter 2 : LITERATURE REVIEW .5 Chapter 3 : THEORETICAL BACKGROUND. What is CAN. What is OBD II. OBD on car.

OBD II frame. Receive parameter data. Which diagnostic service is used ?. Get and decode the responded frame.

Receive Diagnotic Trouble Code (DTC). Which diagnostic Service is used ?. Get and decode the responded frame. Clear Diagnotic Trouble Code (DTC).

Which diagnotic Service is used ?. Send request to clear DTC .24 Chapter 4 : DESIGN SYSTEM. Block diagram and components. Result and conclusion.

Block dỉagram and components. Operating principle of the system. Functions of each module in the system. Voltage regulator block.

Bluetooth module block. Processing center block. Can interface block. Module Arduino Uno R3.

Module Bluetooth HC – 05. Module CAN – BUS Shield. 38 Chapter 5 :BUILD SYSTEM. Programming phone apps.

Principle of operation of the application. Arduino's algorithm flow chart. Flow chart of algorithm to get vehicle parameters. Flow chart of algorithm to get DTC.

Flow chart of algorithm to clear DTC. Application’s algorithm flow chart .51 Chapter 6 : TESTING ON CAR. Testing the vehicle's current parameter data. Testing the vehicle's DTC .58 Chapter 7 : CONCLUSION AND RECOMMENDATIONS.

64 v LIST OF ABBREVIATIONS ACC: Accessory ADC: Analog-to-Digital Converter CAN: Controller Area Network DTC: Diagnostic Trouble Code ECU: Electronic Control Unit EEROM: Electrically Erasable Programmable Read Only Memory EU: European Union ID: Identification ISO: International Organization for Standardization KB: Kilobyte Kbps: Kilobits per second LCD: A liquid-crystal display LED: A light-emitting diode mA: Milliamperes Mbps: Megabits per second MHZ: Megahertz OBD: On-Board Diagnostics PID: Parameter Identification PWM: Pulse Width Modulation RPM: Revolutions Per Minute RX: Receive SAE: Society of Automotive Engineers SRAM: Static Random Access Memory TX: Transmit US: United States USB: Universal Serial Bus VDC: Volts Direct Current vi LIST OF FIGURES Figure 3.1: CAN communication protocol .4: OBDII port pinout .6: Convert HEX code to motor speed .8: Multi – frame with pair of data An and Bn .9: DTC error code structure read from the engine ECU .3: Result on serial .4: Result on application on phone .7: Module bluetooth HC- 05 .8: Module Arduino Uno R3 .9: CAN - BUS Shield .10: Connection diagram of module LM2596 3A .11: Module Arduino Uno R3 .12: Module Bluetooth HC – 05 .13: Communicate Bluetooth module HC-05 with Arduino .14: Hardware overview about CAN - BUS Shield .15: Pin map of CAN - BUS Shield .1: Connect CAN - BUS Shield with Arduino Uno .5: Set widget parameters .6: Select Bluetooth at the first time .8: Flow chart of algorithm to get vehicle parameters .9: Flow chart of algorithm to get DTC .10: Flow chart of algorithm to clear DTC .11: Application’s algorithm flow chart .1: Hardware when plugged into OBD2 port .3: Connect with bluetooth .4: Data displayed when in STOP mode .5: Data displayed when in ACC mode .6: Data displayed when the vehicle is in START mode but not moving .7: Data displayed when the vehicle moves .8: No DTC when the vehicle is in normal condition .9: DTC appears when the system has a problem .10: DTC data after clearing .59 viii LIST OF TABLES Table 3.2: Meaning of USBII port pinout .3: OBD-II Mode .4: 4 bytes of data .6: Decode DTC according data A and B .7: Decoding example according data A and B .22 ix Chapter 1 : INTRODUCTION 1. Reason for choosing topic Traffic jams and environmental pollution in large cities have become a serious problem due to the increase in the number of vehicles moving [1]. Car rental and car-sharing services were born as a flexible and environmentally friendly solution, because they help reduce traffic congestion on the streets and reduce environmental pollution through vehicle sharing [2]. Furthermore, this service brings flexibility to users, allowing them to rent cars according to their needs and only pay for the actual time used.

This helps save costs compared to owning and maintaining a private car, especially for those who only need to use the car for short periods of time or irregularly. Along with the development of mobile technology and Internet connection applications, it has created favorable conditions for the development of shared car services. Mobile applications allow users to easily search, book and pay conveniently [3]. The above ideas show that the market for car rental and car sharing services has been growing very strongly domestically and internationally.

With the exception of Antarctica, vehicle sharing services are currently available on every continent. Approximately 40% of all car sharing cars worldwide are located in Asia, making it the area with the highest car sharing percentage. Second place goes to Europe, where more than 30% of the world's fleet is based. North America's car-sharing market comes in third.

At that time, car sharing service users need to be able to access information about vehicle status quickly and conveniently to ensure safety and the best experience. But actually the car rental service still does not meet customer needs as it still lacks some technological improvements applied to satisfy customer requirements. Like a regular car renter, they will not be sure if the car they are currently renting is having any problems to ensure that their trip will go smoothly. 1 For businesses, managing a large number of vehicles also becomes a problem when they have to ask engineers to use manual inspection methods on each vehicle, which is very time- consuming.

Accurately determining the vehicle's condition is extremely necessary. Based on highly rated applications for car rental and car sharing services such as: Zipcar, Turo, Getaround,. Therefore, our team has chosen this topic to research and develop a solution that allows users or businesses to easily monitor basic vehicle parameters and error codes via the OBD2 port on the vehicle in case the system of the vehicle having problems or damage through the mobile application. OBDII (On-Board Diagnostics II) is a standard communication port on most modern cars, allowing access to many important vehicle parameters such as speed, fuel level, engine temperature, error codes , and much more information.

Using OBDII to obtain car data is a cost-effective and easy-to-deploy solution compared to developing separate sensors and measurement systems. The urgency of the subject As mentioned above, car rental and car sharing services are developing rapidly today, so managing and meeting customer needs effectively and quickly is really necessary in this country. It's time to create a brand right from the beginning to capture the market. It can be seen that this problem is extremely urgent.

Nội dung được bảo vệ bản quyền — Tải xuống đầy đủ