Site Information

 Loading... Please wait...

SAE J1939 Programming with Arduino - Message Design

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

For this programming sample I have randomly chosen two PGNs from the vast selection of available parameter group numbers. They are:

  • PGN 65267 – Vehicle Position, provides the vehicle’s latitude and longitude.
    • Transmission Repetition Rate: 5 sec
    • Parameter Group Number: 0xFEF3
    • Data Length: 8 bytes
    • Default Priority: 6
  • PGN 65269 – Ambient Conditions, provides barometric pressure, cab interior temperature, ambient air temperature, engine air inlet temperature, and road surface temperature.
    • Transmission Repetition Rate: 1 sec
    • Parameter Group Number: 0xFEF5
    • Data Length: 8 bytes
    • Default Priority: 6

Note: In order to implement other or further PGNs, you will need a copy of the SAE J1939/71 standard for a detailed description of the parameters and their data format. 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.


Besides the actual PGNs, we will also need to simulate the application’s source address. The source address is usually determined through the address claim process of the SAE J1939 protocol stack, which is not yet part of this programming sample.

For mere test and demonstration purposes, it is sufficient to assume the addresses. In the following, we use 0x20 for PGN 65267 and 0x30 for PGN 65269.

Applying the PGNs plus priority plus source address, the message IDs are:


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...