4
\$\begingroup\$

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.

| improve this question | | | | |
\$\endgroup\$
  • 4
    \$\begingroup\$ use RS-422 instead of RS-232 \$\endgroup\$ – old_timer Mar 30 '16 at 23:59
  • \$\begingroup\$ 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) \$\endgroup\$ – CoderTao Mar 31 '16 at 1:41
  • \$\begingroup\$ For long distances use rs485- differential, twisted pair communication lines \$\endgroup\$ – seetharaman Mar 31 '16 at 5:26
  • \$\begingroup\$ No twisted pair cable \$\endgroup\$ – user3602066 Mar 31 '16 at 8:08
  • \$\begingroup\$ See electronics.stackexchange.com/questions/187633/… 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. \$\endgroup\$ – GuitarPicker Apr 1 '16 at 3:10
13
\$\begingroup\$

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.

| improve this answer | | | | |
\$\endgroup\$
  • 1
    \$\begingroup\$ 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. \$\endgroup\$ – Asmyldof Mar 31 '16 at 0:32
  • \$\begingroup\$ Can you please let me know why the signal is noisy on the receiver end? \$\endgroup\$ – user3602066 Mar 31 '16 at 8:07
  • 1
    \$\begingroup\$ @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. \$\endgroup\$ – pipe Mar 31 '16 at 10:06
  • \$\begingroup\$ @user3602066 I updated my answer with some more information about it. \$\endgroup\$ – pipe Apr 1 '16 at 1:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.