NMEA 0183

From CruisersWiki

(Difference between revisions)
Jump to: navigation, search
(Implementation on Board)
Line 26: Line 26:
==Implementation on Board==
==Implementation on Board==
 +
Although NMEA 0183 was designed to run over the '''RS-422''' serial interface, which can support a single talker and up to 10 listeners and data rates as high as 10 mbit/sec, in practical terms the majority of devices are compatible with the PC style '''RS-232''' interface.  This interface is generally restricted to a single talker and a single listener, although the output of most common NMEA 0183 devices can be shared between multiple listeners.
===Talkers===
===Talkers===
 +
A '''talker''' is any device that can transmit NMEA 0183 signals.  Typically these will be:
 +
* [[GPS]] devices, for transmitting position (latitude, longitude) and time signals.
 +
* On board sensors, such as a depth sensor, wind sensor, hull speed/log sensor, fuel gauge, etc.
 +
* [[AIS]] units.
 +
 +
A talker will normally have a speed that it will be able to transmit at.  For the vast majority of devices this is 4800 baud. For AIS units and certain multiplexers it is normally 38400 baud.
===Listeners===
===Listeners===
 +
A '''listener''' is a device that can listen to and understand NMEA 0183 signals.  Typically these will be:
 +
* An [[autopilot]], which will need to receive heading data and may also be interested in wind speed/direction data.
 +
* A PC or laptop running navigation software.
 +
* A [[GPS]] may also act as a listener so that it can be programmed with waypoint data.
 +
* A chart plotter.
 +
 +
Many devices act as both listeners and receivers, for example chart plotters and autopilots are usually provided with both send and receive NMEA 0183 connectors, and some instruments may wish to receive some data (e.g. GPS data) and also output data based on positions -- such as an AIS system that will output alarm data based on GPS input and its own understanding of the position of nearby ships.
===Multiplexers===
===Multiplexers===
 +
A multiplexer is some kind of device, usually programmable, that has many serial ports that can either listen or send NMEA 0183 data, and be programmed to listen to some data and output some data.
 +
 +
(... list of NMEA multiplexers, advantages, disadvantages, etc, of each).
===Wiring===
===Wiring===
 +
Typically NMEA 0183 wiring will adhere to the [http://en.wikipedia.org/wiki/RS-232#3-wire_and_5-wire_RS-232 minimal 3 wire] implementation of RS-232, meaning that you only need two wires for either (but not both) of transmit or receive, and only 3 wires for both transmit and receive (with a common ground wire).  NMEA outputs on marine instruments therefore usually have either 2 connectors (transmit and ground, or receive and ground), or 3 connectors (transmit, receive, ground).
 +
 +
If you are connecting a NMEA 0183 talker '''A''' to a NMEA 0183 listener '''B''' then it is simply a matter of running a pair of wires between the two, and connecting as follows:
 +
* '''A''' output connects to '''B''' input.
 +
* '''A''' ground connects to '''B''' ground.
 +
 +
If both devices are both talkers and listeners, then there are 3 wires instead of 2, and the wiring is almost as simple:
 +
* '''A''' output connects to '''B''' input.
 +
* '''A''' input connects to '''B''' output.
 +
* '''A''' ground connects to '''B''' ground.
 +
 +
If one of the devices is a PC, then typically it will have a DE-9 connector and you need to make the connections as per the next section.
 +
 +
===Connectors===
 +
The RS-422 standard does not define a connector type.  The RS-232 standard makes a recommendation that a 25 pin D-sub connector (DB-25) be used but does not make this recommendation mandatory -- in most cases PC devices will have a [http://en.wikipedia.org/wiki/DE-9 DE-9] connector instead.
 +
 +
The DE-9 connector in 3 wire mode has the following [http://en.wikipedia.org/wiki/Serial_port#Pinouts pinouts]:
 +
* Pin 3 -- transmit
 +
* Pin 2 -- receive
 +
* Pin 5 -- ground
 +
 +
No other pins are normally used by NMEA 0183 although they are there for other purposes.
 +
 +
So to connect a NMEA 0183 talker '''A''' to a PC, one would typically wire a serial DE-9 socket to the two connectors on the talker as follows:
 +
* '''A''' output to DE-9 pin 2
 +
* '''A''' ground to DE-9 pin 5
 +
 +
Similarly, if a listener was being connected to a PC then it would use pins 3 and 5 of the DE-9 socket.
 +
 +
These days most laptop PCs have no serial ports at all, having been replaced by the newer USB ports, and therefore a [http://www.maplin.co.uk/p/usb-to-serial-9-pin-male-adapter-zp43w USB to serial adapter such as this one] needs to be plugged in to a USB port on the laptop.
==Forum Discussions==
==Forum Discussions==
Line 43: Line 90:
* [http://www.catb.org/gpsd/NMEA.html NMEA Revealed] by Eric S. Raymond
* [http://www.catb.org/gpsd/NMEA.html NMEA Revealed] by Eric S. Raymond
* [http://en.wikipedia.org/wiki/Eric_S._Raymond Eric S. Raymond] on wikipedia
* [http://en.wikipedia.org/wiki/Eric_S._Raymond Eric S. Raymond] on wikipedia
 +
* [http://en.wikipedia.org/wiki/RS-232 RS-232] on wikipedia
 +
* [http://en.wikipedia.org/wiki/RS-422 RS-422] on wikipedia
 +
* [http://en.wikipedia.org/wiki/Serial_port Serial port] on wikipedia
==References & Publications==
==References & Publications==

Revision as of 13:39, 10 November 2014

NMEA 0183

The National Marine Electronics Association (NMEA) is a US-based marine electronics trade organisation setting standards of communication between marine electronics.

NMEA 0183 is a combined electrical and data specification for communication between marine electronics such as echo sounder, sonars, anemometer, gyrocompass, autopilot, GPS receivers and many other types of instruments. It has been defined by, and is controlled by, the National Marine Electronics Association. It is slowly being phased out in favour of the newer NMEA 2000 standard, however many common devices support only NMEA 0183 and not NMEA 2000.

Introduction

The NMEA 0183 standard uses a simple ASCII, serial communications protocol that defines how data are transmitted in a "sentence" from one "talker" to multiple "listeners" at a time. Through the use of intermediate expanders, a talker can have a unidirectional conversation with a nearly unlimited number of listeners, and using multiplexers, multiple sensors can talk to a single computer port.

At the application layer, the standard also defines the contents of each sentence (message) type, so that all listeners can parse messages accurately.

Electrically most implementations of NMEA 0183 are functionally identical to a serial port running RS-232 (or EIA-232) which means that the protocol can be driven by a PC or laptop computer which normally has one or more serial ports and/or USB ports which can have serial to USB adapters attached.

Protocol Description

  • Each message's starting character is a dollar sign.
  • The next five characters identify the talker (two characters) and the type of message (three characters).
  • All data fields that follow are comma-delimited.
  • Where data is unavailable, the corresponding field remains blank.
  • There is an asterisk and checksum at the end of the message.
  • <CR><LF> ends the message.

The complete NMEA standard is proprietary and must be purchased from the NMEA at a cost of around US$250 as of June 2013. However, much of it has been reverse-engineered from public sources.

The best available public source for the NMEA 0183 protocol is NMEA Revealed by Eric S. Raymond.

Implementation on Board

Although NMEA 0183 was designed to run over the RS-422 serial interface, which can support a single talker and up to 10 listeners and data rates as high as 10 mbit/sec, in practical terms the majority of devices are compatible with the PC style RS-232 interface. This interface is generally restricted to a single talker and a single listener, although the output of most common NMEA 0183 devices can be shared between multiple listeners.

Talkers

A talker is any device that can transmit NMEA 0183 signals. Typically these will be:

  • GPS devices, for transmitting position (latitude, longitude) and time signals.
  • On board sensors, such as a depth sensor, wind sensor, hull speed/log sensor, fuel gauge, etc.
  • AIS units.

A talker will normally have a speed that it will be able to transmit at. For the vast majority of devices this is 4800 baud. For AIS units and certain multiplexers it is normally 38400 baud.

Listeners

A listener is a device that can listen to and understand NMEA 0183 signals. Typically these will be:

  • An autopilot, which will need to receive heading data and may also be interested in wind speed/direction data.
  • A PC or laptop running navigation software.
  • A GPS may also act as a listener so that it can be programmed with waypoint data.
  • A chart plotter.

Many devices act as both listeners and receivers, for example chart plotters and autopilots are usually provided with both send and receive NMEA 0183 connectors, and some instruments may wish to receive some data (e.g. GPS data) and also output data based on positions -- such as an AIS system that will output alarm data based on GPS input and its own understanding of the position of nearby ships.

Multiplexers

A multiplexer is some kind of device, usually programmable, that has many serial ports that can either listen or send NMEA 0183 data, and be programmed to listen to some data and output some data.

(... list of NMEA multiplexers, advantages, disadvantages, etc, of each).

Wiring

Typically NMEA 0183 wiring will adhere to the minimal 3 wire implementation of RS-232, meaning that you only need two wires for either (but not both) of transmit or receive, and only 3 wires for both transmit and receive (with a common ground wire). NMEA outputs on marine instruments therefore usually have either 2 connectors (transmit and ground, or receive and ground), or 3 connectors (transmit, receive, ground).

If you are connecting a NMEA 0183 talker A to a NMEA 0183 listener B then it is simply a matter of running a pair of wires between the two, and connecting as follows:

  • A output connects to B input.
  • A ground connects to B ground.

If both devices are both talkers and listeners, then there are 3 wires instead of 2, and the wiring is almost as simple:

  • A output connects to B input.
  • A input connects to B output.
  • A ground connects to B ground.

If one of the devices is a PC, then typically it will have a DE-9 connector and you need to make the connections as per the next section.

Connectors

The RS-422 standard does not define a connector type. The RS-232 standard makes a recommendation that a 25 pin D-sub connector (DB-25) be used but does not make this recommendation mandatory -- in most cases PC devices will have a DE-9 connector instead.

The DE-9 connector in 3 wire mode has the following pinouts:

  • Pin 3 -- transmit
  • Pin 2 -- receive
  • Pin 5 -- ground

No other pins are normally used by NMEA 0183 although they are there for other purposes.

So to connect a NMEA 0183 talker A to a PC, one would typically wire a serial DE-9 socket to the two connectors on the talker as follows:

  • A output to DE-9 pin 2
  • A ground to DE-9 pin 5

Similarly, if a listener was being connected to a PC then it would use pins 3 and 5 of the DE-9 socket.

These days most laptop PCs have no serial ports at all, having been replaced by the newer USB ports, and therefore a USB to serial adapter such as this one needs to be plugged in to a USB port on the laptop.

Forum Discussions

List links to discussion threads on partnering forums. (see link for requirements)

External Links

References & Publications

Personal Notes

Personal experiences?


Template:Guide1



SailorSmiley.gifContributors to this page

Names: Delatbabel



Cruising Wiki Navigation

| HOMEPAGE | Wiki Contents | Navigation | NMEA 0183
Personal tools
advertisement
Friends of Cruisers Wiki