On March 21, 2024, we held an online seminar titled "RS-232/422/485 Circuit Design Basics Seminar for Beginners."
In this seminar, we explained electrical characteristics such as noise and reflections that tend to occur in each standard as a design basis for ensuring transmission distance and data communication quality in RS-232/422/485 communication. In order to make it easy to understand even for those who are involved in circuit design for the first time, the following agenda was followed on the day.
【agenda】
1. Overview of RS-232/422/485 standards (noise resistance/weakness, suitability/unsuitability for long distance transmission, etc.)
2. RS-232/422/485 connection examples and applications
3. RS-232/422/485 Design Considerations
- Why Termination Resistors are Needed
- Fail-safe circuit
We received many questions at the seminar. We have carefully selected some of the most frequently asked questions from our customers and will introduce the answers below.
About the classification of questions to be introduced
We will introduce them in the following five categories.
(1) Standards
Questions about the RS standard itself
(2) Peripheral circuit design
Important points to consider when designing peripheral circuits
(3) Cables/connectors
Questions about peripherals such as cable connectors to be used
(4) About devices
Questions about RS standard devices
(5) Precautions for use
Important points to note when using RS standards
(1) Standards
Aren't RS-232/422/485 protocols?
RS-232C uses UART (Universal Asynchronous Receiver Transmitter) asynchronous serial communication and performs flow control by referring to status signals such as RTS and CTS. RS-422/485 specifies only electrical specifications.
UART is commonly used, but is not specified as a standard.
What communication method (UART, I2C, SCI, etc.) should be used for serial communication between the RS-232C driver and the microcontroller?
Basically, communication is done via UART, because RS-232C communication is done using UART.
Although it is an external site, please refer to the explanation of UART near Figure 7 at the URL below.
What does the "C" in the RS-232C driver stand for? Could you please give me an overview of the functions of the part in question? Also, is it correct to understand that there is still demand for RS-232?
The C stands for RS-232 version “C.” RS-232 version C was very popular and therefore widely used.
It is mainly used in the industrial field to connect PCs to monitors/printers.
Except for environments where it has been replaced by Ethernet and USB and is no longer used, RS-232 is still in use, as it has continued to operate stably for a long time.
What does it mean that 64 nodes are possible with RS-485 communication? I understood that up to 32 nodes could be connected.
The standard is 32 nodes.
Let's say there is a resistor of about 15kΩ at the input pin of RS-485. In this case, the current flowing through this resistor is called 1 unit load. Normally, RS-485 driver ICs are designed to drive up to 32 unit loads. However, devices have been released that can reduce the load current by half by improving the receiver design. With such devices, you can connect twice the 32 unit load, or 64 receiver nodes.
Please refer to Table 1 in the application note below.
Please tell me the details of the electrical specifications of each standard. Also, if ICs comply with the same standard, can we assume that they are compatible regardless of IC model number or manufacturer? Please let me know if there are any points to be careful about.
RS-232/422/485 have been standardized by the ITU (The International Telecommunication Union) as ITU232/422/485 respectively and can be obtained from the following links.
For RS-422/485 specifications, please refer to the simplified document below.
As long as the RS-422/485 standard is met, connections can be made regardless of manufacturer. Using TI products with a proven track record is safe.
Is it easy to convert signals from RS-232 to RS-422?
It is possible, but it may be difficult because it requires switching between single-ended and differential. An IC that converts single-ended signals to differential is required. Also, the connector shape will change, so a conversion adapter is required.
(2) Peripheral circuit design
What is the best place to terminate an RS-485 cable in a multiple-to-multiple connection?
Generally, it is placed before the device that is the end point of the signal line.
Even if a termination resistor is connected to a device that branches off along the transmission path, the electrical signal generated by the master side may return to the master side as a reflected wave, which may prevent proper communication.
It is recommended to place two, one at the beginning and one at the end of the entire transmission path, to match the impedance of the entire transmission path to the characteristic impedance and minimize signal reflection.
Since half-duplex RS-485 is multi-drop, even if a termination resistor is placed at the final end, reflections will still occur because the signal is branched along the way.
There is a possibility that it may happen.
When the transmission path is long or multiple devices are connected, it may be necessary to place a termination resistor in the middle, but placing a termination resistor in the middle of the path changes the impedance of the entire transmission path and may cause signal reflection. For this reason, termination resistors are generally placed only at the first and last devices.
It is important to properly adjust the value of the termination resistor and its placement location according to the specifications of the equipment, cables, etc.
How do you calculate the current consumption of the transmit and receive lines of a communications IC?
The answer is as the current flowing through the bus. It depends on the configuration in which it is connected.
In the case of RS-485, termination resistors are required at both ends, so that a current flows through two 100 Ω differential terminations connected in parallel to generate a differential voltage swing in the specified range of 1.5 to 5 V.
If the value of the termination resistor is 100 Ω, then I = V / R, so the current flowing from the driver is {(1.5~5V)/50 Ω} + current of each unit load x number of ports.
Will a fail-safe circuit be required for each receiver?
Basically, it is not necessary for each receiver. The fail-safe circuit is implemented together with the termination resistor. Therefore, please implement it not for each receiver, but for the receiver near the termination resistor.
If you want to know where a cable break occurred, you might consider adding fail-safe circuitry to multiple receivers.
If the cable is broken in the middle, all receivers from the break point onwards will be at a logic high or low.
On the other hand, the receiver before the break will be in a state where it can receive signals. By checking this difference in state, it may be possible to determine the location of the break.
One thing to note is that increased resistance can attenuate the signal and require more output current from the driver.
It is said that it is best to match the RS-485 termination resistance to the impedance of the cable, but how far must the difference between the cable impedance and the termination resistance be before reflections occur?
The degree of reflection can be calculated using the reflection coefficient. Please see the following FAQ for this seminar.
"Fail-safe" means that the floating state prevents the communications IC from malfunctioning, but does it mean preventing failure?
The purpose is to prevent malfunction. However, since no fail-safe measures have been implemented, the output logic of the IC may not be determined, causing the IC downstream of the output to malfunction, which may lead to failure of the entire system. To prevent failure, please implement measures such as surge protection circuits and insulation.
If cost and area were not an issue, would it be correct to say that the fail-safe on the right side, which corresponds to Idle, Open, and Short, is better?
You are correct. The fail-safe circuit on the right side is also a circuit that can handle shorts, so if you need greater robustness, I think you should consider using it.
If space is limited, please use a fail-safe IC (such as THVD2410/50).
(3) Cables/connectors
What kind of cable is best to use for each communication method? Also, if I use a shielded cable, how should I handle it?
The cables used vary depending on the communication standard, but we will introduce some commonly used cables.
RS-232 uses a cable that consists of several single wires bundled together.
For RS-422/485, multiple 100 Ω differential wires are bundled together in a single cable, and shielded cables are common in industrial applications.
How to process the shield
The shield's GND is connected to the frame GND and is separated from the GND inside the board. EMI can be reduced by taking measures to prevent current from flowing inside the board. See Figure 27 in the application note below.
What is the characteristic impedance of a communication cable?
The characteristic impedance of a communication cable is the ratio of the voltage and current generated when an AC signal passes through the transmission line.
It is determined by the thickness and spacing of the wire, and the dielectric constant of the insulator. It can be calculated using the following formula.
【a formula】
Zo (characteristic impedance) = V (voltage) / I (current) = √⊿L / ⊿C
⊿L: Inductance per unit length of the transmission line
⊿C: Capacitance per unit length of the transmission line
I understand that the termination resistance depends on the characteristic impedance of the cable, but what is the characteristic impedance of the cables commonly used for RS-422 and RS-485?
I am aware that there are many cables with characteristic impedances of 100Ω or 120Ω.
Is it recommended to use twisted pair cables for communication cables used with RS-422 and RS-485?
We recommend using a twisted pair cable. RS-422 and 485 communicate using differential signals, so using a twisted pair cable makes them less susceptible to external noise and reduces the impact of external noise. Most cables on the market are twisted pair cables.
Are there any connectors that are commonly used for RS-422 and RS-485? I often see terminal blocks and D-SUB connectors, but what about RJ45?
There are also cases where RJ45 connectors are used, and I think D-SUB and RJ45 are the most commonly used connectors.
Next, it is recognized that terminal blocks are also used.
Are there any common connectors or terminal blocks for connecting RS-485?
D-SUB connectors, RJ45 connectors, and terminal blocks are commonly used.
(4) About devices
The maximum communication speed of the 35p THVD1424/54 is said to be 20mbps, but isn't the maximum 10mbps?
Most applications using RS-485 are designed to operate at speeds slower than 10Mbps, but there are some cases where communication at speeds above 10Mbps is possible.
For this reason, some ICs, such as the THVD1424/54, are listed as having a maximum communication speed of 20 Mbps. This speed can be achieved when all of the IC's recommended operating conditions are met and the conditions of the ANSI/TIA/EIA-485-A standard are fully complied with.
Does this mean that if I use THVD2410/50, I won't need series resistors or pull-up/down resistors?
You are correct. In the case of the THVD2410V, it has a built-in timer circuit that outputs a high signal when an undefined value is input.
For example, when a short circuit occurs and the input signal becomes 0V, the output goes High and continues to output High until the input signal exceeds the VTH_FSH voltage range.
For example, when using ISO1430B, if Vcc2 on the isolated side is 5V, how many volts will the operating signal on the communication line be?
The common mode voltage is 1 to 3V, Typ Vcc2/2, with a differential amplitude of 2.1V Min, Typ 3.7V.
(5) Precautions for use
Do ICs with built-in surge protection diodes require special care to prevent heat generation compared to regular ICs?
The heat generated in surge protection diodes is instantaneous and cannot be reduced externally.
This can be addressed by taking measures in the IC design, such as increasing the size of the surge protection diode and increasing its thermal capacity.
Please give me some examples of measures to deal with heat generated by external surge protection diodes. Also, for IC-embedded types, please also provide measures to deal with diode heat generation.
One way to deal with heat generated by an external diode is to provide a heat sink.
Are there any disadvantages to isolation?
The disadvantages are the increased cost and mounting area.
·price
Isolation ICs are more expensive than regular ICs and the total number of components increases, resulting in a higher overall price.
·area
Isolation ICs often come in large package sizes to ensure sufficient creepage distance.
Furthermore, when multiple components are used to achieve isolation, the number of required components increases, which in turn increases the mounting area.
How can I avoid communication collisions in RS-485?
There is a method for bus control using software.
In software control, collisions between transmission and reception are prevented by controlling the voltage level of the transmission line by software before the transmission data is placed on the line.
Is it possible to hot-plug an RS-485 cable? If so, where should the termination be located?
RS-485 does not allow hot plugging. However, as a countermeasure for RS-485, there is a method to protect the IC from overvoltage by adding a surge protection diode, as explained in the section on transient overvoltage protection.
If it is within the fault protection voltage of the IC, there is no need to add a protection circuit, but if there is a possibility of live insertion/removal, it is a good idea to add a surge protection circuit for safety reasons. Although it is an article from another company, the contents of the following URL are useful.
The termination resistor is placed before the final receiver.
There is also an on-demand video for those who want to look back on the seminar.
We have carefully selected some of the Q&A sessions and introduced them here. We hope you enjoyed them. The main seminar will also be available as an on-demand video.
You will be able to watch on-demand videos by simply registering below, so please register.
Inquiry
If you have any questions, please feel free to contact us using the information below.