A few days ago, I saw discussions in the group chat about the issue of “TTL, RS232, and RS485 transmission distances“..Today, I took some time to share related content, hoping it will be helpful to everyone.
Overview
Many people may not be very familiar with TTL, RS232, and RS485, so let me briefly summarize what they are.
1. TTL Level
TTL: Transistor-Transistor Logic, which represents transistor-transistor logic levels.
For example, 0V represents logic low, and 5V represents logic high. The logic high output from the serial port pins of an STM32 microcontroller is 3.3V.
You may ask: What is a logic level?
A logic level is a specific voltage or state where a signal can exist, usually represented as “0/1”, “on/off”, “ON/OFF”, or “LOW/HIGH”.

With the rapid development of electronic technology, the voltage for logic high levels has also been decreasing, for example, the supply voltage for DDR5 memory is only 1.1V.
For related content in this section, you can refer to an article I previously shared: The World of Logic Levels 0 and 1.
2. RS232
RS232, also known as 232, stands for EIA-RS-232.
● EIA: Electronic Industry Association,● RS: Recommended Standard, representing the recommended standard● 232: represents the identification number
RS232 has multiple versions, including RS232A, RS232B, RS232C…F, etc., with RS-232C being the most commonly used today.
RS232 was originally used for modems, so its pin definitions are related to modem transmission.
In the early days, 25-pin connectors (DB25) were commonly used, especially for early printers and fax machines, but they are rarely used now.
Many people may not have seen it; during my university days, I used this DB25 interface to download programs to the MSP430.

Now, DB9 is commonly used, which I believe everyone is familiar with, but most of the time we only use pins 2, 3, and 5.

| Number | Definition | Function |
|---|---|---|
| 1 | DCD | Data Carrier Detect |
| 2 | RXD | Data Receive |
| 3 | TXD | Data Transmit |
| 4 | DTR | Data Terminal Ready |
| 5 | GND | Signal Ground |
| 6 | DSR | Data Set Ready |
| 7 | RTS | Request to Send |
| 8 | CTS | Clear to Send |
| 9 | RI | Ring Indicator |
DB9 is still retained on many computer back panels; even if it’s not on the back panel, the motherboard also has a DB9 interface (just recently, I built a computer and specifically bought an external DB9 interface).

3. RS485
RS485 can be said to have developed on the basis of RS232, with the aim of “increasing anti-interference capability and signal transmission distance“.
RS232 uses voltage to represent logic high and low levels, for example, ±15 volts.
RS485 uses differential voltage, which means the voltage difference between two signal lines (A and B) represents logic high and low levels.
RS232 supports full-duplex communication, while RS485 is half-duplex communication.

Transmission Distance
In college, your teacher might tell you: RS232 transmission distance is 15 meters. Or, you might see in some books that RS485 transmission distance is 1200 meters.
The communication transmission distance is related to many factors, and there is a significant difference between actual and theoretical distances. In some cases, RS485 transmission over 500 meters might even have issues.
The communication transmission distance is influenced by various factors, including communication method, baud rate, connection cable, interference, etc. Here, I will briefly discuss these issues in relation to UART communication.
1. Communication Method
The communication methods mentioned here refer to the different communication methods such as “TTL, RS232, and RS485” in the title.
Under normal circumstances, the communication distance is: TTL < RS232 < RS485.
TTL is usually used within a circuit board (on the same board), for example, communication between the serial ports of chip A and chip B.
RS232 is still used in many situations, typically for communication between devices, usually connected via DB9 or two signal lines (in a project I participated in, I expanded 8 serial ports using a computer PCI card, which used the RS232 method).
RS485 is more commonly used in industrial products, allowing multiple devices to connect on the RS485 bus, with longer transmission distances and stronger anti-interference capabilities.
2. Baud Rate
Baud rate refers to the number of symbols transmitted per second. One baud represents the transmission of one symbol per second.
You can think of it as the speed of signal transmission, for example, a serial port at 9600 bps.
The higher the baud rate, the higher the frequency, and under the same conditions, the shorter the transmission distance.
The baud rate of a serial port can be very high, such as 115200 bps, but transmitting at this baud rate via RS232 may encounter issues after about 10 meters.
3. Connection Cable
The connection cable is also a key factor. The material of the cable (copper, aluminum, iron), thickness, and whether it is shielded can all affect the transmission distance of signals.
In clean environments (such as laboratories or offices), the differences may not be noticeable, but in complex environments (such as factories with many large machinery), you will feel the difference.
Therefore, RS485 uses differential signals and twisted pairs, and better quality cables with shielding will have advantages in industrial environments.
4. Interference Factors
Those who have worked on industrial products know that not only are EMC requirements high, but communication requirements are also high.
If a large device next to you suddenly starts, it could cause your communication to fail (or the chip to reset, freeze, etc.).
Just because RS485 can transmit 1200 meters doesn’t mean that communication will succeed even at 200 meters in a factory.
In summary, to increase transmission distance while ensuring the stability of transmission signals, it is usually necessary to stay as far away from interference sources (large machinery), increase shielding measures, and reduce transmission speed (baud rate), etc.
ENDSource: strongerHuangCopyright belongs to the original author. If there is any infringement, please contact for deletion.▍Recommended ReadingA Comprehensive Overview of General GUI Based on MCUWhy Do Many People Only Turn Off Their Monitors After Work and Never Shut Down Their Computers?These Domestic Software Were Once Mistaken by the Public as Developed by Foreign Giants…→ Follow to Stay Updated ←