Circuit for intelligently switching two kinds of data communication through single RJ45 interface
By designing an intelligent switching circuit on a single RJ45 interface, and utilizing the system logic chip U4B and relays LS1 and LS2, automatic switching between RS232 and RS485 communication is achieved, solving the problems of inconvenient communication and stacking in small devices, and realizing convenient bidirectional data communication.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2026-04-07
AI Technical Summary
In the existing technology, when using RS232 data communication and RS485 data communication, the network communication system needs to manually switch, and small terminal devices only have one RJ45 interface, which makes communication easy to stack and inconvenient to use.
Design a single RJ45 interface intelligent switching circuit, including system logic chip U4B, RS485 and RS232 data conversion circuit, intelligent switching circuit and interface circuit. Automatic switching is achieved through relays LS1 and LS2 to ensure smooth switching between RS232 and RS485 communication.
It enables automatic switching between RS232 and RS485 communication on a single RJ45 interface, avoiding communication stacking. Users only need one network cable to achieve bidirectional data communication, making operation simple.
Smart Images

Figure CN224097716U_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The utility model relates to interface data communication field, more specifically, relate to a kind of circuit of single RJ45 interface intelligent switching two kinds of data communication. BACKGROUND
[0002] With the rapid development of communication network technology, more and more network systems need to be connected through network terminal devices and other terminal devices to achieve data communication and sharing, unified management.
[0003] RS232 data communication or RS485 data communication will be used between network systems, they have their own communication circuit, and each has its own communication interface, which can be arbitrarily selected when used. When there is a common data line, the jumper cap is switched manually to achieve RS232 data communication and RS485 data communication. However, this method is very inconvenient, and small terminal devices often only have one RJ45 interface to connect to the upper device or computer DB9 interface. At this time, RS232 data communication or RS485 data communication is needed in the same RJ45 interface, and RS232 data communication and RS485 data communication are prone to stacking. SUMMARY
[0004] In view of the above defects of the prior art, a circuit for intelligent switching of two kinds of data communication with a single RJ45 interface is provided.
[0005] The utility model discloses a technical scheme that solves its technical problem is adopted: a kind of single RJ45 interface intelligent switching two kinds of data communication circuit, including system logic chip U4B and interface circuit, the system logic chip U4B is connected with RS485 data conversion circuit and RS232 data conversion circuit, the RS485 data conversion circuit is connected with intelligent switching circuit, the intelligent switching circuit is connected with interface circuit, the RS232 data conversion circuit is also connected with interface circuit, the RS232 data conversion circuit is also connected with intelligent switching circuit, the intelligent switching circuit includes resistance R9, the resistance R9 is connected with system logic chip U4B, the resistance R9 is connected with triode Q1 and resistance R15, the resistance R9 is connected with the base of triode Q1, resistance R15 and the emitter of triode Q1 are all grounded, the collector of triode Q1 is connected with diode D1 and resistance R7, diode D1 is connected with the capacitor C21 of ground, diode D1 is also connected with external power supply, the resistance R7 is connected with relay LS1 and relay LS2, the relay LS1 and relay LS2 are all connected with interface circuit, the relay LS1 and relay LS2 are all connected with external power supply, the relay LS1 and relay LS2 are all connected with RS485 data conversion circuit, the relay LS1 and relay LS2 are also all connected with RS232 data conversion circuit.
[0006] As preferred, the relay LS1 and relay LS2 are both double-pole double-throw type relays, the coil pin 1 of the relay LS1 is connected with the resistance R7, the coil pin 8 of the relay LS1 is connected with external power supply, the contact 3 of the relay LS1 and the contact 6 of the relay LS1 are both connected with interface circuit, the contact 2 of the relay LS1 and the contact 7 of the relay LS1 are both connected with RS485 data conversion circuit, the contact 4 of the relay LS1 and the contact 5 of the relay LS1 are both connected with RS232 data conversion circuit, the coil pin of the relay LS2 is also connected with the resistance R7, the coil pin 8 of the relay LS2 is also connected with external power supply, the contact 3 of the relay LS2 and the contact 6 of the relay LS2 are both connected with interface circuit, the contact 2 of the relay LS2 and the contact 7 of the relay LS2 are both connected with RS485 data conversion circuit, the contact 4 of the relay LS2 and the contact 5 of the relay LS2 are both connected with RS232 data conversion circuit.
[0007] As preferred, the RS485 data conversion circuit comprises a chip U1, the chip U1 is connected with the system logic chip U4B, the pin VCC of the chip U1 is connected with the external power supply, the pin VCC of the chip U1 is further connected with a capacitor C1 and a capacitor C2, the capacitor C1 and the capacitor C2 are grounded, the pin B of the chip U1 is connected with a resistor R1, the pin A of the chip U1 is connected with a resistor R2 and a resistor R3, the resistor R2 is connected with the resistor R1, the pin Z of the chip U1 is connected with a resistor R5, the pin Y of the chip U1 is connected with a resistor R6, the resistor R and the resistor R3 are connected with the relay LS1, the resistor R5 and the resistor R6 are connected with the relay LS2.
[0008] As preferred, the RS232 data conversion circuit comprises a first conversion circuit and a second conversion circuit, the first conversion circuit is connected with the system logic chip U4B, the first conversion circuit is further connected with the relay LS1 and the relay LS2, the second conversion circuit is connected with the system logic chip U4B, the second conversion circuit is further connected with the interface circuit.
[0009] As preferred, the first conversion circuit comprises a chip U2, the chip U2 is connected with a capacitor C3, the chip U2 is connected with the system logic chip U4B, the pin VCC of the chip U2 is connected with the external power supply, the pin VCC of the chip U2 is further connected with the grounded capacitor C5, the pin V+ of the chip U2 is connected with the grounded capacitor C6, the pin V- of the chip U2 is connected with the grounded capacitor C7, the pin T1O of the chip U2 is connected with a resistor R8 and the grounded capacitor C8, the pin R1I of the chip U2 is connected with a resistor R11 and the grounded capacitor C9, the pin T2O of the chip U2 is connected with a resistor R12 and the grounded capacitor C10, the pin R2I of the chip U2 is connected with a resistor R14 and the grounded capacitor C11, the resistor R8 and the resistor R11 are connected with the relay LS2, the resistor R12 and the resistor R14 are connected with the relay LS1.
[0010] As preferred, the second conversion circuit comprises a chip U3, the pin VCC of which is connected with an external power supply, the pin VCC of which is also connected with a grounded capacitor C13, the pin V+ of which is connected with a grounded capacitor C6, the pin V- of which is connected with a grounded capacitor C16, the pin T1O of which is connected with a resistor R16 and a grounded capacitor C17, the pin R1I of which is connected with a resistor R18 and a grounded capacitor C18, and the pin R2I of which is connected with a resistor R21 and a grounded capacitor C19, all of which are connected with the interface circuit.
[0011] As preferred, the interface circuit comprises an RJ45 interface, the pin TP3- of which is connected with a grounded transient voltage suppression diode D8, the pin TP3- of which is also connected with a relay LS1, the pin TP3+ of which is connected with a grounded transient voltage suppression diode D7, the pin TP3+ of which is also connected with the RS232 data conversion circuit, the pin TP2+ of which is connected with a grounded transient voltage suppression diode D6, the pin TP2+ of which is also connected with the RS232 data conversion circuit, the pin TP1- of which is connected with a grounded transient voltage suppression diode D5, the pin TP1- of which is also connected with a relay LS2, the pin TP1+ of which is connected with a grounded transient voltage suppression diode D4, the pin TP1+ of which is also connected with the relay LS2, the pin TP0- of which is connected with a grounded transient voltage suppression diode D3, the pin TP0- of which is also connected with the RS232 data conversion circuit, the pin TP0+ of which is connected with a grounded transient voltage suppression diode D2, and the pin TP0+ of which is also connected with the relay LS1.
[0012] The utility model discloses a beneficial effect lies in: when terminal equipment and data equipment communicate, the default state is RS232 communication, when selecting RS232 communication or RS485 communication according to demand, when user needs to switch to RS485 state communication, system logic chip U4B output PWR_CON comes the control relay LS1 and relay LS2 complete the automatic switching of circuit, that is, automatic RS232 communication switches to RS485 communication. Final data signal is all connected to single RJ45 port, and user only needs a RJ45 network cable or RJ45 to DB9 data line, can easily realize RS232 data communication and RS485 data communication, and through above-mentioned intelligent switching circuit, RS232 data communication and RS485 data communication will not appear stacking. BRIEF DESCRIPTION OF DRAWINGS
[0013] Figure 1 It is the circuit diagram of the utility model embodiment intelligent switching circuit;
[0014] Figure 2 It is the circuit diagram of the utility model embodiment RS485 data conversion circuit;
[0015] Figure 3 It is the circuit diagram of the utility model embodiment first conversion circuit;
[0016] Figure 4 It is the circuit diagram of the utility model embodiment second conversion circuit;
[0017] Figure 5 It is the circuit diagram of the utility model embodiment interface circuit;
[0018] Figure 6 It is the circuit diagram of the utility model embodiment logic chip U4B. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical scheme and advantage of the utility model embodiment clearer, the following will combine the technical scheme in the utility model embodiment to be clear, complete description, obviously, the described embodiment is the part embodiment of the utility model, not all embodiments. Based on the embodiment of the utility model, all other embodiments obtained by the ordinary skill in the art without creative labor belong to the protection scope of the utility model, and besides, the direction language such as " up " " down " " front " " back " " left " " right " " inside " " outside " etc. in the utility model is only reference attached to the direction of drawing, and the direction language is used to better, more clearly illustrate and understand the utility model, and is not indicative or implies the orientation that the utility model must have, therefore can not be understood as the limitation of the utility model.
[0020] The utility model embodiment for exampleFigures 1 to 6 As shown in the figure, a single RJ45 interface intelligent switching two kinds of data communication circuit, including system logic chip U4B and interface circuit, the system logic chip U4B is connected with RS485 data conversion circuit and RS232 data conversion circuit, the RS485 data conversion circuit is connected with intelligent switching circuit, the intelligent switching circuit is connected with interface circuit, the RS232 data conversion circuit is also connected with interface circuit, the RS232 data conversion circuit is also connected with intelligent switching circuit, the intelligent switching circuit includes resistance R9, the resistance R9 is connected with system logic chip U4B, the resistance R9 is connected with triode Q1 and resistance R15, the resistance R9 is connected with the base of triode Q1, the resistance R15 and the emitter of triode Q1 are all grounded, the collector of triode Q1 is connected with diode D1 and resistance R7, the diode D1 is connected with ground capacitor C21, the diode D1 is also connected with external power supply, the resistance R7 is connected with relay LS1 and relay LS2, the relay LS1 and relay LS2 are all connected with interface circuit, the relay LS1 and relay LS2 are all connected with external power supply, the relay LS1 and relay LS2 are all connected with RS485 data conversion circuit, the relay LS1 and relay LS2 are also all connected with RS232 data conversion circuit.
[0021] When the terminal equipment and data equipment communication, the default state is RS232 communication, according to the demand selection RS232 communication or RS485 communication, when the user needs to switch to RS485 state communication, system logic chip U4B output PWR_CON to control relay LS1 and relay LS2 complete line automatic switching, namely automatic RS232 communication switching to RS485 communication. The final data signal, all connected to a single RJ45 port, the user only needs a RJ45 network cable or RJ45 to DB9 data line, can easily realize RS232 data communication and RS485 data communication, and through the above intelligent switching circuit, RS232 data communication and RS485 data communication will not appear stacking.
[0022] Further improvement, such as Figure 1As shown in the figure, the relay LS1 and the relay LS2 are both double-pole double-throw relays, the coil pin 1 of the relay LS1 is connected with the resistor R7, the coil pin 8 of the relay LS1 is connected with the external power supply, the contact 3 of the relay LS1 and the contact 6 of the relay LS1 are both connected with the interface circuit, the contact 2 of the relay LS1 and the contact 7 of the relay LS1 are both connected with the RS485 data conversion circuit, the contact 4 of the relay LS1 and the contact 5 of the relay LS1 are both connected with the RS232 data conversion circuit, the coil pin of the relay LS2 is also connected with the resistor R7, the coil pin 8 of the relay LS2 is also connected with the external power supply, the contact 3 of the relay LS2 and the contact 6 of the relay LS2 are both connected with the interface circuit, the contact 2 of the relay LS2 and the contact 7 of the relay LS2 are both connected with the RS485 data conversion circuit, the contact 4 of the relay LS2 and the contact 5 of the relay LS2 are both connected with the RS232 data conversion circuit.
[0023] Further improvement, as Figure 2 As shown in the figure, the RS485 data conversion circuit comprises a chip U1, the chip U1 selects the ISL3180 logic chip, the chip U1 is connected with the system logic chip U4B, the pin VCC of the chip U1 is connected with the external power supply, the pin VCC of the chip U1 is also connected with the capacitor C1 and the capacitor C2, the capacitor C1 and the capacitor C2 are both grounded, the pin B of the chip U1 is connected with the resistor R1, the pin A of the chip U1 is connected with the resistor R2 and the resistor R3, the resistor R2 is connected with the resistor R1, the pin Z of the chip U1 is connected with the resistor R5, the pin Y of the chip U1 is connected with the resistor R6, the resistor R and the resistor R3 are both connected with the relay LS1, the resistor R5 and the resistor R6 are both connected with the relay LS2.
[0024] Further improvement, as Figure 3 And Figure 4 As shown in the figure, the RS232 data conversion circuit comprises a first conversion circuit and a second conversion circuit, the first conversion circuit is connected with the system logic chip U4B, the first conversion circuit is also connected with the relay LS1 and the relay LS2, the second conversion circuit is connected with the system logic chip U4B, the second conversion circuit is also connected with the interface circuit.
[0025] Further improvement, as Figure 3As shown in the first conversion circuit includes chip U2, chip U2 is selected SP3232EEA chip, the chip U2 is connected with the capacitor C3, the chip U2 and system logic chip U4B are connected, the pin VCC of the chip U2 is connected with external power supply, the pin VCC of the chip U2 is also connected with the ground capacitor C5, the pin V+ of the chip U2 is connected with the ground capacitor C6, the pin V- of the chip U2 is connected with the ground capacitor C7, the pin T1O of the chip U2 is connected with the resistor R8 and the ground capacitor C8, the pin R1I of the chip U2 is connected with the resistor R11 and the ground capacitor C9, the pin T2O of the chip U2 is connected with the resistor R12 and the ground capacitor C10, the pin R2I of the chip U2 is connected with the resistor R14 and the ground capacitor C11, the resistor R8 and the resistor R11 are connected with the relay LS2, the resistor R12 and the resistor R14 are connected with the relay LS1.
[0026] Further improvements, such as Figure 4 As shown in the second conversion circuit includes chip U3, preferably, chip U3 is also selected SP3232EEA chip, the chip U3 and system logic chip U4B are connected, the pin VCC of the chip U3 is connected with external power supply, the pin VCC of the chip U3 is also connected with the ground capacitor C13, the pin V+ of the chip U15 is connected with the ground capacitor C6, the pin V- of the chip U15 is connected with the ground capacitor C16, the pin T1O of the chip U3 is connected with the resistor R16 and the ground capacitor C17, the pin R1I of the chip U3 is connected with the resistor R18 and the ground capacitor C18, the pin R2I of the chip U3 is connected with the resistor R21 and the ground capacitor C19, the resistor R16, the resistor R18 and the resistor R21 are connected with the interface circuit.
[0027] Further improvements, such as Figure 5As shown in the figure, the interface circuit includes an RJ45 interface, the shell of the RJ45 interface is grounded, a transient voltage suppression diode D8 connected with the ground is connected to the pin TP3- of the RJ45 interface, the pin TP3- of the RJ45 interface is also connected with a relay LS1, a transient voltage suppression diode D7 connected with the ground is connected to the pin TP3+ of the RJ45 interface, the pin TP3+ of the RJ45 interface is also connected with an RS232 data conversion circuit, a transient voltage suppression diode D6 connected with the ground is connected to the pin TP2+ of the RJ45 interface, the pin TP2+ of the RJ45 interface is also connected with the RS232 data conversion circuit, a transient voltage suppression diode D5 connected with the ground is connected to the pin TP1- of the RJ45 interface, the pin TP1- of the RJ45 interface is also connected with a relay LS2, a transient voltage suppression diode D4 connected with the ground is connected to the pin TP1+ of the RJ45 interface, the pin TP1+ of the RJ45 interface is also connected with the relay LS2, a transient voltage suppression diode D3 connected with the ground is connected to the pin TP0- of the RJ45 interface, the pin TP0- of the RJ45 interface is also connected with the RS232 data conversion circuit, a transient voltage suppression diode D2 connected with the ground is connected to the pin TP0+ of the RJ45 interface, the pin TP0+ of the RJ45 interface is also connected with the relay LS1, preferably, the transient voltage suppression diode D8, the transient voltage suppression diode D7, the transient voltage suppression diode D6, the transient voltage suppression diode D5, the transient voltage suppression diode D4, the transient voltage suppression diode D3 and the transient voltage suppression diode D2 are TVS diode arrays packaged together.
[0028] It should be understood that, for those skilled in the art, improvements or changes can be made according to the above description, and all these improvements and changes shall belong to the protection scope of the appended claims of the utility model.
Claims
1. A circuit for intelligent switching between two data communication methods using a single RJ45 interface, characterized in that, The system includes a system logic chip U4B and an interface circuit. The system logic chip U4B is connected to an RS485 data conversion circuit and an RS232 data conversion circuit. The RS485 data conversion circuit is connected to an intelligent switching circuit. The intelligent switching circuit is connected to the interface circuit. The RS232 data conversion circuit is also connected to the interface circuit. The RS232 data conversion circuit is also connected to the intelligent switching circuit. The intelligent switching circuit includes a resistor R9. The resistor R9 is connected to the system logic chip U4B. The resistor R9 is connected to a transistor Q1 and a resistor R15. The resistor R9 is connected to the base of the transistor Q1. The emitter of both resistor R15 and transistor Q1 is grounded; the collector of transistor Q1 is connected to diode D1 and resistor R7; diode D1 is connected to a grounded capacitor C21; diode D1 is also connected to an external power supply; resistor R7 is connected to relays LS1 and LS2; relays LS1 and LS2 are both connected to an interface circuit; relays LS1 and LS2 are both connected to an external power supply; relays LS1 and LS2 are both connected to an RS485 data conversion circuit; relays LS1 and LS2 are also both connected to an RS232 data conversion circuit.
2. The circuit for intelligent switching between two data communication methods using a single RJ45 interface according to claim 1, characterized in that, Both relays LS1 and LS2 are double-pole double-throw relays. The coil pin 1 of relay LS1 is connected to resistor R7. The coil pin 8 of relay LS1 is connected to an external power supply. Contacts 3 and 6 of relay LS1 are connected to an interface circuit. Contacts 2 and 7 of relay LS1 are connected to an RS485 data conversion circuit. Contacts 4 and 5 of relay LS1 are connected to an RS232 data conversion circuit. The coil pin of relay LS2 is also connected to resistor R7. The coil pin 8 of relay LS2 is also connected to an external power supply. Contacts 3 and 6 of relay LS2 are connected to an interface circuit. Contacts 2 and 7 of relay LS2 are connected to an RS485 data conversion circuit. Contacts 4 and 5 of relay LS2 are connected to an RS232 data conversion circuit.
3. The circuit for intelligent switching between two data communication methods using a single RJ45 interface according to claim 1, characterized in that, The RS485 data conversion circuit includes a chip U1; the chip U1 is connected to the system logic chip U4B; the VCC pin of the chip U1 is connected to an external power supply; the VCC pin of the chip U1 is also connected to capacitors C1 and C2; both capacitors C1 and C2 are grounded; the B pin of the chip U1 is connected to a resistor R1; the A pin of the chip U1 is connected to resistors R2 and R3; resistor R2 is connected to resistor R1; the Z pin of the chip U1 is connected to a resistor R5; the Y pin of the chip U1 is connected to a resistor R6; resistors R and R3 are both connected to relay LS1; resistors R5 and R6 are both connected to relay LS2.
4. The circuit for intelligent switching between two data communication methods using a single RJ45 interface according to claim 1, characterized in that, The RS232 data conversion circuit includes a first conversion circuit and a second conversion circuit; the first conversion circuit is connected to the system logic chip U4B; the first conversion circuit is also connected to relays LS1 and LS2; the second conversion circuit is connected to the system logic chip U4B; the second conversion circuit is also connected to the interface circuit.
5. The circuit for intelligent switching between two data communication methods using a single RJ45 interface according to claim 4, characterized in that, The first conversion circuit includes a chip U2; the chip U2 is connected to a capacitor C3; the chip U2 is connected to a system logic chip U4B; the VCC pin of the chip U2 is connected to an external power supply; the VCC pin of the chip U2 is also connected to a grounded capacitor C5; the V+ pin of the chip U2 is connected to a grounded capacitor C6; the V- pin of the chip U2 is connected to a grounded capacitor C7; the T1O pin of the chip U2 is connected to a resistor R8 and a grounded capacitor C8; the R1I pin of the chip U2 is connected to a resistor R11 and a grounded capacitor C9; the T2O pin of the chip U2 is connected to a resistor R12 and a grounded capacitor C10; the R2I pin of the chip U2 is connected to a resistor R14 and a grounded capacitor C11; resistors R8 and R11 are both connected to a relay LS2; resistors R12 and R14 are both connected to a relay LS1.
6. The circuit for intelligent switching between two data communication methods using a single RJ45 interface according to claim 4, characterized in that, The second conversion circuit includes chip U3; chip U3 is connected to system logic chip U4B; pin VCC of chip U3 is connected to an external power supply; pin VCC of chip U3 is also connected to a grounded capacitor C13; pin V+ of chip U3 is connected to a grounded capacitor C6; pin V- of chip U15 is connected to a grounded capacitor C16; pin T1O of chip U3 is connected to a resistor R16 and a grounded capacitor C17; pin R1I of chip U3 is connected to a resistor R18 and a grounded capacitor C18; pin R2I of chip U3 is connected to a resistor R21 and a grounded capacitor C19; resistors R16, R18, and R21 are all connected to an interface circuit.
7. The circuit for intelligent switching between two data communication methods using a single RJ45 interface according to claim 1, characterized in that, The interface circuit includes an RJ45 interface; pin TP3- of the RJ45 interface is connected to a grounded transient voltage suppression diode D8; pin TP3- of the RJ45 interface is also connected to a relay LS1; pin TP3+ of the RJ45 interface is connected to a grounded transient voltage suppression diode D7; pin TP3+ of the RJ45 interface is also connected to an RS232 data conversion circuit; pin TP2+ of the RJ45 interface is connected to a grounded transient voltage suppression diode D6; pin TP2+ of the RJ45 interface is also connected to an RS232 data conversion circuit; pin TP1- of the RJ45 interface is connected to a grounded... The transient voltage suppressor diode D5 is connected to the RJ45 interface; pin TP1- of the RJ45 interface is also connected to relay LS2; pin TP1+ of the RJ45 interface is connected to grounded transient voltage suppressor diode D4; pin TP1+ of the RJ45 interface is also connected to relay LS2; pin TP0- of the RJ45 interface is connected to grounded transient voltage suppressor diode D3; pin TP0- of the RJ45 interface is also connected to RS232 data conversion circuit; pin TP0+ of the RJ45 interface is connected to grounded transient voltage suppressor diode D2; pin TP0+ of the RJ45 interface is also connected to relay LS1.