Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 20-10-2015, 07:41   #16
Registered User

Join Date: Oct 2015
Posts: 1
Re: How can I connect AIS to my Laptop?

Like CarCode said, NMEA 0183 uses RS-422. RS-232 is fine for slower speed devices like GPS which runs at 4800 kbs but maxes out at 20k (19.2 kbs). AIS runs at 38,400 so you need an RS-422-to-USB connection for the higher speed. Install your RS-422-to-USB converter driver, open Device Manager (Windows), expand the Ports and you'll see your virtual port -- probably COM3 or COM4. Click the Port Settings tab and set Bits per second to 38,400. Keep the default settings for the rest: 8-N-1-N. Launch OpenCPN, open the configuration menu -> Connections and Add a Connection (your virtual port). Set the port to 38,400. Click the Show NMEA Debug Window and hopefully you will see your AIS NMEA sentences streaming through.
__________________

__________________
crowra is offline   Reply With Quote
Old 20-10-2015, 08:47   #17
Senior Cruiser

Cruisers Forum Supporter

Join Date: Aug 2009
Location: between the devil and the deep blue sea
Boat: a sailing boat
Posts: 17,314
Re: How can I connect AIS to my Laptop?

As noted above, first check if your signal OUT is rs232 or rs422. You will know this from your AIS hardware manual.

A RS232 converter will not get 422 signal to the laptop.

If your signal is rs422 (easy to tell by counting the wires as rs422 is a 4 wire against rs232 3 wire signal (gnd wire is common on rs233 for bothe in and out signal)).

Then just follow the converters pinout instructions and you are set.

PS If your AIS hardware has nmea out software switch, it must be ON for the unit to send out data. This part is software/hardware specific.

Cheers,
b.
__________________

__________________
barnakiel is offline   Reply With Quote
Old 20-10-2015, 08:52   #18
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 1,967
Re: How can I connect AIS to my Laptop?

crowra...
I do not agree to the distinction between RS-232 and RS-422. My opinion is that there are no differences in data speed capability between the two. 38400 bps is fine also on RS-232.
However is RS-422(/485) often referred to as industrial standard because its capability over longer distances. RS-442 operates on higher voltage (Also is the data port ground not connected to the signal +-) and thus less sensitive for disturbance, its said to support cable distances up to 100 meters. (RS-232: 0<>+12V | RS-422: -12V<>+12V)
Mixing of the two systems, e.g. RS-232 connected to RS-422, can perhaps work but it's not recommended, especially can RS-442 connected to an old RS-232 PC port sometimes damage the port (to high voltage).
RS-422(Rx) can sometimes read RS-232(Tx) if the circuit detects the lower voltage but certain messages will likely be missed.
Håkan
__________________
Hakan is offline   Reply With Quote
Old 20-10-2015, 08:59   #19
Senior Cruiser

Cruisers Forum Supporter

Join Date: Aug 2009
Location: between the devil and the deep blue sea
Boat: a sailing boat
Posts: 17,314
Re: How can I connect AIS to my Laptop?

Quote:
Originally Posted by crowra View Post
Like CarCode said, NMEA 0183 uses RS-422. RS-232 is fine for slower speed devices like GPS which runs at 4800 kbs but maxes out at 20k (19.2 kbs). AIS runs at 38,400 so you need an RS-422-to-USB connection for the higher speed. (...)
Correct when talking about a specific AIS device, but not as a general AIS/rs rule.

There are both 232 and 422 AIS devices on the market.

The limitation is not in the bauds limit but only in the length of the wires you can run with a specific rs standard before the signal gets garbled.

With longer runs (as may be the case with equipment meant for commercial applications that are spread over bigger areas and where there may be a lot of other electrical equipment around) you want rs422.

Long story short, some AIS devices are rs232, some are rs422.

b.
__________________
barnakiel is offline   Reply With Quote
Old 20-10-2015, 09:46   #20
mrm
Registered User

Join Date: Feb 2011
Location: Poland, EU
Boat: crew on Bavaria 38 Cruiser
Posts: 651
Re: How can I connect AIS to my Laptop?

Well, the RS-232 vs RS-422/485 main difference on a physical interface level is that RS-232 uses a single wire for Tx and a single wire for Rx, while the other two use pairs of wires.

In RS-232 Both Tx and Rx are referenced to a common ground. In other words: RS-232 is voltage driven.

RS-422/485 use a pair of wires wires for Tx (Tx+/Tx-) and a pair of wires for Rx (Rx+/Rx-). These pairs create in effect a current loop (actually two loops). In other words: RS-422/485 are current driven.

Voltage driven interfaces are cheaper (less wires) but more sensitive to noise, while current loops show high immunity to electro-magnetic interference and are preferred in industrial environments (well, *were* preferred, nowadays most new designs are optical fibre).

However, both RS-232 and RS-422 are capable of speeds well into Megabit/s range although it is rare to see them used at such speeds.

Now, with technology cleared up a bit, a little troubleshooting advice from a long term SysOp. The easy way to see if a problem is with the converter or with a device not sending data is:
- disconnect the device from the converter,
- connect pin 2 & 3 together at the converter (assuming a RS-232 DB-9 connector; iow: short Tx with Rx)
- run a terminal emulation program on the computer where the converter is attached and connect with the program to the (emulated) serial interface of the converter,
- set data transmission to NO FLOW CONTROL (i.e. no XON/XOFF, no RTS/CTS), any speed and parity/stop bits should do here,
- check that 'local echo' option of your terminal emulator is OFF,
- start typing.

If you see your typing echoed back to the terminal all is well, your converter is transmitting and receiving and its drivers are performing ok.
If doubled echo is seen it is also OK, it means that 'local echo' option was left on..
If no echo is seen, investigate on the PC side.

Now, after checking your converter, remove the short between pins 2&3 and connect data cable from your device to the converter. Set data speed and parity to correct values. Look at your terminal program again. Any incoming data present? If yes, device is transmitting and link is working correctly. Time to configure nav software. If not, investigate cable and device further.

Hope it helps someone.

Marius
__________________
mrm is offline   Reply With Quote
Old 20-10-2015, 11:10   #21
Registered User

Join Date: Jul 2010
Location: Monastir, Tunisia
Boat: Amel Sharki
Posts: 1,774
Re: How can I connect AIS to my Laptop?

Marius,
very well explained. Hopefully anyone will understand it now...

Next problem are the RS232/USB converters especially their drivers for Windows...

Gerhard
__________________
CarCode is offline   Reply With Quote
Old 21-10-2015, 06:27   #22
Senior Cruiser

Cruisers Forum Supporter

Join Date: Aug 2009
Location: between the devil and the deep blue sea
Boat: a sailing boat
Posts: 17,314
Re: How can I connect AIS to my Laptop?

Quote:
Originally Posted by mrm View Post

(...)

If yes, device is transmitting and link is working correctly.

(...)

Marius
If not, you may have a rs422 out on the device. Go get a 422 converter then. And you will know which rs you have on the device from the instruction manual of the device. Buy only after. They are not dirt cheap.

@Marius: good job M. PS 232 is two (not one) wire: the gnd of tx and rx is common. Thus we are talking about a 3 wire 232 vs. four wire 422. Agree?

Regards,
b.
__________________
barnakiel is offline   Reply With Quote
Old 21-10-2015, 06:36   #23
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,320
Re: How can I connect AIS to my Laptop?

We probably should have this valuable information in the manual, maybe under Supplementary Hardware | Official OpenCPN Homepage

Maybe titled "RS232-RS422 Differences and Details"?
__________________
rgleason is offline   Reply With Quote
Old 21-10-2015, 07:11   #24
Registered User

Join Date: Jul 2010
Location: Monastir, Tunisia
Boat: Amel Sharki
Posts: 1,774
Re: How can I connect AIS to my Laptop?

Quote:
Originally Posted by rgleason View Post
We probably should have this valuable information in the manual, maybe under Supplementary Hardware | Official OpenCPN Homepage

Maybe titled "RS232-RS422 Differences and Details"?
Better not as long as people don't know how to count the amount of wires...

Gerhard
__________________
CarCode is offline   Reply With Quote
Old 21-10-2015, 12:20   #25
Senior Cruiser

Cruisers Forum Supporter

Join Date: Aug 2009
Location: between the devil and the deep blue sea
Boat: a sailing boat
Posts: 17,314
Re: How can I connect AIS to my Laptop?

I think there is nothing wrong with people counting the wires. If only the manufacturers could clearly give us this vital piece of info in their specs! Wiring info in manuals varies from fine (Garmin, SH, Furuno, etc.) to horrible (Raymarine, Simrad, etc.) I am not sure why.

b.
__________________
barnakiel is offline   Reply With Quote
Old 21-10-2015, 17:16   #26
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,320
Re: How can I connect AIS to my Laptop?

I can volunteer to try to consolidate this in a page in the manual, provided you guys will review it for errors/omissions. --I only know RS232.
__________________
rgleason is offline   Reply With Quote
Old 23-10-2015, 02:39   #27
mrm
Registered User

Join Date: Feb 2011
Location: Poland, EU
Boat: crew on Bavaria 38 Cruiser
Posts: 651
Re: How can I connect AIS to my Laptop?

Quote:
Originally Posted by barnakiel View Post
@Marius: good job M. PS 232 is two (not one) wire: the gnd of tx and rx is common. Thus we are talking about a 3 wire 232 vs. four wire 422. Agree?
In the context of our topic (i.e. separate equipment connected by RS-232 cable) I absolutely agree. The third wire connects the 'grounds' and provides a common reference for voltages on Tx and Rx lines. That is what I meant when I wrote "In RS-232 both Tx and Rx are referenced to a common ground" but you are right that it is better to explicitly state that common GND is achieved by a third wire connecting equipment GNDs on both ends.

(In broader scope, I have seen setups where only two wires were used (Tx, Rx) and the GND reference was provided as a part of a common supply GND or common chassis. Not a good engineering practice and well beyond the scope of our topic.)

So in summary, yes, RS-232 is two data wires with voltages referenced to a third wire.

@rgleason: I think a manual page is a good initiative and I will try to help where I can.


Regards,
Marius
__________________
mrm is offline   Reply With Quote
Old 26-10-2015, 20:40   #28
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,320
Re: How can I connect AIS to my Laptop?

Please check out:
RS-232 and RS-422/485 Differences and Details | Official OpenCPN Homepage

Does RS-422 have a separate GND ground? Perhaps it should be mentioned too.
__________________
rgleason is offline   Reply With Quote
Old 27-10-2015, 09:38   #29
Senior Cruiser

Cruisers Forum Supporter

Join Date: Aug 2009
Location: between the devil and the deep blue sea
Boat: a sailing boat
Posts: 17,314
Re: How can I connect AIS to my Laptop?

Quote:
Originally Posted by rgleason View Post
Please check out:
RS-232 and RS-422/485 Differences and Details | Official OpenCPN Homepage

Does RS-422 have a separate GND ground? Perhaps it should be mentioned too.
It does. But it is irrelevant to the signal. Mind RS422 devices can be separated by hundreds of yards and they may as well have their own gnd each.

Also to the poster one post above: skip the chasis part - it is not EARTH, it is GROUND on the rs232. Keep the chasis out of the picture for clarity.

b.
__________________
barnakiel is offline   Reply With Quote
Old 30-10-2015, 04:27   #30
mrm
Registered User

Join Date: Feb 2011
Location: Poland, EU
Boat: crew on Bavaria 38 Cruiser
Posts: 651
Re: How can I connect AIS to my Laptop?

Quote:
Originally Posted by barnakiel View Post
It does. But it is irrelevant to the signal. Mind RS422 devices can be separated by hundreds of yards and they may as well have their own gnd each.

Also to the poster one post above: skip the chasis part - it is not EARTH, it is GROUND on the rs232. Keep the chasis out of the picture for clarity.

b.
Yes, and.. yes.

M.

@rgleason: to me it looks good, but I am not a native English speaker...
__________________

__________________
mrm is offline   Reply With Quote
Reply

Tags
ais, laptop

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
AIS Live Shipping Map - Has Anyone Found a Way To Connect This To Opencpn? charliehows OpenCPN 0 04-09-2012 16:03
How to connect AIS with Ethernet in Opencpn rakhesh Navigation 9 28-06-2012 11:02
VSPE to Connect AIS and NMEA Bus to One Serial PC Port Helmsmatt OpenCPN 12 15-08-2011 12:24
No GPS/AIS Connect with Betas ktcanuck OpenCPN 4 26-05-2011 03:52
Can You Get Radar & AIS Overlay on Laptop ? AIS Transceiver Recommendations ? lunasea.ds Marine Electronics 22 27-12-2010 14:06



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 23:55.


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.