Go Down

Topic: Serial communication distance (Read 20418 times) previous topic - next topic

magnethead794

I'm using a 12db antenna on the end of my bluesmirf RPSMA and get ~600ft of LoS range and 300 ft of non-LoS range to my cell phone. Adding extension cable will reduce gain, so I'd like to take the bluesmirf off the project box, and have it at the end of a ~10 ft cable.

Is this attainable for a 5 volt Serial connection, or am I barking up the wrong tree and Ohm's Law will take over?

What about a 20 ft cable?

pwillard

#1
Dec 13, 2011, 08:00 pm Last Edit: Dec 13, 2011, 08:08 pm by pwillard Reason: 1
Serial Communication at TTL signal levels (0 and 5V) is very distance limited.  At 10 Feet or more you are inviting spurious noise and strong ambient signals onto your communications path.  This is why the RS232 driver chips were invented.  

RS232 uses +/- ~12V level signalling with much in the way  of voltage margin for 1's and 0's

Adding RS232/RS485 drivers is what you want to pursue if going more than several feet.  MAX232 would be a good start.

Example: I've been able to run 4800 baud connections at 4500'.

zoomkat

Well, you could get some cat3 four conductor telephone wire and give it a try.
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

goofballtech

at work I have run rs232 150+ feet at 38400 baud.

115200 baud rs232 tends to drop out around 50 feet for me.

baud rate and the device you are ouputing frrom make a fair difference for ditances.

if you are looking for long distances 485 or 422 conversion is certainly the way to go as mentioned above.


magnethead794

15 ft is about the absolute max I would be planning to go. 20 would be too long for what I want to do.

magnethead794

#5
Dec 14, 2011, 10:38 am Last Edit: Dec 14, 2011, 11:17 am by magnethead794 Reason: 1
So I'm thinking to use a 5M Cat5 cable (cheap, easy to get) with the power/ground on one set of twisted pairs, and the Rx/Tx on another set of twisted pairs. Would this be okay without too much data degradation?

Would I want to leave the other 2 pairs open, or ground them all?

RJ45 breakout with mounting holes -> http://microcontrollershop.com/product_info.php?products_id=3463

I just realized I can use this inplace of a DB9 for the LCD connection as well- it has 7 data/power lines, and I have a switch that pulls an 8th line low. And it will look much cleaner.

pwillard

#6
Dec 14, 2011, 07:51 pm Last Edit: Dec 14, 2011, 07:54 pm by pwillard Reason: 1
No, wrapping TX and RX around each other  will accomplish the opposite of what twisted pair is designed to do.  You wrap a TX or RX signal with a wire at ground potential.

If done your way, at each END of the wire run,  TX is wrapped next to RX, soooo  the TX signal has the potential to BLEED into the RX signal at a point where TX is strongest and RX signal is weakest... Make sense?  Wrapping with ground signal helps tp provide some blockage of the stronger signal that wants to interfere.

magnethead794

So pair Rx and GND, GND and 5V, GND and GND, and Tx and GND?

Or pair 5V with a N/C wire?

magnethead794


zoomkat


Any Answer?


Sure, twisted pair wire may cause more trouble than help. Get 20' of four conductor telephone wire and give it a try using three of the conductors for tx/rx/gnd.
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

magnethead794



Any Answer?


Sure, twisted pair wire may cause more trouble than help. Get 20' of four conductor telephone wire and give it a try using three of the conductors for tx/rx/gnd.


Phone wire will plug into an RJ45 right? I just have to find the 4 conductor wire? (I'm assuming put Rx and Tx on the ends with ground in the middle?)

zoomkat

Quote
Phone wire will plug into an RJ45 right? I just have to find the 4 conductor wire? (I'm assuming put Rx and Tx on the ends with ground in the middle?)


The four conductor telephone wire is available most everywhere, Radio Shack, Lowes, Home depot, even at the DollarTree at times. The RJ45 connector has eight wire slots, so you put the wire ends in the slots you want to use and then crimp them. I use telephone wire to connect some of my computers to my router in a 10baseT configuration.
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

magnethead794

so instead of using the RJ-14 plug, cut it off and stick an RJ-45 on it?

MarkT

If your signal is relatively low bandwidth you can get away with longer distances - but the receiver circuitry needs a low-pass-filter (R+C) and schmidt-trigger to filter out the high speed noise and reflections and generate a proper logic level again.  If you want to send logic speed signals (10's of MHz) then you have to use the cable as a transmission line with proper line drivers and receivers.

For 10 feet you may get away with it.
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

magnethead794


If your signal is relatively low bandwidth you can get away with longer distances - but the receiver circuitry needs a low-pass-filter (R+C) and schmidt-trigger to filter out the high speed noise and reflections and generate a proper logic level again.  If you want to send logic speed signals (10's of MHz) then you have to use the cable as a transmission line with proper line drivers and receivers.

For 10 feet you may get away with it.


Right now I have it linked up at 115,200 bps. But after researching, I'm tempted to drop it down to 9600 because of the wire's inductance and capacitance properties.

Go Up