[comp.sys.ibm.pc.hardware] Serial-port connections

bobmon@iuvax.cs.indiana.edu (RAMontante) (08/13/90)

"How long is a serial port?" Or, more accurately...my cousin has a dumb
device with a serial port (connected to some relays), and he'd like to
control the device remotely from his P.C.  My question is, how far can
the remote device be from the the P.C., and how should it be connected?
Would a "null modem" cable be reliable over a 200-foot span?  If not,
what's the cheapest connection?  We thought of two modems and some phone
wire; would the phone wire need to be powered then?  (300-baud would be
good enough; it's not a high-speed device out there.)

Thanks in advance for any suggestions.

robertb@cs.washington.edu (Robert Bedichek) (08/13/90)

In article <54123@iuvax.cs.indiana.edu> bobmon@iuvax.cs.indiana.edu (RAMontante) writes:
>"How long is a serial port?" Or, more accurately...my cousin has a dumb
>device with a serial port (connected to some relays), and he'd like to
>control the device remotely from his P.C.  My question is, how far can
>the remote device be from the the P.C., and how should it be connected?
>Would a "null modem" cable be reliable over a 200-foot span?  If not,
>what's the cheapest connection?  We thought of two modems and some phone
>wire; would the phone wire need to be powered then?  (300-baud would be
>good enough; it's not a high-speed device out there.)
>
>Thanks in advance for any suggestions.

The RS-232 spec says the wires can't be longer than 50 feet and the
baud can't be greater than 9600.  Lots of people exceed these numbers
without problem.  You can probably go 200 feet w/o a problem.

Try it and see.  If you are still concerned, check the signal quality
with a scope at both ends.  If the peak-to-peak is over 10V, its fine.
If it is less, it might not be fine.

The chips used to drive RS-232 vary, some are capable of more drive
than others.

Has anyone tried connecting two modems w/o a telephone circuit?  The
modems might not work w/o the telco's line impedance.  I don't know.

You can reliably go thousands of feet with a current loop interface.
It is easy to go from RS-232 to current loop if you can wire up an
optoisolator, a transistor or two, and the connectors and power
supply.

	Rob

darcy@druid.uucp (D'Arcy J.M. Cain) (08/13/90)

In article <54123@iuvax.cs.indiana.edu> bobmon@iuvax.cs.indiana.edu (RAMontante) writes:
>"How long is a serial port?" Or, more accurately...my cousin has a dumb
>device with a serial port (connected to some relays), and he'd like to
>control the device remotely from his P.C.  My question is, how far can
>the remote device be from the the P.C., and how should it be connected?
>Would a "null modem" cable be reliable over a 200-foot span?  If not,
>what's the cheapest connection?  We thought of two modems and some phone
>wire; would the phone wire need to be powered then?  (300-baud would be
>good enough; it's not a high-speed device out there.)

The RS-232-C standard specifies that a 50' cable should be capable of handling
up to 19200 BPS (loosly meaning 19200 baud) but most hardware today can handle
longer distances.  In general, as you lower the baud rate, the maximum safe
length increases.  Do some testing to find a baud rate that works reliably
then cut that in half for a margin of safety.  I am sure that you will be
able to do better than 300 baud.

-- 
D'Arcy J.M. Cain (darcy@druid)     |
D'Arcy Cain Consulting             |   MS-DOS:  The Andrew Dice Clay
West Hill, Ontario, Canada         |   of operating systems.
+ 416 281 6094                     |

robin@uhccux.uhcc.Hawaii.Edu (Robin Amano) (08/14/90)

In article <54123@iuvax.cs.indiana.edu> bobmon@iuvax.cs.indiana.edu (RAMontante) writes:
>"How long is a serial port?" Or, more accurately...my cousin has a dumb
>device with a serial port (connected to some relays), and he'd like to
>control the device remotely from his P.C.  My question is, how far can
>the remote device be from the the P.C., and how should it be connected?
>Would a "null modem" cable be reliable over a 200-foot span?  If not,
>what's the cheapest connection?  We thought of two modems and some phone
>wire; would the phone wire need to be powered then?  (300-baud would be
>good enough; it's not a high-speed device out there.)

RS232C standard limits cable lengths to 50 feet.  But, that's just the 
required standard.  Here at UH and at a private computer firm I used to 
work at we exceeded that length by far.  Infact, if you don't mind 300
baud you can easily run a 200-foot length, actually you might still be 
able to run at 9600 baud depending on your terminal.  We have a few lines
here at UH over 500 feet, some use line drivers and run at 9600 and some
are satisfied with nothing and run at 1200 baud - and these are non-shielded
solid conductor telephone cable.  If I were you I would get shielded cable
and try it without any modem or line driver.  I think you'll probably be 
able to go 9600 or 2400 at the least, but since you don't mind a slow 300
I can almost guarantee you that it'll work!  Although nothing is ever
guaranteed in this world.

phys169@canterbury.ac.nz (08/21/90)

In article <54123@iuvax.cs.indiana.edu> bobmon@iuvax.cs.indiana.edu (RAMontante) writes:
> how far can the remote device be from the the P.C., 
I've managed 600metres at 4800 baud. It depends a lot on noise sources, baud
rate, and whether you use currenht loop drivers.

> and how should it be connected?
You may manage with a simple null-modem cable, but try it thoroughly first
(include parity error detection at both ends, sends lots of data, try it for
several days, e.g. I had an arc-welding machine nearby that was only used
occassionally, but when it was, there were problems. Also check the voltage
levels of the earth lines of both machines - check for mains hum ( a few volts
can cause errors, I had about 50v difference in one case, that zapped interface
chips!).
 
Better still, use 20mA or 40mA current loop circuits with opto-couplers. These
used to be popular on terminals and minicomputers; the interface to RS232 is
easy (consisting od a few cheapo resistors, protective diodes, batteries, and
opto-couplers - also called opto-isolators). You can reliably go over 1000
yards with 20mA loops, since it provides a better signal/noise ratio and avoids
mains hum in "earth loops" between equipment. But, for 200ft, definately try
plain RS232 first.

Mark Aitchison, Physics, University of Canterbury, New Zealand.