Cable
&
Communication
 Networks
Index - Cables & Communication
RS232
Index- Serial 
 Long LinesPrevious Page

RS232C set a cable lengths of 15 metres - (50 feet) and this is still often given as the maximum. This limited distance was sufficient to interconnect equipment such as computers, modems and terminals in the mainframe and minicomputer installations of the time.

Demand for computer power proved much greater than was forseen. As well as having a main computer centre most organisations aquired mini-computer and server clusters distributed throughout the premises, and visual display terminals or PCs on most desks. In the 1970s and early 80s most organisations aquired their first networks -often in the form of RS232 cabling feeding signals from terminals to mainframes.

Until the mid 1980s RS232 was effectively the only affordable "open" network standard. Ethernet gave much higher speeds over longer cables but Ethernet adapters were expensive. RS232 proved to be very adaptable in providing local area network coverage.

RS232 is still quite widely used, particularly in engineering environments. RS232 is fast enough for alpha-numeric data aquisition. Green-screen terminals are more robust than PCs and less troublesome.

So if you do need a new RS232 line - bear in mind the various solutions to line length.

Bit Rate and Line Length
 
RS232-F suggests a relationship between cable length and data rate that technicians have followed as a rule of thumb for years.

On a short cable the graph suggests a maximum data rate somewhat under 100,000 baud. 

This may not be true maximum for a machine - with one of the FIFO UARTS more may be achieved.

Cables can be exceed 2 kilometres in length and should handle data at about 1200 baud.
 
 

There are not many sites where a cable more than a kilometer long can be used without using the public highway, so equipment for very long lines has mainly been of interest to nationalised telecommunications companies. The liberalisation of telecommunications markets should create more diversity. If a long line is needed, however, it will nearly always make more sense to use Ethernet on fiber rather than RS232 on copper. Modems and line drivers are an old solution - but they still have their uses.

Line DriversThe proper solution for lines where the bit rate required is higher than the length suggests is to use to use special line drivers. Line driver design varies, but recent devices will typically carry a signal to 1000 metres or more.
 
Older line drivers tend to be simplified modems - they have the frequency modulation circuits but not the line interface and support circuitry needed to make modems work over the public switched telephone network. These devices were usually implemented as mains-powered metal boxes looking rather like a typical modem.
More recent designs of line driver more typically convert RS232's single ended drive into a differential signal - RS485 for instance. The conversion is not always explicitly stated on the package because a "converter" might be expected to do other things beyond translating voltage levels.

The line driver device is typically built into a small plastic enclosure looking like an enlarged connector and using a power-brick adapter to connect to the mains. These devices can be low cost, but sometimes only operate in one direction - they are intended to support printers rather than terminals.

Because there is no strict standard long-line drivers normally have to be bought as a pair.

ModemsIf the distance to be covered extends beyond a kilometer one solution may be to use a modem. The growth in Internet use has made modems so commonplace that although they are more complicated they may be less costly than line-drivers.

In principle a modem will drive a signal at up to 32,000 bits per second 5 to 10 kilometres before a repeater is needed. In the public telephone network this is sufficient to reach the subscriber line interface in the exchange - and from there to the global network.

In practice using a modem on a "private wire" may be rather more complicated than using it on a phone wire. Recent modems are intended for connection to ordinary telephone lines, rather than back to back on a private wire. Modem internal circuits may need to see battery voltage. If there really is a need for this sort of connection the chances are that there is aslo a need for phone service running alongside - so the modems can connect over the PABX private phone cable.

Recent modems are low cost but the internal workings are very sophisticated. There are low level commands supported by driver programs or a ROM built into the modem, then there are the "Hayes AT" commands used for configuring the device. On top of this most devices now ship with a collection of programs intended to ease connection to the Internet; these features will get in the way of a simple task like acting as a long line driver.

Brute Force & IgnoranceLine drivers and modems used to cost a significant amount - several hundred pounds each - adding substantially to the cost of installing a terminal. To avoid this cost installers simply installed a cable - if it worked all well and good. If it didn't stage 2 was to reduce the baudrate - dropping from 9,600 baud down to 1,200 in stages - very often this succeeeded. 

As a final step try sticking resistors (1 Kohm) between the data lines and ground. This extra loading may act as partial terminators and counter line capacitance. A more intellectual approach might be to look in detail at the circuitry at either end. Very often equipment designers left the slew-rate controls off 1488 /1489 driver receiver pairs.
 


 
 

Noise & Length Limits

RS232s line length and speed limitations arise directly from its simplistic design.
Bit-stream codingData and handshake information are directly encoded as a bit-stream using large bipolar voltage swings measured with respect to a common ground. However recievers often lack the hysterisis or error reporting capability to make any use of this voltage margin. The bit stream coding means the signal is unbalanced and leads to voltage drift, there is no redundancy in the signal that can be used to discover and discount noise and insufficient clock synchronisation information
Power sum cross talkThe cable encloses two (sometimes more) data signals and several handshakes. All of these signals are changing state - the data and any clock signals rapidly, the handshakes more slowly but just as abruptly. Each signal is capable of inducing cross talk in others nearby so the power-sum crosstalk in the cable is a complex mixture of all sort of events.
No line isolationIn RS232 installations there is usually no galvanic isolation between circuit and cable. Ethernet transcievers use baluns for isolation but it's designers know precisely what frequency range to expect. RS232 uses such a range of baud-rates that simple inductive isolating components like baluns cannot be used. Cables, transcievers, digital circuitry and power supplies are all in electrical contact and all able to propagate noise. If there is any difference in the ground potential at either end of the cable receive circuits will have difficulty distinguishing signal from noise.

Current loop and some very careful RS232 designs use opto-isolators to isolate cicuit elements but this adds significantly to the expense.

No attention to impedanceAlmost no attention is paid to impedance in most RS232 designs. Cables usually do have a stated capacitance figure, but there is no characteristic impedance for them or for the connectors. Since the signal is a square-wave bit stream at a baud rate that can vary over a wide range it is difficult to determine the impedance of components. A broad guess is that for signals in the 10,000 bit per second range typical cable impedance is probably around 500 -1000 Ohms.
No pairing and inadequate return pathsCable conductors are not usually paired; instead there is a single ground. As the state of the handshake signals changes they will alter the exact value of ground on this single wire - which is usually the same diameter and resistance as any of the signal wires. At higher frequencies when the inductance of the single ground will be particularly noticeable the main ground path is probably via the shield - or if it is not connected at both ends - partly via the power circuit ground.
Thin stranded wiresCable conductors are often made up of very thin stranded wire - otherwise the 8 or 25 core cable is rather thick and heavy. Stranded wire tends to have a rather indeterminate impedance and a high attenuation for high frequency signals - the lost power becomes cross talk in surrounding cables.

The thin conductors present a higher than expected resistance to high frequency signals because of the skin effect. Thicker conductors would work better.

Pair separationLayout of the pins in the plug makes signal paring impossible even if a twisted-pair cable is used - and each connector creates an arbitrary separation between signal and ground.
Arbitrary TerminationNo explicit terminating resistor is present on either end of most RS232 cables. Transmitters may have a 300 Ohm resistor in series and receivers have a 3-7K Ohm input impedance. Some circuits do have capacitor-resistor-inductor networks for slew-rate control but given the surrounding circuitry it would be difficult for a field engineer to work out what the impact of this should be. 

High impedances reflect a signal back in its original form, low impedances reflect it inverted. RS232 is bipolar, so the alternating voltages give alternating reflections. In some circumstances a cable which normally works will suffer a set of noise signals that causes breakdown. 

Poorly defined noise marginsThe standard appears to have a 6 volt forbidden zone between the valid mark and space states. Unfortunately most transciever circuitry does not do much to distinguish forbidden from valid states. More recent designs of transciever chip do improve matters by having a high level of hysterisis - that is, once they have entered a valid state it is relatively difficult for small noise signals to change them.

Overall, the design of RS232 is just about a definitive list of ways to create transmission errors, particularly from crosstalk.

Impedance mismatches will also cause severe signal reflections within the cable. On the relatively short cables at the comparatively low data rates used by RS232 these will often die away in a few microseconds before they have a direct impact.

Higher baud-rates will create more noise as signals attempt to leave their ill-matched cables, and at higher baud rates momentary changes due to cross talk and reflections are more likely to be interpreted as valid bits by the receiver circuitry inside the UART.
 

The traditional approach to curing problems with RS232 has been to improve cable shielding. Shielding has some merit - in a large bundle of cable shielding will diminish cross talk between cables. Shielding will also eliminate electrical noise such as mains hum and radio-frequency interference that can cause data errors. By comparrison with the long list of problems given above it might be suggested that shielding offers few benefits.
 

Earth Loops & Differences

It is not uncommon to find quite different electrical earth potentials between two buildings. Buildings can use different earth techniques, and it is quite possible to find more than 10 volts difference between neighbouring offices. Furthermore the earth potentials may change as the electrical loads in the buildings change, so problems can be intermittent.

If an RS232 cable joins two buildings at different earth voltages then the ground will pass a current. It is quite possible for the current to be substantial. Earth voltages between two buildings could be sufficiently different for electric shocks to be fatal, and the currents drawn could be large enough to set fire to cables. If there is reason to suspect an earth problem work carefully and measure with a meter. (An old technique for working with high voltages is to keep one hand in your pocket - shocks that pass through the arms can stop the heart.)

An RS232 line running between two buildings with different earth voltages will not work properly once the difference in ground potential exceeds the 6-volt margin between "1" and "0". Furthermore if the potential is 5 volts then there is little margin for electrical noise.

--
If the "protective ground" is treated as just another circuit, rather than being connected to the shield, then the same cable can also be used as a parallel printer extension. (Arguably, this is how PG should be treated - it is an electrical connection not a shield. PG needs complete continuity. The shield should not be connected at one end to eliminate earth loops.)