Communication circuit and electronic equipment

By designing a communication circuit for the bus communication system, the combination of differential amplification module, detection module and main control module is used to solve the problems of communication delay and signal conflict in the traditional bus communication system, and efficient and stable communication signal transmission is achieved.

CN222763899UActive Publication Date: 2025-04-15TP-LINK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202421412022.4
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2025-04-15
Estimated Expiration
2034-06-19

AI Technical Summary

Technical Problem

Traditional communication systems that communicate via bus have communication problems with communication delay, especially when there are many devices, the delay in bus communication is obvious, and the slave node cannot directly transmit emergency data such as alarms.

Method used

A communication circuit is designed, including a differential amplification module, a detection module and a main control module. The differential amplification module generates a feedback voltage based on the bus voltage, the detection module outputs a collision feedback signal when the feedback voltage is within the preset range, and the main control module delays the communication signal when it receives the collision feedback signal to avoid signal collision.

Benefits of technology

In the absence of conflict, each communication circuit directly sends communication signals to the communication bus, improves the transmission efficiency of communication signals, and avoids conflicts through delayed transmission when multiple communication circuits send signals at the same time, and ensures the stability of signal transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN222763899U_ABST
    Figure CN222763899U_ABST
Patent Text Reader

Abstract

The utility model discloses a communication circuit and electronic equipment, the communication circuit is used for being connected with other communication circuits through a communication bus, the communication circuit comprises a differential amplification module, a detection module and a main control module, and the differential amplification module is used for generating feedback voltage according to bus voltage on the communication bus; the detection module is used for outputting a conflict feedback signal when the feedback voltage is within a preset voltage range; and the main control module is used for delaying the communication signal sent to the communication bus under the condition of receiving the conflict feedback signal. And under the condition of no conflict, each communication circuit directly sends a communication signal to the communication bus, so that direct transmission of the communication signal is realized. The differential amplification module and the detection module can monitor the conflict condition, and can send the communication signals in a delayed manner to stagger the sending time of each communication circuit and avoid the conflict under the condition that the communication signals are simultaneously sent by a plurality of communication circuits to cause the signal conflict.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of communication technology, and in particular, relates to a communication circuit and electronic equipment. Background Art

[0002] Currently, in a conventional communication system using bus communication, such as an RS485 bus communication system, there is usually a single master node, and the other nodes are all slave nodes.

[0003] The communication between nodes is initiated by the master node. After receiving the command, the slave node obtains the bus control right and then sends information to the bus. After the transmission is completed, the bus control right is returned to the master node. The slave node can only send data when the master node inquires, so it cannot transmit emergency data such as alarms. The slave nodes cannot communicate with each other, and the signals that need to be transmitted can only be transferred through the master node, which seriously affects the transmission speed of information. Especially when the number of devices connected to the bus is large, the delay of bus communication is obvious. Utility Model Content

[0004] The purpose of the present application is to provide a communication circuit and an electronic device, aiming to solve the problem of communication delay existing in the traditional communication system through bus communication.

[0005] A first aspect of an embodiment of the present application provides a communication circuit, which is used to connect to other communication circuits via a communication bus, and the communication circuit includes: a differential amplifier module, connected to the communication bus, and used to generate a feedback voltage based on the bus voltage on the communication bus; a detection module, connected to the differential amplifier module, and used to output a conflict feedback signal when the feedback voltage is within a preset voltage range; a main control module, connected to the detection module and the communication bus, and used to delay the communication signal sent to the communication bus when the conflict feedback signal is received.

[0006] In one embodiment, the differential amplifier module includes a sampling unit and a differential amplifier unit; the first end of the sampling unit is connected to the communication bus, the second end of the sampling unit is connected to the first end of the differential amplifier unit, and the second end of the differential amplifier unit is connected to the detection module; the sampling unit is used to unidirectionally transmit a sampling voltage to the differential amplifier unit according to the bus voltage; the differential amplifier unit is used to generate the feedback voltage based on the sampling unit.

[0007] In one embodiment, the sampling unit includes a first voltage follower and a second voltage follower; the communication bus includes a first bus and a second bus; the sampling voltage includes a first sampling voltage and a second sampling voltage; the input end of the first voltage follower is connected to the first bus, the output end of the first voltage follower is connected to the differential amplifier unit, the input end of the second voltage follower is connected to the second bus, and the output end of the second voltage follower is connected to the differential amplifier unit; the first voltage follower is used to generate and output the first sampling voltage equal to the voltage on the first bus; the second voltage follower is used to generate and output the second sampling voltage equal to the voltage on the second bus.

[0008] In one embodiment, the differential amplification unit includes a first operational amplifier, a first resistor, a second resistor, a third resistor and a fourth resistor; the non-phase input terminal of the first operational amplifier is connected to the output terminal of the first voltage follower through the first resistor, the non-phase input terminal of the first operational amplifier is also connected to the bias power supply through the second resistor, the inverting input terminal of the first operational amplifier is connected to the output terminal of the second voltage follower through the third resistor, the inverting input terminal of the first operational amplifier is also connected to the output terminal of the first operational amplifier through the fourth resistor, and the output terminal of the first operational amplifier is connected to the detection module.

[0009] In one embodiment, the detection module includes a window comparator, the input end of the window comparator is connected to the differential amplifier module, the output end of the window comparator is connected to the main control module, and the window comparator is used to output the conflict feedback signal according to the feedback voltage and a preset voltage range.

[0010] In one embodiment, the window comparator includes a second operational amplifier, a third operational amplifier, a first unidirectional conductor, a second unidirectional conductor and a reference voltage output circuit; the inverting input terminal of the second operational amplifier is connected to the reference voltage output circuit, the non-inverting input terminal of the second operational amplifier is connected to the differential amplifier module, the output terminal of the second operational amplifier is connected to the positive electrode of the first unidirectional conductor, and the negative electrode of the first unidirectional conductor is connected to the main control module; the non-inverting input terminal of the third operational amplifier is connected to the reference voltage output circuit, the inverting input terminal of the third operational amplifier is connected to the differential amplifier module, the output terminal of the third operational amplifier is connected to the positive electrode of the second unidirectional conductor, and the negative electrode of the second unidirectional conductor is connected to the main control module; the reference voltage output circuit is used to provide a first reference voltage to the second operational amplifier and a second reference voltage to the third operational amplifier according to the preset voltage range.

[0011] In one embodiment, the detection module further includes a signal shaping unit, which is connected between the output end of the window comparator and the main control module, and is used to shape the conflict feedback signal.

[0012] In one embodiment, it also includes a signal recovery module, the input end of the signal recovery module is connected to the differential amplifier module, and the output end of the signal recovery module is connected to the main control module; the signal recovery module is used to generate a recovery signal according to the feedback voltage, and the main control module is also used to compare the recovery signal with the sent communication signal to obtain the working status of the communication bus.

[0013] In one embodiment, it also includes an analog-to-digital conversion module, the input end of the analog-to-digital conversion module is connected to the communication bus, and the output end of the analog-to-digital conversion module is connected to the main control module; the analog-to-digital conversion module is used to generate a voltage digital signal according to the bus voltage on the communication bus, and the main control module is also used to adjust the communication mode of each of the communication circuits connected to the communication bus according to the voltage digital signal.

[0014] A second aspect of an embodiment of the present application provides an electronic device, comprising the communication circuit as described above.

[0015] Compared with the prior art, the embodiments of the present application have the following beneficial effects: in the absence of a conflict, each communication circuit directly sends a communication signal to the communication bus, thereby achieving direct transmission of the communication signal and improving the transmission efficiency of the communication signal. The differential amplifier module and the detection module can monitor the conflict situation, and when multiple communication circuits send communication signals at the same time, resulting in a signal conflict, the communication signal can be sent at a delayed time to stagger the sending time of each communication circuit and avoid the conflict. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A schematic diagram of the structure of a communication circuit provided in one embodiment of the present application;

[0017] Figure 2 A specific circuit diagram of a differential amplifier module and a window comparator provided in an embodiment of the present application;

[0018] Figure 3 A specific circuit diagram of a signal shaping unit provided in one embodiment of the present application;

[0019] Figure 4 A specific circuit diagram of a signal recovery module provided in one embodiment of the present application;

[0020] Figure 5 Another structural schematic diagram of a communication circuit provided in one embodiment of the present application;

[0021] Figure 6 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application;

[0022] Figure 7 A flow chart of a communication conflict control method provided by an embodiment of the present application;

[0023] Figure 8 A specific flow chart of step S300 provided in one embodiment of the present application;

[0024] Fig. 9 A specific flow chart of step S310 provided in one embodiment of the present application;

[0025] Fig.10 A further structural schematic diagram of a communication circuit provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0027] It should be noted that when an element is referred to as being “connected to” another element, it can be directly connected to the other element or indirectly connected to the other element.

[0028] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0029] Figure 1 A schematic diagram of the structure of a communication circuit provided in an embodiment of the present application is shown. For the sake of convenience, only the parts related to the present embodiment are shown, which are described in detail as follows:

[0030] The communication circuit 10 is used to connect with other communication circuits 10 via a communication bus 20. The communication circuit 10 includes: a differential amplifier module 100, a detection module 200 and a main control module 300.

[0031] The differential amplifier module 100 is connected to the communication bus 20, and is used to generate a feedback voltage according to the bus voltage on the communication bus 20. The detection module 200 is connected to the differential amplifier module 100, and is used to output a conflict feedback signal when the feedback voltage is within a preset voltage range. The main control module 300 is connected to the detection module 200 and the communication bus 20, and is used to delay the transmission of the communication signal to be sent to the communication bus 20 when receiving the conflict feedback signal.

[0032] In the absence of a conflict, each communication circuit 10 directly sends a communication signal to the communication bus 20, so that direct transmission of the communication signal can be achieved. The differential amplifier module 100 and the detection module 200 can monitor the conflict situation, and when multiple communication circuits 10 send communication signals at the same time, resulting in a signal conflict, the communication signal can be sent at a delayed time to stagger the sending time of each communication circuit 10 to avoid the conflict.

[0033] In some embodiments, when a conflict feedback signal is detected, the main control module 300 may send a communication signal after delaying a corresponding backoff time according to the type of the communication signal to be sent.

[0034] In one embodiment, if Figure 2 As shown, the differential amplification module 100 includes a sampling unit 110 and a differential amplification unit 120 .

[0035] The first end of the sampling unit 110 is connected to the communication bus 20, the second end of the sampling unit 110 is connected to the first end of the differential amplifier unit 120, and the second end of the differential amplifier unit 120 is connected to the detection module 200. The sampling unit 110 is used to unidirectionally transmit the sampling voltage to the differential amplifier unit 120 according to the bus voltage. The differential amplifier unit 120 is used to generate a feedback voltage based on the sampling unit 110.

[0036] It is understandable that the sampling unit 110 implements isolation between the differential amplifier unit 120 and the communication bus 20 to prevent the voltage of the differential amplifier unit 120 from affecting the communication bus 20. The differential amplifier unit 120 can perform differential amplification on the collected sampled voltage to determine the communication state of the communication bus 20.

[0037] In one embodiment, if Figure 2 As shown, the sampling unit 110 includes a first voltage follower 111 and a second voltage follower 112. The communication bus 20 includes a first bus A and a second bus B. The sampling voltage includes a first sampling voltage and a second sampling voltage.

[0038] The input end of the first voltage follower 111 is connected to the first bus A, the output end of the first voltage follower 111 is connected to the differential amplifier unit 120, the input end of the second voltage follower 112 is connected to the second bus B, and the output end of the second voltage follower 112 is connected to the differential amplifier unit 120. The first voltage follower 111 is used to generate and output a first sampling voltage equal to the voltage on the first bus A. The second voltage follower 112 is used to generate and output a second sampling voltage equal to the voltage on the second bus B.

[0039] It is understandable that the input impedance of the first voltage follower 111 and the second voltage follower 112 is relatively large, so obtaining the first sampling voltage and the second sampling voltage through the first voltage follower 111 and the second voltage follower 112 can avoid affecting the voltage on the communication bus 20 .

[0040] In one embodiment, if Figure 2 As shown, the differential amplifier unit 120 includes a first operational amplifier U3, a first resistor R3, a second resistor R4, a third resistor R5, and a fourth resistor R6. The non-inverting input terminal of the first operational amplifier U3 is connected to the output terminal of the first voltage follower 111 through the first resistor R3, and the non-inverting input terminal of the first operational amplifier U3 is also connected to the bias power supply through the second resistor R4, wherein the bias power supply can provide a first working voltage V1, the inverting input terminal of the first operational amplifier U3 is connected to the output terminal of the second voltage follower 112 through the third resistor R5, and the inverting input terminal of the first operational amplifier U3 is also connected to the output terminal of the first operational amplifier U3 through the fourth resistor R6, and the output terminal of the first operational amplifier U3 is connected to the detection module 200.

[0041] It can be understood that the first operational amplifier U3 can generate a feedback voltage according to the voltage difference between the output end of the first voltage follower 111 and the output end of the second voltage follower 112, and the feedback voltage is larger when the voltage difference between the output end of the first voltage follower 111 and the output end of the second voltage follower 112 is larger. The bias power supply can avoid outputting a negative feedback voltage, so that the detection module 200 can detect the feedback voltage.

[0042] It should be noted that the communication bus 20 may be an RS485 bus. When the communication circuit 10 sends a communication signal, the communication circuit 10 may be internally equivalent to selectively connecting the first bus A and the second bus B through the pull-up resistor R pu Or pull-down resistor R pdThey are respectively connected to an interface power supply and ground, and the interface power supply can provide a voltage with a voltage value of VCC. When only one communication circuit 10 sends a communication signal, since the ports of the remaining communication circuits 10 are all in a high-impedance state, the levels of the first bus A and the second bus B are 0V and VCC (the communication circuit 10 sends 0) or VCC and 0V (the communication circuit 10 sends 1).

[0043] When two communication circuits 10 on the communication bus 20 send data at the same time, taking one communication circuit 10 sending 1 and the other communication circuit 10 sending 0 as an example, the voltage on the first bus A becomes BUS 0 due to the data conflict. A , the voltage on the second bus B changes to BUS due to data conflict B ,in When the two communication circuits 10 are the same, the voltage on the first bus A is approximately equal to the voltage on the second bus B. Similarly, when multiple communication circuits 10 in the system send data at the same time, and at the same time, m communication circuits 10 send 1 and n communication circuits 10 send 0, then At this time, the voltage difference between the voltage on the first bus A and the voltage on the second bus B is The differential amplifier unit 120 may obtain a feedback voltage according to a voltage difference between a voltage on the first bus A and a voltage on the second bus B. In some embodiments, VCC is a 5V voltage.

[0044] Since the feedback voltage corresponds to the voltage on the communication bus 20 , it is possible to determine whether there is a conflict on the communication bus 20 through the feedback voltage.

[0045] In one embodiment, if Figure 2 As shown, the detection module 200 includes a window comparator 210, the input end of the window comparator 210 is connected to the differential amplifier module 100, the output end of the window comparator 210 is connected to the main control module 300, and the window comparator 210 is used to output a conflict feedback signal according to the feedback voltage and the preset voltage range.

[0046] It is understandable that the preset voltage range can be set according to the amplification factor of the differential amplifier module 100 and the voltage VCC. When the feedback voltage is within the preset voltage range, it indicates that there is a conflict in the current communication bus 20 .

[0047] In one embodiment, if Figure 2 As shown, the window comparator 210 includes a second operational amplifier U4, a third operational amplifier U5, a first unidirectional conductor D1, a second unidirectional conductor D2 and a reference voltage output circuit 211. The first unidirectional conductor D1 and the second unidirectional conductor D2 can both be diodes.

[0048] The inverting input terminal of the second operational amplifier U4 is connected to the reference voltage output circuit 211, the non-inverting input terminal of the second operational amplifier U4 is connected to the differential amplifier module 100, the output terminal of the second operational amplifier U4 is connected to the positive electrode of the first unidirectional conductor D1, and the negative electrode of the first unidirectional conductor D1 is connected to the main control module 300. The non-inverting input terminal of the third operational amplifier U5 is connected to the reference voltage output circuit 211, the inverting input terminal of the third operational amplifier U5 is connected to the differential amplifier module 100, the output terminal of the third operational amplifier U5 is connected to the positive electrode of the second unidirectional conductor D2, and the negative electrode of the second unidirectional conductor D2 is connected to the main control module 300. The reference voltage output circuit 211 is used to provide a first reference voltage to the second operational amplifier U4 and a second reference voltage to the third operational amplifier U5 according to a preset voltage range.

[0049] It can be understood that, in this embodiment, the first reference voltage is equal to the maximum value of the preset voltage range, and the second reference voltage is equal to the minimum value of the preset voltage range.

[0050] When the feedback voltage is greater than the first reference voltage or the feedback voltage is less than the second reference voltage, the window comparator 210 outputs a high level; when the feedback voltage is less than the first reference voltage and the feedback voltage is greater than the second reference voltage, the window comparator 210 outputs a low level (conflict feedback signal).

[0051] In some embodiments, Figure 2 As shown, the reference voltage output circuit 211 includes a reference power supply, a first voltage-dividing resistor R7, a second voltage-dividing resistor R8 and a third voltage-dividing resistor R9. The reference power supply can provide a second operating voltage V2. The first end of the first voltage-dividing resistor R7 is connected to the reference power supply, the second end of the first voltage-dividing resistor R7 is respectively connected to the first end of the second voltage-dividing resistor R8 and the inverting input end of the second operational amplifier U4, the second end of the second voltage-dividing resistor R8 is respectively connected to the first end of the third voltage-dividing resistor R9 and the non-inverting input end of the third operational amplifier U5, and the second end of the third voltage-dividing resistor R9 is grounded.

[0052] For example, in some embodiments, the voltage VCC is specifically 5V, the bias power supply outputs a voltage of 2.5V, the amplification factor of the differential amplifier unit 120 is 0.5, and the first reference voltage and the second reference voltage may be 3V and 2V, respectively.

[0053] In one embodiment, if Figure 3 As shown, the detection module 200 further includes a signal shaping unit 220. The signal shaping unit 220 is connected between the output end of the window comparator 210 and the main control module 300. The signal shaping unit 220 is used to shape the conflict feedback signal.

[0054] It can be understood that by shaping the conflict feedback signal through the signal shaping unit 220, misjudgment of the conflict state can be reduced.

[0055] Specifically, the signal shaping unit 220 includes a fourth operational amplifier U6, the non-inverting input terminal of the fourth operational amplifier U6 is connected to the output terminal of the window comparator 210, and the inverting input terminal of the fourth operational amplifier U6 is connected to the comparison voltage. When the high level output by the output terminal of the window comparator 210 is greater than the comparison voltage, the signal shaping unit 220 outputs a level that can be recognized by the main control module 300.

[0056] In one embodiment, if Figure 4 As shown, the communication circuit 10 further includes a signal acquisition module 400, the input end of the signal acquisition module 400 is connected to the differential amplifier module 100, and the output end of the signal acquisition module 400 is connected to the main control module 300. The signal acquisition module 400 is used to generate an acquisition signal according to the feedback voltage, and the main control module 300 is also used to compare the acquisition signal with the sent communication signal to obtain the working state of the communication bus 20.

[0057] Specifically, the signal recovery module 400 can obtain a recovery signal by limiting the feedback voltage based on the feedback voltage. For example, in some embodiments, the signal recovery module 400 can output a 3.3V voltage when the feedback voltage is greater than 3.3V, and output a 0V voltage when the feedback voltage is less than 3.3V, to obtain a recovery signal composed of high and low levels. The data transmitted on the communication bus 20 can be determined according to the recovery signal. When the communication circuit 10 to which the signal recovery module 400 belongs outputs a communication signal, the communication signal can be verified. When the recovery signal corresponds to the sent communication signal, it can be determined that there is no conflict on the current communication bus 20. The recovery module 400 can assist in the detection of conflicts.

[0058] In one embodiment, if Figure 5 As shown, the communication circuit 10 also includes an analog-to-digital conversion module 500, the input end of the analog-to-digital conversion module 500 is connected to the communication bus 20, and the output end of the analog-to-digital conversion module 500 is connected to the main control module 300. The analog-to-digital conversion module 500 is used to generate a voltage digital signal according to the bus voltage on the communication bus 20, and the main control module 300 is also used to adjust the communication mode of each communication circuit 10 connected to the communication bus 20 according to the voltage digital signal. Among them, the analog-to-digital conversion module 500 includes an analog-to-digital converter.

[0059] In one embodiment, the main control module 300 includes a controller and a communication chip. The controller is respectively connected to the detection module 200 and the analog-to-digital conversion module 500, and the communication chip is respectively connected to the controller and the communication bus 20. The controller can control the communication chip to output a communication signal. In some embodiments, the controller can be a Microcontroller Unit (MCU), a single-chip microcomputer, a programmable logic controller, a central processing unit, or other processors with processing and computing functions.

[0060] It should be noted that when multiple communication circuits 10 in the system simultaneously send data, and at the same moment, m communication circuits 10 send 1 and n communication circuits 10 send 0, then Therefore, when the main control module 300 obtains the voltage BUS on the communication bus 20 through the analog-to-digital conversion module 500 A and the voltage BUS B , and the voltage VCC is known, the main control module 300 can obtain the specific values of m and n, so as to determine the number of conflicting communication circuits 10.

[0061] In one embodiment, the main control module 300 is configured to: output a communication signal when no conflict feedback signal is detected; when a conflict feedback signal is detected, send a communication signal after delaying a corresponding backoff duration according to the type of the communication signal to be output. The backoff duration is a duration randomly selected within the backoff duration range corresponding to the type of the communication signal.

[0062] It can be understood that each type of communication signal can be assigned a priority. When the bus is idle, all communication circuits 10 can directly send communication signals. When multiple communication circuits 10 simultaneously send communication signals, then according to the priority of the communication signals, the corresponding backoff duration range can be configured to achieve the purpose of avoiding communication signal conflicts.

[0063] Exemplarily, in some embodiments, the backoff duration range corresponding to the communication signal of the first priority is 0 to M1 seconds. The communication circuit 10 outputting the communication signal of the first priority can randomly select a duration within the range of 0 to M1 seconds as the backoff duration. For example, the backoff duration can be set to MX seconds, where 0 < MX < M1. The backoff duration range corresponding to the communication signal of the second priority is M1 seconds to M2 seconds. The communication circuit 10 outputting the communication signal of the second priority can randomly select a duration within the range of M1 seconds to M2 seconds as the backoff duration. For example, the backoff duration can be set to MY seconds, where M1 < MY < M2. And so on.

[0064] In one embodiment, when a plurality of communication circuits 10 are connected to the communication bus 20 , one of the communication circuits 10 may be set as a master node, and the remaining communication circuits 10 may be set as slave nodes.

[0065] The main control module 300 of the master node is also configured to: when a conflict feedback signal is detected, determine the number of conflicting communication circuits 10 according to the voltage digital signal; when the number is within a preset range, send the communication signal after a delay of a corresponding backoff time according to the type of the communication signal to be sent; when the number is not within the preset range, transmit the communication signal by querying each slave node.

[0066] It can be understood that the main control module 300 can obtain the specific voltage on the communication bus 20 based on the voltage digital signal, and then obtain the number of communication circuits 10 involved in the conflict according to the voltage. When there are too many conflicting communication circuits 10, in order to further improve the stability of communication signal transmission, the traditional method of transmitting communication signals by the master node querying the slave node can be used.

[0067] In one embodiment, the master control module 300 of the slave node is further configured to: send a request signal to the master node when a conflicting feedback signal is detected;

[0068] The main control module of the master node is further configured to: after receiving the request signal, control each slave node that is ready to send a communication signal to output a preset signal; and determine the number of conflicting communication circuits 10 according to the voltage digital signal collected by the analog-to-digital conversion module 500 when each slave node outputs the preset signal. The preset signal can be set according to actual needs. In one embodiment, the preset signal can be 1.

[0069] It is understandable that the master node can determine the number of conflicting communication circuits 10 when detecting a conflict feedback signal, and can also determine the number of conflicting communication circuits 10 in response to requests from each slave node. Therefore, the master node can be configured according to actual needs.

[0070] In some embodiments, the master node can also control each slave node to calibrate, and can control some slave nodes to output preset signals at the same time when idle, and obtain the voltage digital signal of the communication bus 20 in different conflict situations through the analog-to-digital conversion module 500, and store it, so that the next time a conflict occurs, the number of conflicts can be quickly obtained by looking up the table based on the voltage digital signal. There are several possibilities, wherein N is the number of communication circuits 10 connected to the communication bus 20.

[0071] Figure 6A schematic diagram of the structure of an electronic device provided by an embodiment of the present application is shown. For the sake of convenience, only the parts related to the present embodiment are shown, which are described in detail as follows:

[0072] The electronic device 30 includes the communication circuit 10 of any one of the above embodiments. In one embodiment, the electronic device 30 may be a frequency converter, and the communication bus 20 may be an RS485 bus.

[0073] Figure 7 A flow chart of a communication conflict control method provided by an embodiment of the present application is shown. For ease of description, only the part related to the present embodiment is shown, which is described in detail as follows:

[0074] The communication conflict control method can be applied to Figures 1 to 6 In the communication circuit 10 of any of the above embodiments, the communication conflict control method can be specifically implemented by the main control module 300 of the communication circuit 10.

[0075] like Figure 7 As shown, the communication conflict control method includes steps S100 to S300.

[0076] Step S100: When preparing to output a communication signal, the output of the detection module is detected.

[0077] Step S200: outputting a communication signal when no conflicting feedback signal is detected.

[0078] Step S300: When a conflicting feedback signal is detected, a communication signal is sent after a delay corresponding to a backoff time according to the type of the communication signal.

[0079] The backoff duration is a duration randomly selected from a backoff duration range corresponding to the type of the communication signal.

[0080] It is understandable that each type of communication signal can be assigned a priority, and when the bus is idle, all communication circuits 10 can directly send communication signals. When multiple communication circuits 10 send communication signals at the same time, the corresponding backoff time range can be configured according to the priority of the communication signal to achieve the purpose of avoiding communication signal conflicts.

[0081] Exemplarily, in some embodiments, the backoff duration range corresponding to the communication signal of the first priority is 0 to M1 seconds. The communication circuit 10 that outputs the communication signal of the first priority can randomly select a duration within the range of 0 to M1 seconds as the backoff duration. For example, the backoff duration can be set to MX seconds, where 0 < MX < M1. The backoff duration range corresponding to the communication signal of the second priority is M1 seconds to M2 seconds. The communication circuit 10 that outputs the communication signal of the second priority can randomly select a duration within the range of M1 seconds to M2 seconds as the backoff duration. For example, the backoff duration can be set to MY seconds, where M1 < MY < M2. And so on.

[0082] The communication conflict control method can detect whether there is a conflict on the communication bus 20. In the case of no conflict, each communication circuit 10 can directly send a communication signal to the communication bus 20 to achieve the direct transmission of the communication signal and improve the transmission efficiency of the communication signal. In the case of a signal conflict, the communication conflict control method can control the communication signal to be sent with a delay, so that the sending times of each communication circuit 10 are staggered to avoid conflicts.

[0083] In one embodiment, when multiple communication circuits are connected to the communication bus, one of the communication circuits is the master node, and the remaining communication circuits are slave nodes. The communication circuit further includes an analog-to-digital conversion module, and the analog-to-digital conversion module is used to generate a voltage digital signal according to the bus voltage on the communication bus.

[0084] As Figure 8 shown, step S300 specifically includes steps S310 to S330.

[0085] Step S310: In the case of detecting a conflict feedback signal, determine the number of conflicting communication circuits according to the voltage digital signal.

[0086] Step S320: In the case where the number is within a preset range, send the communication signal after delaying the corresponding backoff duration according to the type of the communication signal to be prepared for sending.

[0087] Step S330: In the case where the number is not within the preset range, control the master node to transmit the communication signal by querying each slave node.

[0088] It can be understood that the main control module 300 can obtain the specific voltage on the communication bus 20 based on the voltage digital signal, and then obtain the number of communication circuits 10 participating in the conflict according to this voltage. In the case of too many conflicting communication circuits 10, in order to further improve the stability of the communication signal transmission, the traditional method of the master node querying the slave nodes can be used to transmit the communication signal.

[0089] In one embodiment, as Fig. 9As shown, step S310 specifically includes steps S311 to S313.

[0090] Step S311: When each slave node detects a conflicting feedback signal, it sends a request signal to the master node.

[0091] Step S312: After receiving the request signal, the master node controls each slave node that is ready to send a communication signal to output a preset signal.

[0092] Step S313: the master node determines the number of conflicting communication circuits according to the voltage digital signals collected by the analog-to-digital conversion module when each slave node outputs a preset signal.

[0093] It is understandable that the master node can determine the number of conflicting communication circuits 10 when detecting a conflict feedback signal, and can also determine the number of conflicting communication circuits 10 in response to requests from each slave node. Therefore, the master node can be configured according to actual needs.

[0094] In one embodiment, if Fig.10 As shown, the main control module of the communication circuit 10 includes a memory 310 and a controller 320. The controller 320 is respectively connected to the memory 310, the detection module 200 and the analog-to-digital conversion module 500. The memory 310 stores a computer program. When the controller 320 executes the computer program, a communication conflict control method as in any of the above-mentioned embodiments is implemented.

[0095] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0096] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0097] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0098] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A communication circuit, characterized in that: The communication circuit is used to connect with other communication circuits through a communication bus, and the communication circuit includes: A differential amplifier module connected to the communication bus, the differential amplifier module is used to generate a feedback voltage according to a bus voltage on the communication bus; A detection module connected to the differential amplification module, the detection module being configured to output a conflict feedback signal when the feedback voltage is within a preset voltage range; A main control module is connected to the detection module and the communication bus, and is used for delaying the communication signal sent to the communication bus when receiving the conflict feedback signal.

2. The communication circuit according to claim 1, characterized in that The differential amplification module includes a sampling unit and a differential amplification unit; The first end of the sampling unit is connected to the communication bus, the second end of the sampling unit is connected to the first end of the differential amplifier unit, and the second end of the differential amplifier unit is connected to the detection module; The sampling unit is used for unidirectionally transmitting a sampling voltage to the differential amplification unit according to the bus voltage; The differential amplification unit is used to generate the feedback voltage based on the sampling unit.

3. The communication circuit according to claim 2, characterized in that The sampling unit includes a first voltage follower and a second voltage follower; the communication bus includes a first bus and a second bus; the sampling voltage includes a first sampling voltage and a second sampling voltage; The input end of the first voltage follower is connected to the first bus, the output end of the first voltage follower is connected to the differential amplification unit, the input end of the second voltage follower is connected to the second bus, and the output end of the second voltage follower is connected to the differential amplification unit; The first voltage follower is used to generate and output the first sampling voltage which is equal to the voltage on the first bus; The second voltage follower is used for generating and outputting the second sampling voltage which is equal to the voltage on the second bus.

4. The communication circuit according to claim 3, characterized in that: The differential amplification unit includes a first operational amplifier, a first resistor, a second resistor, a third resistor and a fourth resistor; The non-inverting input terminal of the first operational amplifier is connected to the output terminal of the first voltage follower through the first resistor, the non-inverting input terminal of the first operational amplifier is also connected to the bias power supply through the second resistor, the inverting input terminal of the first operational amplifier is connected to the output terminal of the second voltage follower through the third resistor, the inverting input terminal of the first operational amplifier is also connected to the output terminal of the first operational amplifier through the fourth resistor, and the output terminal of the first operational amplifier is connected to the detection module.

5. The communication circuit according to any one of claims 1 to 4, characterized in that: The detection module includes a window comparator, the input end of the window comparator is connected to the differential amplifier module, the output end of the window comparator is connected to the main control module, and the window comparator is used to output the conflict feedback signal according to the feedback voltage and a preset voltage range.

6. The communication circuit according to claim 5, characterized in that The window comparator comprises a second operational amplifier, a third operational amplifier, a first unidirectional conductor, a second unidirectional conductor and a reference voltage output circuit; The inverting input terminal of the second operational amplifier is connected to the reference voltage output circuit, the non-inverting input terminal of the second operational amplifier is connected to the differential amplifier module, the output terminal of the second operational amplifier is connected to the positive electrode of the first unidirectional conductor, and the negative electrode of the first unidirectional conductor is connected to the main control module; The non-inverting input terminal of the third operational amplifier is connected to the reference voltage output circuit, the inverting input terminal of the third operational amplifier is connected to the differential amplifier module, the output terminal of the third operational amplifier is connected to the positive electrode of the second unidirectional conductor, and the negative electrode of the second unidirectional conductor is connected to the main control module; The reference voltage output circuit is used to provide a first reference voltage to the second operational amplifier and a second reference voltage to the third operational amplifier according to the preset voltage range.

7. The communication circuit according to claim 5, characterized in that The detection module further comprises a signal shaping unit, which is connected between the output end of the window comparator and the main control module, and is used for shaping the conflict feedback signal.

8. The communication circuit according to any one of claims 1 to 4, characterized in that: It also includes a signal recovery module, the input end of the signal recovery module is connected to the differential amplification module, and the output end of the signal recovery module is connected to the main control module; The signal recovery module is used to generate a recovery signal according to the feedback voltage, and the main control module is also used to compare the recovery signal with the sent communication signal to obtain the working status of the communication bus.

9. The communication circuit according to any one of claims 1 to 4, characterized in that: It also includes an analog-to-digital conversion module, wherein the input end of the analog-to-digital conversion module is connected to the communication bus, and the output end of the analog-to-digital conversion module is connected to the main control module; The analog-to-digital conversion module is used to generate a voltage digital signal according to the bus voltage on the communication bus, and the main control module is also used to adjust the communication mode of each of the communication circuits connected to the communication bus according to the voltage digital signal.

10. An electronic device, characterized in that: Comprising the communication circuit as claimed in any one of claims 1 to 9.