NMEA 2000
This article is intended to give engineers a brief overview of the NMEA 2000 protocol. For details on the specification itself, please visit the International Marine Electronics Association (NMEA).
NMEA 2000 is a replacement for the NMEA 0183 network which has been used in the marine industry
on pleasure craft, tankers, submarines, yachts, and cargo ships for the past 20 years. Today NMEA 2000 is used
as the standard communications bus for marine equipement.
NMEA 2000 Overview
NMEA 2000 is a high level communications protocol, which operates on a Controller Area
Network (CAN) bus. NMEA 2000 specifies exactly how information (e.g. engine RPM) is
exchanged between electronic control units (ECUs) on a network.
It defines the data's priority, size, scaling, and offset. For example, NMEA 2000 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.
NMEA 2000 Datalink
NMEA 2000 uses a simple datalink layer to communicate information. Altogether there are six subfields which are encoded into the 29-bit CAN identifier, they are shown below and are: Priority, Extended Data Page, Data Page, Protocol Format, Protocol Specific, and Source Address.
P |
EDP |
DP |
PF |
PS |
SA |
3 bits |
1 bit |
1 bit |
8 bits |
8 bits |
8 bits |
P is the priority of the message, EDP and DP make up 4 different pages with one page being reserved for ISO 15765-3. PF and PS define the parameter group number and destination address, and SA is the source address of the controller application. For details about this encoding, refer to NMEA 2000-21.
NMEA 2000 Messages
At the heart of NMEA 2000 is the Parameter Group Number (PGN), which is a unique number
assigned to every NMEA 2000 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.
NMEA 2000 Message Sizes
NMEA 2000 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 NMEA 2000 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 NMEA 2000's transport
protocol which is specified by IS 11783-3 and J1939-21.
The transport protocol layer defines two different types of message fragmentation: BAM and CM. There are several differences between those two types, the main difference being the destination address. A BAM uses a global destination address and is therefore sent to all CAs, while a CM is destination specific. Due to the addressing scheme, only a single BAM can be transmitted simultaneously, while multiple CMs using different destination addresses may be simultaneously transmitted.
Another difference between BAMs and CMs is the time is takes to send a messages. With a BAM, data packets must be spaced at least 50 ms apart and no more than 200 ms. With a CM, data frames may be sent as quickly as possible.
NMEA 2000 Physical Layers
Currently there is a single 250 Kbps physical layers defined by the NMEA 2000 main document. NMEA 2000 specifies a shielded twisted pair of wires with a maximum backbone length of 100 meters and maximum stub length of 6 meter. The physical layer uses a four pin connector, with power and ground, and allows for up to 50 CAN nodes.
NMEA 2000 CAN Parameters
NMEA 2000 specifies a network data rate of 250 Kbps with a minimum period of 3.98 us and a maximum period of 4.02 us. The CAN bus sample point setting has a minimum value of 85% and maximum value of 90%.
CAN peripherals also allow for synchronous jump width (SJW) settings as 'large as possible'. The SJW value dictates how much time can be added or subtracted to the node's CAN clock for syncronization purposes.
NMEA 2000 NAME Field
Every ECU, or CA (controller application) on a NMEA 2000 network has a unique NAME. The NAME is 64 bits wide and is made up of the following fields: Arbitrary Address Capable, Industry Group, Vehicle System Instance, Vehicle System, Reserved Bit, Function, Function instance, ECU Instance, Manufacturer Code, and Identity Number. The NAME field gives each CA a unique identity. Nodes on the network use the NAME field to distinguish between each other. The NAME field is also essential to Network Management as it establishes node priority. The NAME translates to a number; the lowest numeric values have the highest priority when claiming addresses.
An ECU may contain multiple CAs and NAME fields.
NMEA 2000 Address Claiming
In NMEA 2000 CAs, or electronic control units, on the vehicle network bus must claim a unique source address to enable communication. Addresses 0 to 128 are pre-assigned and CAs which use these addresses are allowed to communicate immediately after power up. In anticipation of future devices and functions, however, NMEA 2000 includes a method for dynamically assigning addresses. New devices must announce an address for themselves by transmitting an address claim message.
Sending an Address Claim message the new (non-addressed) device sends out an Address Claim PGN indicating the address it is assuming. All devices on the network compare this newly claimed address with their internal address tables. If the address is already in use by a device with a higher priority (determined by the NAME), the higher priority device indicates the conflict by sending out a Address Claim message. The lower priority device immediately stops using the address and must claim a new one.
About NMEA
NMEA is the International Marine Electronics Association, that represents NMEA's evolution from a national to an international marine electronics standards and education association.
The mission of the National Marine Electronics Association is to be a worldwide, self-sustaining organization committed to enhancing the technology and safety of electronics used in marine applications.
NMEA 2000 Specifications
- NMEA 2000-Main: Parent Document
- NMEA 2000-Main: Physical Layer
- ISO 11783-3: Data Link Layer
- ISO 11783-5: Network Management
- NMEA 2000-Appendix A: Application Layer
- NMEA 2000-Appendix C: Certification Criteria
- ISO 11898: Controller Area Network