I have an application where two different microcontrollers need to communicate. I was thinking that for simplicity, just use 5V instead of converting to RS232 levels. What in good practice would the max distance be for single ended communications? (0-5V). At what distance / conditions should I consider a differential driver / receiver?
Electronic – Max Distance for 5V serial communications
communicationmicrocontrollerserial
Related Topic
- Electronic – Start bits in asynchronous serial communications
- Electronic – Buffering a Digital Microcontroller Signal for Connecting to an Optocoupler
- Electronic – SIM7100 GSM Modem Unreliable Connection
- Electronic – Powering SN75176 for RS485/UART communications over long distances
- Electronic – Implementation details of a home microcontroller network
Best Answer
RS232 is a (well, two) single-ended transmission standard, with a typically large voltage swing (-12V to 12V, 24V high to low (with a -3V to 3V dead Spot)). It's easy to get information on distance for RS232:
With RS232, shielding and twisted pair both offer some noise filtering, allowing for higher speeds or longer distance.
TTL level serial/UART for your setup only has 5V swing. Combining The low voltage swing, you have to figure three things. One is cable resistance. All cables have resistance that adds up. While negligible at small distances, the longer the cable and higher the current, the more the voltage at one end changes compared to the other end.
Two is cable capacitance. The higher the capacitance, the more it resists changing from one voltage Level to the other. The higher the capacitance, the slower it changes and more rounded off the signal gets. So with higher speed and greater distance or capacitance, the signal will start to look less like a square wave and more like a sine wave.
Three is noise. Due to the lower voltage swing, lack of differential signaling, or error correction, the more it affects the communication. Shielding and twisted pair will help.
Based on that, I guess, not having found any good information online, that 5v 9600 bps, could do 50 feet/15 meters on generic UTP Cat 5 just fine.
In general, the faster the speed + the higher the capacitance + the smaller the voltage swing = the shorter the distance, before you even get into noise. There is no flat rule of thumb.