Site Information

 Loading... Please wait...

SAE J1939 Programming with Arduino - The SAE J1939 Higher-Layer Protocol

Posted by Wilfried Voss on

This post is part of a series about SAE J1939 ECU Programming & Vehicle Bus Simulation with Arduino.

SAE J1939 ECU Programming & Vehicle Bus Simulation with Arduino

Even though extremely effective in automobiles and small, embedded applications, CAN Bus alone is not suitable for projects that require a minimum of network management and messages with more than eight data bytes.

As a consequence, higher layer protocols (additional software on top of the CAN Bus physical layer) such as SAE J1939 for vehicles were designed to provide an improved networking technology that support messages of unlimited length and allow network management, which includes the use of node IDs (CAN supports only message IDs where one node can manage multiple message IDs).

SAE J1939

  • Is a standard developed by the Society of Automotive Engineers (SAE)
  • Defines communication for vehicle networks (trucks, buses, agricultural equipment, etc.)
  • Is a Higher-Layer Protocol using CAN as the physical layer
  • Uses shielded twisted pair wire
  • Applies a maximum network length of 40 meters (~120 ft.)
  • Applies a standard baud rate of 250 Kbit/sec
  • Allows a maximum of 30 nodes (ECUs) in a network
  • Allows a maximum of 253 controller applications (CA) where one ECU can manage several CAs
  • Supports peer-to-peer and broadcast communication
  • Supports message lengths up to 1785 bytes
  • Defines a set of Parameter Group Numbers (PGNs, predefined vehicle parameters)
  • Supports network management (includes node IDs and an address claiming procedure)

Compared to other, function-driven protocols such as CANopen and DeviceNet, SAE J1939 is primarily data-driven. In fact, J1939 provides a far better data bandwidth than any of these automation protocols.

SAE J1939 data packets contain the actual data and a header, which contains an index called Parameter Group Number (PGN). A PGN identifies a message's function and associated data (a more detailed description of PGNs and essential protocol functions are included in the description of the ARD1939 protocol stack later in this book). J1939 attempts to define standard PGNs to encompass a wide range of automotive, agricultural, marine and off-road vehicle purposes.

Note: For more detailed information on the SAE J1939 Standards Collection, please refer to the official SAE documentation or to A Comprehensible Guide to J1939.

The actual data in the data field is described by the SPNs.

Note: You will need a copy of the SAE J1939/71 standard for a detailed description of all PGNs and SPNs. You may find some of them by browsing the Internet, but be aware that there is no complete online reference. A description of all PGNs is out of the scope of this book.


A Comprehensible Guide to J1939

SAE J1939 has become the accepted industry standard and the vehicle network technology of choice for off-highway machines in applications such as construction, material handling, and forestry machines. J1939 is a higher-layer protocol based on Controller Area Network (CAN). It provides serial data communications between microprocessor systems (also called Electronic Control Units - ECU) in any kind of heavy duty vehicles. The messages exchanged between these units can be data such as vehicle road speed, torque control message from the transmission to the engine, oil temperature, and many more.

A Comprehensible Guide to J1939 is the first work on J1939 besides the SAE J1939 standards collection. It provides profound information on the J1939 message format and network management combined with a high level of readability.

Read more...