Electronic – Maximum cable length for 3.3V UART signals

cablesuart

I would like to avoid using RS-232 converters between two microcontrollers on two different boards. For various reasons, only UARTs are supported, e.g. no SPI or I2C, and I will be using CAT5E cable to RJ45 jacks between the boards. The data rate will be 115200bps, possibly up to 921600bps. Ground is connected along with the UART signals.

While I currently have it working at the lengths I need it, for my own education, is there a way to estimate the maximum cable length at which this would be reliable?

Best Answer

There is no single safe answer. It has a lot to do with the length of the cable, surrounding electrical noise, and how fast you want to go. Ethernet uses CAT5 cable to transmit at 10 Mbit/s for the slowest variety, so 1 Mbit/s is easily doable if you take the proper precautions. Note that with ethernet each signal gets its own twisted pair, and each pair is carefully terminated at the characteristic impedance of the cable at each end. Each pair is driven differentially and interpreted differentially, and is also designed so that it can't cause ground loops.

If you do all these thing, you can transmit 1 Mbit/s data on CAT5 cable for long distances, like 1000 meters. As you do less of these things, the usable distance will go down. If it's just board to board in the same chassis, for example, then you probably don't need to do much special. If you're going outside the unit, then differential line drivers and receivers could be useful.

Try something in your setup and look at the signals at the receiving end to get some idea of the noise margin, adjust as needed. Maybe use a protocol that can detect and recover from errors, and keep track of how often that is happening. There are too many ways to list here without more information.