PDA

View Full Version : RS232 long distance cable termnation



munromh
- 14th April 2013, 14:33
I have a 16F886 that I'd like to send 9600 baud RS232 half duplex data to a monitoring laptop setup with a terminal program. The distance is 1000'. I made a test setup with 1000' of un-terminated unshielded 26awg twisted pair wire and it works just fine. I took a look at the signal with a scope and it looks pretty good. I think that proper termination might help to clean it up just a bit but I'm having a hard time determining what the proper termination should be. A 100 ohm load on the receiving end? Empirical testing? I've searched the forum and the web but have not come up with a definitive answer. Can someone point me in the direction of a useful reference.

I should note that I plan to go RS485 but at this point I'd like to work with what I have.

Thanks,
Mark

At output of 16F886:

https://dl.dropboxusercontent.com/u/4046007/Output.bmp

At input to test terminal:

https://dl.dropboxusercontent.com/u/4046007/terminal.bmp

HenrikOlsson
- 14th April 2013, 15:59
Hi,
Ideally you should terminate it with the same value as the characterestic impedence of the cable you're using.
I see the voltage level is only 5V, does that mean you're driving the cable with the PIC output directly? If so you need to watch out so you don't overload the output circuitry of the PIC. (100ohm across 5V is 50mA which the PIC isn't specified to source). A proper line driver is probably a good idea but then you might as well go RS485 and be done with it.

Why not try throwing a 1k across the receiving end and see what it looks like?

/Henrik.

munromh
- 14th April 2013, 17:25
Yes you are correct I am driving it directly from the PIC output pin. I was familiar with terminating with the characteristic impedance of the cable for RS485 (differential) but I wasn't sure if that was also the case for RS232 (single ended). I hadn't seen a reference to that. I guess empirical testing is in order.

You're right the 100 ohm termination would overload the output pin, I hadn't really considered the over all circuit loads yet and was just throwing numbers down, my bad. I appreciate the reminder though.

RS485 is in the future but I'm just trying to add this to a board I've already made. I'll redesign the board with an RS-485 chip, but until then ......

Mark

HenrikOlsson
- 14th April 2013, 17:48
One thing you could try is "AC-termination". A 100ohm (or 120 or 150 or whatever) in series with a 47nF capacitor from the signal wire to GND.
That way it's basically terminated during the transitions but won't pull a lot of current while idle.

Fidelis
- 16th April 2013, 20:05
Hi, At 100 meters, you are still good to go, should you choose to exceed that, you must go for RS-485.

Cheers.