Raspberry Pi navigation on the open seas
Protocols
By 1980 it had become clear that electrical devices on board a boat had to be able to communicate with each other in some way. The NMEA 0183 standard was developed as the first protocol of its kind, describing fundamental standards for the process by which existing devices exchange information with one another. However, NMEA 0183 has major weaknesses. For example, the specifications do not prescribe how the devices make the information available. The RS232 serial protocol is the preferred choice, wherein wire pairs from each device are connected to D-Sub nine-pin connectors, from which data can flow unimpeded.
NMEA 2000 is the successor standard to NMEA 0183, with improvements to make communications easier. For example, the newer standard has its own type of connector, by which all existing devices on a boat can be daisy-chained together. The result is a large contiguous network that can be tapped into at any point to access all available data. The catch, however, is that the protocol is proprietary and therefore cannot be used with open source applications.
Additionally, all of the larger manufacturers of nautical electronics have developed their products on the basis of either NMEA 0183 or NMEA 2000. This is a problem with respect to the "Einstein" echo sounder, which speaks "Seatalk," a proprietary version of NMEA 0183. Therefore, the data cannot be captured over the RS232 protocol, requiring an adapter for devices compatible with either standard.
avNav as a Data Center
So how can it be that this menagerie of devices works properly in combination with a Raspberry Pi and avNav? The good news comes first. The NMEA 0183 protocol is still used for data output on many of the devices. The integrated GPS likewise offers a wire pair for NMEA 0183. The radio that was selected does the same. The speedometer also communicates data via NMEA 0183. Therefore, the data can be rerouted to a Rasp Pi with a D-Sub connector and a USB adapter for serial interfaces.
A costly NMEA 0183 bridge would otherwise be necessary for connecting multiple compatible devices. Ordinarily such a bridge comes with an integrated serial USB adapter for sending data to a computer, but it would cost at least 10 times as much as the present solution. In the end, it was necessary to purchase a Seatalk-to-NMEA 0183 bridge for the echo sounder because the Rasp Pi with avNav simply does not understand Seatalk.
The radio also has special needs. It outputs AIS data but speaks RS422, another serial protocol, rather than RS232, which also can be connected to the Rasp Pi by means of a D-Sub nine-pin and serial-to-USB adapter. However, the wire assignment is different from the RS232. As a result, it is a good idea to be careful when soldering; otherwise, the Rasp Pi could receive mixed signals or no signal at all on the serial interface.
An additional consideration unique to the radio has to do with GPS. The NMEA 0183 wires leading from the GPS are supposed to connect the GPS directly with the radio. This is a clever arrangement. If the captain sends out an SOS via DSC, the radio will then recognize the current location of the boat and simultaneously send this information with the alarm. The sea rescuers will then know where they need to go. The data from the GPS is also supposed to go to the Rasp Pi. In the end, a Wago clamp solved the problem. By means of a Y-type assembly, a cable supplies a wire pair from the GPS to the radio and another cable goes to the Rasp Pi.
Theoretically, it is sufficient to solder the wires for the on-board metrics devices directly to a D-Sub nine-pin connector bar. For everyday use, however, a housing for the connectors should be used in addition to the connector bar. This creates integrated cable strain relief. Technically speaking, this is not a major factor. However the housing does protect the solder on the D-Sub connections from breaking if boating conditions become rough.
To determine whether the connection was successful, I issued the terminal multiplexer screen
command,
$ screen -L /dev/ttyUSB0 38400
which lets screen
eavesdrop on the first port of the serial-to-USB converter at a speed of 38,400bps.
Buy this article as PDF
Pages: 8
(incl. VAT)