An RS232 cable question or two

Greetings RS232 Gurus, I have a couple machine tools that connect to a computer through RS232. I now need to run a longer cable for one of the machines. Looking online it seems like the biggest limiting factor is the capacitance of the cable. I have a reel of cable with three twisted pairs and no shield that's about 300 feet long. Measuring the capacitance with my multimeter I find the capacitance is less than

2300pf. This is fine as near as I can tell because I only need to run about 60 feet and the baud rate I need is 19600. I don't know how accurate the meter is except for what the documentation says and it seems like the measurement is accurate enough. So I think the baud rate I want to use will be OK. But I have two questions. First, I measured the capacitance of each pair of wires by stripping the ends and connecting the meter to these ends without touching with my fingers. Each pair was pretty close to the same measurement. Is this the proper way to test the capacitance of the cable? Second, there is no shield in the cable. Since I only need one pair of the three pairs in the cable can I just use the four remaining wires connected together at one end as a shield since all the wires are twisted together? Or should I just go out and buy a cable with a shield and put this reel back into storage with all my other wire? Thanks, Eric
Reply to
etpm
Loading thread data ...

I'm just a hobbyist, not an expert. Others can and should chip in. But I have the RS-232 spec handy and figured I'd give it a shot.

I can't answer about how good your capacitance measurement is. Probably should be done with an LCR meter set to 10kHz and 100kHz. Good twisted pair runs 15pF/ft or less... but cable for RS-232 would be roughly 40pF-50pF/ft. Your 300' of cable measurement comes out at 7.7pF/ft. Which doesn't seem likely.

RS-232D specifies at most 2500pF for data rates up to 9600 and receiver impedance between 3k and 7k Ohm. The bit times for 9600 is 104us. So the tau=RC=7k*2500pF=17.5us. That's 6 tau per bit time. At 19200, the bit time is 52us, so the tau should be half of 17.5us or 8.75us and the capacitance should be 1250pF or less. If the cable were older RS-232 cable at

50pF/ft, that would limit you to 25'. But since you are using unshielded twisted pair, it's more likely to be closer to the 15pF/ft figure. Which gets you three times as far, or maybe 75' or so.

Also, actual testing of cables shows that the RS-232 driver and receiver pairs actually do better than the standard says. Receivers usually aren't 7k Ohm, for example, but less. So that's good.

Since these were based on worst case 7k ohm receivers... just guessing at this... I'd say you've got a good shot at it working okay at 60' and 19200. Of course, none of this takes into account noise and nearby machinery effects. Or ground loop currents, if any. But I'd say it's worth a shot and that you will probably be okay. (I know I've run more than 60' of non-twisted pair cable at 19200 without any trouble --- from a VAX 11/780 computer to consoles placed outside the raised floor, air-conditioned room.)

But maybe an expert will chip in and set me straight.

Jon

Reply to
Jon Kirwan

You could build your own driver with "pre-comp"... boost the leading edge dramatically. I've done that for ~1000' of cable. That's so old a design (pre-CAD) it's own paper (pre-CAD). I'll see if I can find it in my archives. ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     | 
| Analog Innovations, Inc.                         |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| Phoenix, Arizona  85048    Skype: Contacts Only  |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 
              
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

Really, obtain a couple of 422 or 485 to 232 converters and do that. Even if it works while you're looking at it*, the additional CMRR of 485/422 is vastly worth it, and the adapters don't have to cost much.

*the gremlins always come out when you are looking somewhere else.
--
Les Cargill
Reply to
Les Cargill

Thanks for the reply Jon. I was dubious about how accurately my meter was measuring the capacitance. But since the cable is pretty new, and I'm running less than 75 feet, I think I'll be OK. I do have the option of slowing down the data rate and programs now transfer between machines in less than 30 seconds usually so slowing the data rate down won't really slow me down much. Especially since I'm only transferring programs about once a day. Thanks, Eric

Reply to
etpm

schreef in bericht news: snipped-for-privacy@4ax.com...

Cables - all cables - have resistance, conductance, capacitance and inductance. Measuring the capacitance of long cables will be influenced by the inductance. The rate of that influence depends on the cable, its length and the measuring method. To get an indication of the capacitance you'd better take a shorter piece of cable. Let's say a 5ft and a 10ft piece. Inductance will have hardly influence as capacitance is (almost) always measured at relative low frequencies. If a double length measures double the capacitance you know you're on the right track.

Whether or not an unshielded cable will do, depends mainly on the disturbing EM-fields in the environment. Engines, switchers, triac controls and the like. I've used longer cat 5 cable in an office environment without problems. But I also had to provide a solution for the same length of cables - though at higher speed - in a factory hall. So if it's no problem to try, give it a try. Otherwise you'd better go for the RS232 to RS458 converters. (If even they fail, you can go for glassfibre. I once had to do for a very long cable.)

petrus bitbyter

Reply to
petrus bitbyter

I don't think 60 feet at 19600 will be too much problem.

The real issue in machine shops is stray (big) voltages between local "grounds". I've seen no end of fried interface chips, and worse, in industrial,environments. You need galvanic isolation.

--
"For a successful technology, reality must take precedence  
over public relations, for nature cannot be fooled." 
                                       (Richard Feynman)
Reply to
Fred Abse

Try it! I've run RS232 over a city block at 9600.

--

John Larkin                  Highland Technology Inc 
www.highlandtechnology.com   jlarkin at highlandtechnology dot com    

Precision electronic instrumentation 
Picosecond-resolution Digital Delay and Pulse generators 
Custom timing and laser controllers 
Photonics and fiberoptic TTL data links 
VME  analog, thermocouple, LVDT, synchro, tachometer 
Multichannel arbitrary waveform generators
Reply to
John Larkin

I've done similar without any problem.

But I also had some customer leading a cable along a gutter for maybe 25m happily paying the bill 4 or 5 times a year when his equipment was blown and had to be replaced. Relative cheap office equipment but nevertheless. He kept saying it was only temporarily and he was right off course. Everything in this life is temporarily isn't it? Though this time it took over 2 years if memory serves.

On another location a double shielded ground cable of about 100m did 9600 RS458 very well until the next thunderstorm. Eventually I used glass fiber to solve the problem.

petrus bitbyter

Reply to
petrus bitbyter

[60 feet at 19+ kbaud]

In a machine-shop environment, it might be better to use a differential protocol for long cables. One could consider Ethernet twisted-pair cable, and a little Ethernet/serial converter near the machine tool. It's probably going to be useful to have Ethernet wires later, anyhow.

Reply to
whit3rd

the problem with rs-232 is isn't not even a real standard. If it works with 6 foot cables, great, and most stuff does.

For long distances, using fiber to serial converters works great. It's not cheap though. It does eliminate grouding problems and noise issues though.

Reply to
Cydrome Leader

It certainly is a standard, or if you're a pedant, a series of standards. It's defined by the EIA (and probably a dozen others). It works with cables a *lot* longer than 6', but there is a length-data rate tradeoff.

Where is fiber in the RS-232 standards? RS422 or RS485 makes a lot more sense than fiber, here, but RS-232 should work fine.

Reply to
krw

When I designed the very first 1488/1489 chips in the mid-60's there WAS a standard. Now almost anything that switches between two levels gets called RS-232. ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     | 
| Analog Innovations, Inc.                         |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| Phoenix, Arizona  85048    Skype: Contacts Only  |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 
              
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

--
There still is; it's now called: "TIA-232-F", but back then (1969) it 
was called:  EIA RS-232-C.
Reply to
John Fields

a series of old standards nobody really follows. Some of the worst offenders are those usb to serial dongles which struggle to work with anything.

notice they keyword "converter". Since you'd locate them just a few feet away from your equipment you mostly eliminate problems with cables and what kludged, random version of rs-232 somebody tried to implement in your devices.

The original poster mentioned machine tools, not a dumb terminal attached to a minicomputer in the other room. Complete electrical isolation may be a good thing to have in this case.

It's also likely some ebay optical converers could be cheaper than blown out serial ports in the long run too.

Reply to
Cydrome Leader

bingo.

I was fiddling with a BASIC stamp recently and there's some hack mode to fake serial output using just +5 and 0V. It will run a "rs-232" interface vacuum flourescent display with no errors, so far, but it's such a sketchy hack, like most serial stuff these days.

I'd like to see how the +5 to 0 serial plays with a classic terminal like an ADM5a or ADDS Regent 100.

Reply to
Cydrome Leader

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.