Long serial cable

I need a longish serial cable to get from the workshop computer to the bench. Say 4 mtr. I already have the D connectors and wonder what would be the most suitable cable I have 'in stock' Only need the send and return - no 5v. Would balanced mic cable do - or two co-ax? I do have some decent video co-ax but two would be a bit big to fit the D connector shells.

Reply to
Dave Plowman (News)
Loading thread data ...

Mic cable - I've used star quad for countless serial cables, both RS232 and RS422.

Reply to
Peter Watson

4m is not long for an RS232 style serial cable run, and almost anything will do, although it gets more critical at higher bit rates.

Conventionally, untwisted screened cable is used, although there are variants which use balanced drivers for the signals, which require a twisted pair per signal.

Not sure what you mean by "return". Do you mean send and receive, or just unidirectional send and the ground return wire?

Reply to
Andrew Gabriel

At that length you really need signal return and *ground* at least.

You wont get a huge speed over 4 meters. I would use cat 5 for fixed wiring, or maybe even lightweight mains..

Bear in mind you will have to use either no flow control or Xon/Xoff if you only use three wires.

5, to get DTR/DSR, is better.
Reply to
The Natural Philosopher

The device I need to connect to says 115200 baud.

This is definitely unbalanced.

No - TX and RX and obviously ground. Those are the only connections on the device DB9.

Reply to
Dave Plowman (News)

RS232 serial is +/- 12v. USB is 5v... But you refer to D type connectors so I assume you mean RS232. B-)

A bit of twin screened mib cable will work. Serial cables are normally only x wires with an overall screen. No twisted pairs or anything the signals are not balanced and quite big.

Reply to
Dave Liquorice

I think that is the same speed as the old Mac Apple Talk system. I used to run that all over the house in 3 pair internal telephone wire with other way connected to BT and 0/12v dc. I ran it unbalanced between 0v and one space wire. Never observed any problems with many 10s of metres.

Bob

Reply to
Bob Minchin

OK, that's quite high, but shouldn't be a problem. I've run 921600 baud at 2m with correct cable without any data corruption, and it may have gone further (didn't test). All modern UARTs do 8 or 16 times over-sampling anyway, which means they cope with much worse signals than the original RS232 specs allowed for. If you are running an error detecting/correcting protocol over the link, you can get away with some corruption. If not, then you need to consider the effect of any corruption.

You'll need a 3-core (or more) screened cable, and I would avoid twisted.

I used to buy quite a lot of made-up serial leads from CPC and they were cheaper than you could buy the connectors alone, but their range seems to have dropped to just two products now, and not long enough for you.

OK. Although DB9 combines signal ground and screen ground, I would not use the screen as the signal ground in the cable, hence 3-core plus screen, and connect the screen at just one end.

Presumably the device uses xon/xoff flow control, or guarantees to be able to receive at full rate and doesn't send large blocks of data.

Reply to
Andrew Gabriel

In message , "Dave Plowman (News)" writes

Almost whatever you have to hand, as long as it's shielded. 4 metres is trivial if we're talking about RS-232.

IIRC the max length for RS-232 by the specs is about 15 metres.

Obviously, the speed is fairly important and lower speeds will work better over longer cables but I've used 115k at ten metres and 19.2 over some silly distances (around 35 metres for a terminal) without noticeable problems. Just pay attention to the shield and ground.

Reply to
Clint Sharp

Pretty much anything will work at that distance - even at 115K.

If you are wiring 9 way connectors then just connect:

9w 9w

2 3

3 2 5 5

For 25 way:

9w 9w

2 3

3 2 7 7

and for mixed sizes:

9w 25w

2 2 * note no twist required on mixed connectors

3 3 5 7
Reply to
John Rumm

No, you use 5 wires with CTS/RTS as well. These control handshaking at the character-by-character level, to avoid over-running buffers.

DSR/DTR are only needed if you can afford 7 wire, or if you really need to deal with the "device ready" issue for batch operations.

Although you could potentially use XON/XOFF to replace either or both of these, they're an unreliably way to replace CTS/RTS. If a character buffer is full, the risk is that the XOFF is lost too. Besides which, many modern devices don't do XON/XOFF.

Running in 3 wire splurge mode (no handshaking) works for slow send speeds and fast receivers. Typically these days it works so long as your tiny processor is sending data to your PC and the commands your PC sends to the tiny processor are short. If you're doing large downloads from the PC (big G code programs, display bitmaps, anything over 1k long), then you can still get handshaking problems.

Electrically, RS232 is fussiest and 422 et al have wider margins. Even so it's an electrically robust protocol and rarely a problem. If you don't have multi-core, then do it with twisted pair phone cable but put one signal and a ground down each pair. The data rates are low enough that there's little coupling between the legs of the pair anyway.

Reply to
Andy Dingley

It's for the serial port on a PC. According to the blurb with the device I'm connecting to it pins 1&9 have 5 volts DC on them to power things like Bluetooth.

Reply to
Dave Plowman (News)

This setup uses a 'pass through' - not 'null modem'.

Reply to
Dave Plowman (News)

RS232 DB9 pin 1 is Carrier Detect and pin 9 Ring Indicator so this port is non-standard. I assume this non-standard port is on the bit of kit you want to connect to the PC and it just has the abilty to power a Bluetooth device if required.

Reply to
Dave Liquorice

There are a number of serial port boards which can be jumpered to provide 5V or 12V outputs for powering the attached device. I have one in my collection upstairs somewhere. (At one time, I did quite a bit of work on the Solaris serial port driver, which necessitated getting a wide selection of different boards to test it against.) The other way to do this is to force DTR and RTS to known states, and then use them to power a low-power device, and I've done this a few times. At least Dave's device seems to be behaving as a DCE and the power is provided on what are normally DCE outputs, so it should be benign if plugged into a DTE with a 1-to-1 cable.

Reply to
Andrew Gabriel

Muy bad. Been too long. You are of course completely correct.

Reply to
The Natural Philosopher

Used to run 19.2k around cat 5 to glass terminals - serious distances, but couldn't get higher, so I assumed that the OP wouldn't;'t be able to go much above 100k, which is what everyone else seems to say.

Reply to
The Natural Philosopher

Yep so have I and got confused when said device doesn't work 'cause the associated software wasn't controling the lines as expected...

Reply to
Dave Liquorice

The maximum specification cable length is 50 feet, or the cable length equal to a capacitance of 2500 pF. It is the puffage rather than the length which is critical so using a cable with low capacitance allows you to span longer distances without going beyond the limitations of the standard. Using CAT-5 cable with a typical capacitance of 17 pF/ft, the maximum allowed cable length is about 50m.

Somewhere in the garage I've some line drivers that will allow you to go to about a km if you want.

Reply to
Peter Parry

Many UARTs won't run more than 115K, so that is a fair bet ;-)

Reply to
John Rumm

HomeOwnersHub 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.