RS232-RS422 Differences and Details
RS-232 vs RS-422/485 main difference on a physical interface level is that
RS-232 uses 3 wires plus common ground: one wire for Tx, one wire for Rx. Both Tx and Rx are referenced to a common ground. In other words: RS-232 is voltage driven. In RS-232 both Tx and Rx are referenced to a common ground, with 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.
RS-422/485 uses 4 wires: a pair of wires wires for Tx (Tx+/Tx-) and a pair of wires for Rx (Rx+/Rx-). These pairs create two current 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.
Some Detaiis about RS-232 and RS-422
RS-232 and RS-422, similar data speed with different signal characteristics (line length different) both do 38400 bps for AIS.
RS-422(/485) is often referred as industrial because of its capability over longer distances.
RS-442 operates on higher voltage and has tw separate loops so is less sensitive, support cable greater distances (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.
RS-442 connected to an old RS-232 PC port can sometimes damage the port (too 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.
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:
1. Disconnect the device from the converter.
2. Connect pin 2 & 3 together at the converter (assuming a RS-232 DB-9 connector; in other words, short Tx with Rx)
3. Run a computer terminal program with the converter attached and connect to the (emulated) serial interface of the converter.
4. Set data transmission to NO FLOW CONTROL (i.e. no XON/XOFF, no RTS/CTS), any speed and parity/stop bits should do here.
5. Check that 'local echo' option of your terminal emulator is OFF,
4. Start typing.
5. If the typing is echoed back to the terminal, converter is transmitting/receiving and drivers are performing.
6. If doubled echo is seen it is also OK, it means that 'local echo' option was left on.
7. If no echo is seen, investigate on the PC side.
Now, after checking your converter,
1. Remove the short between pins 2&3 and connect data cable from your device to the converter.
2. Set data speed and parity to correct values.
3. Look at your terminal program again. Any incoming data present?
4. If yes, device is transmitting and link is working correctly. Time to configure nav software.
5. If not, investigate cable and device further.
Next problem are the RS232/USB converters especially their drivers for Windows...
You will know which RS you have on the device from the instruction manual of the device.
Once you are sure which you have, RS-232 and RS-422 you will need to get the proper serial converter to USB.
1. Install your RS-422-to-USB converter driver,
2. Open Device Manager (Windows) & expand the Ports to see your virtual port -- probably COM3 or COM4.
3. Click the Port Settings tab and set Bits per second to or 4800bps for GPS or 38,400bps.
4. Keep the default settings for the rest: 8-N-1-N.
5. Launch OpenCPN,
6. Open the configuration menu -> Connections
7. Add a Connection (your virtual port number).
8. Set the port to 4800 or 38,400.
9. Click the Show NMEA Debug Window
Hopefully you will see your AIS NMEA sentences streaming through.
In Windows all usb connections are recorded in a file, and when a USB device is removed, the drivers remain. You should always try to plug the USB device into the same port as before if at all possible. Label your USB Hub and Cables. If you have used USB a lot, with different devices, you may want to carefully clear out all the historic settings of usb in windows. There are several usb tools which will allow you to inspect this list and remove individual entries. Doing this (avoiding hd etc). Helped my computer's usb behavior. Label all usb cables and ports.
How to easily remove old USB device drivers:
This thread on CF may be useful.
How to Connect AIS to laptop
For Diagram of the pinout http://www.cruisersforum.com/forums/f134/how-can-i-connect-ais-to-my-lap...