4

I am using a cable of approx 1600ft to enable communication between two computers using RS-232(pins 2,3 and 5). On checking the transmitted signal on the oscilloscope, i get the output as below (hex code:41H):

enter image description here

However, on oscilloscope at the receiver end, following is displayed: enter image description here

The connection does not involve any terminal resistances and when I checked the output by connecting the oscilloscope probe directly to the rs-232 pins, the output was as seen in the first image, however, on connecting it to the computer and then checking it on an oscilloscope, a noisy output as seen in second image was displayed.

Can someone please suggest on what should be the correct approach to enable communication using RS-232 for such long distance.

Also, the receiver computer does not show any output on transmitting any of the hex codes. The baud rate used was 300.

Thank you.

  • 4
    use RS-422 instead of RS-232 – old_timer Mar 30 '16 at 23:59
  • Can you add more info about the cable? (three conductor, no twisted pairs, 18 gauge per conductor, also contains a 120VAC circuit, that kind of info) – CoderTao Mar 31 '16 at 01:41
  • For long distances use rs485- differential, twisted pair communication lines – seetharaman Mar 31 '16 at 05:26
  • No twisted pair cable – user3602066 Mar 31 '16 at 08:08
  • See http://electronics.stackexchange.com/questions/187633/max-serial-cable-length for more discussion on this. Basically, the spec defines maximum cable capacitance to 2500 pF. There are line drivers/baluns/converters available for sending RS-232 signals over longer distances using other methods, such as CAT5 cabling. – GuitarPicker Apr 01 '16 at 03:10

1 Answers1

13

Can someone please suggest on what should be the correct approach to enable communication using RS-232 for such long distance.

No, because RS-232 was never designed to work over such distances. A long cable like that picks up a lot of noise and interference, like an antenna. Because RS-232 is single-ended, this noise and interference is impossible to distinguish from a real signal. Every(?) protocol designed for longer distances or faster speed will use differential signaling, which, roughly speaking, sends a mirrored copy of the data at the same time as the normal version. That way, the interference can be canceled out.

The closely related RS-422 and RS-485 will work far better, and it is easy to convert from RS-232 to RS-422/485 and then back to RS-232 on the other end. These standards were designed to run over the lengths of cable you want, but has the small drawback of requiring twice as many wires for the data. RS-485 can work in half-duplex mode, using the RS-232 RX/TX as one pair, if you don't have enough signal lines.

Numerous converters exist on eBay for 2 USD with free shipping, or, depending on your application, there are TTL<->RS-422/485 converters for microcontrollers.

pipe
  • 13,748
  • 5
  • 42
  • 72
  • 1
    Note, however, that the most common 422 drivers for use with uC's cannot bridge that large a gap with normal wire, as the current loop requires a large voltage swing to be possible across such a large complex drain. – Asmyldof Mar 31 '16 at 00:32
  • Can you please let me know why the signal is noisy on the receiver end? – user3602066 Mar 31 '16 at 08:07
  • 1
    @user3602066 Because a 1600 foot cable will pick up an immense amount of noise and crud. Simple as that really. That's why RS-232 can't be used, and the balanced versions are much more suitable for the purpose. – pipe Mar 31 '16 at 10:06