Technology

SAE J1939 Introduction and Overview

This article is intended to give engineers a brief overview of the SAE J1939 protocol and how J1939 networks work. For additional information, including source code, CPU benchmarks, protocol specifications, and a presentation on J1939, please visit our link at the bottom of this article.

SAE J1939 is the standard communications network for sharing control and diagnostic information between electronic control units (ECUs) residing in heavy-duty and commercial vehicles. Examples of such vehicles are school buses, concrete mixers, military vehicles, and semi-trucks. Due to its popularity and success, it has been adopted by the agricultural (ISO 11789) and marine (NMEA2000) industries.

SAE J1939 has been used for 18 years and is replacing SAE J1587/J1708, which is the previous standard communication network for heavy-duty and commercial vehicles. J1587/J1708 has been in use for 27 years, and as of 2011 some OEMs continue to use the J1587/J1708 and J1939 networks.

J1939 Overview:

SAE J1939 is a high-level communications protocol that operates on a Controller Area Network (CAN) bus. J1939 specifies exactly how information (eg engine RPM) is exchanged between a vehicle’s electronic control units.

Defines the priority, size, scale, offset, and transmission speed of the data. For example, J1939 specifies that wheel speed have a default priority of 2, a size of 16 bits, a resolution of 1/256 km/h, an offset of 0, and a baud rate of 20 ms.

The standard goes on to define additional aspects, including how large messages are fragmented and reassembled, message wait times, network speed, the physical layer, and how applications, not ECUs, acquire source addresses from the net.

J1939 Publications:

J1939 messages are defined and identified by their Parameter Group Number (PGN), which is a unique number assigned to each message. The PGN is used to identify the message and its data. Typically, a message will contain a parameter group, which is where the name Parameter Group Number comes from. However, sometimes a message will contain only one parameter. An example of a single parameter is the vehicle identification number, or VIN, which is sent in a single message fragmented into multiple CAN data frames.

The vast majority of messages contain a group of parameters. A good example of this is PGN 65,134 which is the message “High Resolution Wheel Speed”. This message contains 4 parameters: “Front Axle – Left Wheel Speed”, “Front Axle – Right Wheel Speed”, “Rear Axle – Left Wheel Speed” and “Rear Axle – Right Wheel Speed”.

In total in the standard there are a total of 8,672 PGN. And because there is still an unused reserved bit, future expansion is still possible.

J1939 Parameters:

J1939 parameters are defined and identified by their Suspect Parameter Number (SPN), which is a unique number assigned to each parameter. For example, the previously mentioned parameter “Front Axle – Left Wheel Speed”, has an SPN of 1.592. The purpose of the SPN is to identify a certain parameter without having to use its “Front Axle – Left Wheel Speed” text representation.

One use of the SPN is when a failure occurs and a failure message is transmitted, the data portion of the failure message will contain the SPN of 1,592. This method allows the receiving controller application to know exactly what failed, without having to send the text representation. It is important to note, and a common misconception, that the SPN is not used under normal operating conditions.

J1939 message sizes:

J1939 has three different allowed message sizes, which are: 3 bytes, 8 bytes, and variable length. The vast majority of J1939 messages are 8 bytes long. The 8 byte length comes from the fact that the largest single CAN data frame contains 8 bytes of data. Full packaging of individual CAN data frames increases network bandwidth efficiency by minimizing the number of messages. To understand in detail the associated overhead of CAN data frames, please refer to the CAN specification which can be found on our J1939 software page.

Variable-length messages are messages with a length from 9 to 1785 bytes. These messages are too large to fit in a single CAN data frame and must be fragmented by the transmitter and reassembled by the receiver. This process of message fragmentation and reassembly is known as “Transport Protocol” and is layer four in the seven layer OSI model. The “Transportation Protocol” is defined by document J1939-21.

There is only one message that is three bytes long, and that is PGN 59,904, which is the “Request” message. The “Request” message is used to request PGNs that have a transmission rate of ‘on demand’. For example, the Vehicle Identification Number (VIN) has a transmission rate of ‘on request’. Therefore, the VIN is never present on the J1939 network unless an ECU sends a “Request” message containing the PGN for the VIN message.

J1939 physical layers:

There are two physical layers defined, J1939-11 and J1939-15, with a third physical layer, J1939-14, redacted. These physical layer specifications detail a large amount of information. The most common points of interest to engineers are: maximum backbone length, maximum stub length, maximum number of ECUs, minimum and maximum voltage levels for the network, minimum and maximum bit time, and minimum and maximum speed of response. maximum for signal transitions.

J1939-11 specifies a shielded twisted pair of cables with a maximum backbone length of 40 meters. It uses a three-pin connector and allows up to 30 nodes. It has a bit time of 4.00 us with a tolerance of 0.05%.

J1939-14 is a new physical layer that is currently in the draft process. The main goal of this specification is to double the network speed from 250 Kbps to 500 Kbps. Although this specification is still a draft, as of 2010 there were heavy vehicle OEMs implementing it in their vehicles.

J1939-15 specifies a reduced physical layer that is a lower cost version of layer -11. It uses unshielded twisted pair cables with a maximum backbone length of 40 meters. It uses a two-pin connector, instead of three pins for -11, and allows up to 10 nodes. It also has a bit time of 4.00 us with a tolerance of 0.05%.

J1939 Specifications:

J1939 Serial Communications and Control Vehicle Network
J1939-01 Control and communication network for roadside equipment
J1939-02 Communication and control of agricultural and forestry off-road machinery
J1939-03 On-Board Diagnostics Implementation Guide
J1939-05 Aft Marine Propulsion and Spark-Ignition Engine On-Board Diagnostics
J1939-11 Physical Layer – 250k bps, twisted shielded pair
J1939-13 external diagnostic connector
J1939-14 Physical layer, 500 Kbps
J1939-15 Reduced Physical Layer, 250 Kbps, Unshielded Twisted Pair (UTP)
J1939-21 Data Link Layer
J1939-31 Network Layer
J1939-71 Vehicle Application Layer
J1939-73 Application Layer – Diagnostics
J1939-74 Application – Configurable Messaging
J1939-75 Application Layer: Gensets and Industrial
J1939-81 Network Management
J1939-82 Compliance: Trucks and Buses
OBD J1939-84 Communications Compliance Tests – Heavy Vehicles

Leave a Reply

Your email address will not be published. Required fields are marked *