Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 18-02-2008, 11:15   #1
Registered User
 
scotte's Avatar

Join Date: Apr 2007
Location: SF Bay Area, CA, USA
Boat: Privilege 39
Posts: 664
NMEA-0183 and RS-422 vs RS-232

Questions seem to come up on occasion about wiring for NMEA, and use of RS-232. Hopefully this article will help understand the issue and be of use for other folks setting up an NMEA network on their own boats.

This discussion is explicitly about NMEA-0183 - not NMEA-0180, NMEA-0182, NMEA-2000, SeaTalk, etc. I've tried to write this technically correct, but hopefully more or less understandable without getting too loose on the details. If I've been overly sloppy, please don't hesitate to call me on them.

Strictly speaking, the NMEA-0183 specification calls for an RS-422 differential transmission system.

What's thedifference between single-ended and differential transmission?

"single-ended" means that the signal is transmitted over a single wire. The receiving end has to determine the voltage of this signal, and to do so it needs a reference. In a single-ended system, a "signal ground" is used as a reference. The receiving end essentially measures the voltage on the wire relative to this signal ground.

RS-232 is single-ended. A transmit wire has voltage relative to the signal ground. Note that in the case of a bi-directional configuration (where a particular device is both sending and receiving), the signal ground can be shared between the two.

The problem with single-ended transmission is that it can be prone to noise. For example, if the cable crosses over other cables, voltage can be inducted from the other cables and the receiving end may not be able to distinguish the right signal relative to signal ground. The same thing can happen if the signal ground is not stable.

Also, the RS-232 specification states that it is point-to-point, so technically speaking you can only have a single talker and a single listener. In other words, you cannot connect more than two devices together.

A "differential" transmission system works by transmitting over two wires. When one wire sends a voltage, the other wire sends the opposite voltage. The receiving end detects a transmission by comparing the voltage differential between these two transmit wires, instead of using a signal ground.

A differential setup is much less prone to inductive noise because an inducted voltage tends to affect both transmit wires in the same way. The receiving end doesn't care because it's only comparing the difference between the two wires - in other words, the inductive noise will increase (or decrease) the voltage in both wires, but the delta between the two will remain nearly constant.

Note that a proper differential transmission needs no signal ground, and a bi-directional setup (where a device is both transmitting and receiving) is supposed to require 4 wires, as there is no common reference ground. Also note that many "NMEA-0183" devices are loose on this. For example, both fixed-mount Garmin GPS units I have onboard only provide a single transmit and receive wire; power ground must be used for reference.

RS-422 uses differential transmission. Unlike RS-232, the specification allows for multiple listeners - but you can still only have a single talker. So, you can connect more than two devices together, but only one can be a transmitter, the rest must all be receivers.

So why can I plug my NMEA-0183 GPS into my computer's RS-232 and get data? You can argue it's either good engineering or just plain blind luck. RS-232 receivers detect the correct voltage, even though we've technically muddled things by using the power ground from the RS-422 transmitter as a signal ground on the RS-232 receiver. Using the power ground wire as a signal ground works because the RS-422 driver in the GPS bases it's transmit voltages from this ground. In other words, the combination of the right transmit leg of RS-422 and power ground is effectively the same thing as the combination of transmit on RS-232 and signal ground.

The unfortunate thing about loose adherence to RS-422 and not providing proper differential wiring is a much lower noise threshold. Where a single-ended system will start to become unreliable after maybe a couple dozen feet if you are lucky, a differential system can be reliable for several thousand feet. In an electrically noisy environment like a boat this can make a big difference.
__________________

__________________
scotte is offline   Reply With Quote
Old 18-02-2008, 11:29   #2
Moderator Emeritus
 
David M's Avatar

Cruisers Forum Supporter

Join Date: Sep 2007
Location: San Francisco Bay
Boat: research vessel
Posts: 10,150
Nice writeup scotte! It clarifies some things I was unaware of....thanks.

I just wanted to add that with a NMEA 0183 multiplexer you can take two or more sources that generate NMEA 0183 data and send that data to a single display unit. In that sense, it is possible to combine two NMEA data streams into one steam. This of course means one direction only.

I have heard that NMEA 0183 is an ASCII sentence but with a higher voltage...is this true scotte?
__________________

__________________
David

Life begins where land ends.
David M is offline   Reply With Quote
Old 18-02-2008, 13:17   #3
Senior Cruiser

Cruisers Forum Supporter

Join Date: Dec 2006
Location: Seattle
Boat: Cal 40
Posts: 2,401
Images: 7
Quote:
Originally Posted by David M View Post
Nice writeup scotte! It clarifies some things I was unaware of....thanks.

I just wanted to add that with a NMEA 0183 multiplexer you can take two or more sources that generate NMEA 0183 data and send that data to a single display unit. In that sense, it is possible to combine two NMEA data streams into one steam. This of course means one direction only.

I have heard that NMEA 0183 is an ASCII sentence but with a higher voltage...is this true scotte?
You're mixing protocols and hardware. Above he says 183 is speced as RS-422. That's hardware which included voltage specs. What pattern the 1s and 0s is defined as is another matter. So if you send 100 0001, that means A in ascii. There is also number of start, stop and parity added to the protocol. EBIDIC is an example of another code. 183 uses ascii code.

ASCII - Wikipedia, the free encyclopedia

The next level is that only certain patterns of letters and numbers are recognized as valid sentences in 183. If you send a love letter from your computer to an NMEA listener it's going to be confused.

http://vancouver-webpages.com/peter/nmeatype.txt
__________________
cal40john is offline   Reply With Quote
Old 19-02-2008, 10:39   #4
Moderator Emeritus
 
David M's Avatar

Cruisers Forum Supporter

Join Date: Sep 2007
Location: San Francisco Bay
Boat: research vessel
Posts: 10,150
Not sure I understand. So what I read some time ago is not true and that ASCII is nothing like NMEA-0183? Is that correct?

Or are you saying that two NMEA sources will not work with a NMEA multiplexer? (It does for me)

I have NMEA data sent from my sounder and GPS to displays on deck for the scientists, to my Nav computer to run my Nobeltec chart software and to a few other computers for data logging. I do understand that NMEA 0183 data is one way only.

Am I understanding things correctly?
__________________
David

Life begins where land ends.
David M is offline   Reply With Quote
Old 19-02-2008, 13:10   #5
Registered User

Join Date: Apr 2007
Posts: 718
I'm not sure what he's trying to say. The NMEA 0183 standard defines the electrical signal requirements, data transmission protocol and timing, and specific sentence formats for a 4800-baud serial data bus. The data format protocol calls for all transmitted data to be interpreted as ASCII characters. The sentences, of course, must conform to a certain structure as indicated in the standard.

Eric
__________________
fairbank56 is offline   Reply With Quote
Old 16-02-2010, 10:49   #6
Registered User
 
ActisenseTech's Avatar

Join Date: Feb 2010
Posts: 5
Quote:
So why can I plug my NMEA-0183 GPS into my computer's RS-232 and get data? You can argue it's either good engineering or just plain blind luck.
Most modern RS232 chips don't actually need the -ve swing to read a signal despite the requirement in the spec. This is why, more often than not, connecting RS-422 to RS-232 will work. I argue good engineering!
With the addition of isolated outputs to some products there is another good engineering solution.
The differential (RS-422) system means that at one moment A is positive relative to B and then B is positive relative to A.
The key here is the word relative.
If B is tied to ground and cannot go positive then A is forced to go negative to B instead.
The A line is now swinging from + to - volts around B.
This can ONLY work if the outputs are isolated (floating).
Tying an un-isolated B to Ground will cause something to burn out.
The B line will be driven and a large current will sink straight to ground.
Quote:
Strictly speaking, the NMEA-0183 specification calls for an RS-422 differential transmission system.
NMEA 0183 version 2.0 onwards unequivocally specifies meeting the differential RS-422 specification. Previous to version 2.0 ground was used as a reference. The earlier version is why new products can claim NMEA 0183 status without meeting the RS-4222 differential requirement without breaking any rules, somewhat cheeky perhaps but certainly allowed.
__________________
Actisense - The NMEA Specialists
http://twitter.com/ActisenseNews
ActisenseTech is offline   Reply With Quote
Old 17-02-2010, 14:19   #7
Nearly an old salt
 
goboatingnow's Avatar

Cruisers Forum Supporter

Join Date: Jun 2009
Posts: 13,649
Images: 3
if you want to use RS422 in a gounded system, then just ground the receivers - signal, the output ( talker) "-" is left disconnected. Both talker and receiver must be on a common power ground. (which is usually the case).

Note that most rs422 chips can actually cope with one or both of their outputs shorted to ground. Different chips react in differnt ways. but rarely does it damage them.
__________________
goboatingnow is offline   Reply With Quote
Old 11-01-2012, 17:36   #8
Registered User

Join Date: Jul 2011
Location: Brooklyn
Boat: Catalina 30
Posts: 60
Re: NMEA-0183 and RS-422 vs RS-232

Not that I don't trust postings here, but every boatyard has enough experts to drown out the truly informed people. Thankfully I found confirmation to much of the advise above as to what is acceptable, and why, via this link (after days of part time googling).

See also an almost identical posting HERE.
__________________
carlspackler is offline   Reply With Quote
Old 05-03-2013, 17:27   #9
GWB
Registered User

Join Date: Sep 2008
Location: Brookings, Oregon
Boat: Westsail 32
Posts: 296
Images: 1
Re: NMEA-0183 and RS-422 vs RS-232

Sorry to ressurect this old thread, I have a question about the RS422 wiring.

My NMEA device has 4 wires:
receive +, receive-,transmit+ and transmit-

My RS422 cable has 9 wires:
Black GND GND Device ground supply pin.
Brown CTS+ Input Clear to Send Control + (B), Input
Red TXD- Output Data – (A) Output
Orange TXD+ Output Data + (B) Output
Yellow RXD+ Input Data + (B) Input
Green RTS+ Output Request To Send Control + (B), Output
Blue RTS- Output Request To Send Control – (A), Output
White RXD- Input Data – (A) Input
Grey CTS- Input Clear to Send Control input – (A), Input

Question: which of the 4 wires do I connect to? My assumption is white, yellow, red and orange.
Thanks for any help!
__________________
GWB is offline   Reply With Quote
Old 05-03-2013, 18:15   #10
Moderator
 
Paul Elliott's Avatar

Cruisers Forum Supporter

Join Date: Sep 2006
Posts: 3,864
Images: 4
Re: NMEA-0183 and RS-422 vs RS-232

Quote:
Originally Posted by GWB View Post
Sorry to ressurect this old thread, I have a question about the RS422 wiring.

My NMEA device has 4 wires:
receive +, receive-,transmit+ and transmit-

My RS422 cable has 9 wires:
Black GND GND Device ground supply pin.
Brown CTS+ Input Clear to Send Control + (B), Input
Red TXD- Output Data – (A) Output
Orange TXD+ Output Data + (B) Output
Yellow RXD+ Input Data + (B) Input
Green RTS+ Output Request To Send Control + (B), Output
Blue RTS- Output Request To Send Control – (A), Output
White RXD- Input Data – (A) Input
Grey CTS- Input Clear to Send Control input – (A), Input

Question: which of the 4 wires do I connect to? My assumption is white, yellow, red and orange.
Thanks for any help!
Yes. TXD+/TXD-, RXD+/RXD-

I've not seen NMEA devices using CTS or RTS, so you can probably ignore these. It is possible that you will need to terminate one these to a + or - voltage.

Now, is TXD an input, or an output? RS232/422 is completely confusing on this subject, since you have DTE (Data Terminal Equipment) and DCE (Data Communication Equipment). Back in the old days, the DCE was your computer or terminal, and the DCE was your modem (remember those?) TXD means the signal transmitted from the DTE to the DCE. RXD means the signal transmitted from the DCE to the DTE.

In NMEA systems, the transmit/receive nomenclatures seem to be equally confusing. I usually look at the signals with a scope or meter, or just connect them and see what happens. If you swap +/- and TX/RX (four useful permutations), you're going to find the one that works (once you get the baud rates matched.)

I suppose this is one advantage of NMEA-2000!
__________________
Paul Elliott, S/V VALIS - Pacific Seacraft 44 #16 - Friday Harbor, WA
www.sailvalis.com
Paul Elliott is offline   Reply With Quote
Old 05-03-2013, 19:51   #11
GWB
Registered User

Join Date: Sep 2008
Location: Brookings, Oregon
Boat: Westsail 32
Posts: 296
Images: 1
Re: NMEA-0183 and RS-422 vs RS-232

Thank you Paul
__________________
GWB is offline   Reply With Quote
Old 07-03-2013, 18:05   #12
GWB
Registered User

Join Date: Sep 2008
Location: Brookings, Oregon
Boat: Westsail 32
Posts: 296
Images: 1
Re: NMEA-0183 and RS-422 vs RS-232

Paul, I'm going to need some more help. I tried all the permutations of the 4 wires and no joy. Any ideas on the CTS or RTS wiring?
Thanks for your help
__________________
GWB is offline   Reply With Quote
Old 23-06-2013, 14:53   #13
Moderator
 
Paul Elliott's Avatar

Cruisers Forum Supporter

Join Date: Sep 2006
Posts: 3,864
Images: 4
Re: NMEA-0183 and RS-422 vs RS-232

I just saw this. Any luck with your connections?
__________________
Paul Elliott, S/V VALIS - Pacific Seacraft 44 #16 - Friday Harbor, WA
www.sailvalis.com
Paul Elliott is offline   Reply With Quote
Old 23-06-2013, 17:50   #14
Nearly an old salt
 
goboatingnow's Avatar

Cruisers Forum Supporter

Join Date: Jun 2009
Posts: 13,649
Images: 3
Re: NMEA-0183 and RS-422 vs RS-232

Receive + to A +
Receive - to A-

Transmit + to B+
Transmit - to B-

connect CTS - & + together see note below

Your receiving device must be set to no hardware handshake., 4800 baud

What RS422 receiver are you using

dave
__________________
Check out my new blog on smart boat technology, networking and gadgets for the connected sailor! - http://smartboats.tumblr.com
goboatingnow is offline   Reply With Quote
Old 23-06-2013, 18:00   #15
Registered User

Join Date: Jul 2011
Location: Brooklyn
Boat: Catalina 30
Posts: 60
Re: NMEA-0183 and RS-422 vs RS-232

I really love digging into wiring like this, but I am also suspicious of the reliability of anything in a noisy electrical environment with salt air all around. In my case I was hoping to wire up a BR-355 GPS Puck to my VHF, but I would need 5 volts to power it, thus a voltage regulator, maybe a clamp circuit to protect the semiconductors (or I am being paranoid). In the end I am opting to use a handheld GPS+VHF and eventually switch to a Standard Horizon GX1700 VHF with GPS Built in. I feel as though it's a cop out, but for $200 bucks or so, the install will be neater and probably more reliable.

I only regret the limits on clearing out the MMSI number so I could sell the unit I have.
__________________

__________________
carlspackler is offline   Reply With Quote
Reply

Tags
nmea, nmea 0183, rs232, rs422

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NMEA <-> RS232 Doghouse Marine Electronics 24 21-01-2008 09:09
NMEA interface for Ritchie Magtronic fluxgate compass PaulSommers Marine Electronics 2 16-01-2008 04:23
Pearson 419, 422 & 424 Ishmael Monohull Sailboats 3 03-09-2007 09:46
Raymarine RL80C with NMEA GPS receiver bobs Marine Electronics 10 24-07-2007 11:09
The NMEA Mystery Sandero Marine Electronics 18 21-06-2006 20:20



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 05:50.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.