Communication circuit

By switching communication modes using an analog switch, the problem of fixed communication direction of communication devices is solved, enabling flexible switching and convenient adaptation in half-duplex mode, and enhancing sensor compatibility.

CN224205085UActive Publication Date: 2026-05-05ZHUHAI SIQI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
ZHUHAI SIQI TECH CO LTD
Filing Date
2025-04-28
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

The communication direction of existing communication devices is fixed and cannot be flexibly switched, which means that circuit modifications must be made on the circuit board when replacing communication devices, resulting in insufficient security and convenience.

Method used

Analog switches are used to switch between transmit and receive modes. The MCU generates a selection signal to control the first analog switch and the second analog switch to be turned on, thereby switching between the transmit control circuit and the receive control circuit.

Benefits of technology

The automatic switching function for receiving/transmitting in half-duplex mode has been added, which improves the flexibility and convenience of communication methods, enhances the compatibility with sensors with different communication methods, and avoids the problem of asynchronous sending/receiving.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN224205085U_ABST
    Figure CN224205085U_ABST
Patent Text Reader

Abstract

The utility model discloses a communication circuit which comprises a half-duplex communication chip, an MCU, a first analog switch, a second analog switch, a sending control circuit and a receiving control circuit. The TX / RX end of the half-duplex communication chip is connected with one end of the first analog switch and one end of the second analog switch. The other end of the first analog switch is connected with one end of the sending control circuit, and the other end of the sending control circuit is used as a TX end connected with a communication device; the other end of the second analog switch is connected with one end of the receiving control circuit, and the other end of the receiving control circuit is used as an RX end connected with a communication device; the selection signal output end of the MCU is connected with the control end of the first analog switch and the control end of the second analog switch. A selection signal generated by the MCU controls one of the first analog switch and the second analog switch to be switched on. According to the utility model, the flexible switching of the receiving and transmitting modes is realized based on the analog switch, the convenience of communication mode switching is improved, and the compatibility of sensors with different communication modes is greatly enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This utility model belongs to the field of electronic circuit technology, specifically relating to a communication circuit that realizes transmit and receive mode switching based on an analog switch. Background Technology

[0002] Currently, many communication chips transmit signals in half-duplex or full-duplex mode. However, some data acquisition devices and sensor communication devices only have two modes: sending and receiving, i.e., simplex. For example, temperature sensors and other communication devices only have a sending function. If they are replaced with sensors that only have a receiving function or half-duplex sensors, communication will fail. This means that the current communication direction and function are fixed, lacking the flexibility to replace communication devices. Once a replacement is needed, circuit modifications must be made on the circuit board. If additional components are required, circuit cutting and soldering must be done on the circuit board, which is neither safe nor convenient. Summary of the Invention

[0003] This invention provides a communication circuit designed to achieve transmit / receive mode switching based on an analog switch, thereby solving the technical problem that the communication direction cannot be flexibly switched in the prior art.

[0004] The present invention adopts the following technical solution:

[0005] A communication circuit includes a half-duplex communication chip, an MCU, a first analog switch, a second analog switch, a transmitting control circuit, and a receiving control circuit. The TX / RX terminals of the half-duplex communication chip are respectively connected to one end of the first analog switch and one end of the second analog switch. The other end of the first analog switch is connected to one end of the transmitting control circuit, which serves as the TX terminal connected to a communication device. The other end of the second analog switch is connected to one end of the receiving control circuit, which serves as the RX terminal connected to the communication device. The selection signal output terminal of the MCU is respectively connected to the control terminals of the first analog switch and the second analog switch. The selection signal generated by the MCU controls one of the first analog switch and the second analog switch to be turned on.

[0006] As a specific technical solution, when the selection signal is high, the first analog switch is turned on and the transmitting control circuit is enabled; when the selection signal is low, the second analog switch is turned on and the receiving control circuit is enabled.

[0007] As a specific technical solution, the first analog switch and the second analog switch are two analog switches integrated into one analog switch chip, and the selection signal output terminal of the MCU is respectively connected to the control terminal of the two analog switches.

[0008] As a specific technical solution, the selection signal output terminal of the MCU is connected to the base (B) of an NPN transistor and the control terminal of the first analog switch. The emitter (E) of the NPN transistor is grounded, and the collector (C) is connected to a 5V power supply and the control terminal of the second analog switch.

[0009] As a specific technical solution, the transmission control circuit includes a 12V power supply and a MOSFET. The other end of the first analog switch is connected to the gate (G) of the MOSFET, and the drain (D) of the MOSFET is connected to the 12V power supply and serves as the TX terminal for connection with the communication device.

[0010] As a specific technical solution, the 12V power supply terminal is equipped with a first RC filter circuit.

[0011] As a specific technical solution, the TX terminal is equipped with a second RC filter circuit.

[0012] As a specific technical solution, the receiving control circuit includes a 12V power supply, a PNP transistor and a diode D2. The other end of the second analog switch is connected to the collector (C) of the PNP transistor and ground. The emitter (E) of the PNP transistor is connected to the 12V power supply. The base (B) of the PNP transistor is connected to the anode of the diode D2. The cathode of the diode D2 serves as the RX terminal connected to the communication device.

[0013] As a specific technical solution, the RX terminal is equipped with a third RC filter circuit.

[0014] As a specific technical solution, the MCU adopts the HC32L170JATH type chip, the half-duplex communication chip adopts the SN65HVD485ED type chip, and the analog switch chip adopts the CD4051B or 74LV4066PW type chip.

[0015] The communication circuit provided by this utility model switches the communication mode via an analog switch. When the selection signal is high, the communication mode is controlled as a transmitting mode; when the selection signal is low, the communication mode is controlled as a receiving mode. Its beneficial effects are mainly reflected in: adding the function of automatically switching between receiving and transmitting modes in half-duplex mode, making the communication method more flexible, facilitating the adaptation or replacement of communication devices with single receiving function, single transmitting function, or dual receiving and transmitting functions (such as various sensors), making up for the shortcomings of existing half-duplex circuits that cannot interact in real time; improving the convenience of communication mode switching, and greatly enhancing the compatibility with sensors with different communication methods. Attached Figure Description

[0016] To more clearly illustrate the embodiments of this utility model, the accompanying drawings used in the description of the embodiments or the prior art will be briefly described below.

[0017] Figure 1 This is an overall block diagram of the communication circuit provided in this embodiment of the utility model.

[0018] Figure 2 This is a circuit diagram of the analog switch, transmitting control circuit, and receiving control circuit in the communication circuit provided in this embodiment of the utility model.

[0019] Figure 3 yes Figure 2 The circuit shown is a schematic diagram of the current direction when the selected signal is high and TX / RX is transmitting a high level.

[0020] Figure 4 yes Figure 2 The circuit shown is a schematic diagram of the current direction when the selection signal is high and the TX / RX transmission is low.

[0021] Figure 5 yes Figure 2 The circuit shown is a schematic diagram of the current direction when the selection signal is low and TX / RX is high.

[0022] Figure 6 yes Figure 2 The circuit shown is a schematic diagram of the current direction when the selection signal is low and TX / RX is transmitting a low level. Detailed Implementation

[0023] To make the technical solution of the present invention clearer and its technical advantages more apparent, the technical solution of the present invention will be clearly and completely described below in conjunction with specific embodiments. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of the present invention.

[0024] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings. For ease of explanation, the orientations are defined in conjunction with the drawings. These orientation definitions are merely for the purpose of clearly describing the relative positional relationships and are not intended to limit the actual orientation of the product or device during production, use, or sale. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Moreover, in the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "set," "connect," etc., should be interpreted broadly. For example, it can refer to a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in the present invention according to the specific circumstances.

[0025] like Figure 1As shown, as a basic implementation method, this embodiment provides a communication circuit for switching between transmit and receive modes based on an analog switch, including a communication chip, an MCU, a first analog switch, a second analog switch, a transmit control circuit, and a receive control circuit.

[0026] The communication chip is an RS485 half-duplex communication chip, such as the SN65HVD485ED chip or a similar communication chip. The TX / RX terminal of the communication chip is connected to one end of the first analog switch, and the other end of the first analog switch is connected to one end of the transmitting control circuit. The other end of the transmitting control circuit serves as the TX terminal for connecting to the communication device (e.g., some sensors). The TX / RX terminal of the communication chip is also connected to one end of the second analog switch, and the other end of the second analog switch is connected to one end of the receiving control circuit. The other end of the receiving control circuit serves as the RX terminal for connecting to the communication device (e.g., some sensors).

[0027] A certain signal output terminal of the MCU is configured as a selection signal output terminal. This selection signal output terminal is connected to the control terminal of the first analog switch (which is used to control the above two ends of the first analog switch to be turned on or off) and the control terminal of the second analog switch (which is used to control the above two ends of the second analog switch to be turned on or off). The selection signal SELECT generated by the MCU controls the first analog switch and the second analog switch to be turned on at one of them.

[0028] In this embodiment, when the SELECT signal generated by the MCU is high, it controls the first analog switch to turn on and enables the transmitting control circuit; when the SELECT signal generated by the MCU is low, it controls the second analog switch to turn on and enables the receiving control circuit. Furthermore, in this embodiment, the MCU uses an HC32L170JATH type chip, but it can also be other similar MCU chips capable of generating high and low levels as selection signals.

[0029] In one specific implementation, the first analog switch and the second analog switch are two analog switches integrated into a single analog switch chip. The selection signal output terminal of the MCU is connected to the control terminals of the two analog switches respectively. For example, the analog switch chip is a CD4051B or 74LV4066PW type chip, which can provide at least two analog switch input / output pins and corresponding control pins.

[0030] Combination Figure 2As shown, the analog switch chip has four analog switch channels: 1Y-1Z, 2Y-2Z, 3Y-3Z, and 4Y-4Z, with control terminals 1E, 2E, 3E, and 4E respectively. In this embodiment, 1Y-1Z-1E and 2Y-2Z-2E are selected as the first and second analog switches, respectively. Simultaneously, the MCU generates a selection signal SELECT, which is sent to the control terminals 1E and 2E of the analog switch chip. When SELECT is high, the first analog switch is turned on, enabling the transmitting control circuit. When the MCU generates a selection signal SELECT is low, the second analog switch is turned on, enabling the receiving control circuit.

[0031] See also Figure 2 As shown, the specific connection method between the MCU's selection signal output terminal and the first analog switch and the second analog switch is as follows: the MCU's selection signal output terminal is connected to the base (B) of an NPN transistor and the control terminal 1E of the first analog switch. The emitter (E) of the NPN transistor is grounded, and the collector (C) is connected to a 5V power supply and the control terminal 2E of the second analog switch.

[0032] See also Figure 2 The transmission control circuit includes a 12V power supply and a MOSFET. The other end of the first analog switch is connected to the gate (G) of the MOSFET, and the drain (D) of the MOSFET is connected to the 12V power supply and serves as the TX terminal for connection to the communication device. Furthermore, a first RC filter circuit is provided at the 12V power supply terminal, and a second RC filter circuit is provided at the TX terminal.

[0033] See also Figure 2 The receiving control circuit includes a 12V power supply, a PNP transistor, and a diode D2. The other end of the second analog switch is connected to the collector (C) of the PNP transistor and ground. The emitter (E) of the PNP transistor is connected to the 12V power supply, and the base (B) of the PNP transistor is connected to the anode of diode D2. The cathode of diode D2 serves as the RX terminal for connection to the communication device. Furthermore, a third RC filter circuit is provided at the RX terminal.

[0034] Below, in conjunction with Figures 3 to 6 This embodiment introduces several operating modes of the communication circuit provided:

[0035] (1) When the MCU's select signal SELECT is high and the communication chip's TX / RX pin sends a high level, the current direction is as follows: Figure 3 As shown; specifically: at this time, because the NPN transistor is turned on, the 2E terminal receives a low level (NPN transistor saturation conduction voltage drop 0.3V), and the second analog switch is not turned on; the 1E terminal receives a high level, the first analog switch is turned on, and the transmission mode is entered; at the same time, because the TX / RX terminal transmits a high level, the MOSFET is turned on, and the TX terminal transmits a low level (MOSFET conduction voltage).

[0036] (2) When the MCU's select signal SELECT is high and the communication chip's TX / RX pin sends a low signal, the current direction is as follows: Figure 4 As shown; specifically: at this time, because the NPN transistor is turned on, the 2E terminal receives a low level (NPN transistor saturation conduction voltage drop 0.3V), and the second analog switch is not turned on; the 1E terminal receives a high level, the first analog switch is turned on, and the transmission mode is entered; at the same time, because the TX / RX terminal sends a low level, the MOSFET is not turned on (cut off), and the TX terminal sends a high level (12V).

[0037] (3) When the MCU's select signal SELECT is low and the RX terminal sends a high level, the current direction is as follows: Figure 5 As shown; specifically: at this time, since the NPN transistor is cut off, the 2E terminal receives a high level (5V pull-up), and the second analog switch is turned on; the 1E terminal receives a low level, the first analog switch is not turned on, and the receiver mode is entered; at the same time, since the RX terminal sends a high level, the PNP transistor has no voltage difference, the diode D2 is not turned on (cut off), and the RX terminal receives a low level (GND).

[0038] (4) When the MCU's select signal SELECT is low and the RX terminal sends a low level, the current direction is as follows: Figure 6 As shown; specifically: at this time, because the NPN transistor is cut off, the 2E terminal receives a high level (5V pull-up), and the second analog switch is turned on; the 1E terminal receives a low level, the first analog switch is not turned on, and the receiving mode is entered; at the same time, because the RX terminal sends a low level, the PNP transistor is turned on, and the 12V is divided by the resistor through the PNP transistor, and the TX / RX terminal of the communication chip receives a high level (12V voltage divider).

[0039] The communication circuit provided by this utility model, by adding a selection signal SELECT, controls the communication mode to transmit when the selection signal is high and to receive when the selection signal is low. Its advantages include: more flexible communication by switching communication modes via an analog switch; automatic switching between receive and transmit modes in half-duplex mode; enhanced real-time interaction capabilities; and effective avoidance of asynchronous switching between sender and receiver in special circumstances, as communication is no longer based on the logic of the communicating parties. The communication circuit provided by this utility model can effectively match sensors or modules with different communication capabilities, and can be compatible with simplex / half-duplex communication circuits without changing existing circuits. It overcomes the shortcomings of existing half-duplex circuits in real-time interaction, facilitating the adaptation or replacement of single-receive, single-transmit, and dual-transmit / receive communication devices (such as various sensors). It also improves the convenience of communication mode switching and greatly enhances compatibility with sensors using different communication methods.

[0040] The above are preferred embodiments of this utility model. It should be noted that, for those skilled in the art, several improvements and modifications can be made without departing from the principle of this utility model, and these improvements and modifications are also considered to be within the protection scope of this utility model.

Claims

1. A communication circuit, characterized in that, The system includes a half-duplex communication chip, an MCU, a first analog switch, a second analog switch, a transmitting control circuit, and a receiving control circuit. The TX / RX terminals of the half-duplex communication chip are connected to one end of the first analog switch and one end of the second analog switch, respectively. The other end of the first analog switch is connected to one end of the transmitting control circuit, which serves as the TX terminal connected to a communication device. The other end of the second analog switch is connected to one end of the receiving control circuit, which serves as the RX terminal connected to a communication device. The selection signal output terminal of the MCU is connected to the control terminals of the first and second analog switches, respectively. The selection signal generated by the MCU controls one of the first and second analog switches to be turned on.

2. The communication circuit according to claim 1, characterized in that, When the selection signal is high, the first analog switch is turned on and the transmitting control circuit is enabled; when the selection signal is low, the second analog switch is turned on and the receiving control circuit is enabled.

3. The communication circuit according to claim 2, characterized in that, The first analog switch and the second analog switch are two analog switches integrated into one analog switch chip, and the selection signal output terminal of the MCU is respectively connected to the control terminal of the two analog switches.

4. The communication circuit according to claim 1, characterized in that, The MCU's select signal output terminal is connected to the base (B) of an NPN transistor and the control terminal of the first analog switch. The emitter (E) of the NPN transistor is grounded, and the collector (C) is connected to a 5V power supply and the control terminal of the second analog switch.

5. The communication circuit according to claim 4, characterized in that, The transmission control circuit includes a 12V power supply and a MOSFET. The other end of the first analog switch is connected to the gate (G) of the MOSFET, and the drain (D) of the MOSFET is connected to the 12V power supply and serves as the TX terminal for connection with the communication device.

6. The communication circuit according to claim 5, characterized in that, The 12V power supply terminal is equipped with a first RC filter circuit.

7. The communication circuit according to claim 5, characterized in that, The TX terminal is equipped with a second RC filter circuit.

8. The communication circuit according to claim 5, characterized in that, The receiving control circuit includes a 12V power supply, a PNP transistor, and a diode D2. The other end of the second analog switch is connected to the collector (C) of the PNP transistor and ground. The emitter (E) of the PNP transistor is connected to the 12V power supply. The base (B) of the PNP transistor is connected to the anode of the diode D2. The cathode of the diode D2 serves as the RX terminal for connection to the communication device.

9. The communication circuit according to claim 8, characterized in that, The RX terminal is equipped with a third RC filter circuit.

10. The communication circuit according to claim 3, characterized in that, The MCU uses the HC32L170JATH type chip, the half-duplex communication chip uses the SN65HVD485ED type chip, and the analog switch chip uses the CD4051B or 74LV4066PW type chip.