Maximum length for TTL UART between two boards

Thread Starter

mishra87

Joined Jan 17, 2016
536
Hi All,

What could be the maximum achievable length for TTL UART communication between two boards without using transreciever IC.
Assuming standard baud rate for communication.

Regards,
 

OBW0549

Joined Mar 2, 2015
2,984
What could be the maximum achievable length for TTL UART communication between two boards without using transreciever IC.
That would depend entirely on the chosen baud rate, the logic technology being used (TTL, LSTTL, CMOS, etc.) and how noisy the electrical operating environment is; so it's impossible to give you a specific maximum distance.

Personally, for my hobby stuff, I don't attempt to go more than a few feet without a proper transceiver or other suitable interface. And for the commercial products I've designed, I've always used a transceiver.

Assuming standard baud rate for communication.
WHICH standard baud rate??? 75 bits/second? 300? 1200? 9600? 115K? I hope you realize that just saying "standard baud rate" doesn't tell anyone anything.
 
This is something you will have to test yourself. It will depend on the baud rate and quality of the cable. I wouldn't go more than a couple of feet.
 

djsfantasi

Joined Apr 11, 2010
5,600
And I would use a twisted pair for the wire. And depending on the information you didn’t supply, you might have to consider shielded cable. Definitely not individual wires!
 

Sensacell

Joined Jun 19, 2012
2,447
And it depends on what's happening on the grounds.

Large pulses of current, switching noise and lots of other nasties can corrupt your ground reference, and hence, your TTL signal.
 

JohnInTX

Joined Jun 26, 2012
3,801
I think the main reason why we're having difficulty answering your question with certainty is that for any distance at all, good design practice demands some sort of driver / interface to adapt the TTL logic signal to driving over distance. TTL is just not designed for that. It is not uncommon to see drivers / buffers in larger systems in TTL to TTL lines. My personal experience with raw TTL over some feet of distance back in the day was unsatisfactory.

Here's some info for RS-232 showing distance vs. baud rate:
https://www.lammertbies.nl/comm/info/RS-232_specs.html

For longer hauls consider RS422 / RS485. These use differential signalling and can be used in point to point connections like your UART. I personally use them for any appreciable distance.
http://www.rs485.com/rs485spec.html

Good luck!
 

Thread Starter

mishra87

Joined Jan 17, 2016
536
I think the main reason why we're having difficulty answering your question with certainty is that for any distance at all, good design practice demands some sort of driver / interface to adapt the TTL logic signal to driving over distance. TTL is just not designed for that. It is not uncommon to see drivers / buffers in larger systems in TTL to TTL lines. My personal experience with raw TTL over some feet of distance back in the day was unsatisfactory.

Here's some info for RS-232 showing distance vs. baud rate:
https://www.lammertbies.nl/comm/info/RS-232_specs.html

For longer hauls consider RS422 / RS485. These use differential signalling and can be used in point to point connections like your UART. I personally use them for any appreciable distance.
http://www.rs485.com/rs485spec.html

Good luck!
Quite Good information and gonna help me.
 

rsjsouza

Joined Apr 21, 2014
201
Try providing the information asked. Your last post does not add much to the characterization of the problem.
An example of a better formed question is: https://electronics.stackexchange.com/questions/31949/maximum-cable-length-for-3-3v-uart-signals

So, not only the data rate is specified, but also the TTL voltage levels and the media where the signals will travel.

As you can also tell from the ensuing discussion, there is no umbrella answer for this question - it will demand some calculation and experimentation due to several factors (some uncontrollable) already mentioned above, such as the output strength of the pins driving the lines, the sensitivity and noise immunity of the input pins listening to the lines, surrounding environment (noise, transients), quality of cables and connectors (cross talk, attenuation), among others.
 

Thread Starter

mishra87

Joined Jan 17, 2016
536
I meant was -

Could it be possible that TTL UART will work at 2 meter distance at lower baud rate.

May be anyone had same experience and their thought definitely gonna help me.

Yes their are way to do this ...

1. Using RS232 transceiver IC at both end (both boards) could cost of 2 transreciver ICs.
2. RS485 differential mode communication can do the same Job and they can also cost if transreceiver ICs.

Only cost effectevie solution was TTL UART and if this is not going to work , I have to go with either any of above solutions.

Thanks to all for your reply !!!
 

Thread Starter

mishra87

Joined Jan 17, 2016
536
Try providing the information asked. Your last post does not add much to the characterization of the problem.
An example of a better formed question is: https://electronics.stackexchange.com/questions/31949/maximum-cable-length-for-3-3v-uart-signals

So, not only the data rate is specified, but also the TTL voltage levels and the media where the signals will travel.

As you can also tell from the ensuing discussion, there is no umbrella answer for this question - it will demand some calculation and experimentation due to several factors (some uncontrollable) already mentioned above, such as the output strength of the pins driving the lines, the sensitivity and noise immunity of the input pins listening to the lines, surrounding environment (noise, transients), quality of cables and connectors (cross talk, attenuation), among others.
TTL level at both end 3V3.
Baud rate could be lower.
Board to board communication via cable
MCU STM32F series

Hope this helps .
 

MrChips

Joined Oct 2, 2009
19,275
You need to tell us your baud and/or cable length.

Look at RS-232 specifications:



RS-232 drivers employ circuits with controlled rise times.
If you want to go straight TTL here are some tips:

1) use CMOS ICs
2) reduce your baud
3) control the rise times
4) use twisted pairs
5) keep the cable length to a minimum

If you are still seeking a hard and fast answer, the answer is 3 ft (1m) @ 9600 baud.
 

Thread Starter

mishra87

Joined Jan 17, 2016
536
Try providing the information asked. Your last post does not add much to the characterization of the problem.
An example of a better formed question is: https://electronics.stackexchange.com/questions/31949/maximum-cable-length-for-3-3v-uart-signals

So, not only the data rate is specified, but also the TTL voltage levels and the media where the signals will travel.

As you can also tell from the ensuing discussion, there is no umbrella answer for this question - it will demand some calculation and experimentation due to several factors (some uncontrollable) already mentioned above, such as the output strength of the pins driving the lines, the sensitivity and noise immunity of the input pins listening to the lines, surrounding environment (noise, transients), quality of cables and connectors (cross talk, attenuation), among others.
I guess , May be tried to market their own Forum.
 

rsjsouza

Joined Apr 21, 2014
201
Given your specifications, in my experience 2m is too long to cover with 3.3V LVTTL due to the inductance and capacitance of the wires if you want to use a typical speed of 9600bps. I am not very familiar with the device you are using, but its datasheet mentions 8mA for GPIOs and you would need to make some experiments with your cable to appropriately set a baud rate that gives you reliable communications.

The experiments here can help you measure the cable parameters, which are dependent on the length and separation of the wires.

These can also be calculated (self-inductance, cross inductance, capacitance) or simulated with advanced tools - although these may cost you. Something discussed here.

I guess , May be tried to market their own Forum.
What do you mean by that? :confused:
 

Thread Starter

mishra87

Joined Jan 17, 2016
536
You need to tell us your baud and/or cable length.

Look at RS-232 specifications:



RS-232 drivers employ circuits with controlled rise times.
If you want to go straight TTL here are some tips:

1) use CMOS ICs
2) reduce your baud
3) control the rise times
4) use twisted pairs
5) keep the cable length to a minimum

If you are still seeking a hard and fast answer, the answer is 3 ft (1m) @ 9600 baud.
Thanks for your valuable information.

I have only cable length fixed means board to board distance is 2 meters.

Now I have to do ommunication using UART at 3V3. I have to find the baud rate and I am not sure if it works even lower baud rate i.e. 4800, 2400 etc at 2 meters.

I want to avoid RS232 transreceiver IC.

Thanks again :
 

Thread Starter

mishra87

Joined Jan 17, 2016
536
So that cracks of this post is that i should avoid using 3.3V Board to board uart and should opt for Either RS232 Transreciever ICs or with RS485 .

Now moving ahead with this thread -

What is basics pros & cons if I go with rs232 for 2 meters .

What is pros and cons if I go with rs485 for 2 meters

Which is better for this application.

Thanks all for your time !!!
 

MaxHeadRoom

Joined Jul 18, 2013
19,033
For only two metres you can go with either, RS232 would require a Minimum of 3 conductors, RS485 you can use 2, a differential pair, if you wish.
The MAX232 is a common IC.
Max.
 

MrChips

Joined Oct 2, 2009
19,275
Depends on your application. Is this a home/hobby project or commercial/industrial application?
What are the consequences of corrupt transmission?

Try 2m @ 4800 baud over two twisted pairs, i.e. TX/GND and RX/GND.
 

crutschow

Joined Mar 14, 2008
23,347
Can you do some experiments with 2 meters of twisted pair cable between a TTL transmitter and receiver and see how it works?
You may have to add a resistor in series with the transmitter output to control the rise-time and thus the ringing at the receiver end.

What "TTL" circuits are you using (3.3V is not standard TTL)?
 
Last edited:
Top