This article is intended to give engineers a brief overview of the SAE J1939 protocol.
SAE J1939 is a replacement for the SAE J1587/J1708 network which has been used for medium and heavy duty commercial vehicles for the past 20 years. Today J1939 is used as the standard communications bus for commercial vehicle's diagnostic and control applications. Due to its popularity and success, it has been adopted by the agricultural (ISO 11789) and marine industries (NMEA2000). Competing high-level CAN protocols are ISO 15765 and CANopen.
SAE J1939 is a high level communications protocol, which operates on a Controller Area Network (CAN) bus. J1939 specifies exactly how information (e.g. engine RPM) is exchanged between electronic control units (ECUs) on a vehicle.
It defines the data's priority, size, scaling, and offset. For example, J1939 specifies engine RPM to have a default priority of 3, to have a size of 16-bits, a resolution of 0.125 rpm/bit, and an offset of 0.
The standard goes on to define many other aspects, including message timeouts, how large messages are fragmented and reassembled, the network speed, the physical layer, and how applications acquire network addresses.
At the heart of J1939 is the Parameter Group Number (PGN), which is a unique number assigned to every J1939 message. The PGN serves to identify the message and its data. Although sometimes a message will contain a single parameter (e.g. VIN), typically the PGN will contain a group of parameters. In the standard there is a total of 8,672 PGNs.
For an example message, take PGN 61,444. It identifies the "Electronic Engine Controller 1" message. Per the specification, "EEC1" has seven different parameters embedded in the data field of the message. Engine RPM is one of those seven parameters.
J1939 Message Sizes
J1939 has three different allowed message sizes, they are: 3 bytes, 8 bytes, and variable length. There is only one message which is three bytes in length, and that is the request message (PGN 59,904).
The majority of messages in J1939 are 8 bytes in length. This allows for a more efficient use of the network bandwidth by maximizing the amount of data on the network by reducing the number of messages.
Variable length messages are messages with a length from 9 to 1,785 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 is defined by J1939's transport protocol which is specified by J1939-21.
J1939 Physical Layers
Currently there are two 250 Kbps physical layers defined, J1939-11 and J1939-15, with a 500 Kbps layer, J1939-14, under development.
J1939-11 specifies a shielded twisted pair of wires with a maximum backbone length of 40 meters. It uses a three pin connector and allows for up to 30 nodes.
J1939-15 specifies an unshielded twisted pair of wires with a maximum backbone length of 40 meters. It uses a two pin connector and allows for up to 10 nodes.