<<

AUTOMOTIVE

Data Acquisition from HD Vehicles Using J1939 CAN

Richard P. Walter Eric P. Walter Table of Contents

Chapter 1 Benefits and Applications of the In-Vehicle Network for Data Acquisition...... 1 1.1 Overview—Data Gold Mine...... 1 1.2 Focus and Assumptions of This Book...... 2 1.3 Access to the Data...... 2 1.4 Normal and Requested Messages...... 2 1.4.1 Normal Messages...... 2 1.4.2 Requested (Diagnostic/Polled/Event) Messages...... 3 1.4.3 Requested Versus Normal Messages...... 3 1.5 Comparing Light- and Heavy-Duty Vehicle Designs...... 3 1.6 Medium-Duty Vehicles...... 5 1.7 Applications...... 5 1.8 How to Use This Book...... 5 References...... 6

Chapter 2 Comparison with Traditional Data Acquisition...... 7 2.1 Acquiring Data with Our Own Sensors...... 7 2.2 In-Vehicle Network Data...... 8 2.3 Acquiring Parameters from the Network...... 9 2.4 Complications of Network Versus Direct Sensors...... 9

Chapter 3 Binary, Hex, Bits, and Bytes...... 11 3.1 Introduction to Bits, Binary, and Hexadecimal Conventions...... 11 3.2 Hexadecimal Designations...... 12 3.3 Introduction to Bits and Bytes...... 12 3.4 11- and 29-Bit CAN IDs...... 12 3.5 Data Conventions...... 13 3.5.1 Conversion Format...... 13 3.5.2 Byte Format...... 13 3.5.3 Byte Order...... 14

Chapter 4 Controller Area Network (CAN) Protocol ...... 17 4.1 What is CAN?...... 17 4.2 What Does CAN Define?...... 19 4.2.1 Layer 1—...... 19 4.2.2 Level 2—Data ...... 20 4.3 Applications of CAN...... 22 4.4 CAN on Light-duty Vehicles Using ISO 15765...... 23 References...... 23

v Chapter 5 J1939 Standard Overview...... 25 5.1 Introduction...... 25 5.2 Previous In-Vehicle Network Standards (J1708 and J1587)...... 27 5.3 J1939 Overview and Industry-Specific Standards...... 28 5.3.1 J1939 – Top-Level Document...... 28 5.3.2 J1939DA – Digital Annex...... 29 5.3.3 J1939/01 – On-Highway Equipment Control and Communication Network...... 29 5.3.4 J1939/02 - Agricultural and Forestry Off-Road Machinery Control and Communication Network...... 30 5.3.5 J1939/05 Marine Stern Drive and Inboard Spark-Ignition Engine On-Board Diagnostics Implementation Guide...... 31 5.4 J1939/7x – Background Application Standards...... 31 5.4.1 J1939/74 – Application Configurable Messaging...... 31 5.4.2 J1939/75 – Generator Sets and Industrial...... 32 5.5 J1939/8x...... 32 5.5.1 J1939/81 – Network Management...... 32 5.5.2 J1939/82 – Compliance—Truck and Bus...... 33 5.6 Most Important J1939 Standards...... 34 References...... 34

Chapter 6 J1939 Lower Layer Specifications...... 35 6.1 Physical Layer...... 35 6.1.1 J1939/11—Physical Layer—250 kbits/s, Shielded Twisted Pair...... 35 6.1.2 J1939/13—Off-Board Diagnostic Connector...... 36 6.1.3 J1939/14—Physical Layer, 500 kbits/s...... 38 6.1.4 J1939/15—Physical Layer, 250 kbits/s, Unshielded Twisted Pair...... 38 6.2 Data Layer...... 38 6.2.1 J1939/21——Message Format...... 39 6.2.2 J1939/21—Data Link Layer—Transmitting Messages...... 44 6.2.2.1 Broadcast Announce Message (Global)...... 45 6.2.2.2 Broadcast Long Message Example: PGN-FEE3 (65251)— Engine Configuration...... 45 6.2.2.3 Connection Management (Targeted)...... 45 6.2.2.4 Request Messages...... 46 6.3 Network Layer (J1939/31)...... 46 References...... 49

Chapter 7 Application Layer (J1939/71)...... 51 7.1 PGNs and SPNs...... 51 7.2 J1939 Message Data Format...... 53 7.3 Scaling Information...... 54 7.4 Rate...... 55 7.5 Digital Annex (J1939DA)...... 55 vi 7.6 Logging J1939 Data with a Test Tool...... 55 7.6.1 Example J1939/71 Database Editor...... 56 7.6.2 Selecting Parameters to Acquire...... 57 7.6.3 Finding Available Parameters...... 57 7.6.4 Sorting by Name, Unit, or PGN...... 58 7.6.5 Defining the Acquisition Rate and Source Address...... 58 7.6.6 Importing Proprietary Messages...... 58 7.7 Sample J1939 Message File...... 58 References...... 60

Chapter 8 Diagnostics (J1939/73)...... 61 8.1 Overview...... 61 8.2 Diagnostic Messages...... 62 8.3 Diagnostic Trouble Codes...... 64 8.3.1 Lamp Status (First Byte)...... 64 8.3.2 Second Byte...... 65 8.3.3 HD DTC Parameters (Bytes 3 through 6)...... 65 8.3.3.1 Suspect Parameter Number...... 65 8.3.3.2 Failure Mode Identifier...... 65 8.3.3.3 Occurrence Count...... 66 8.3.3.4 SPN Conversion Method...... 66 8.3.4 Controller ID...... 66 8.3.5 Example...... 66 8.3.6 Multiple DTCs Reported...... 67 8.4 Comparing HD OBD with LD OBD-II...... 68 8.5 Targeted or Global Requests...... 69 References...... 70

Chapter 9 Heavy-Duty On-Board Diagnostic (HD-OBD) ...... 71 9.1 Introduction of OBD...... 71 9.2 Worldwide Harmonized On-Board-Diagnostics (WWH-OBD)...... 72 9.3 J1939/03 On-Board Diagnostics Implementation Guide...... 73 9.4 J1939/84 OBD Communications Compliance Test Cases for Heavy-Duty Components and Vehicles...... 73 9.5 Comparing LD with HD-OBD...... 74 9.5.1 Comparing HD and LD Standards...... 74 9.5.2 Comparing HD and LD Approaches...... 74 9.5.3 Comparing HD Messages with LD Test Modes...... 75 9.6 Example Fault Codes...... 76 9.6.1 Example Fault Codes Using J1979 for OBD-II...... 77 9.6.2 Example Fault Codes Using UDS ISO 14229 for EOBD...... 78 9.6.3 Example Fault Codes Using J1939...... 80 9.6.4 Example Fault Codes Using WWH-OBD...... 80 References...... 83 Chapter 10 Examples of J1939 Data...... 85 10.1 Sample J1939 Message File...... 85 10.2 Debugging Controllers and Reverse Engineering non-Standard J1939 Messages...... 86 10.3 Example Scaled Engineering Data...... 89 10.4 Web-Based Dashboards and Example Applications...... 92 10.4.1 Fleet Data...... 92 10.4.2 Diagnostics and Alerts...... 93 10.4.3 Diagnosing Intermittent Problems...... 94 10.4.4 Fuel Economy...... 96 10.4.5 Duty Cycle and Drive Cycle Analysis...... 97 References...... 97

Chapter 11 Data Storage and Transfer...... 99 11.1 File Size...... 99 11.1.1 Estimating File Size...... 99 11.1.2 File Format and Compression...... 100 11.2 Data Transfer Options and Data Rates...... 100 11.2.1 WiFi...... 101 11.2.2 Cellular...... 102 11.2.3 Bluetooth...... 102 11.2.4 USB...... 102 11.3 Real-Time Data Versus Logging...... 103 11.3.1 Real-Time Data...... 103 11.3.2 Logging...... 103 11.3.3 Acquisition, Storage, Display, and Analysis Trade-Offs...... 104

Appendix A Abbreviations...... 105 Index...... 111