Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 111 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
111
Dung lượng
7,98 MB
Nội dung
Nghiên cu thit k, ch to máy chmng CAN iv HVTH : KS NGUYNGC , , , , , , , .làm cho vic kim soát các h thng trên và va có th giám sát các h thn t i cp thit. . T , nên ph thu . . , sau: 1. CAN. 2. -2 -2. 3. 24HJ64GP506A, , . 4. 3133. Kt qu t CAN, qua th nghi ng trên xe Honda Civic c , , kt c gin gn nh. c sn xu Nghiên cu thit k, ch to máy chmng CAN v HVTH : KS NGUYNGC ABSTRACT Today, automotive technology have developed dramatically, Many systems on modern cars are equipped with eletronic control modules such as : electronic fuel injection, electronic ignition, automatical air conditioning, ABS brake, electronic suspension, automatic emission control, etc. These innovations make automobile control become more and more complicated, so that the demand of a common system which can both control the quality of harmful gases emission as well as monitor all other electronic and mechanical system on automobile is an imperative requirement.CAN system is produced to response the former requirements and soon be an indispensable part in high-priced dedicated devices and softwares. For manufacturing automotive diagnostic divice via CAN with cheaper cost for using in automotive service stations and vocational schools, the thesis issued following content: 1. Theoretical research on CAN and data communication in the CAN systems. 2. Research method of the data encryption standards OBD-2 and communication standards OBD -2. 3. Using microchip PIC24HJ64GP506A, LCD and electronic units, which are easy found in Vietnam market to design and produce electronic board of the tester. Programming and Load data for the device. 4. To carry out diagnosis experiments on the Honda Civic series with the manufactured tester and make comparison with the results with Inova 3133 diagnostic equipment. The thesis result is successfully manufacturing automotive diagnostic divice via CAN system with robust design and simply structure. During test time, the device has operated propertly in Honda Civic as technical requirements; the detected fault codes from the device are completely satisfy manufacturers and ISO standards.The result of the thesis is a scientific foundation for producing automotive diagnostic equipments in the future. Nghiên cu thit k, ch to máy chmng CAN vi HVTH : KS NGUYNGC MC LC Trang ta Trang Lý lch cá nhân i L ii Cm t iii Tóm tt iv Mc lc vi Danh sách các ch vit tt x Danh sách các hình xi Danh sách các bng xii TNG QUAN 1.1. Tng quan chung v c nghiên cu, các kt qu nghiên cu trong và 1 1.1.1. Tng quan chung v c nghiên cu 1 1.1.2. Các kt qu nghiên c 2 1.1.2.1. Tình hình nghiên cc 2 1.1.2.2Tình hình nghiên cc 6 1.2. Mc tiêu c tài 8 1.3.Nhim v c tài và gii h tài 8 u 8 1.5.K hoch thc hin 9 LÝ THUYT 2.1. Khái quát v chun giao thc CAN ················································ 10 2.1.1 Gii thiu v mng CAN ·························································· 10 2.1.2 Khái quát v giao thc CAN ······················································ 11 2.2. Lp vt lý ·············································································· 14 2.2.1 Non return zero ······································································ 14 2.2.2 Bit Stuffing ·········································································· 15 Nghiên cu thit k, ch to máy chmng CAN vii HVTH : KS NGUYNGC 2.2.3 Bit Timing ··········································································· 15 2.3. dài ca mt Bus ·································································· 16 2.4. Trng t ··········································· 17 2.5. Gii quyt tranh chp trên Bus ····················································· 18 2.6. CAN frame ············································································ 19 2.7. Các segment khác nhau ······························································ 25 2.8. Khong thi gian khác nhau ca các Segment và Time Quantum ············· 25 2.9. S ng b xung clock ······························································ 27 2.9.1. SJW ················································································· 27 2.9.2. Li pha ··············································································· 27 ng b ···································································· 29 2.9.4. Truyn nhn message ······························································ 30 2.9.5. X lý li ············································································· 30 2.10. ng dng mng CAN trên xe ···················································· 32 2.10.1. Nhng hn ch cy in ···················································· 32 ng truyn d liu a hp ···················································· 34 2.10.3. S mng CAN trên xe Honda Civic ········································ 37 2.10.4. S mng CAN trên xe Toyota Vios 2007 ································· 39 2.10.5. S mng CAN trên xe Toyota Yaris 2007 ································· 40 :CÁC PHNG PHÁP MÃ HÓA D LIU CHOÁN OBD-2 VÀ CÁC CHU GIAO TI OBD-2 3.1. Gii thiu v OBD -2 PIDs ························································· 41 3.2. Các ch hot ng ································································ 41 3.3. Bng mã PIDs ········································································· 42 3.3.1.Bng mã PIDs và cách gii mã ···················································· 42 3.3.2. Cách gii mã các c bit ·················································· 55 3.3.2.1. Ch 1 PID01 ································································ 55 3.3.2.2. Ch 1 PID03 ································································ 56 3.3.2.3. Ch 1 PID12 ································································ 57 Nghiên cu thit k, ch to máy chmng CAN viii HVTH : KS NGUYNGC 3.3.2.4Ch 1 PID 1C ································································ 57 3.3.2.5. Ch 1 PID41 ··································································· 58 3.3.2.6. Ch 3 ··········································································· 59 3.4. Qúa trình truyn d liu s dng CAN 11 bit ···································· 61 3.4.1. Qúa trình truyn d liu ·························································· 62 3.4.2.Qúa trình nhn d liu ······························································ 62 3.5. Các chun giao tip OBD -2 ······················································· 62 3.5.1. Gic choán OBD -2 ···························································· 63 3.5.2. Mã li ················································································ 64 3.5.3. Các chun giao tip OBD -2 ······················································ 65 3.5.3.1. Giao thc ISO 9141-2 ··························································· 65 3.5.2.2. Giao thc SAE J1850 VPW ···················································· 67 3.5.2.3 Giao thc SAE J1850 PWM ···················································· 67 3.5.2.4 Giao thc ISO 14230 KWP2000 ··············································· 69 3.5.2.5 Giao thc ISO 15765 CAN ······················································ 70 THIT K, CH TO MÁY CH QUA MNG CAN 4.1. Tng quan v dòng PIC24HJ64GP506A ·········································· 71 m chính ································································· 71 4.1.2 Tóm tt các dòng PIC24H ························································· 73 4.1.3 Ki ······································································· 74 4.2. Module CAN trong PIC24HJ64GP506A ········································· 74 4.2.1. Tng quan module CAN ·························································· 74 4.2.2. Các dng Frame truyn ···························································· 75 4.2.3 Các ch hong ······························································· 75 4.2.3.1 Ch Initialization ······························································ 75 4.2.3.2 Ch Disable ···································································· 76 4.2.3.3.Ch Normal ···································································· 76 4.2.3.4.Ch Loopback ································································ 76 Nghiên cu thit k, ch to máy chmng CAN ix HVTH : KS NGUYNGC 4.3. Thit k các mn ca máy ·········································· 77 4.3.1. Mch ngun ········································································ 77 4.3.2. Mch MCU ·········································································· 77 4.3.3. Mch Vehicle interface ··························································· 79 4.3.4. Mch LCD Interface ······························································ 80 4.4. Ch to máy chng CAN ····························· 82 4.4.1 S mch in lp trên và v trí linh kin ········································ 82 4.4.2. S mch in li ·························································· 83 4.4.3. Máy chng CAN ····································· 84 4.4.4. L thut toán ································································ 85 THC NGHIM MÁY CHUTRÊN XE ng dn s dng máy ch ········································ 86 5.1.1. Cu to máy ch ····················································· 86 5.1.2. Ch ················································· 87 5.1.3. An toànkhi s dng máy ·························································· 87 5.2. Thc nghim cha xe Honda Civic ····································· 88 5.2.1. Kt ni máy chi xe ··················································· 88 5.2.2. Vn hành ch ······························································· 89 5.2.2.1 nhit không khítrên xe Honda Civic ·········· 91 5.2.2.2 m bin MAF ··················································· 91 5.2.2.3. Xóa mã li ········································································ 92 5.t qu thc nghim ···················································· 92 5.2.3.1 nh giá kt qu chn oán mã li trên xe ···································· 92 thí nghim máy ch ·············································· 93 5.2.3.3 nh giá kt qu thc nghim bng máy ch·········· 94 KT LUN - NG PHÁT TRIN C TÀI 6.1. Kt lun ··············································································· 96 6.2. Mt s ngh ········································································ 97 6.3 ng phát trin c tài ·························································· 97 TÀI LIU THAM KHO ······························································ 98 Nghiên cu thit k, ch to máy chmng CAN x HVTH : KS NGUYNGC CAN Controller Area Network DTC Diagnostic Trouble Codes ECMElectronic Control Module ECU Electronic Control Unit ISO International Standard Organization OBD On-Board Diagnostic EOBDEuropean On Board Diagnostics HDOBD Heavy Duty On-Board Diagnostic CPU Central Proceeing Unit LLC Logical Link Control MAC Medium Access Control PWM-Pulse-Width Modulation ALU Arithmetic Logical Unit NRZ None Return to Zero NMT Network Mangement VPW Variable Pulse Width PWM Pulse Width Mdulation KWP Keyword Protocol SOF Start Of Frame DMA Direct Memory Access DLC Diagnostic Link Connector LCD Liquid Crystal Display CRC Cyclic Redundancy Code PSW Program Status Word SAE Society of Automotive Engineers Nghiên cu thit k, ch to máy chmng CAN xi HVTH : KS NGUYNGC TRANG Baûng 1.1: B nh nh thi h MSC-51 ·················································· 3 Bng 1.2 : k hoch và thi gian thc hin··············································· 9 Bng 2.1: Vn tc dài Bit time ·················································· 16 Bng 2.2: So sánh CAN low speed và CAN high speed ····························· 17 Bng 2.3: Thi gian ca mi segment ·················································· 26 B ng b ································································ 29 Bng 3.1: Các ch hong ························································· 41 Bng 3.2: Bng mã PIDs và cách gii mã ·············································· 54 Bng 3.3: Mã hóa Ch 1- PID01 ···················································· 55 Bng 3.4: Cách mã hóa quá trình kim tra ············································ 55 Bng 3.5: Mã hóa Byte C và D ······································· 56 Bng 3.6: Mã hóa Byte C và D u ········································ 56 Bng 3.7: Mã hóa Ch 1 PID03 ···················································· 57 Bng 3.8: Mã hóa Ch 1 PID12 ···················································· 57 Bng 3.9: Mã hóa Ch 1 PID1C ···················································· 58 Bng 3.10: Mã hóa Ch 1 PID41 ··················································· 59 Bng 3.11: Mã hóa Ch c DTCs bit A7,A6 ·································· 59 Bng 3.12: Mã hóa Ch c DTCs bit A5,A4 ·································· 59 Bng 3.13: Mã hóa Ch c DTCs bit A3,A2,A1,A0 ························· 60 Bng 3.14: Mã hóa loi nhiên liu······················································· 61 Bng 3.15: Chn ······························ 62 Bng 3.16: Chn ································· 62 Bng 4.1: Các dòng PIC24H trên th ng ··········································· 73 Nghiên cu thit k, ch to máy chmng CAN xii HVTH : KS NGUYNGC DANH SÁCH CÁC HÌNH HÌNH TRANG Hình 1.1: chânAT89C51 ··························································· 4 Hình 1.2: S chân vu khinAT89S52 ··········································· 6 Hình 2.1: Tính nh ca CAN ······················································· 11 Hình 2.2: Ví d v mng CAN ·························································· 12 Hình 2.3: Mt nút mng CAN ··························································· 12 Hình 2.4: Mô hình mng CAN ·························································· 13 Hình 2.5: Các lp layer giao tip ························································ 14 Hình 2.6: NRZ method ··································································· 15 Hình 2.7: K thut Bit Stuffing ························································· 15 Hình 2.8: Gi thi gian ······························································ 15 Hình 2.9: T t l nghch v dài Bus ·········································· 16 Hình 2.10: n áp ca CAN low speed ··············································· 17 Hình 2.11: n áp ca CAN high speed ·············································· 18 Hình 2.12: S kháng nhiu vi ng cn t ······························ 18 Hình 2.13: Gii quyt tranh chp trên Bus ············································ 19 Hình 2.14: Khung truyn ································································· 20 Hình 2.15 : CRC field ···································································· 20 Hình 2.16: Khung truyn d liu CAN················································· 21 Hình 2.17: CAN standard frame ························································ 22 Hình 2.18: CAN Extended frame ······················································· 22 Hình 2.19: CAN remote frame ·························································· 23 Hình 2.20: CAN error frame····························································· 23 Hình 2.21i gian cho 1 bit ·································· 24 Hình 2.22: Mc cu to bi 4 segments ····································· 24 Hình 2.23: Cu trúc ca Time Quantum ··············································· 25 Hình 2.24: S ng Time Quanta có th cho mi segment ························ 26 Nghiên cu thit k, ch to máy chmng CAN xiii HVTH : KS NGUYNGC Hình 2.25: V ng b ······························································ 27 Hình 2.26: Chui dch chuy dài Segment ca Nominal Bit Time ··········· 28 Hình 2.27 khi b nhn CAN message ········································ 30 Hình 2.28: khi b truyn CAN message ······································ 30 Hình 2.29: Các loi li khác nhau······················································· 31 Hình 2.30. Mô t ng truyp················································· 33 Hình 2.31. Mô hình mng CAN trên xe ················································ 35 Hình 2.32. Mng giao tip CAN vi ECU trên xe ···································· 36 Hình 2.33: Mng giao tip CAN vi ECU trên xe Volvo ··························· 36 Hình 2.34 mng CAN trên xe Honda Civic 2007 ··························· 37 Hình 2.35 mng CAN trên xe Vios 2007 ······································ 39 Hình 2.36 mng CAN trên xe Toyota Yaris 2007···························· 40 Hình 3.1. Gic ch 2 ····················································· 63 Hình 3.2: Hình 3.2: trong mt mã li ····························· 64 Hình 3.3: khi chun giao tip ISO 9141 ······································ 66 Hình 3.4:Dng sóng ca giao thc ISO 9141-2 ······································· 66 Hình 3.5: khi chun giao tip SAE J1850 VPW ····························· 67 Hình 3.6: Dng sóng ca giao thc SAE J1850 VPW ······························· 67 Hình 3.7: khi chun giao tip SAE J1850 PWM ····························· 67 Hình 3.8: Dng sóng ca giao thc SAE J1850 PWM ······························· 67 Hình 3.9: khi chun giao tip ISO 14320 KWP2000 ························ 69 Hình 3.10:Dng sóng ca giao thc KWP2000 ······································· 69 Hình 3.11: khi chun giao tip ISO 15765 CAN ···························· 70 Hình 3.12: Dng sóng ca giao thc ISO 15765 CAN ······························· 70 Hình 4.1: u 64-Pin TQFP ·········································· 74 Hình 4.2: khi module CAN ····················································· 75 Hình 4.3 mch ngun cp 5V và 3.3V ········································· 77 Hình 4.4: Mch MCU s dng PIC24HJ64GP506A ································· 78 Hình 4.5: Mch Vehicle Interface ······················································ 79 [...]... NGỌC Nghiên cứu, thiết kế chế tạo máy chẩn đốn ơ tơ thơng qua mạng CAN - Thực nghiệm trên máy chẩn đốn 3133 để xác định các thơng số mã lỗi động cơ có chuẩn giao tiếp CAN trên xe Honda Civic để làm cơ sở chế tạo máy chẩn đốn ơ tơ thơng qua mạng CAN - Nghiên cứu thiết kế chế tạo máy chẩn đốn ơtơ thơng qua mạng CAN Thực nghiệm xuất mã lỗi động cơ và đánh giá kết quả hoạt đơ ̣ng của máy 1.4 Ph ng pháp... layer và MAACsub layer của các chuẩn này là CAN 2.1.2 Khái qt v giao thức CAN Chuẩn đầu tiên của CAN là chuẩn ISO 11898-2 định nghĩa các tính chất của CAN High Speed Một ví dụ về mạng CAN trong thực tế: GVHD: PGS_TS ĐÕ VĂN DŨNG 11 HVTH: KS NGUYỄN VĂN NGỌC Nghiên cứu, thiết kế chế tạo máy chẩn đốn ơ tơ thơng qua mạng CAN Hình 2.2: Ví dụ về mạng CAN Cơng nghệ cáp của mạng CAN có đường dây dẫn đơn giản,... đáp ứng của từng thơng điệp Ý nghĩa quan trọng trong việc thiết kế hệ thống nhúng thời gian thực Trước khi có mạng CAN, lựa chọn duy nhất cho mạng giao tiếp trong hệ thống thời gian thực là mạng Token Ring chậm chạp Hình 2.4: Mơ hình mạng CAN GVHD: PGS_TS ĐÕ VĂN DŨNG 13 HVTH: KS NGUYỄN VĂN NGỌC Nghiên cứu, thiết kế chế tạo máy chẩn đốn ơ tơ thơng qua mạng CAN Tiêu chuẩn ISO 11898 định nghĩa hai lớp... NGUYỄN VĂN NGỌC Nghiên cứu, thiết kế chế tạo máy chẩn đốn ơ tơ thơng qua mạng CAN Việc thực hiện chuẩn CAN trở nên cực kì đơn giản nhờ sự hỗ trợ của các nhà sản xuất chip đó Điểm nổi trội nhất ở chuẩn CAN là tính ổn định và an tồn (reliability and safety) Nhờ cơ chế phát hiện và xử lý lỗi cực mạnh, lỗi CAN messages hầu như được phát hiện Theo thống kê, xác suất để một message của CAN bị lỗi khơng được phát... NGỌC Nghiên cứu, thiết kế chế tạo máy chẩn đốn ơ tơ thơng qua mạng CAN CHƯƠNG 2 CƠ S LÝ THUY T V M NG CAN 2.1 Khái qt v chu n giao thức CAN : 2.1.1 Gi i thi u v m ng CAN Controller Area Network (CAN) là giao thức giao tiếp nối tiếp hỗ trợ mạnh cho những hệ thống điều khiển thời gian thực phân bố (Distributed Realtime Control System) với độ ổn định, bảo mật và chống nhiễu cực tốt CAN lần đầu tiên được... thuyết vi xử ly 2 Tháng 04/2013 - Nghiên cưu cơ sở ly thut ma ̣ng CAN va cac ch̉ n giao tiêp OBD -2 GVHD: PGS_TS ĐÕ VĂN DŨNG 9 HVTH: KS NGUYỄN VĂN NGỌC Nghiên cứu, thiết kế chế tạo máy chẩn đốn ơ tơ thơng qua mạng CAN 3 Tháng 05/2013 4 Tháng 07/2013 5 Tháng 8,9/2013 - Thiết kế board mạch va chê ta ̣o máy chẩn đốn ơ tơ thơng qua ma ̣ng CAN - Nghiên cưu lập trình va na ̣p dữ liê ̣u cho may - Thử nghiệm,... sennsor, PLC communication, thiếtbị y tế… Ngày nay, CAN đã có vị trí chiếm lĩnh trong ngành cơng nghiệp ơ tơ Trong những chiếc xe đời mới thường có một mạng CAN high speed để điều khiển động cơ và phanh…một mạng CAN low speed dùng để điều khiển những thiết bị khác như kiếng chiếu hậu, đèn… Chuẩn Field Bus Divice net, CAN open, J1939 thường dùng trong cơng nghiệp chính là chuẩn CAN mở rộng với Physixcal...Nghiên cứu thiết kế, chế tạo máy chẩn đốn ơ tơ tểơng Ọua mạng CAN Hình 4.6:Sơ đồ mạch LCD Interface ··················································· 81 Hình 4.7:Sơ đồ mạch in lớp trên và vị trí linh kiện··································· 82 Hình 4.8:Sơ đồ mạch in lớp dưới ······················································· 83 Hình 4.9: Máy chẩn đốn ơ tơ thơng qua mạng CAN ································... điệp Mỗi loại thơng điệp trong mạng CAN được gán cho một ID – số định danh – tùy theo mức độ ưu tiên của thơng điệp đó Hình 2.3: Một nút mạng CAN GVHD: PGS_TS ĐÕ VĂN DŨNG 12 HVTH: KS NGUYỄN VĂN NGỌC Nghiên cứu, thiết kế chế tạo máy chẩn đốn ơ tơ thơng qua mạng CAN Mạng CAN thuộc loại Message Base System, khác với Address Base System, mỗi loại thơng điệp được gán một ID Những hệ thống Address Base System... cơng nghệ cao để có được sự chủ động trong sản xuất đang được các cơ sở sản xuất quan tâm hàng đầu Vì thế Thầy PGS_TS Đ VĔN DǛNG nhận thấy được sự cần thiết của cơng nghệ chế tạo, thiết kế và lập trình vi điều khiển Thầy đã đề xuất và hướng dẫn các đề tài mang tính chất thiết kế, chế tạo và ứng dụng cao như: Nghiên cứu, chế tạo mạch đánh lửa trên động cơ ô tô theo chương trình – KS Nguyễn Văn Long Giang . ········································································ 95 Nghiên cứu, thiết kế chế tạo máy chẩn đoán ô tô thông qua mạng CAN 1 HVTH: KS NGUYC CH 1 TOÅNG QUAN 1.1. . cứu, thiết kế chế tạo máy chẩn đoán ô tô thông qua mạng CAN 4 HVTH: KS NGUYC ° Gii thiu AT89C52: Hình 1.1: chân AT89C51 Nghiêncu ch to máy. AT89S52 gm các khi: - CPU ( Central Processing Unit): Nghiên cứu, thiết kế chế tạo máy chẩn đoán ô tô thông qua mạng CAN 5 HVTH: KS NGUYC A.