RS485 and RS232 input signal protection and automatic switching circuit

By designing an automatic switching circuit, using the double-knife double-throw relay switch U3 and the identification circuit, the automatic switching between the RS232 and RS485 interfaces is realized, which solves the problem of cumbersome signal conversion operation in the prior art and improves the convenience and efficiency of signal transmission.

CN222545644UActive Publication Date: 2025-02-28CHENGDU YUANKUO TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202421477116.X
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2025-02-28
Estimated Expiration
2034-06-26

AI Technical Summary

Technical Problem

In the prior art, signal conversion between the RS232 interface and the RS485 interface needs to be plugged into the conversion board, resulting in cumbersome and inconvenient operation.

Method used

A RS485 and RS232 input signal protection and automatic switching circuit is designed, and the double-knife double-throw relay switch U3 and recognition circuit are used to automatically switch the RS485 and RS232 interface according to the input signal, replacing the traditional physical plug-in operation.

Benefits of technology

It realizes bidirectional protection of the input signal of the access loop and automatically switches according to the signal type. It is faster and more efficient than the existing technology, avoiding the cumbersome operation of plugging and unplugging the adapter board.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The utility model relates to the technical field of industrial control signal transmission circuits, and particularly discloses an RS485 and RS232 input signal protection and automatic switching circuit, which comprises an RS485 interface chip circuit, an RS232 interface chip circuit, a double-pole double-throw relay switch U3 for automatically switching RS485 and RS232 input signals, an identification circuit and an external wiring terminal for accessing an external signal. According to the utility model, an input signal accessed to a loop can be bidirectionally protected, meanwhile, an RS485 / RS232 circuit function can be automatically switched according to a signal type, and compared with an existing mode of carrying out conversion by physically plugging / taking down an adapter, the circuit provided by the utility model is faster and more efficient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model relates to the technical field of circuits, in particular to a structural compatibility circuit for data transmission in the field of industrial control, and specifically to an RS485 and RS232 input signal protection and automatic switching circuit. Background Art

[0002] In the current industrial control field, data transmission between devices is particularly important. RS232 and RS485 are the most commonly used and universal interfaces. The current common processing methods are:

[0003] ① Both interfaces are designed in the initial stage of equipment design, and different interfaces are used according to the site.

[0004] The design is unable to confirm other device types, and the interface must be selected by comparing with other devices. If the equipment assemblers do not understand the product interface type and make incorrect connections, it will cause damage to the equipment.

[0005] ② Use the adapter board to switch the signal type and use the conversion board to convert the signal according to the site.

[0006] In the existing data communication field, especially in the industrial communication field, asynchronous serial communication technology is often used to realize data exchange. At present, the most commonly used are RS232 and RS485 communication protocols. RS232 is the earliest serial interface standard, which has been widely used in short-distance and low-transmission rate applications. However, its transmission distance is not far and the transmission rate is low. The RS485 interface uses hardware to make up for this shortcoming. Subsequently, the RS485 interface standard was proposed on the basis of RS232 to overcome the shortcoming of the RS232 interface's short communication distance. In the existing use process, there is often only one serial port for use due to restrictions. When the RS485 interface function is needed, an adapter board must be plugged in, and when the serial port function is to be used, the adapter board must be removed. It brings a lot of inconvenience in operation. In order to facilitate the switching of signals, it is now necessary to design an input signal protection and automatic switching circuit to automatically convert the RS232 interface and the RS485 interface. Utility Model Content

[0007] In order to solve the problem that the conversion between RS232 interface and RS485 interface in the prior art needs to be achieved by plugging in a conversion board, thereby solving the problem of cumbersome conversion, the present application provides RS485 and RS232 input signal protection and automatic switching circuits, which can automatically protect and automatically switch RS485 and RS232 input signals according to different input signals, aiming to replace the cumbersome operation of manually physically plugging in or removing the conversion board when conversion is required in the prior art, making signal transmission more convenient and efficient.

[0008] In order to achieve the above purpose, the technical solution adopted in this application is:

[0009] RS485 and RS232 input signal protection and automatic switching circuit, including RS485 interface chip circuit, RS232 interface chip circuit, double-pole double-throw relay switch U3 and identification circuit for automatically switching RS485 and RS232 input signals, and external wiring terminals for accessing external signals;

[0010] The external wiring terminal includes a high potential pin EXPOT+ and a low potential pin ESPOT- and is connected to a high potential input pin 3 and a low potential input pin 6 of a double-pole double-throw relay switch, respectively. The high potential pin EXPOT+ is also connected to the input end of the identification circuit through a switch diode D1 and a protection resistor R4 connected in series in sequence;

[0011] The RS485 interface chip circuit adopts the BL3085 chip, wherein pin B is connected to pin 5 of the double-pole double-throw relay switch U3, and pin A is connected to pin 4 of the double-pole double-throw relay switch U3; the RS232 interface chip circuit adopts the SP3232EIM / TR chip, wherein pin R1IN is connected to pin 2 of the double-pole double-throw relay switch U3, pin 7 of the double-pole double-throw relay switch U3 is grounded, pin 1 is connected to VCC through resistor R3, and pin 8 is connected to the output end of the identification circuit.

[0012] Preferably, the identification circuit includes voltage-dividing resistors R5 and R8 connected in series with the input end in sequence, and a capacitor C7 connected in series with the voltage-dividing resistors R5 and R8 and then in parallel, one end of the capacitor C7 is connected to the input end, and the other end is connected to GND; it also includes a transistor Q1 and a transistor Q2, the base of the transistor Q1 is connected between the voltage-dividing resistors R5 and R8, the emitter is connected to VCC, the collector is connected to the emitter of the transistor Q2 through the voltage-dividing resistor R6 and connected to GND, the collector of the transistor Q1 is connected to the base of the transistor Q2 through the resistor R7, and the collector of the transistor Q2 is connected to the pin 8 of the double-pole double-throw relay switch U3 as the output end of the identification circuit.

[0013] Preferably, a fast transient tube D2 is further provided between pin B of the BL3085 chip and pin 5 of the double-pole double-throw relay switch U3, a fast transient tube D3 is further provided between pin A of the BL3085 chip and pin 4 of the double-pole double-throw relay switch U3, and pin R1 IN of the SP3232E IM / TR chip is connected to pin 2 of the double-pole double-throw relay switch U3 via a fast transient tube D4.

[0014] Beneficial effects:

[0015] The utility model can provide bidirectional protection for the input signal of the access loop, and can automatically switch to RS485 / RS232 circuit function according to the signal type, which is faster and more efficient than the existing physical plug-in / removal adapter conversion method. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative labor.

[0017] Figure 1 It is the RS485 interface chip circuit.

[0018] Figure 2 It is a RS232 interface chip circuit.

[0019] Figure 3 It is an external wiring terminal.

[0020] Figure 4 It is the double-pole double-throw relay switch U3 and the identification circuit. DETAILED DESCRIPTION

[0021] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.

[0022] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0023] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0024] Preferred embodiment:

[0025] The utility model provides a simple and extremely practical circuit structure. The circuit structure and working principle will be described below with the preferred embodiment of the present application. Figure 1-Figure 4 As shown, a RS485 and RS232 input signal protection and automatic switching circuit is provided, including an RS485 interface chip circuit, an RS232 interface chip circuit, a double-pole double-throw relay switch U3 and an identification circuit for automatically switching RS485 and RS232 input signals, and an external wiring terminal for accessing external signals;

[0026] The external wiring terminal includes a high potential pin EXPOT+ and a low potential pin ESPOT- and is connected to a high potential input pin 3 and a low potential input pin 6 of a double-pole double-throw relay switch, respectively. The high potential pin EXPOT+ is also connected to the input end of the identification circuit through a switch diode D1 and a protection resistor R4 connected in series in sequence;

[0027] The RS485 interface chip circuit adopts the BL3085 chip, wherein pin B is connected to pin 5 of the double-pole double-throw relay switch U3, and pin A is connected to pin 4 of the double-pole double-throw relay switch U3; the RS232 interface chip circuit adopts the SP3232EIM / TR chip, wherein pin R1IN is connected to pin 2 of the double-pole double-throw relay switch U3, pin 7 of the double-pole double-throw relay switch U3 is grounded, pin 1 is connected to VCC through resistor R3, and pin 8 is connected to the output end of the identification circuit.

[0028] In this embodiment, the identification circuit includes voltage-dividing resistors R5 and R8 connected in series with the input end in sequence, and a capacitor C7 connected in series with the voltage-dividing resistors R5 and R8 and then in parallel, one end of the capacitor C7 is connected to the input end, and the other end is connected to GND; it also includes a transistor Q1 and a transistor Q2, the base of the transistor Q1 is connected between the voltage-dividing resistors R5 and R8, the emitter is connected to VCC, the collector is connected to the emitter of the transistor Q2 through the voltage-dividing resistor R6 and connected to GND, the collector of the transistor Q1 is connected to the base of the transistor Q2 through the resistor R7, and the collector of the transistor Q2 is connected to the pin 8 of the double-pole double-throw relay switch U3 as the output end of the identification circuit.

[0029] In this embodiment, a fast transient tube D2 is also provided between pin B of the BL3085 chip and pin 5 of the double-pole double-throw relay switch U3, a fast transient tube D3 is also provided between pin A of the BL3085 chip and pin 4 of the double-pole double-throw relay switch U3, and pin R1IN of the SP3232EIM / TR chip is connected to pin 2 of the double-pole double-throw relay switch U3 through a fast transient tube D4.

[0030] About working principle: Figure 1 and Figure 2U1 and U2 are RS485 and RS232 interface chips, which complete RS485 and RS232 input level conversion. CN1 is an external terminal connected to the opposite side device. RS1, RS2, D2, D3, and D4 constitute the input protection circuit. When the external input is an inappropriate level signal or is interfered by static electricity, it exceeds the threshold range of the fast transient tube D2, D3, and D4, and the fast transient tube is turned on, and the current increases instantly. At this time, the resistance of the self-recovery fuse RS1 and RS2 increases instantly, causing the fault line to be approximately open, thereby effectively protecting the circuit on this side and the opposite side loop. When the line fault is eliminated, the resistance of the self-recovery fuse RS1 and RS2 returns to normal, and the communication channel returns to normal. Figure 4 It is a double-pole double-throw relay and an identification circuit for switching input channels. Among them, U3 is a double-pole double-throw relay, Q1 and Q2 are two transistors, and D1 is a switching diode. After the external two-wire input channel is connected, it is connected to the relay (U3) PIN3 and PIN6 pins through the self-recovery fuses RS1 and RS2 respectively. The positive end signal EXPOT+ of the input channel charges the capacitor C7 through the switching diode and the current limiting resistor R4. When the external RS485 signal is connected, the capacitor charging voltage is about 3.8V. After the voltage is divided by R5 and R8, the base voltage of Q1 is lower than 3.8V, Q1 is turned on, the base level of Q2 is pulled high, Q2 is turned on, and the relay coil drives the relay to operate. The original connection between 3 and 2 is switched to 3 and 4. The original connection between 6 and 7 is switched to 6 and 5, so the circuit automatically switches to RS485 communication; when the external RS232 signal is connected, the capacitor charging voltage is about 13.8V, and after the voltage is divided by R5 and R8, the base voltage of Q1 is greater than 5V, Q1 is not conducting, the base of Q2 remains at a low level, Q2 is not conducting, the relay does not operate, and the original connection between 3 and 2, and the connection between 6 and 7 are maintained, so that the circuit remains in RS232 communication. At this point, the input signal protection and automatic circuit switching are completed, so as to achieve the purpose of eliminating the need to plug and unplug the physical adapter board.

[0031] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. RS485 and RS232 input signal protection and automatic switching circuit, characterized by: It includes an RS485 interface chip circuit, an RS232 interface chip circuit, a double-pole double-throw relay switch U3 and an identification circuit for automatically switching RS485 and RS232 input signals, and an external wiring terminal for accessing external signals; The external wiring terminal includes a high potential pin EXPOT+ and a low potential pin ESPOT- and is connected to a high potential input pin 3 and a low potential input pin 6 of a double-pole double-throw relay switch, respectively. The high potential pin EXPOT+ is also connected to the input end of the identification circuit through a switch diode D1 and a protection resistor R4 connected in series in sequence; The RS485 interface chip circuit adopts the BL3085 chip, wherein pin B is connected to pin 5 of the double-pole double-throw relay switch U3, and pin A is connected to pin 4 of the double-pole double-throw relay switch U3; the RS232 interface chip circuit adopts the SP3232EIM / TR chip, wherein pin R1 IN is connected to pin 2 of the double-pole double-throw relay switch U3, pin 7 of the double-pole double-throw relay switch U3 is grounded, pin 1 is connected to VCC through resistor R3, and pin 8 is connected to the output end of the identification circuit.

2. The RS485 and RS232 input signal protection and automatic switching circuit according to claim 1, characterized in that: The identification circuit includes voltage-dividing resistors R5 and R8 connected in series with the input end in sequence, and a capacitor C7 connected in series with the voltage-dividing resistors R5 and R8 and then in parallel, one end of the capacitor C7 is connected to the input end, and the other end is connected to GND; it also includes a transistor Q1 and a transistor Q2, the base of the transistor Q1 is connected between the voltage-dividing resistors R5 and R8, the emitter is connected to VCC, the collector is connected to the emitter of the transistor Q2 through the voltage-dividing resistor R6 and connected to GND, the collector of the transistor Q1 is connected to the base of the transistor Q2 through the resistor R7, and the collector of the transistor Q2 is connected to the pin 8 of the double-pole double-throw relay switch U3 as the output end of the identification circuit.

3. The RS485 and RS232 input signal protection and automatic switching circuit according to claim 1, characterized in that: A fast transient tube D2 is also provided between pin B of the BL3085 chip and pin 5 of the double-pole double-throw relay switch U3, a fast transient tube D3 is also provided between pin A of the BL3085 chip and pin 4 of the double-pole double-throw relay switch U3, and pin R1 IN of the SP3232EIM / TR chip is connected to pin 2 of the double-pole double-throw relay switch U3 through a fast transient tube D4.