485 circuit (networking/non-networking) selection of up and down matching resistors

        The 485 circuit is one of the most common signal transmission lines used in industrial fields, because of the coupling effect of differential signals and common mode rejection, its anti-interference ability is very strong. However, there are always some thorny problems in the application of 485 circuits. Such problems are generally the problem of matching impedance. The following is a pull-up and pull-down impedance from the 485 networking (taking 32 copies of a concentrator as an example) and 1-to-1 communication. match.

         
        A typical 485 circuit is shown in the figure above, U4 is a 485 chip, and the left side of the chip generally has less internal interference in the device, and general single-line transmission can be used. For the pull-up resistor related to the optocoupler, please refer to my other article ( Optocoupler pull-up resistor selection ). The TVS tube and thermal in the picture are both to protect the external interface of the device. For specific selection, refer to the external interface of the device. In this article, we mainly analyze the problem of matching the pull-up and pull-down impedance of the external transmission line, that is, the determination of the resistance values ​​of the pull-up and pull-down resistors R92 and R93 .
        485 electrical characteristics: logic "1" is represented by the voltage difference between two lines +2~6V; logic "0" is represented by the voltage difference between the two lines -2~6V, between -2V~+2V is an uncertain state. The maximum transmission distance is 1200 meters according to the standard 9600bps.
        1-to-1 situation: 1-to-1 485 communication is relatively simple, and the selected impedance is also relatively easy to determine. The easiest mistake to make is that the communication between two non-polar 485 chips is not connected to the pull-down resistor, causing the communication to fail. This is because there is no pull-down The resistor provides an effective state of "0", and there is no clear and effective discharge path for the transmission signal current, resulting in a large rise time of the signal, and even unable to return to the initial state, as shown in the figure:
        Read the 1bit sampling flow chart of MCU's 485:
        1bit sampling time T, the high level hold time is at least 10/16T to ensure sampling, if the pull-up resistor is too large (the capacitance effect of the AB port, equivalent to first-order RC, the rise time is 3RC ), it will lead to signal transmission. The MCU cannot collect the status signal due to the large time delay. For example, if we take a 20K pull-up and pull-down resistor, we will get the following waveform (4800bps):

        At 4800bps, T=208us; above 2V, it is about 100us≈1/2T<10/16T, and the delay at the optocoupler at the back end of the 485 transmission (in the best matching case) is about 10%, so the signal cannot be collected. According to the rise time RC charge and discharge rise time and the minimum sampling time, the calculated critical resistance value is about 10K, in order to leave a certain margin and try not to increase the power consumption, choose about 5K.
         Networking situation: The equipment in the 485 network generally requires a common ground, that is, a common ground, which will increase the grounding or power supply capability of transmission, which is conducive to signal transmission. The circuit is shown above, which is based on 32 devices. The input impedance of each device's AB port receiving state (query the input impedance of the 485 chip) is about 12KΩ. Generally, a resistance of about 100Ω is matched between the two 485 lines. Absorb the differential signal at the end and suppress the interference caused by the reflection at the end of the pulse signal. At first glance, the power consumption will be very large, but the equivalent impedance allocated to each device after the common ground is 3.2K. In this way, I calculate the equivalent impedance of the AB port in the case of a device drive: 60+80 (the calculated external equivalent impedance of the AB port is 80Ω) Ω=140Ω ( the pull-up resistor in the above picture should be on the left side of the thermal, find the picture Too lazy to change (╯' - ')╯︵ ┻━┻  ). The specific rise time should also be determined according to the T time of the communication rate. Measure the waveform and calculate it again. The calculation of the critical resistance value is the same as the above 1 to 1 (lazy cancer It happened again (ಥ _ ಥ) ), 20K lines, 25K is not impossible.
Refill when available. (~﹃~)~zZ.
        

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324524097&siteId=291194637