Sunday, January 13, 2013

NMEA 2000, aka N2K

What the heck is that?  NMEA stands for the National Marine Electronics Association, and NMEA 2000, or N2K for short, is a standard way to interconnect marine electronics devices.  It's the replacement for the NMEA 0183 standard which is nothing more than computer serial ports.

The big problem with NMEA 0183 is that computer serial connections are meant to be point to point.  It's two things, and only two things, talking to each other.  If you have 5 devices, all of which need to talk to more than one other device, you get an explosion of connections.  This has been mitigated in 0183 by recognizing that the real restriction is that only one person can be talking, but multiple people can be listening.  The result is that boat electronics build using 0183 area a rats nest of Talkers and Listeners.  When the GPS talks, the VHF, Chart Plotter, and Auto Pilot need to Listen.  When the Chart Plotter talks, the Auto Pilot needs to listen, but not on the same port as the GPS (remember, only one talker is allowed on each connection).  When the AIS talks, the Chart Plotter needs to listen, but again on a different port, and that port needs to run at a different speed than everything else.  When the rate compass talks the Chart Plotter, Radar, and Auto Pilot need to listen.  It gets complicated very fast, and for someone climbing onto a boat to diagnose a problem, it can be a real head scratcher.  It was fine when boats only had a few instruments, but with a lot of instruments is gets ugly very fast.

NMEA 2000 fixes this by creating a communications "bus" which is nothing more than a single set of wires running through the boat that everything taps into.  Smarts in the attached devices allows them to ensure only one person speaks at a time,  just like a computer network.  Devices can be added and removed by connecting them to the bus with T connectors.  Any device can talk on the bus, and any device that cares can listen.  The rats nest of wires and ports disappears.  Another cool side effect is that failing over from one device to another is trivial, and in most cases happens automatically.  For example, let's say you have a satellite compass which gives position plus a highly accurate heading.  And you also have a second GPS, plus a rate compass.  You can set up the auto pilot to prefer the most accurate device, in this case the satellite compass, but if it fails, to use the GPS and rate compass instead.  This fail over happens automatically.  If you were using 0183, you would have to rewire things, or set things up with selector switches to pick which device to use and manually switch in the event of a failure.

But N2K is not without it's challenges.  Like any new standard, it takes a while for different manufacturers to support it, there can be different interpretations of the standard which cause problems, and bugs in products.  There also is a provision of vendor-specific messages which on one hand is essential for things like device configuration and firmware updates, but also allows vendors to venture off and create their own thing rather than work with others.  That said, I don't see any way in which it's worse than 0183, and lots of ways that it's better.  Other complaints argue that NMEA should have just used Ethernet, or that it should have been a switched topology rather than a bus.  Although interesting bar room banter for nerds (like me) those arguments have no practical relevance for someone outfitting a boat.  N2K is what it is, and you can use it, or use something else.  I just argue that of the choices available to us, it's the best one.

Another argument against N2K has to do with reliability, the ability of a single failure of just the right type to lock out the whole bus, and compatibility problems between devices.  There is truth to all of these arguments, but every year that goes by they diminish.  All the same arguments were made about computer networks early on, and we seem to have gotten by it just fine.  I think the trick to success with N2K is to not push its limits.  Don't put too many devices on, test things carefully, and consider multiple, separate buses for larger configurations.  For example, put your navigation equipment on one bus, and put all the house lighting controls on a separate bus.

For a little background, N2K is based on the CAN bus which was create for use in cars.  Cars have a whole pile of computers on board, and one or more CAN buses are used to connect them together.  Another standard at work is J1939, also based on the CAN bus, and used for diesel engine control in current model diesel engines.  NMEA borrowed these existing and well proven technologies, and added in their own marine-specific messages to make it work in boats.  It's akin to coming up with your own written language, but using standard envelopes, addresses, and the post office for all the delivery.

To me, the benefits of N2K clearly outweigh the negatives.  Others may arrive at different conclusions, and that's fine too.  We implemented N2K on our current boat, and attached to it are:

- Chart Plotter
- GPS
- Weather station
- All the autopilot components including 2 control panels, the course computer, rate compass, rudder feedback, and remote control.
- 0183 converter to connect the VHFs
- Water tank level sensors
- Trim tab position sensors
- 2 Mareteron displays that can display a myriad of different information

On the new boat we plan to do the same, plus add a small number of additional devices.  We will be doubling up the auto pilot devices for redundancy, adding a couple more tank sensors for fuel levels, and adding temperature sensors in the equipment spaces.  It's not a lot, and I'm confident that we will have a reliable system.

No comments:

Post a Comment

Make comments here