Interfacing with NMEA 2000

NMEA 2000 is a newer version of NMEA 0183 with higher speed and better electrical connections it is electrically compatible with the CAN-bus developed about 1983 for automobiles by Bosch in Germany. The two versions are not compatible, but converters are abundant. I have deployed a Raymarine starter kit converter that o.a perform this task.  This converter translate the SeaTalk1 messages to the STNG standard which is NMEA2000. 

As Raymarine Next Generation (ST-NG) is very similar to NMEA 2000 & CAN-bus this solution represented the simplest approach for Algol. A drawing is published. Soon the new NMEA 2000 solution will be deployed.

SignalK now have support for NMEA2000 and by using a Serial Link CAN interface data from the NMEA2000 network can be imported into OpenPlotter. I have tested both a version without optical isolation from China (use with a USB isolator) and an  optical isolated version (which use an isolating tranceiver), the latter is safer and recommended   for permanent installation. These adapters work straight out of the box. 

These devices made in China shown on the left are based on the cantact project and canable site.   These devices comes with slcan (serial line interface)  firmware. There is no need to flash new firmware, the default slcan firmware work straight out of the box.  The none isolated  uses a simple CAN bus tranceiver (VP1050), while the isolated used a more complex (ADM3053) tranceiver from Analog devices.   Both use an ARM based powerful 32 bit microcontroller STM32 (STM32F 48MHz/32kB)  to present a serial USB interface (like /dev/ttyUSB0 , /dev/ttyACM0 or similar) to the computer.  Adding a line to the udev rules can make a new device that is always the /dev/canable1 as the /dev/ttyACM0 or ttyACM1 can change. Using udev rules both gps and canable can have their own /dev names, like /dev/gps0 and /dev/canable1, this is safer and even more intuitive. 

The lower one on the left is the isolated version, which contain a galvanic isolating chip as linked to above.  This will effective isolate stray current, common ground noise and any problems arising from sharing ground with the high current, high noise 12V service supply.  I have written about isolation before

The STM32 runs a serial line can interface (slcan)  firmware by default.  This enable the computer use USB like a serial port connecting to a /dev/ttyACMx like device. OpenPlotter connect via the serial connection module and set up a connection to the SignalK server. From there SignalK takes care of the rest. OpenCPN can connect to the SignalK and display values and the web interface of signalK can display any value available. OpenCPN can connect to the SignalK server and collect data for display, see the screendump below. 

SignalK read data from the serial device, setup using the slcan device is done using the OpenPlotter CAN bus module, see sceendump left below.  The colour turn blue if everything went well.  From canable connection to SignalK the package canboat (a JavaScript version also exist) is used, this is package which decode the NMEA2k messages to sensible information.  SignalK is set to receive as shown to the right below,  and data should be available, check web interface on port 3000. To display SignalK data in OpenCPN the picture on the right below show an example og how this can be done, SignalK uses the port 3000.