How to design RS485 interface circuit? RS485 interface circuit design example

5V, 35pF, bidirectional ESD protection diode

This design guide discusses how to design an RS-485 interface circuit. The necessity of balancing the transmission line standard is discussed in the paper, and a process control design example is given. The line also discusses the line load, signal attenuation, fail-safe, and galvanic isolation.
1. Why Balance Transmission Line Standards The focus of this paper is on the industry's most widely used balanced transmission line standard: ANSI/TIA/EIA-485-A (hereafter referred to as 485). After reviewing some of the key aspects of the 485 standard, a factory automation example is used to introduce how to implement a differential transmission structure in an actual project.
In long-distance, high-noise environments, data transfer between computer components and peripherals is often difficult, and if possible, use single-ended drivers and receivers. For systems that require long-distance communication, a balanced digital voltage interface is recommended.
The 485 is a balanced (differential) digital transmission line interface developed to improve the limitations of TIA/EIA-232 (hereafter referred to as 232). 485 has the following features:
· High communication rate – up to 50M bits/s
· Communication distance is far – up to 1200 meters (Note: 100Kbps)
· Differential transmission – less noise radiation · Multiple drivers and receivers In practical applications, 485 drivers, receivers or transceivers can be used if low-cost, reliable connection data communication between two or more computers is required. . A typical example is the use of 485 to transfer information between a sales terminal and a central computer. The use of twisted pair transmission balanced signals has lower noise coupling, plus 485 has a wide common-mode voltage range, so 485 allows communication at rates up to 50M bit/s, or thousands of communication distances at low speeds.
Due to the wide range of 485 applications, more and more standards committees use the 485 standard as the physical layer specification for their communication standards. Including ANSI SCSI (small computer system interface), Profibus standard, DIN measurement bus and China's multi-function energy meter communication protocol standard DL/T645.

The Balanced Transmission Line Standard 485 was developed in 1983 and is used as a data transmission interface for data, clock or control lines between the host and peripherals. The standard only specifies the electrical layer, and other protocols such as protocol, timing, serial or parallel data, and linkers are all defined by the designer or higher layer protocols.
Initially, the 485 standard was defined as an upgrade to the flexibility of the TIA/EIA-422 standard (hereafter referred to as 422). Since 422 is only simplex communication (Note: 422 uses two pairs of differential communication lines, the transmission uses one pair, the reception uses one pair, so the data is transmitted in one direction on one line), 485 allows on a pair of signal lines Multiple drivers and receivers facilitate half-duplex communication (see Figure 1). Like 422, 485 does not specify the maximum cable length, but can transmit 1.2km under the condition of 100-AWG cable and 100kbps; 485 also does not limit the maximum signal rate, but is limited by the ratio of rising edge time and bit time. Similar to 232. In most cases, the cable length is more limited than the driver due to transmission line effects and external noise.
2. System design considerations
2.1 Line Load In the 485 standard, the line load should take into account the load on the line termination and transmission line. Whether the transmission line terminal is matched depends on the system design, and is also affected by the length of the transmission line and the signal rate (in general, the low speed and short distance may not be matched by the terminal).
2.1.1 Transmission line termination matching The transmission line can be divided into two models: distributed parameter model [1] and lumped parameter model [2]. Which model the test transmission line belongs to depends on the transition (rise/fall) time tt of the signal and the propagation time tpd of the driver output to the end of the cable.
If 2tpd ≥ tt/5, the transmission line must be processed according to the distributed parameter model, and the transmission line terminal matching must be handled; in other cases, the transmission line is regarded as a node parameter model, and the transmission line terminal matching is not necessary.
Note 1: Distributed Parameter Model - The voltage and current in the circuit are a function of time and are related to the geometry and spatial position of the device.
Note 2: Lumped Parameter Model - The voltage between any two endpoints in the circuit and the current flowing into the endpoint of either device are fully determined, regardless of the geometry and spatial position of the device.
2.1.2 Unit load concept The maximum number of drivers and receivers attached to the same 485 communication bus depends on their load characteristics. The load on the driver and receiver is measured against the unit load. The 485 standard specifies that up to 32 unit loads can be attached to a single transmission bus.
The unit load is defined as the allowable current through a steady-state load of 1mA in a 12V common-mode voltage environment, or a steady-state load of 0.8mA in a -7V common-mode voltage environment. The unit load may consist of drivers, receivers, and fail-safe resistors, but does not include AC termination matching resistors.
Figure 2 shows an example of the unit load calculation for the SN75LBC176A transceiver. Because the device integrates the driver and receiver together to form the transceiver (that is, the driver output and receiver inputs are connected to the same bus), it is difficult to obtain the driver leakage current and the receiver input current separately. For ease of calculation, the receiver input impedance is considered to be 12 kΩ and the transceiver is mA current. This can represent a unit load, and 32 such loads are allowed on the transmission bus.
As long as the receiver's input impedance is greater than 12kΩ, more than 32 such transceivers can be used on a single transmission bus.

2.2 Signal Attenuation and Distortion A useful common sense is to allow signal attenuation of -6 dB at maximum signal rate (unit: Hz) communication. In general, the cable supplier will provide a signal attenuation chart. The curve shown in Figure 3 shows the relationship between 24-AWG cable attenuation and frequency.

The easiest way to determine the extent to which random noise, jitter, distortion, etc. affect the signal is to use an eye diagram. Figure 4 shows the signal distortion at the receiving end at different signal rates using a 20AWG twisted pair cable at 500 meters. As the signal rate increases further, the effects of jitter become more pronounced. At 1 Mbit/s, the jitter is about 5%, and at 3.5 Mbit/s, the signal is completely overwhelmed and the transmission quality is severely degraded. In practical systems, the maximum allowable jitter is typically less than 5%.

2.3 fault protection and failure protection
2.3.1 Fault protection As with any other system design, fault response measures must be customarily considered, whether they are naturally occurring or environmentally induced. For factory control systems, extreme noise voltages are typically required to be protected. The differential transmission mechanism provided by 485, especially the wide common-mode voltage range, makes 485 have some immunity to noise. However, in the face of complex and harsh environments, its immunity may be insufficient. There are several ways to provide protection. The most effective method is galvanic isolation, which is discussed later. Galvanic isolation provides better system level protection, but at a higher price. A more popular and less expensive solution is to use diode protection. Using a diode approach instead of galvanic isolation is a compromise that provides protection at a lower level. An example of an external diode and an internal integrated transient protection diode is shown below:
The 485 transceiver SN75LBC176 shown in Figure 5 is externally connected to a diode to prevent transient glitch.

The RT is usually a termination matching resistor equal to the cable characteristic impedance R0.
Figure 6 shows the 485 transceiver SN75LBC184 with an internal integrated TVS diode for applications where full 485 functionality is desired and PCB space is limited. The SN75LBC184 integrates a protection diode internally to directly replace the SN75LBC176 for high energy electrical noise environments.

2.3.2 Failure Protection Many 485 applications also require fail-safe protection. Failure protection is useful for the application layer and requires careful consideration and full understanding.
In an interface system where any of the multiple drivers/receivers share the same bus, the drive is inactive for most of the time, and this state is referred to as the bus idle state. When the drive is in an idle state, the driver outputs a high-impedance state. When the bus is idle, the voltage along the line is floating (that is, it is not high or low). This can cause the receiver to be erroneously triggered high or low (depending on ambient noise and the last level polarity before the line is floating). Obviously, this situation is unpopular. An associated circuit is required in front of the receiver to change this indeterminate state to a known, pre-agreed level, which is referred to as fail-safe. In addition, fail-safe protection against data errors due to short circuits.
There are many ways to implement fail-safe protection, including adding hardware circuitry and using software protocols. Although the software protocol is more complicated to implement, it is the preferred method. However, because most system designers and hardware designers prefer to use hardware to implement fail-safe protection, adding hardware circuits to implement fail-safe protection is more often used.
The fail-safe circuit must provide a clear input voltage to the receiver, whether short-circuited or open-circuited. If the communication line is in a very harsh environment, line termination matching is also necessary.
Many manufacturers have begun to integrate some fail-safe circuits (such as open-circuit fail-safe) into the chip. Usually these extra circuits only add a large value pull-up resistor at the receiver's non-inverting input and a large value pull-down resistor at the receiver's inverting terminal. These two resistors are typically around 100KΩ. These resistors and termination matching resistors form a potential driver that can only provide a differential voltage of a few mV. Therefore, this voltage (receiver threshold voltage) is not sufficient to switch the receiver state. Using such an internal pull-up resistor allows the bus to not perform termination matching, but significantly reduces the maximum signal rate and reliability.
Figure 7 shows some 485 interface universal external fail-safe circuits. Each circuit tries to maintain the receiver input voltage not less than the minimum threshold and maintain one under one or more fault conditions (open, idle, short). Known logic state. In these circuits, R2 represents the transmission line impedance matching resistor and becomes part of the voltage driver: producing a steady state bias voltage. It is assumed here that each receiver represents 1 unit load.
The table in the right half of Figure 7 lists some typical resistor and capacitor values, the type of failsafe provided, the number of unit loads used, and signal distortion. In the next section, the resistance values ​​in the short-circuit-failed circuit are calculated to illustrate how to modify these resistor values ​​to suit a particular design.

To achieve short circuit protection, more resistors are needed. When the cable is shorted, the transmission line impedance becomes zero and the termination matching resistor is also shorted. Short-circuit failure protection can be achieved by placing an additional resistor in series with the receiver input.
The additional resistor R3 shown in Figure 8 can only be used where the driver and receiver are separated. Most of the current 485 drivers and receivers are integrated on a single chip (called a transceiver) and are internally connected to the same bus. This transceiver cannot be used for short-circuit fail-safe. If short-circuit protection is required, an internal integrated short-circuit protected transceiver or a device that uses a separate driver and receiver, such as the SN75ALS180, can be selected. If a short-circuit fail-safe circuit is used in the transceiver, resistor R3 causes additional distortion in the output signal. The SN75ALS180 device with separate driver and receiver does not have this problem because the driver is directly connected to the bus and bypasses R3.

The resistance value is calculated as follows. If the transmission line is shorted and R2 is removed from the circuit, the receiver input voltage is:
VID= VCC * 2R3 / (2R1 + 2R3)
For 485 applications, the standard specifies that the receiver can recognize input signals as low as 200mV. So when VID > VIT or VID > 200mV, a known state can be determined. This is the first design constraint:
VCC* 2R3 / (2R1 + 2R3) > 200mV
When the transmission line is in a high-impedance state, the receiver is affected by R1, R2, and R3, and its input voltage is:
VID= VCC* (R2 + 2R3) / (2R1 + R2 + 2R3)
Get the second design constraint:
VCC * (R2 + 2R3) / (2R1 + R2 + 2R3) > 200mV
The transmission line is affected by the termination of the termination matching resistor R2 and twice the (R1+R3). The characteristic impedance Zo of the transmission line is matched to this, which gives the third design constraint:
Zo= 2R2 * (R1 + R3) / (2R1 + R2 +2R3)
Other design constraints include additional line loading provided by the fail-safe circuit, signal distortion caused by R3 and R1, and receiver input resistance.
Note: The short-circuit/open-circuit fail-safe circuit is integrated into the 3.3V 485 transceiver such as the SN75HVD10 and the updated product.
2.4 Galvanic isolation Computers and industrial serial interfaces are often in a noisy environment and may affect the integrity of data transmission. For any interface circuit, the tested method to improve noise performance is galvanic isolation.
In data communication systems, isolation means that there is no direct current flow between multiple drivers and receivers. An isolation transformer provides power to the system, and optocouplers or digital isolation devices provide data isolation. Galvanic isolation removes ground loops and rejects noise voltages. Therefore, using this technique can suppress common mode noise and reduce other radiated noise.
As an example, Figure 9 shows a node of the process control system that connects the data logger to the host computer via a 485 link.
When an adjacent motor is started, the ground potential of the data logger and the computer will be instantaneously different, which usually causes a large current. If the data communication does not use an isolation scheme, the data may be lost and, in the worst case, the computer may be compromised.
2.4.1 Circuit Description The schematic shown in Figure 9 is a node of a distributed monitoring, control, and management system that is typically used for process control. Data is transmitted over a pair of twisted pairs, and the ground wire uses a shield. Such applications often require low power consumption because many remote substations use batteries or require a backup battery (after a power failure, the device needs to be able to use the backup battery for a certain amount of time). In addition, with a low power count, a small isolation transformer can be used. As shown in Figure 9, the transceiver uses the SN65HVD10. Of course, any TI 3.3V or 5V RS485 transceiver, 3.3-V TIA/EIA-644 LVDS or 3.3-V TIA/EIA-899 M-LVDS transceiver can use this. Circuit.
2.4.2 Operation Principle The example shown in Figure 9 can be used for 3.3V or 5V. The power supply is isolated by transformer and the data signal is isolated by digital isolators. Because 485 transceivers require isolated power, the tunable LDO regulator must be isolated. This function can be implemented using a NAND gate oscillator circuit to drive an isolation transformer. The output voltage of the transformer is adjusted and filtered for use by a low dropout linear regulator. In high EMI environments, this approach is often used to prevent noise from other remote power subsystems from coupling to the mains. The TPS7101 is used to power other electronic components and provides up to 500mA. By adjusting the bias resistor R7, the TPS7101 can output 3.3V or 5V. See the BOM list for specific resistance values.
The data signal isolation is completed by a three-channel digital isolator ISO7231M. The device provides 2.5KV (rms) voltage isolation and 50KV/us instantaneous discharge protection at 150Mbps signal rate.


3. Process Control Design Example In order to obtain more knowledge of 485 system design, a better method is to look at specific examples. Consider a system in which the system has a main controller and several sub-station factory automation systems, each of which can send and receive data.
The system characteristics are shown below, and the general specifications are shown in Figure 10.
· The farthest substation is 500m from the main controller · 31 substations (plus a total of 32 devices)
· Signal transmission rate is 500 kbit/s
· Half-duplex communication

Devices that follow the 485 standard transmit data at 500 kbit/s, requiring the driver output transition (rising/falling) time tt to be no greater than 0.3 unit interval time (UI), so there are:
Tt≤0.3 * UI
Tt ≤ 0.3 * (1 / (500 * 103) ) = 600ns
If the cable transmission signal speed is equal to the propagation speed of the light in vacuum, the signal transmission delay tpd is 3.33 ns/m, multiplied by the transmission line length of 500 meters, which is 1667 ns.
According to the formula in Section 2.1, it can be determined whether the transmission line is a distributed parameter model or a node parameter model: if 2tpd ≥ tt/5, the transmission line is considered to be a distributed parameter model. Obviously, 3334 > 120, so the transmission line model of this example is a distributed parameter model. In an industrial environment, such transmission lines must be terminally matched.
Regarding the attenuation, although the fundamental frequency of the signal rate of 500 kbit/s is 250 kHz, we still calculate the attenuation according to 500 kHz because the signal actually contains a higher frequency portion. According to the rule of thumb that the maximum attenuation does not exceed -6dB, the maximum attenuation at the end of the 500m cable is required to be less than -6dB, which is 0.36dB/30m. Let's look at the chart shown in Figure 3. This is a graph of the attenuation vs. frequency provided by the cable manufacturer. The 500 kHz frequency corresponds to an attenuation of 0.5 dB/30 m, which is more than the design constraint of 0.14 dB/30 m. This is allowed in this example because it is acceptable to slightly reduce the noise margin provided by conservative rules.

HDMI Spliter & Switch

HDMI, English full name is High Definition Multimedia Interface, Chinese name is the abbreviation of High Definition Multimedia Interface. In April 2002, Hitachi, Panasonic, Philips, SONY, Thomson, Toshiba and Silicon Image joined forces to form the HDMI organization. In China, Zhaolong and Akihabara are HDMI standard advocates and technology leaders. HDMI can transmit uncompressed HD video and multi-channel audio data in high quality, with the highest data transmission speed of 5Gbps. At the same time, there is no need to carry out digital/analog or analog/digital conversion before signal transmission, which can ensure the highest quality of audio and video signal transmission.

Hdmi Splitter And Switch,Hdmi Cable Splitter,Hdmi Splitter Switch,Hdmi Splitter Audio

CHANGZHOU LESEN ELECTRONICS TECHNOLOGY CO.,LTD , https://www.china-lesencable.com