NMEA2000 – Introduction for Developers

This article provides a basic introduction to NMEA 2000 for companies intending to develop a NMEA 2000 device.

 

NMEA 2000 Basics

NMEA 2000 is a CAN-based protocol for marine applications.  It is the de-facto backbone for marine applications around the world, integrating navigation, propulsion, lighting, power, switching and entertainment devices. 

It always uses 250 Kbit/s and has a maximum of 50 physical devices on one network.  Based on ISO11783 (SAE J1939), it specifies a set of standardized messages called Parameter Group Number (PGN), each one has a unique number. 

There are PGNs available for a wide variety of applications inside a vessel such as navigation, propulsion, lighting etc. 

One additional feature that NMEA 2000 requires on top of the basis of ISO11783 is the Fast Packet Protocol.  This is an additional Transport Protocol which can transfer up to 223 bytes in up to 31 CAN frames. 

 

Larger vessels typically have one to three NMEA 2000 networks.  The typical NMEA 2000 has a backbone connected via T-pieces and drop cables down to the devices.  At each end there is a 120-ohm terminator which is an off-the-shelf component as shown in Figure 1 Typical installation for NMEA2000.  In a micro NMEA 2000 network, all cables use 5-pin M12 type connector.

figure 1 Typical installation for NMEA2000
figure 1 Typical installation for NMEA2000

NMEA 2000 devices have a set of rules that must be followed to operate correctly.  These include but not limited to:

·        Bit rate must be 250 Kbit/s

·        Provide a set of services to identify a device, its manufacturer and a list of Tx and Rx PGNs.

·        Provide the Load Equivalency Number (LEN) which describes how much current is drawn from the network.

·        Provide configuration services to change features such as update rate, priority and instance.

·        Operate with supply voltage between 9V and 16V.

·        DC and AC isolation of I/O from the NMEA 2000 connector.

 

These are defined in the NMEA 2000 specification package which is available from the National Marine Electronics Association (NMEA) and website (nmea.org).  To be able to state that a product is a NMEA 2000 device, the NMEA require that manufacturers put their products through the NMEA 2000 certification process.  This is broken down into      two main parts.  The first is concerned with checking the requirements of the embedded software in the device to ensure that its communications conform to NMEA 2000, e.g. timing, requests, responses, mandatory services.  The second part is a self-certification checklist for hardware requirements mostly e.g. connectors, cables, PCB design, AC and DC isolation, CAN signalling.  These are described further in this article.

 

NMEA 2000 Connector (M12 5-pin)

The connectors are DeviceNet 5-pin M12 connectors. The physical connector and pinout differ between mini- and micro- type.  Micro type is the most common connector.

NMEA 2000 Device Implementations and Common Misconceptions

A common misunderstanding is that NMEA 2000 is simply SAE J1939 with parameters for marine applications instead of for trucks.  From the experience of Warwick Control, some companies simply do this and somehow obtain the details of the PGNs that they need from the internet.  When these are put through the software tests that are executed by the official NMEA 2000 certification tool, this often results in many failures.

There are a lot of devices available on the market that claim to be NMEA 2000 compatible devices in some way.  However, in reality most of these devices do not actually meet all of the requirements of NMEA 2000.  There are also many open source and private projects available online which aim to integrate into NMEA 2000.  Again, these projects do not support all requirements of NMEA 2000.

When a device is a NMEA 2000 certified device, it means that it provides certain software services via the protocol and also the hardware meets certain requirements (e.g. such as DC or AC isolation).

 

What NMEA 2000 Product Certification Gives You

Product certification Guarantees a certain level of quality and interoperability for NMEA 2000 networks by ensuring that a device supports a set of NMEA 2000 protocol services and hardware requirements.  For device manufacturers, this means that they can use state that their product is NMEA 2000 certified and use the NMEA 2000 logo in their marketing.

The NMEA 2000 product certification process is part automated software tests, part self-certification process to check on the hardware and other requirements.  Both are specified in Appendix C of the NMEA 2000 specification package available from the NMEA.

 

Automated tests are specified in Appendix C3 and use the bench setup shown in Figure 2.  It uses a Kvaser CAN interface as the other device on the network which connects to the Device Under Test (DUT) via a terminated bench-based CAN bus.  The NMEA 2000 certification tool is used on a Windows PC and provides instructions for initial conditions of each test and then all of the NMEA 2000 message exchange is started by a press of a button.

Figure 2 Setup fpr NMEA 2000 Automated Software Testing offictial set up
Figure 2 Setup fpr NMEA 2000 Automated Software Testing offictial set up

Appendix C2 of the NMEA 2000 specification package is a self-certification process and takes the user through a set of hardware tests and checklist items to ensure that the product meets the requirements.  These include aspects such as:

·        Includes measurements of DC or AC isolation between the NMEA 2000 connector and any other IO that may be present on the device.

·        Declaration of storage and operational temperatures.

·        Details of CAN signal timing.

 

Companies wishing to develop NMEA 2000 devices can carry out the certification of the product to NMEA 2000 themselves by purchasing the NMEA 2000 certification tool from the NMEA.  An alternative route is to benefit from the experience and guidance from the team at Warwick Control with their NMEA 2000 conformance and product certification services.

 

Whichever route is chosen, a Manufacturer Code (unique to company) and Product Code (unique to product) must be obtained from the NMEA.

Figure 3 Setup for NMEA 2000 Automated Software Testing (set up for debugging issues)
Figure 3 Setup for NMEA 2000 Automated Software Testing (set up for debugging issues)

Advantages of Warwick Control Service

Why would you use the service from Warwick Control Technologies?  The main reason is to benefit from its expertise and experience.

In general, there are two levels of service available from Warwick Control Technologies:

·        Pre-Conformance – This is recommended for customers needed to check the main software conformance to the NMEA2000 communication requirements and the CAN signalling of a prototype device.

·        This can also be extended to look at NMEA 2000 hardware requirements if a customer is not confident in their hardware design.

·        Full Product Certification – This is recommended for customers that feel their device is ready to go for full product certification with the NMEA.  This includes a check of both software and hardware of the device.

 

The benefit of engaging Warwick Control Technologies earlier in the project and using the Pre-Conformance test service is that a company will get early advice on issues that could delay development, increase project costs and delay the product release date.

The general benefits of engagement include:

·        Engage engineers who are experienced with the NMEA 2000

·        Know how to analyse the test failures.

·        Tests provided in addition to those required by the NMEA, therefore helping to provide a high level of product for customers.

 

Testing Tools

The following are recommended tools for anyone developing a NMEA 2000 device:

 

·        X-Analyser 3 – allows viewing of all CAN messages and full display of NMEA 2000 for debugging (using a Kvaser CAN interface).

o   If you use a Professional level of Kvaser interface, you can also inject CAN error frames.

·        NMEA 2000 Certification Tool – used for running the test cases that are needed for product certification (using a Kvaser CAN interface).

·        PicoScope 2206b – USB PC oscilloscope for checking quality of CAN electrical signal (CAN H and CAN L).

·        Digital Voltmeter – for measuring device termination, DC and AC isolation values.

·        NMEA 2000 Diagnostic Tools – many available intended to be used by marine installers and technicians.  These tend to be limited by data throughput; it is best to use X-Analyser 3 for an increased level of debugging performance.

 

Interoperability Testing

Whilst conformance testing and NMEA 2000 product certification ensures that a device meets the protocol requirements, it does not ensure Interoperability with other devices.  It is part of the testing regime required for a NMEA 2000 product.

The simpler devices usually are quite straightforward.  However, vessels tend to have a Multi-Function Display (MFD) for access to the information from NMEA 2000 devices and to control aspects of the vessel. This is one of the more complex devices on the vessel.  Entertainment head units and remote controllers are another example of complex devices needing to integrate with the vessel MFD devices and can often be challenging.  Interoperability of new devices will the more complex devices is not guaranteed by the NMEA2000 product certification process and therefore additional testing is recommended.

 

Cybersecurity and NMEA 2000

Across many industries, protocols based on CAN have been developed.  Everyone needs to now consider cybersecurity issues.  A paper was presented in May 2024 at the CAN in Automation’s (CIA) International CAN Conference in Baden-Baden which described the latest results from a review of the vulnerabilities in NMEA 2000 to cyberattacks.  The paper was titled “Making marine applications based on NMEA 2000 robust to cyberattacks”.  This review is ongoing and further updates will be available.

 

The European Telecommunications Standards Institute has produced ETSI EN 303 645

Cyber Security for Consumer Internet of Things: Baseline Requirements.  This has a 13-point checklist of which many will be useful for even non-IoT devices.

 

 

Other Information

There is a nice description on how to create a NMEA 2000 network by Digital Yacht here https://support.digitalyacht.co.uk/how-to-create-an-nmea-2000-network/