Design and Implementation of SAE J1939 Vehicle Diagnostics System

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

2019 International Conference on Computation, Communication and Engineering

Design and Implementation of SAE J1939 Vehicle Diagnostics System


B.V.P. Prasad, Jing-Jou Tang, Sheng-Jhu Luo

Department of Electronic Engineering, Southern Taiwan University of Science and Technology,


71005 Nantai Street, Yongkang District, Tainan City, Taiwan.
bvpprasad@stust.edu.tw, tjj@stust.edu.tw, 4a037025@stust.edu.tw,

Abstract J1939. In order to provide a reliable system, simulator such as


Vector CANoe is utilized. Different CAN Bus Emulators and
Driving safety is always the top priority of fleet management scopes are also used to verify the functionality of the system.
for light duty (LD) vehicles. Unfortunately, the current bus Based on the proposed system, most of the ECUs connected to
driving recorder cannot be manipulated electronically. That is, the CAN bus can be queried, and its current data can be
the data plotted on the traditional pie chart is not digital and reported for diagnosis. Further analysis can be conducted based
cannot be used for vehicle accident verdict. In this paper, a on correlated data to provide more evidence in case of traffic
vehicle diagnostics system is developed based on the SAE accidents.
J1939 protocol, which is developed by the Society of
Automotive Engineers (SAE), for HD vehicles. In this system, II. BACKGROUND
an integrated software and hardware interfaces are
implemented to monitor the vehicles relevant data. The Vector A. CAN
CANoe simulator is utilized to simulate the proposed Electrical CAN (Controller Area Network) standard is a
Control Unit (ECU) in an automotive CAN bus environment. communication protocol developed by BOSCH and published
In this work, RL78 MCU from Renesas Electronics of Japan is in 1986. It was listed in the ISO (International Organization for
used to design a monitoring device that supports SAE. Standardization) standard in 1993: ISO11898.
With the proposed system J1939 Bridge, the driver data CAN is mainly used on the data bus of vehicle
from the vehicle CAN bus can be monitored, analyzed and communication network. It allows broadcast communication
calculated. It can yield a range of insights about drivers’ between nodes, and provides a high fault-tolerant and debug
behaviour. The accessed data can also be displayed on a mechanism. In addition to automotive CAN applications they
specific LCD screen connected to the system. Besides, data can are also used in industrial or other multi-node applications with
be transmitted to other devices for mobile application via a high degree of stability communications environment.
Bluetooth connection. The J1939 Bridge, presented in this CAN’s physical layer consists of a two-wire differential bus,
paper, is jointly developed by STUST University and SwiSys i.e., CAN_H and CAN_L, terminated at both ends by a 120-
Company in Taiwan. ohm resistor and connected to a transceiver at each node. Logic
0 and Logic 1 data are defined as dominant bit and recessive
Key words: SAE J1939, CAN Bus, Vector CANoe, On-Board bit, respectively [1].
Diagnosis - II, Emulator, Bluetooth Module.
SAE J1939 / OSI Layers
I. INTRODUCTION
Application SAE J1939/71
People pay more attention to driving safety, and the safety SAE J1939/73
requirements of drivers, passengers and transport operators are
increasing. The current driving recorder (commonly known as Presentation
the big pie chart) for heavy duty (HD) vehicles can only record
some brief information about the vehicle in a non-digital way. Session
Acquiring and analyzing data such as time, running mileage,
or RPM etc. are still impossible for HD vehicles in an Transport SAE J1939/21
electronic and digital way. SAE J1939/01
In this paper, we aim to develop an electronic driver SAE J1939/81
Network SAE J1939/31
behavior recorder based on the SAE (Society of Automotive
Engineers) J1939 standard for HD vehicles. The SAE J1939
standard can help the drivers of large vehicles, fleet managers Data Link SAE J1939/21

(transportation companies), and traffic authorities perform


real-time digital control and analysis of data related to large SAE J1939/11
vehicles. Physical
SAE J1939/12
SAE J1939/14
SAE J1939 protocol completely determines the SAE J1939/15
communication rules from the physical layer to the application
layer and other layers. The Physical Layer and Data Link Layer Figure 1: SAE J1939 in the reference model for ISO/OSI.
are designed based on the protocol standard (ISO 11898) of the
B. SAE J1939
Control Area Control (CAN).
The protocol SAE J1939 defined by the international
In this paper, a specific hardware and software (firmware)
Society of Automotive Engineers (SAE), which is mainly used
module is developed and tested to meet the standard of SAE

ISBN: 978-1-7281-3112-2 71
2019 International Conference on Computation, Communication and Engineering

in the range of heavy commercial vehicles, both "On-Road" that the introduction of the proposed security mechanism does
(Truck & Trailer) and "Off-Road" (Construction, Cranes, etc.). not have considerable effects on the generic CAN bus
SAE J1939 is the recommended practice used for communication reliability. They also show that CAN-FD,
communication and diagnostics interaction among heavy duty standard proves to be an excellent solution for carrying the
(HD) vehicle components. additional authentication data. However, the emerging CAN-
As illustrated in Figure 1, it defines five layers in the seven- FD, standard is not widely used in commercial vehicles.
layer OSI network model, and this includes the CAN ISO Yang Jiansen et al. [5] proposed the Automobile Smart and
11898 specification (using only the 29-bit "extended" identifier) Integrated Control System (ASICS) framework for HD
for the physical and data-link layers. Under J1939/11, the data vehicles with its proprietary XMQ J1939 protocol. In order to
rate is specified as 250 Kbit/s. SAE J1939/21 defines a special reduce the design complexity, this paper only implements the
parameter group (PG) called Request (RQST, PGN = 0x0EA00) partial Diagnosis Message (DM) modes and the data length of
PG which may be used to request transmission of any other the data field is bound to 8.
parameter group. The session and presentation layers are not Sun Wei et al [6] implemented a fault monitoring and
part of the specification [2]. diagnosis system based on SAE J1939 protocol. The main
expert system is to develop a knowledge based and an event
C. J1939 packet architecture and message analysis triggered algorithm to build a reasoning mechanism-based
SAE J1939 is a set of standards based on CAN (ISO 11898) algorithm. This system relies on an embedded system with
architecture, so the J1939 packet architecture is like CAN Bus, ARMSYS2440 core processor and WINCE operating system.
it uses CAN 2.0B which is an extension CAN Bus. CAN 2.0B, Thus, the size and power consumption of the system is too
has a 29-bit data length for storage on the CAN packet large to be equipped in a commercial vehicle.
identification code (CAN
( ID)) as shown in Figure
g 2. The purpose of this work is to develop a hardware device
that meets the SAE J1939 on-board diagnostic system standard
for users and fleet managers. Our system helps the driver to
grasp the vehicle information at any time. With the advantages
of compact size and flexible interface, specific applications for
Figure 2: CAN 2.0B Extended Packet Format. data storage, fusion, interpretation, and analysis, can be
realized easily.
J1939's 29-bit ID contains the seven parts named as Priority,
R, DP, PDU Format, PF, PDU Specific and Source Address. IV. DEVELOPMENT AND IMPLEMENTATION OF SOFTWARE
The PDU Format, PF, and PDU Specific are used to indicate AND HARDWARE SYSTEMS
the PGN group of J1939 is shown in Figure 3.
A. System structure
The vehicle monitoring device "J1939 Bridge" developed in
this work on heavy duty vehicles is shown in Figure 4. "J1939
Bridge" can receive information from the vehicle, such as the
speed, engine speed, engine coolant temperature, including
other vehicle status, and transmit data via wireless
communication (Bluetooth) to the mobile application.
In real-time display, the mobile phone APP can also record
Figure 3: SAE J1939 Packet format. a message each time a vehicle sends a message and also can be
monitored on an LCD screen. The data is stored machine or
There are four categories in J1939's message delivery method, stored in the cloud for the back-end analysts were driving
namely: behavior analysis. Based on SAE J1939 standard, heavy-duty
x Data Frame: This is to send data to other ECUs. vehicles can transmit vehicle ECU information through the
x Request Frame: This is to request data from other ECUs. J1939 protocol in a broadcast manner.
x Error Frame: This is to indicate that an error occurred while
receiving data.
x Overload Frame: This is to indicate that an overload occurs
when receiving data.

III. LITERATURE SURVEY

Our research is aimed at analyzing the appropriate heavy-


Figure 4: Heavy Vehicle using J1939 Bridge.
duty vehicles based on J1939. Wang Quanqi et al [3], also
introduced a system for data acquisition and fault diagnosis for As demonstrated in Figure 5, this "J1939 Bridge" contains
vehicles. The main components of this system include a CAN four parts. They are:
Transceiver, ARM Coretex M3 CPU, GPRS, LCD display, and x CAN Transceiver (TJA 1050)
SD card. It only aims on the CAN bus On-Board-Diagnosis x Main Controller (RL78 MCU)
(OBDII) for light-duty (LD) vehicles instead of the SAE J1939. x Bluetooth Transmission Module (HC-05)
In [4], Pal-Stefan Murvay et al. focus on the security threats x LCD.
to CAN bus in commercial HD vehicles. Their results show

72 ISBN: 978-1-7281-3112-2
2019 International Conference on Computation, Communication and Engineering

B. Development Environment
The system development flowchart is shown in Figure 8.
Basically, the CANoe is used for system planning. The system
implementation (coding and debugging) is realized in the
Renesas RL78 design environment. Finally, the function
validation and verification is completed by using various J1939
emulators and specific scopes and logic
g analyzers for CAN bus.
Figure 5: Components in J1939 Bridge (solid lines).

The external oscilloscope is used to monitor the waveforms


of CAN_H or CAN_L between Emulator and CAN transceiver.
The CAN transceiver will normally receive raw CAN bus
information and sent to the RL78 CAN controller to interpret
the J1939 data format information and display it on the 20x4
LCD screen.
In this work we developed an adapter cable for "J1939
Bridge" to have J1962 SAE interface. SAE J1939 to SAE
J1962 connector adapter cable is shown in Figure 6. Its pin Figure 8: Development process Layout.
position is shown in Figure 7 and described in Table 1. The
J1939 protocol used in this work is a communication protocol Vector CANoe and Renesas RS+ development environments
based on the CAN protocol, and this work will obtain the CAN are being used to verify the system architecture and software
Bus signal through Pin 6 (CAN Low) and Pin 14 (CAN High) stack to realize the suggested "J1939 Bridge". We will give an
pins of SAE J1962 and translate it based on SAE J1939 overview of these tools.
protocols.
I. Vector CANoe
Vector CANoe is a vehicle electronic control unit
development system developed by the German Vector
company, a comprehensive software tool for developing,
testing and analyzing individual ECUs (Electronic Control
Units) and the entire ECU network [7]. It supports the entire
Figure 6: OBD Adapter Cable SAE J1939 to SAE J1962 [4] development process for network designers and test engineers
. from planning to system as shown in Figure 9.
P1 J1939F A Ground 4+5 P2 J1962F
B +12V 16
Eġ Dġ C CAN + 6
Cġ D CAN - 14
Fġ Aġ Bġ
F J1708 + 13
Jġ G J1708 - 12
Gġ H CAN 2 + 3

J CAN - 11
Figure 7: SAE J1939 to SAE J1962 connector adapter cable pin map.

Figure 6 illustrates an adapter cable for SAE J1939 connector


to SAE J1962 connector. There are 9 signal pins in J1939 Figure 9: Development process in Vector CANoe [7].
connector adapter which are respectively A, B, C, D, E, F, G,
H and J. In addition, there is an E pin which is the empty pin. The CANoe project development process is divided into
As for the J1962 connector port, 9 signal pins, namely three Phases as shown in Figure 9.
3,4,5,6,11,12,13,14 and 16 are utilized. x Phase 1: Performs all virtual ECU deployments in
Figure 7 depicts the pin mapping between these two ports. CANoe.
Actually, for the J1962 standard used in the OBDII protocols, x Phase 2: Partially virtualizes some virtual ECUs
pins 8, 9, 11, 12, 13 are for left vehicle manufacture discretion. and connect them to virtually ECUs in CANoe.
x Phase 3: Entities all ECUs and uses CANoe for
Table 1: SAE J1939 to SAE J1962 Pin Comparison Chart. verification.
SAE J1939 Description SAE J1962
A GND 4,5 II. Renesas CS+
B Power+ 16 In this work, the "J1939 Bridge" is developed based on the
C CAN-High 6 Renesas RL78/F14 MCU. An RPB (Renesas Promotion Board)
D CAN-Low 14 comprised of an integrated CAN Bus, LIN Bus, UART Port,
F Make/Model Specific 13
HMI and I/O Port is used for development and testing, as
G Make/Model Specific 12
shown in Figure 10.
H Make/Model Specific 3
J Make/Model Specific 11

ISBN: 978-1-7281-3112-2 73
2019 International Conference on Computation, Communication and Engineering

4x20 LCD
Bluetooth Module

I/O
UART

Figure 10: Renesas RL78 RPB Development System.

The RL78F14 consists of a single chip 16-bit Figure 12: FV-2 – By Emulator-B (J1939_ECU_Simulator).
microcontroller. Data read from its CAN Tx / Rx interface will
be interpreted and sent to the Bluetooth module via the SAU0- The development board uses an oscilloscope for waveform
UART0 Tx / Rx interface. Thus an App. on the external mobile observation. The oscilloscope is used to verify that the CAN
phones can access the J1939 data through the Bluetooth Bus can reliably transmit data and observe the integrity of the
communication channel. waveform, it helps to confirm that the "1939 Bridge"
developed in this paper is safe and reliable in all kinds of noise
V. EXPERIMENTAL RESULT environments.

Regarding the Functional Verification (FV), two J1939 VI. CONCLUSION


emulators OBD_SIM10 and J1939_ECU_Simulator are used
to evaluate the functionality and compatibility of our In this paper the authors have proposed a "J1939 Bridge"
development system. The J1939 emulator is a kind of a based on the SAE J1939 communication standard for HD
hardware that enables to imitate the diagnosis, interaction vehicles. From the experimental results, we have shown that
between HD vehicle and external scan tools. The analyzed internal sensor data from HD vehicles connected to the "J1939
basic signals include the speed of the vehicle, RPM, Bridge" can be successfully accessed. The data such as engine
temperature and coolant temperature. Figure 11 depicts the speed, travel speed, engine coolant temperature, diagnostic
first experiment for FV-1 using oscilloscope and a CAN Bus error code, engine oil temperature, torque value, intake
hub. This CAN Bus hub acts not only a signal hub for CAN manifold pressure value, etc., can be displayed on an LCD
nodes, but also a physical power supply to all the components. display or a mobile App. via Bluetooth communication.
The oscilloscope shows the monitored waveform of CAN_H Furthermore, the real time data storage can be implemented on
signal and the decoded CAN message frame. From the decoded the cloud through the communication channel (i.e., 4G or 5G)
message frame, we can find that the CAN ID 18FE6CEEh we for driver behavior analysis. Eventually, the concept of UBI
interpreted
p from our "J1939 Bridge"
g is correct. (Usage Based Insurance) for drivers can be realized based on
the record of driver behavior.

VII. REFERENCES

[1] CAN Bus Introduction., Renesas Electronics Taiwan, 2017.


[2] Understanding SAE J1939 by Simma Software, Inc.
http://www.simmasoftware.com/j1939-presentation.pdf
[3] W. Quanqi, W. Jian, and W. Yanyan, "Design of Vehicle Bus
Data Acquisition and Fault Diagnosis System," in Proc. IEEE
International Conference on Consumer Electronics,
Figure 11: FV-1 – By Emulator-A (OBD_SIM10). Communications and Networks, (CECNet), XianNing, China, pp.
245-248, Apr. 2011.
The OBD_SIM10 Vehicle Signal Simulator connection and [4] P. S. Murvay and B. Groza, "Security shortcomings and
assembly is shown in Figure 11, it is used for analyses whether countermeasures for the SAE J1939 commercial vehicle bus
J1939 Bridge can successfully interpret the message generated protocol," in Proc. IEEE Transcations on Vehicular technology,
by the OBD_SIM10 vehicle signal simulator. After analyzing Vol. 67, no. 5, pp. 4325-4339, Jan. 2018.
the signal of the simulator by ZLG USB-CANII signal analysis [5] Y. Jiansen, G. Konghui, D. Haitao, Z. Jianwel and X. Bin, "The
device, the simulator provides information such as vehicle application of SAE J1939 protocol in Automobile Smart and
Integrated Control System" in Proc. IEEE International
speed, engine speed, engine coolant temperature, etc., After
Conference on Computer, Mechatronics, Control and Electronic
testing and comparison, it is observed that "J1939 Bridge" can Engineering, (CMCE), Changchun, China, pp. 412-415, Aug.
successfully interpret the vehicle speed, engine speed, engine 2010.
coolant temperature and other information and display it on the [6] Wei Sun., Jun Li., Ying Gao., Dawei Qu & Chenghong Yang.
LCD screen. The Design of Embedded Bus monitoring And Fault Diagnosis
The J1939_ECU_Simulator is used for FV-2 as shown in System Based on Protocol SAE J1939. In 2010 Asia-Pacific
Figure 12. From the interactive verification and testing on CAN Power and Energy Engineering Conference, IEEE, 2010; 1-4.
message frames, it is evident that our "J1939 Bridge" can [7] Vector CANoe User Manual, Informatik, 2010.
successfully interpret the vehicle information such as RPM, https://www.vector.com/int/en/products
VSS, ECT, SPN, FMI, OC, EOT, TP, BPV and MAP. Besides,
all this information can be displayed on the LCD screen in a
manner of switching every five seconds.

74 ISBN: 978-1-7281-3112-2

You might also like