A communication device, an electrical device and a communication control method thereof

By designing a communication circuit that can control the switching of UART and 485 communication methods of software, the problem of reduced hardware versatility and compatibility of electrical equipment is solved, and higher communication convenience and hardware compatibility are achieved.

CN113341790BActive Publication Date: 2025-04-11GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110522377.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-13
Publication Date
2025-04-11
Estimated Expiration
2041-05-13

AI Technical Summary

Technical Problem

When selecting communication methods for electrical equipment, the control unit of electrical equipment needs to distinguish between UART communication methods and 485 communication methods according to different hardware, resulting in reduced hardware universality and compatibility.

Method used

A communication circuit is designed, including an isolation unit, a conversion unit and a communication unit. It can switch the UART communication method and 485 communication method through software settings to achieve flexible selection of communication methods.

Benefits of technology

The switching of communication methods is achieved through software control, which improves the universality and compatibility of the control units of electrical equipment in hardware, reduces operation inconvenience and improves efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113341790B_ABST
    Figure CN113341790B_ABST
Patent Text Reader

Abstract

The present invention discloses a communication device, an electrical device and a communication control method thereof, the device comprising: an isolation unit, receiving a first control signal sent by a first control unit, isolating and processing the first control signal to obtain a first isolation control signal; also receiving a second control signal sent by the first control unit, isolating and processing the second control signal to obtain a second isolation control signal; a conversion unit, based on the first isolation control signal, converting the communication mode and determining the current communication mode; a communication unit, communicating in accordance with the first communication mode when powered on and not working; communicating in accordance with the second communication mode in combination with the second isolation control signal when powered on and working. This solution improves the versatility and compatibility of the control unit in hardware by realizing the switching between the UART communication mode and the 485 communication mode through software settings when the control unit selects the communication mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of communication control technology, and specifically relates to a communication device, an electrical device and a communication control method thereof, and more particularly to a communication circuit capable of switching between a UART communication mode and a 485 communication mode through software control, an electrical device having the communication circuit, and a communication control method for the electrical device. Background Art

[0002] Communication between control units is often required in electrical equipment. The communication methods used in related solutions include Universal Asynchronous Receiver / Transmitter (UART) and 485. UART is often used when the communication distance is short, while 485 is often used when the communication distance is long. Among them, UART is a communication method that uses Universal Asynchronous Receiver / Transmitter (UART) for communication. 485 is a communication method that uses RS485 communication chip for communication.

[0003] In the related scheme, when the control unit of the electrical equipment selects the communication method, it must distinguish whether to use the UART communication method or the 485 communication method based on the hardware differences of the control unit of the electrical equipment, which greatly reduces the versatility and compatibility of the hardware of the control unit of the electrical equipment.

[0004] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The object of the present invention is to provide a communication device, an electrical device and a communication control method thereof, so as to solve the problem that when a control unit of an electrical device selects a communication mode, it is necessary to distinguish whether to use a UART communication mode or a 485 communication mode according to the difference in hardware of the control unit of the electrical device, thereby reducing the problem of hardware versatility and compatibility of the control unit of the electrical device, and achieving the effect of switching between the UART communication mode and the 485 communication mode by setting a communication circuit having a UART communication function and a 485 communication function and capable of switching when the control unit of the electrical device selects a communication mode through software settings, which is beneficial to improving the hardware versatility and compatibility of the control unit of the electrical device.

[0006] The present invention provides a communication device, comprising: an isolation unit, a conversion unit and a communication unit; the isolation unit, the conversion unit and the communication unit can form a communication circuit having a first communication function and a second communication function, and can switch between the first communication function and the second communication function; in the communication circuit: the isolation unit is configured to receive a first control signal sent by a first control unit, and isolate the first control signal to obtain a first isolation control signal; it is also configured to receive a second control signal sent by the first control unit, and isolate the second control signal to obtain a second isolation control signal; wherein the first control unit is a control unit of a first electrical device that needs to communicate; the first control signal is a control signal for selecting a communication mode of the communication circuit by controlling the level of the receiver output end and the driver input end of the communication unit; the second control signal is a control signal for controlling the operation of the communication unit; the communication modes of the communication circuit include: a first communication mode and a second communication mode; The first communication mode is a communication mode for communication using the first communication function; the second communication mode is a communication mode for communication using the second communication function; the conversion unit is configured to convert the communication mode based on the first isolation control signal, so as to use the one of the first communication mode and the second communication mode corresponding to the first control signal as the current communication mode, so that the first control unit can communicate with other control units according to the current communication mode; the communication unit is configured so that when the current communication mode is the second communication mode, the communication unit itself is in a powered-on and working state, so as to realize communication between the first control unit and other control units in the powered-on and working state according to the second communication mode combined with the second isolation control signal; when the current communication mode is the first communication mode, the communication unit itself is in a powered-on and non-working state, so as to communicate with other control units in the powered-on and non-working state according to the first communication mode.

[0007] In some embodiments, the isolation unit includes: a first isolation module and a second isolation module; the conversion unit includes: a first conversion module and a second conversion module; wherein the first isolation module is arranged between the input end of the first control signal and the control end of the first conversion module; the output end of the first conversion module is connected to one of the driver output end and the receiver input end of the communication unit; the first isolation module is also arranged between the input end of the first control signal and the control end of the second conversion module; the output end of the second conversion module is connected to the other connection end of the driver output end and the receiver input end of the communication unit; the second isolation module is arranged between the input end of the second control signal and the driver output enable end and the receiver enable output end of the communication unit.

[0008] In some embodiments, the first isolation module includes: a first optocoupler module; the second isolation module includes: a second optocoupler module; the first conversion module includes: a first switch tube module; the second conversion module includes: a second switch tube module; wherein the cathode on the diode side of the first optocoupler module serves as the input end of the first optocoupler module; the emitter on the transistor side of the first optocoupler module serves as the output end of the first optocoupler module; the cathode on the diode side of the second optocoupler module serves as the input end of the second optocoupler module; the emitter on the transistor side of the second optocoupler module serves as the output end of the second optocoupler module; the base of the first switch tube module serves as the control end of the first switch tube module; the collector of the first switch tube module serves as the output end of the first switch tube module; the base of the second switch tube module serves as the control end of the second switch tube module; the emitter of the second switch tube module serves as the output end of the second switch tube module.

[0009] In some embodiments, the isolation unit further includes: a third isolation module and a fourth isolation module; the conversion unit further includes: a third conversion module and a fourth conversion module; wherein the first isolation module is also arranged between the input end of the first control signal and the control end of the third conversion module; the third isolation module is arranged between the signal receiving end of the first control unit and the first connection end of the third conversion module; the second connection end of the third conversion module is connected to the receiver output end of the communication unit; the first connection end of the third conversion module is also connected to the second connection end of the first conversion module, and the first connection end of the first conversion module serves as the output end of the first conversion module; the first isolation module is also arranged between the input end of the first control signal and the control end of the fourth conversion module; the fourth isolation module is arranged between the signal sending end of the first control unit and the second connection end of the fourth conversion module; the first connection end of the fourth conversion module is connected to the driver input end of the communication unit; the first connection end of the fourth conversion module is also connected to the first connection end of the second conversion module, and the second connection end of the second conversion module serves as the output end of the second conversion module.

[0010] In some embodiments, the third isolation module includes: a third optocoupler module; the fourth isolation module includes: a fourth optocoupler module; the third conversion module includes: a third switch tube module; the fourth conversion module includes: a fourth switch tube module; wherein the emitter on the transistor side of the third optocoupler module serves as the input end of the third optocoupler module; the anode on the diode side of the third optocoupler module serves as the output end of the third optocoupler module; the anode on the diode side of the fourth optocoupler module serves as the input end of the fourth optocoupler module; the base of the third switch tube module serves as the control end of the third switch tube module; the collector of the third switch tube module serves as the first connection end of the third switch tube module; the emitter of the third switch tube module serves as the second connection end of the third switch tube module; the base of the fourth switch tube module serves as the control end of the fourth switch tube module; the emitter of the fourth switch tube module serves as the first connection end of the fourth switch tube module; and the collector of the fourth switch tube module serves as the second connection end of the fourth switch tube module.

[0011] In some implementations, the third switch tube module further includes: a first voltage divider module; the first voltage divider module is disposed at the second connection end of the third switch tube module.

[0012] In some implementations, the fourth switch tube module further includes: a second voltage divider module; the second voltage divider module is disposed at the first connection end of the fourth switch tube module.

[0013] In some embodiments, the communication unit includes: a 485 communication module; the first communication mode includes: a UART communication mode; the second communication mode includes: a 485 communication mode; the communication unit, when the current communication mode is the first communication mode, the communication unit itself is in a powered and non-working state, so that in the powered and non-working state, it communicates with other control units according to the first communication mode; when the current communication mode is the second communication mode, the communication unit itself is in a powered and working state, so that in the powered and working state, it communicates with other control units according to the second communication mode in combination with the second isolation control signal, Including: when the current communication mode is the UART communication mode, the first control signal is a signal of a first set level, the second control signal is a signal of a first set level, and the communication circuit communicates according to the UART communication mode; when the current communication mode is the 485 communication mode, the first control signal is a signal of a second set level, and the communication circuit communicates according to the 485 communication mode; wherein, under the 485 communication mode, when the second control signal is a signal of a first set level, the 485 communication module can realize the first set 485 communication; under the 485 communication mode, when the second control signal is a signal of a second set level, the 485 communication module can realize the second set 485 communication.

[0014] Matching the above-mentioned device, the present invention further provides an electrical device on the other hand, including: the communication device mentioned above.

[0015] Matching the above-mentioned electrical equipment, the present invention provides a communication control method for electrical equipment on another aspect, comprising: receiving a first control signal sent by a first control unit through an isolation unit, and isolating and processing the first control signal to obtain a first isolated control signal; and being further configured to receive a second control signal sent by the first control unit, and isolating and processing the second control signal to obtain a second isolated control signal; wherein the first control unit is a control unit of the first electrical equipment that needs to communicate; the first control signal is a control signal for selecting a communication mode of the communication circuit by controlling the level of the receiver output end and the driver input end of the communication unit; the second control signal is a control signal for controlling the operation of the communication unit; the communication mode of the communication circuit includes: a first communication mode and a second communication mode; the first communication mode is a communication mode using a first communication function for communication; the second communication mode is a communication mode using a second communication function for communication. A communication mode is a communication mode that uses a second communication function to communicate; through a conversion unit, based on the first isolation control signal, a communication mode conversion is performed to use the first communication mode and the second communication mode, whichever communication mode corresponds to the first control signal, as the current communication mode, so that the first control unit can communicate with other control units according to the current communication mode; through a communication unit, when the current communication mode is the second communication mode, the communication unit itself is in a powered-on and working state, so that in the powered-on and working state, according to the second communication mode, combined with the second isolation control signal, the communication between the first control unit and other control units is realized; when the current communication mode is the first communication mode, the communication unit itself is in a powered-on and non-working state, so that in the powered-on and non-working state, according to the first communication mode, it communicates with other control units.

[0016] In some embodiments, the communication unit includes: a 485 communication module; the first communication mode includes: a UART communication mode; the second communication mode includes: a 485 communication mode; through the communication unit, when the current communication mode is the second communication mode, the communication unit itself is in a powered and working state, so that in the powered and working state, the second communication mode is used in combination with the second isolation control signal to realize communication between the first control unit and other control units; when the current communication mode is the first communication mode, the communication unit itself is in a powered and non-working state, so that in the powered and non-working state, communication is carried out with other control units according to the first communication mode, Including: when the current communication mode is the UART communication mode, the first control signal is a signal of a first set level, the second control signal is a signal of a first set level, and the communication circuit communicates according to the UART communication mode; when the current communication mode is the 485 communication mode, the first control signal is a signal of a second set level, and the communication circuit communicates according to the 485 communication mode; wherein, under the 485 communication mode, when the second control signal is a signal of a first set level, the 485 communication module can realize the first set 485 communication; under the 485 communication mode, when the second control signal is a signal of a second set level, the 485 communication module can realize the second set 485 communication.

[0017] Therefore, the scheme of the present invention, by utilizing an isolation circuit, a conversion circuit and an RS485 communication module, sets a communication circuit having a UART communication function and a 485 communication function and capable of switching between the UART communication mode and the 485 communication mode. When the control unit of the electrical device selects the communication mode, it is only necessary to control the level of the receiver output end and the driver input end of the RS485 communication module through software settings to control the communication circuit so that the communication circuit switches between the UART communication mode and the 485 communication mode. Thus, the switching between the UART communication mode and the 485 communication mode is realized through software settings, which improves the communication convenience between the control units of the electrical devices and is conducive to improving the versatility and compatibility of the control units of the electrical devices in hardware.

[0018] Other features and advantages of the present invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the present invention.

[0019] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1is a schematic structural diagram of an embodiment of a communication device of the present invention;

[0021] Figure 2 A schematic diagram of the structure of an embodiment of a communication circuit capable of switching between a UART communication mode and a 485 communication mode through software control;

[0022] Figure 3 A schematic structural diagram of a specific embodiment of an embodiment of a communication circuit capable of switching between a UART communication mode and a 485 communication mode through software control;

[0023] Figure 4 A schematic structural diagram of another specific embodiment of an embodiment of a communication circuit capable of switching between a UART communication mode and a 485 communication mode through software control;

[0024] Figure 5 It is a flow chart of an embodiment of the communication control method of the present invention. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0026] According to an embodiment of the present invention, a communication device is provided. Figure 1 A schematic diagram of the structure of an embodiment of the device of the present invention is shown. The communication device can be used as a communication device of an electrical device to realize communication of the electrical device. The communication device of the electrical device includes: an isolation unit, a conversion unit and a communication unit. Isolation unit, such as isolation circuit 1, isolation circuit 2, isolation circuit 3 and isolation circuit 4. Conversion unit, such as conversion circuit 1, conversion circuit 2, conversion circuit 3 and conversion circuit 4. Communication unit, such as a 485 communication module. The isolation unit, the conversion unit and the communication unit can form a communication circuit having a first communication function and a second communication function, and can switch between the first communication function and the second communication function. The second communication function, such as a 485 communication function. The first communication function, such as a UART communication function. In the communication circuit:

[0027] The isolation unit is configured to receive a first control signal (such as control signal Y) sent by the first control unit, and isolate the first control signal to obtain a first isolated control signal; and is also configured to receive a second control signal (such as control signal X) sent by the first control unit, and isolate the second control signal to obtain a second isolated control signal.

[0028] Wherein, the first control unit (such as control unit 1) is a control unit of the first electrical equipment that needs to communicate. The first control signal is a control signal used to select the communication mode of the communication circuit by controlling the level of the receiver output end and the driver input end of the communication unit. The second control signal is a control signal used to control the operation of the communication unit. The communication mode of the communication circuit includes: a first communication mode and a second communication mode. The first communication mode is a communication mode that uses the first communication function for communication. The second communication mode is a communication mode that uses the second communication function for communication. For example: control signal Y is a control signal for control unit 1 to control whether to use UART communication mode or 485 communication mode, and control signal X is a control signal for control unit 1 to control the operation of RS485 communication chip.

[0029] The conversion unit is configured to perform communication mode conversion based on the first isolation control signal, that is, based on the first control signal after the isolation process, so as to use the one of the first communication mode and the second communication mode corresponding to the first control signal as the current communication mode, so that the first control unit can communicate with other control units according to the current communication mode. In other words, the communication unit can perform communication mode conversion based on the communication mode conversion signal, so as to use the one of the first communication function and the second communication function corresponding to the first control signal as the current communication function, so that the first control unit can communicate with other control units according to the current communication function. Other control units are control units of other electrical equipment that need to communicate with the control unit of the first electrical equipment.

[0030] The communication unit is configured such that when the current communication mode is the second communication mode, the communication unit itself is in a powered and working state, so as to realize communication between the first control unit and other control units according to the second communication mode in combination with the second isolation control signal in the powered and working state; and when the current communication mode is the first communication mode, the communication unit itself is in a powered and non-working state, so as to communicate with other control units according to the first communication mode in the powered and non-working state.

[0031] Thus, through the isolation unit, the conversion unit and the communication unit, a communication circuit having a first communication function and a second communication function can be formed, and the switching between the first communication function and the second communication function can be realized through software setting. In this way, the setting only needs to be controlled by software to select a communication circuit of UART communication mode or 485 communication mode, and the UART communication mode or 485 communication mode can be selectively used through software switching, which greatly improves the compatibility and versatility of the mainboard of the electrical equipment, and also reduces the inconvenience in operation and improves efficiency.

[0032] In some embodiments, the isolation unit includes: a first isolation module (such as isolation circuit 1) and a second isolation module (such as isolation circuit 3). The conversion unit includes: a first conversion module (such as conversion circuit 1) and a second conversion module (such as conversion circuit 2).

[0033] The first isolation module is arranged between the input end of the first control signal and the control end of the first conversion module (such as the base of the transistor Q1). The output end of the first conversion module (such as the collector of the transistor Q1) is connected to one of the driver output end and the receiver input end of the communication unit, that is, connected to the input end of the communication signal M between the first control unit and other control units. The driver output end and the receiver input end of the communication unit are such as the A pin and the B pin of the RS485 chip.

[0034] The first isolation module is also arranged between the input end of the first control signal and the control end of the second conversion module (such as the base of the transistor Q2). The output end of the second conversion module (such as the emitter of the transistor Q2) is connected to the other connection end of the driver output end and the receiver input end of the communication unit, that is, connected to the input end of the communication signal N between the first control unit and other control units. The communication signal M and the communication signal N are both communication signals between the first control unit and other control units.

[0035] The second isolation module is arranged between the input terminal of the second control signal and the driver output enable terminal and the receiver enable output terminal of the communication unit. The driver output enable terminal and the receiver enable output terminal of the communication unit are such as the DE pin and the RE / pin of the RS485 communication chip.

[0036] In some embodiments, the first isolation module (such as isolation circuit 1) includes: a first optical coupling module, such as an optical coupling B1 and its peripheral circuits, and the peripheral circuits of the optical coupling B1 include resistors R1 and R2. The second isolation module (such as isolation circuit 3) includes: a second optical coupling module, such as an optical coupling B3 and its peripheral circuits, and the peripheral circuits of the optical coupling B3 include resistors R5 and R6.

[0037] The first conversion module (such as conversion circuit 1) includes: a first switch tube module, such as transistor Q1 and its peripheral circuit, and resistors R9, R10 and R11 constitute the peripheral circuit of transistor Q1. The second conversion module (such as conversion circuit 2) includes: a second switch tube module, such as transistor Q2 and its peripheral circuit, and resistors R12 and R13 constitute the peripheral circuit of transistor Q1.

[0038] The cathode on the diode side of the first optical coupling module (such as the optical coupling B1 and its peripheral circuit) is connected to the input end of the first control signal as the input end of the first optical coupling module (such as the optical coupling B1 and its peripheral circuit). The emitter on the transistor side of the first optical coupling module (such as the optical coupling B1 and its peripheral circuit) is connected to the output end of the first optical coupling module (such as the optical coupling B1 and its peripheral circuit).

[0039] The cathode on the diode side of the second optical coupling module (such as the optical coupling B3 and its peripheral circuit) is connected to the input end of the second control signal as the input end of the second optical coupling module (such as the optical coupling B3 and its peripheral circuit). The emitter on the transistor side of the second optical coupling module (such as the optical coupling B3 and its peripheral circuit) is connected to the output end of the second optical coupling module (such as the optical coupling B3 and its peripheral circuit).

[0040] The base of the first switch tube module (such as the transistor Q1 and its peripheral circuit) serves as the control end of the first switch tube module (such as the transistor Q1 and its peripheral circuit). The collector of the first switch tube module (such as the transistor Q1 and its peripheral circuit) serves as the output end of the first switch tube module (such as the transistor Q1 and its peripheral circuit).

[0041] The base of the second switch tube module (such as the transistor Q2 and its peripheral circuit) serves as the control end of the second switch tube module (such as the transistor Q2 and its peripheral circuit). The emitter of the second switch tube module (such as the transistor Q2 and its peripheral circuit) serves as the output end of the second switch tube module (such as the transistor Q2 and its peripheral circuit).

[0042] In some embodiments, the isolation unit further includes: a third isolation module (such as isolation circuit 2) and a fourth isolation module (such as isolation circuit 4). The conversion unit further includes: a third conversion module (such as conversion circuit 3) and a fourth conversion module (such as conversion circuit 4).

[0043] Wherein, the first isolation module is also arranged between the input end of the first control signal and the control end of the third conversion module (such as the base of the transistor Q3). The third isolation module is arranged between the signal receiving end of the first control unit and the first connection end of the third conversion module (such as the collector of the transistor Q3). The second connection end of the third conversion module (such as the emitter of the transistor Q3) is connected to the receiver output end of the communication unit (such as the RO pin of the RS485 chip). The first connection end of the third conversion module is also connected to the second connection end of the first conversion module (such as the emitter of the transistor Q1), and the first connection end of the first conversion module serves as the output end of the first conversion module. The signal receiving end of the first control unit is such as the input end of the communication signal RX of the first control unit.

[0044] The first isolation module is also arranged between the input end of the first control signal and the control end of the fourth conversion module (such as the base of transistor Q4). The fourth isolation module is arranged between the signal sending end of the first control unit and the second connection end of the fourth conversion module (such as the emitter of transistor Q4). The first connection end of the fourth conversion module (such as the collector of transistor Q43) is connected to the driver input end of the communication unit (such as the DI pin of the RS485 chip). The first connection end of the fourth conversion module is also connected to the first connection end of the second conversion module (such as the collector of transistor Q2), and the second connection end of the second conversion module serves as the output end of the second conversion module. The signal sending end of the first control unit is such as the input end of the communication signal TX of the first control unit.

[0045] Therefore, by designing four conversion circuits and designing a control signal to control the four conversion circuits at the same time, it is realized that the communication mode can be controlled by software, whether it is UART communication mode or 485 communication mode. Specifically, through four conversion circuits and one optocoupler isolation circuit, the software can be selected to switch between UART communication mode and 485 communication mode. For example, it is possible to control the on and off of two NPN transistors (such as transistor Q1 and transistor Q2) and PNP transistors (such as transistor Q3 and transistor Q4) at the same time through one optocoupler (such as optocoupler B1) to switch between UART communication mode and 485 communication mode.

[0046] In some embodiments, the third isolation module (such as isolation circuit 2) includes: a third optical coupling module, such as optical coupling B2 and its peripheral circuit, and the peripheral circuit of optical coupling B2 includes resistors R3 and R4. The fourth isolation module (such as isolation circuit 4) includes: a fourth optical coupling module, such as optical coupling B4 and its peripheral circuit, and the peripheral circuit of optical coupling B4 includes resistors R7 and R8.

[0047] The third conversion module (such as conversion circuit 3) includes: a third switch tube module, such as transistor Q3 and its peripheral circuit, and resistors R11 and R14 constitute the peripheral circuit of transistor Q3. The fourth conversion module (such as conversion circuit 4) includes: a fourth switch tube module, such as transistor Q4 and its peripheral circuit, and resistors R15 and R16 constitute the peripheral circuit of transistor Q4.

[0048] The emitter on the transistor side of the third optical coupling module (such as the optical coupling B2 and its peripheral circuit) is connected to the signal receiving end of the first control unit, such as the input end of the communication signal RX of the first control unit, as the input end of the third optical coupling module (such as the optical coupling B2 and its peripheral circuit). The anode on the diode side of the third optical coupling module (such as the optical coupling B2 and its peripheral circuit) is used as the output end of the third optical coupling module (such as the optical coupling B2 and its peripheral circuit).

[0049] The anode on the diode side of the fourth optocoupler module (such as optocoupler B4 and its peripheral circuit) serves as the input end of the fourth optocoupler module (such as optocoupler B4 and its peripheral circuit) and is connected to the signal sending end of the first control unit, such as the input end of the communication signal TX of the first control unit.

[0050] The base of the third switch tube module (such as the transistor Q3 and its peripheral circuit) serves as the control end of the third switch tube module (such as the transistor Q3 and its peripheral circuit). The collector of the third switch tube module (such as the transistor Q3 and its peripheral circuit) serves as the first connection end of the third switch tube module (such as the transistor Q3 and its peripheral circuit). The emitter of the third switch tube module (such as the transistor Q3 and its peripheral circuit) serves as the second connection end of the third switch tube module (such as the transistor Q3 and its peripheral circuit).

[0051] The base of the fourth switch tube module (such as the transistor Q4 and its peripheral circuit) serves as the control end of the fourth switch tube module (such as the transistor Q4 and its peripheral circuit). The emitter of the fourth switch tube module (such as the transistor Q4 and its peripheral circuit) serves as the first connection end of the fourth switch tube module (such as the transistor Q4 and its peripheral circuit). The collector of the fourth switch tube module (such as the transistor Q4 and its peripheral circuit) serves as the second connection end of the fourth switch tube module (such as the transistor Q4 and its peripheral circuit).

[0052] For example: When the levels of the DE pin and RE / pin of the RS485 communication chip are both low (regardless of the level of the DI pin at this time): If the voltage of the A pin of the RS485 communication chip is higher than the voltage of the B pin of the RS485 communication chip by more than the first set voltage value u1 at the same time, the RO pin of the RS485 communication chip will output a high level. If the voltage of the A pin of the RS485 communication chip is lower than the voltage of the B pin of the RS485 communication chip by more than the first set voltage value u1 at the same time, the RO pin of the RS485 communication chip will output a low level. Among them, when the electrical equipment is just powered on, the level of the A pin of the RS485 communication chip is pulled to a high level through the pull-up resistor. The level of the B pin of the RS485 communication chip is pulled to a low level through the pull-down resistor. When the levels of the DE pin and RE / pin of the RS485 communication chip are both high, as the high and low levels of the DI pin of the RS485 communication chip change, the A pin and B pin of the RS485 communication chip respectively output a voltage signal that satisfies the logical relationship of a certain 485 communication mode.

[0053] In some embodiments, the third switch tube module (such as transistor Q3 and its peripheral circuit) further includes: a first voltage divider module, such as a voltage divider module composed of resistors R23 and R24. The first voltage divider module is arranged at the second connection end of the third switch tube module (such as transistor Q3 and its peripheral circuit). For example, the purpose of adding resistors R23 and R24 to divide the voltage is to prevent the RS485 communication chip from mis-conducting the transistor Q3 when the voltage at the RO pin is higher than the base of the transistor Q3 by more than 0.7V due to voltage fluctuation.

[0054] In some embodiments, the fourth switch tube module (such as transistor Q4 and its peripheral circuit) further includes: a second voltage divider module, such as a voltage divider module composed of resistor R25 and resistor R264. The second voltage divider module is arranged at the first connection end of the fourth switch tube module (such as transistor Q4 and its peripheral circuit). For example, the purpose of adding resistors R25 and R26 to divide the voltage is that when the communication signal TX is input at a low level, the emitter of the transistor Q4 is 0.7V higher than the base of the transistor Q4 due to the fluctuation of the ground potential, so that the transistor Q4 is mis-conducted.

[0055] In some embodiments, the communication unit includes: a 485 communication module. The 485 communication module includes a 485 communication chip, namely an RS485 communication chip and its peripheral circuits. The peripheral circuit of the RS485 communication chip includes: resistor R19, resistor R20, resistor R21, resistor R22, TVS tube D1 and TVS tube D2. The DI pin of the RS485 communication chip is the RS485 communication chip driver input terminal, the RO pin of the RS485 communication chip is the RS485 communication chip receiver output terminal, the DE pin of the RS485 communication chip is the RS485 communication chip driver output enable terminal, the RE / pin of the RS485 communication chip is the RS485 communication chip receiver output enable terminal, and the A pin and B pin of the RS485 communication chip are the RS485 communication chip driver output terminal or the RS485 communication chip receiver input terminal.

[0056] The first communication mode includes: UART communication mode. The second communication mode includes: 485 communication mode. For example: after the electrical device is powered on, the control unit 1 controls the output of the signal Y to be high level or low level according to actual needs to select whether to use the UART communication mode or the 485 communication mode. The communication signal TX is the communication signal output by the control unit 1, the communication signal RX is the communication signal received by the communication unit 1, and the communication signal M and the communication signal N are the communication signals between the control unit 1 and other control units such as the control unit 2.

[0057] The communication unit, when the current communication mode is the second communication mode, the communication unit itself is in a powered and working state (i.e., powered and performing 485 communication), so as to realize communication between the first control unit and other control units in the powered and working state according to the second communication mode and in combination with the second isolation control signal; when the current communication mode is the first communication mode, the communication unit itself is in a powered and non-working state (i.e., powered but not performing 485 communication), so as to communicate with other control units in the powered and non-working state according to the first communication mode, including any of the following communication situations:

[0058] The first communication situation: when the current communication mode is the UART communication mode, the first control signal is a signal of a first set level, the second control signal is a signal of a first set level, and the communication circuit communicates according to the UART communication mode. The first set level is, for example, a low level. The signal of the first set level is, for example, a low level signal.

[0059] For example: when the UART communication mode is selected, the control signal Y is input at a low level, and the control signal X is input at a low level, and the bases of transistors Q1, Q2, Q3, and Q4 will all change from a low level to a high level. At this time, since the conduction voltage drop of the transistor inside the optocoupler is much smaller than 0.7V, transistors Q3 and Q4 are cut off when the control signal Y is input at a low level. At the same time, although the RS485 communication chip will output a high or low level signal at the RO pin of the RS485 communication chip according to the voltage difference between the A pin of the RS485 communication chip and the B pin of the RS485 communication chip, the emitter voltage of transistor Q3 will not be more than 0.7V greater than the base voltage of transistor Q3, so transistor Q3 is always cut off. Similarly, for transistor Q4, regardless of whether the emitter of transistor Q4 is at a high level or a low level, transistor Q4 is always cut off. Of the entire communication circuit, only the UART communication circuit is working at this time.

[0060] Furthermore, when the communication signal TX is input at a high level, the collector of the transistor Q2 changes from a low level to a high level. Since the base of the transistor Q2 is at a high level and the emitter of the transistor Q2 is at a low level when the collector of the transistor Q2 is at a low level, the transistor Q2 will change from being cut off to being on, the emitter of the transistor Q2 will change from a low level to a high level, and the output of the communication signal N will change from a low level to a high level. In other words, since the base of the transistor Q2 is at a high level and the emitter of the transistor Q2 is at a low level, the transistor Q2 will change from being cut off to being on. When the communication signal TX is input at a low level, the collector of the transistor Q2 changes from a high level to a low level. The transistor Q2 will be cut off, the emitter of the transistor Q2 will change from a high level to a low level, and the output of the communication signal N will change from a high level to a low level. In this way, the high and low level changes of the communication signal TX input cause the communication signal N to also produce corresponding high and low level changes, and the cycle is repeated.

[0061] When the communication signal M is input at a low level, the collector of transistor Q1 is at a low level, transistor Q1 is cut off, and the emitter of transistor Q1 is at a low level, and the communication signal RX outputs a low level. When the communication signal M is input at a high level, the collector of transistor Q1 changes from a low level to a high level. Since the base of transistor Q1 is at a high level and the emitter of transistor Q1 is at a low level when the collector of transistor Q1 is at a low level, transistor Q1 will change from cut off to conduction, and the emitter of transistor Q1 will change from a low level to a high level, and the communication signal RX outputs a high level. It can be understood as "since the base of transistor Q1 is at a high level and the emitter of transistor Q1 is at a low level, transistor Q1 will change from cut off to conduction". "Since the collector of transistor Q2 is at a low level" explains the conduction condition that the collector of transistor Q2 is at a low level. In this way, the high and low level changes of the communication signal M input cause the communication signal RX to also produce corresponding high and low level changes, and the cycle is repeated.

[0062] The second communication situation: when the current communication mode is the 485 communication mode, the first control signal is a signal of a second set level, and the communication circuit communicates according to the 485 communication mode.

[0063] For example: when the 485 communication mode is selected, the control signal Y is input at a high level, and the bases of transistors Q1, Q2, Q3, and Q4 are all at a low level, and transistors Q1 and Q2 will remain cut off and will not conduct. Of the entire communication circuit, only the 485 communication circuit is working at this time.

[0064] Wherein, in the 485 communication mode, when the second control signal is a signal of a first set level, the 485 communication module can implement the first set 485 communication.

[0065] For example: when the control signal X is input at a low level, the DE pin of the RS485 communication chip and the RE / pin of the RS485 communication chip will change from a low level to a high level. At this time, if the communication signal TX is input at a low level, the emitter of transistor Q4 is at a low level, transistor Q4 will not be turned on, and the DI pin of the RS485 communication chip is at a low level. If the communication signal TX is input at a high level, the emitter of transistor Q4 will change from a low level to a high level. Since the collector of transistor Q4 is at a low level when the emitter of transistor Q4 is at a low level, transistor Q4 will be turned on, and the DI pin of the RS485 communication chip will change from a low level to a high level. As the high and low levels of the DI pin of the RS485 communication chip change, the A pin of the RS485 communication chip and the B pin of the RS485 communication chip respectively output a voltage signal that meets a certain 485 communication logic relationship.

[0066] In the 485 communication mode, when the second control signal is a signal of a second set level, the 485 communication module can implement the second set 485 communication.

[0067] For example: when the control signal X inputs a high level, the DE pin of the RS485 communication chip and the RE / pin of the RS485 communication chip are at a low level. At this time, if the A pin voltage of the RS485 communication chip is higher than the B pin voltage of the RS485 communication chip by more than the first set voltage value u1, the RO pin of the RS485 communication chip will output a high level. Since the base of the transistor Q3 is at a low level, the transistor Q3 will be turned on, the collector of the transistor Q3 will change to a high level, and the communication signal RX will change from a low output level to a high level. If the A pin voltage of the RS485 communication chip is lower than the voltage of the BRS485 communication chip by more than the first set voltage value u1, the output at the RO of the RS485 communication chip will change from a high level to a low level. Since the base of the transistor Q3 is at a low level, the transistor Q3 will be turned off, the collector of the transistor Q3 is at a low level, and the communication signal RX will change from a high output level to a low level. In this way, when the control signal X inputs a high level, the voltage difference at the A pin of the RS485 communication chip and the B pin of the RS485 communication chip changes, causing the communication signal RX to also produce corresponding high and low level changes, and the cycle is repeated.

[0068] Thus, through the first control signal, it is possible to select whether the current communication mode is the UART communication mode or the 485 communication mode. Through the second control signal, it is possible to control the operation of the 485 communication module. Thus, it is possible to select whether to use the UART communication mode or the 485 communication mode through software, and the circuit can perform UART communication or 485 communication normally.

[0069] After a large number of experimental verifications, the technical solution of the present invention is adopted, by using an isolation circuit, a conversion circuit and an RS485 communication module, a communication circuit having a UART communication function and a 485 communication function and capable of switching to use a UART communication mode or a 485 communication mode is set, and when the control unit of the electrical device selects the communication mode, it is only necessary to control the level of the receiver output end and the driver input end of the RS485 communication module through software settings to control the communication circuit, so that the communication circuit switches to use a UART communication mode or a 485 communication mode. Thus, the switching between the UART communication mode and the 485 communication mode is realized by software settings, which improves the communication convenience between the control units of the electrical device, and is conducive to improving the versatility and compatibility of the control unit of the electrical device in hardware.

[0070] According to an embodiment of the present invention, an electrical device corresponding to the communication device is also provided. The electrical device may include: the communication device described above.

[0071] In the communication circuits of the related solutions, there is no communication circuit that can realize the switching between UART communication mode and 485 communication mode through software control, which results in that the electrical equipment must distinguish whether to use UART communication mode or 485 communication mode by using the difference in the hardware of the motherboard. However, by using the difference in the hardware of the motherboard to distinguish the communication mode, the versatility and compatibility of the motherboard of the electrical equipment in hardware are greatly reduced. Moreover, when manually changing the hardware of the whole machine to switch the communication mode, the whole machine needs to be disassembled for operation, which is extremely inconvenient and inefficient.

[0072] Among them, the components used in the UART communication method and the 485 communication method are different, and the circuits are also different. Even if the same circuit in the relevant solution has a reserved position for components to switch the communication method, if the components are not changed in the hardware, there is no way to implement and distinguish between the UART communication method and the 485 communication method. Therefore, it often happens that a motherboard can only use the 485 communication method or the UART communication method, which is not universal and compatible. In addition, the motherboard needs to be manually modified in batches, so it is unrealistic and inefficient.

[0073] Considering that in the communication circuit of the electrical equipment, the electrical equipment must distinguish whether to use the UART communication mode or the 485 communication mode through the hardware difference, which greatly reduces the versatility and compatibility of the mainboard of the electrical equipment in hardware. The scheme of the present invention designs a communication circuit that can select the UART communication mode or the 485 communication mode only through software control, that is, provides a communication circuit that can realize software control switching of the UART and 485 communication modes, can realize switching of the UART communication mode and the 485 communication mode only through software settings, that is, can selectively use the UART communication mode or the 485 communication mode through software switching, greatly improves the compatibility and versatility of the mainboard of the electrical equipment, can solve the problem that the communication mode must be distinguished by the hardware difference of the mainboard of the electrical equipment, and greatly reduces the versatility and compatibility of the mainboard of the electrical equipment in hardware. In addition, it also reduces the inconvenience in operation, improves efficiency, and can solve the problem that when manually changing the hardware of the whole machine to switch the communication mode, it is also necessary to disassemble the whole machine for operation, which is extremely inconvenient and inefficient in operation.

[0074] Specifically, the solution of the present invention designs four conversion circuits, and designs a control signal to control the four conversion circuits at the same time, so that the communication mode can be controlled by software to select whether it is UART communication mode or 485 communication mode.

[0075] Combine the following Figures 2 to 4 The examples shown are used to illustrate the specific implementation process of the solution of the present invention.

[0076] Figure 2 The structure diagram of an embodiment of a communication circuit capable of switching between UART communication mode and 485 communication mode through software control is shown in FIG. In the related scheme, either the UART communication part or the 485 communication part is used, or the UART communication mode or the 485 communication mode needs to be switched in the same circuit by manually switching the hardware. Figure 2 In the example shown, four conversion circuits and one optocoupler isolation circuit are used to realize the control by software-selectable switching between UART communication mode and 485 communication mode.

[0077] like Figure 2 As shown, the communication circuit capable of switching between the UART communication mode and the 485 communication mode through software control includes: a first conversion circuit to a fourth conversion circuit (such as conversion circuit 1, conversion circuit 2, conversion circuit 3, conversion circuit 4), a first isolation circuit to a fourth isolation circuit (such as isolation circuit 1, isolation circuit 2, isolation circuit 3 and isolation circuit 4), and a 485 communication module.

[0078] exist Figure 2 In the example shown, the input terminal of the isolation circuit 3 is connected to the control signal Y terminal and can receive the control signal Y.

[0079] The first output terminal of the isolation circuit 3 is connected to the first input terminal of the conversion circuit 1. The second input terminal of the conversion circuit 1 is connected to the communication signal M terminal and can receive the communication signal M. The output terminal of the conversion circuit 1 is connected to the first input terminal of the isolation circuit 1. The output terminal of the isolation circuit 1 is connected to the communication signal RX terminal and can output the communication signal RX.

[0080] The second output end of the isolation circuit 3 is connected to the first input end of the conversion circuit 3. The second input end of the conversion circuit 3 is connected to the first output end of the 485 communication module. The output end of the conversion circuit 3 is connected to the second input end of the isolation circuit 1.

[0081] The third output terminal of the isolation circuit 3 is connected to the first input terminal of the conversion circuit 4. The output terminal of the conversion circuit 4 is connected to the first input terminal of the 485 communication module. The second input terminal of the conversion circuit 4 is connected to the second output terminal of the isolation circuit 2.

[0082] The fourth output terminal of the isolation circuit 3 is connected to the first input terminal of the conversion circuit 2. The output terminal of the conversion circuit 2 is connected to the communication signal N terminal and can output the communication signal N. The second input terminal of the conversion circuit 2 is connected to the first output terminal of the isolation circuit 2. The input terminal of the isolation circuit 2 is connected to the communication signal TX terminal and can receive the communication signal TX.

[0083] The second output terminal of the 485 communication module is connected to the communication signal M terminal. The second input terminal of the 485 communication module is also connected to the communication signal M terminal. The third output terminal of the 485 communication module is connected to the communication signal N terminal. The third input terminal of the 485 communication module is also connected to the communication signal N terminal. The fourth input terminal of the 485 communication module is connected to the output terminal of the isolation circuit 4. The input terminal of the isolation circuit 4 is connected to the control signal X terminal.

[0084] Figure 3 The structure diagram of a specific embodiment of an embodiment of a communication circuit capable of switching between a UART communication mode and a 485 communication mode through software control is shown in FIG. Figure 3 In the example shown, by controlling four conversion circuits and one optocoupler isolation circuit, the software can select to switch between the UART communication mode and the 485 communication mode. Specifically, the switching between the UART communication mode and the 485 communication mode can be realized by controlling the on and off of two NPN transistors and a PNP transistor simultaneously through one optocoupler.

[0085] exist Figure 3In the example shown, U1, U2, U3, U4, U5, U6, U7, U8 are power supply voltages, and U1, U2, U3, U4, U5, U6, U7, U8 can be the same voltage or different voltages. GND and GND2 are grounds, and are isolated from each other. B1, B2, B3, B4 are optocouplers, Q1, Q2 are NPN transistors, Q3, Q4 are PNP transistors, Z1 is an RS485 communication chip, D1, D2 are TVS diodes, communication signal TX is the communication signal output by control unit 1, communication signal RX is the communication signal received by communication unit 1, and communication signal M and communication signal N are communication signals between control unit 1 and control unit 2. The control signal Y is the control signal of the control unit 1 to control whether to use the UART communication mode or the 485 communication mode. The control signal X is the control signal of the control unit 1 to control the operation of the RS485 communication chip. The DI pin of the RS485 communication chip is the input terminal of the RS485 communication chip driver. The RO pin of the RS485 communication chip is the output terminal of the receiver of the RS485 communication chip. The DE pin of the RS485 communication chip is the output enable terminal of the driver of the RS485 communication chip. The RE / pin of the RS485 communication chip is the output enable terminal of the receiver of the RS485 communication chip. The A pin and the B pin of the RS485 communication chip are the output terminal of the driver of the RS485 communication chip or the input terminal of the receiver of the RS485 communication chip. Among them, the control unit 1 and the control unit 2 are the control units of different electrical equipment.

[0086] exist Figure 3 In the example shown, the anode on the diode side of the optocoupler B1 is connected to the power supply U1 via the resistor R1. The cathode on the diode side of the optocoupler B1 serves as the input end of the control signal Y. The collector on the transistor side of the optocoupler B1 is connected to the power supply U4. The emitter on the transistor side of the optocoupler B1 is connected to the ground GND2 via the resistor R2, to the base of the transistor Q3 via the resistor R14, to the base of the transistor Q1 via the resistor R10, to the base of the transistor Q2 via the resistor R12, and to the base of the transistor Q4 via the resistor R15.

[0087] The collector of the transistor side of the optocoupler B2 is connected to the power supply U2. The emitter of the transistor side of the optocoupler B2 is connected to the ground GND through the resistor R3, and also serves as the input end of the communication signal RX. The cathode of the diode side of the optocoupler B2 is connected to the ground GND2 through the resistor R4. The anode of the diode side of the optocoupler B2 is connected to the emitter of the transistor Q1, the collector of the transistor Q3, and the ground GND2 through the resistor R11. The collector of the transistor Q1 is connected to the ground GND2 through the resistor R9, and is also connected to the input end of the communication signal M through the resistor R17. The emitter of the transistor Q3 is connected to the RO pin of the RS485 communication chip Z1.

[0088] The cathode on the diode side of the optocoupler B3 serves as the input end of the control signal X. The anode on the diode side of the optocoupler B3 is connected to the power supply U3 via the resistor R5. The collector on the transistor side of the optocoupler B3 is connected to the power supply U5. The emitter on the transistor side of the optocoupler B3 is connected to the ground GND2 via the resistor R6, and is also connected to the RE / pin of the RS485 communication chip Z1 and the DE pin of the RS485 communication chip Z1.

[0089] The cathode of the diode side of the optocoupler B4 is grounded to GND. The anode of the diode side of the optocoupler B4 is connected to the input end of the communication signal TX through the resistor R7. The collector of the transistor side of the optocoupler B4 is connected to the power supply U6. The emitter of the transistor side of the optocoupler B4 is grounded to GND2 through the resistor R8, connected to the collector of the transistor Q2, and also connected to the emitter of the transistor Q4. The emitter of the transistor Q2 is grounded to GND2 through the resistor R13, and is also connected to the input end of the communication signal N through the resistor R18. The collector of the transistor Q4 is grounded to GND2 through the resistor R16, and is also connected to the DI pin of the RS485 communication chip Z1. The power pin of the RS485 communication chip Z1 is connected to the power supply U7, and the ground pin of the RS485 communication chip Z1 is grounded to GND2. The B pin of the RS485 communication chip Z1 is grounded to GND2 through the resistor R19, and is connected to the cathode of the TVS tube D1 through the resistor R21, and the anode of the TVS tube D1 is grounded to GND2. The cathode of TVS tube D1 is also connected to the input end of communication signal M. Pin A of RS485 communication chip Z1 is connected to power supply U8 via resistor R20, and then connected to the cathode of TVS tube D2 via resistor R22. The anode of TVS tube D2 is grounded to GND2. The cathode of TVS tube D2 is also connected to the input end of communication signal N.

[0090] exist Figure 3 In the example shown, when the levels of the DE pin and RE / pin of the RS485 communication chip are both low (regardless of the level of the DI pin at this time):

[0091] If at the same time, the voltage of the A pin of the RS485 communication chip is higher than the voltage of the B pin of the RS485 communication chip by more than the first set voltage value u1, the RO pin of the RS485 communication chip will output a high level.

[0092] If at the same time, the voltage of the A pin of the RS485 communication chip is lower than the voltage of the B pin of the RS485 communication chip by more than the first set voltage value u1, the RO pin of the RS485 communication chip will output a low level.

[0093] Among them, when the electrical equipment is just powered on, the level of the A pin of the RS485 communication chip is pulled to a high level through a pull-up resistor; the level of the B pin of the RS485 communication chip is pulled to a low level through a pull-down resistor.

[0094] exist Figure 3 In the example shown, when the levels of the DE pin and RE / pin of the RS485 communication chip are both high, as the high and low levels of the DI pin of the RS485 communication chip change, the A pin and B pin of the RS485 communication chip respectively output a voltage signal that satisfies the logical relationship of a certain 485 communication mode.

[0095] Among them, the logical relationship of a certain 485 communication mode refers to: the voltage waveform that meets the 485 communication function. The waveform description of the A pin and the B pin output by the RS485 communication chip is relatively complex. The signal sent by the 485 module is the difference between the signal of the A pin and the B pin. After the receiving end receives the signal of the A pin and the B pin, if the signal of the A pin and the B pin meets a certain difference relationship, it corresponds to the corresponding identification state. Similarly, the RS485 communication chip receives the signal of the A pin and the B pin, and also identifies the communication signal by making a difference between the signal of the A pin and the B pin. For example: when the RE / pin and the DE pin are at logic level 0, if AB>﹢0.2V, the R pin outputs logic level 1; if AB<-0.2V, the R pin outputs logic level 0.

[0096] use Figure 3 In the example shown, when the electrical device is powered on, the control unit 1 controls the output of the signal Y to be high level or low level according to actual needs to select whether to use the UART communication mode or the 485 communication mode, which specifically includes the following steps:

[0097] Step 1: When choosing to use UART communication method:

[0098] When the control signal Y is input at a low level and the control signal X is input at a low level, the bases of transistors Q1, Q2, Q3 and Q4 will all change from a low level to a high level. At this time, since the conduction voltage drop of the transistor inside the optocoupler is much smaller than 0.7V, transistors Q3 and Q4 are cut off when the control signal Y is input at a low level. At the same time, although the RS485 communication chip will output a high or low level signal at the RO pin of the RS485 communication chip according to the voltage difference between the A pin of the RS485 communication chip and the B pin of the RS485 communication chip, the emitter voltage of transistor Q3 will not be more than 0.7V greater than the base voltage of transistor Q3, so transistor Q3 is always cut off. Similarly, for transistor Q4, regardless of whether the emitter of transistor Q4 is at a high level or a low level, transistor Q4 is always cut off.

[0099] Of the entire communication circuit, only the UART communication circuit is working at this time.

[0100] Step 11: When the communication signal TX input is high level:

[0101] The collector of transistor Q2 changes from low level to high level. Since the base of transistor Q2 is at a high level and the emitter of transistor Q2 is at a low level when the collector of transistor Q2 is at a low level, transistor Q2 will change from cut-off to on, the emitter of transistor Q2 will change from a low level to a high level, and the output of communication signal N will change from a low level to a high level. In other words, since the base of transistor Q2 is at a high level and the emitter of transistor Q2 is at a low level, transistor Q2 will change from cut-off to on.

[0102] When the communication signal TX input is low level:

[0103] The collector of transistor Q2 changes from high level to low level. Transistor Q2 will be cut off, the emitter of transistor Q2 will change from high level to low level, and the output of communication signal N will change from high level to low level.

[0104] In this way, the high and low level changes of the communication signal TX input cause the communication signal N to also produce corresponding high and low level changes, and the cycle is repeated.

[0105] Step 12: When the communication signal M inputs a low level:

[0106] The collector of transistor Q1 is at a low level, and transistor Q1 is cut off. At this time, the emitter of transistor Q1 is at a low level, and the communication signal RX outputs a low level.

[0107] When the communication signal M input is high level:

[0108] The collector of transistor Q1 changes from low level to high level. Since the base of transistor Q1 is high level and the emitter of transistor Q1 is low level when the collector of transistor Q1 is low level, transistor Q1 will change from cut-off to on, and the emitter of transistor Q1 will change from low level to high level, and the communication signal RX outputs high level. It can be understood as "since the base of transistor Q1 is high level and the emitter of transistor Q1 is low level, transistor Q1 will change from cut-off to on". "Since the collector of transistor Q2 is low level" explains the on condition that the collector of transistor Q2 is low level.

[0109] In this way, the high and low level changes of the communication signal M input cause the communication signal RX to also produce corresponding high and low level changes, and the cycle is repeated.

[0110] Step 2: When you choose to use 485 communication method:

[0111] When the control signal Y is input at a high level, the bases of transistors Q1, Q2, Q3, and Q4 are all at a low level, and transistors Q1 and Q2 will remain cut off and will not conduct. Specifically, after the control signal Y is input at a high level, transistors Q1 and Q2 will remain in the cut-off state. This is because the base voltages of transistors Q1 and Q2 are always 0 at this time.

[0112] Of the entire communication circuit, only the 485 communication circuit is working at this time.

[0113] Step 21, when the control signal X inputs a low level:

[0114] The DE pin of the RS485 communication chip and the RE / pin of the RS485 communication chip will change from low level to high level:

[0115] At this time, if the communication signal TX input is low level, the emitter of transistor Q4 is low level, transistor Q4 will not be turned on, and the DI pin of the RS485 communication chip is low level.

[0116] At this time, if the communication signal TX is input at a high level, the emitter of transistor Q4 will change from a low level to a high level. Since the collector of transistor Q4 is at a low level when the emitter of transistor Q4 is at a low level, transistor Q4 will be turned on, and the DI pin of the RS485 communication chip will change from a low level to a high level.

[0117] As the high and low levels of the DI pin of the RS485 communication chip change, the A pin of the RS485 communication chip and the B pin of the RS485 communication chip respectively output a voltage signal that satisfies a certain 485 communication logic relationship.

[0118] Step 22: When the control signal X is input at a high level:

[0119] The DE pin of the RS485 communication chip and the RE / pin of the RS485 communication chip are low level:

[0120] At this time, if the voltage of the A pin of the RS485 communication chip is higher than the voltage of the B pin of the RS485 communication chip by more than the first set voltage value u1, the RO pin of the RS485 communication chip will output a high level. Since the base of the transistor Q3 is at a low level, the transistor Q3 will be turned on, the collector of the transistor Q3 will change to a high level, and the communication signal RX will change from a low level output to a high level.

[0121] At this time, if the voltage of the A pin of the RS485 communication chip is lower than the voltage of the BRS485 communication chip by more than the first set voltage value u1, the output at RO of the RS485 communication chip will change from a high level to a low level. Since the base of the transistor Q3 is at a low level, the transistor Q3 will be cut off, the collector of the transistor Q3 is at a low level, and the communication signal RX will change from an output high level to a low level.

[0122] In this way, when the control signal X inputs a high level, the voltage difference at the A pin of the RS485 communication chip and the B pin of the RS485 communication chip changes, causing the communication signal RX to also produce corresponding high and low level changes, and the cycle is repeated.

[0123] As above, it is realized that whether to use UART communication method or 485 communication method is selected through software, and the circuit can perform UART communication or 485 communication normally.

[0124] Figure 4 FIG. 1 is a schematic diagram of another specific embodiment of an embodiment of a communication circuit capable of switching between a UART communication mode and a 485 communication mode through software control. Figure 3 The examples shown are sufficient for practical use. Figure 3 Compared to the example shown, Figure 4 In the example shown, two resistor divider circuits are added, such as four resistors (ie, resistor R23, resistor R24, resistor R25, resistor R26) and corresponding grounds are added locally to prevent misconduction. Figure 4 The function of preventing false connection in the example shown is beneficial to improving the reliability of the above communication circuit.

[0125] exist Figure 4 In the example shown, resistors R23 and R24 are provided between the emitter of transistor Q3 and the RO pin of RS485 communication chip Z1. The RO pin of RS485 communication chip Z1 is connected to ground GND2 via resistors R23 and 24. The common end of resistors R23 and R24 is connected to the emitter of transistor Q3. The purpose of adding resistors R23 and R24 to divide the voltage is to prevent the RS485 communication chip from mis-conducting transistor Q3 when the voltage at the RO pin is higher than the base of transistor Q3 by more than 0.7V due to voltage fluctuation.

[0126] exist Figure 4 In the example shown, Figure 4In the example shown, resistors R25 and R26 are provided between the emitter of transistor Q4 and the collector of transistor Q2. The collector of transistor Q2 is grounded to GND2 via resistors R25 and 26. The common end of resistors R25 and R26 is connected to the emitter of transistor Q4. The purpose of adding resistors R25 and R26 for voltage division is that when the communication signal TX is input at a low level, the emitter of transistor Q4 is 0.7V higher than the base of transistor Q4 due to the fluctuation of the ground potential, causing transistor Q4 to be mis-conducted.

[0127] Since the processing and functions implemented by the electrical equipment of this embodiment are basically corresponding to the aforementioned Figure 1 The embodiments, principles and examples of the device shown are as follows. Therefore, for matters not fully described in the description of this embodiment, reference can be made to the relevant descriptions in the aforementioned embodiments, and no further elaboration will be given here.

[0128] After a large number of experiments and verifications, the technical solution of the present invention is adopted. The solution of the present invention, by utilizing an isolation circuit, a conversion circuit and an RS485 communication module, is set to have a communication circuit with a UART communication function and a 485 communication function, and can switch to use a UART communication mode or a 485 communication mode. When the control unit of the electrical equipment selects the communication mode, it is only necessary to control the level of the receiver output end and the driver input end of the RS485 communication module through software settings to control the communication circuit, so that the communication circuit switches to use the UART communication mode or the 485 communication mode. Whether to selectively use the UART communication mode or the 485 communication mode can be switched through software, which greatly improves the compatibility and versatility of the mainboard of the electrical equipment.

[0129] According to an embodiment of the present invention, a communication control method for an electrical device corresponding to the electrical device is also provided. Figure 5 The flow chart of an embodiment of the method of the present invention is shown in FIG. The communication control method of the electrical equipment may include: steps S110 to S130.

[0130] At step S110, the isolation unit receives a first control signal (such as control signal Y) sent by the first control unit, and isolates the first control signal to obtain a first isolated control signal; it is also configured to receive a second control signal (such as control signal X) sent by the first control unit, and isolates the second control signal to obtain a second isolated control signal.

[0131] Wherein, the first control unit (such as control unit 1) is a control unit of the first electrical equipment that needs to communicate. The first control signal is a control signal used to select the communication mode of the communication circuit by controlling the level of the receiver output end and the driver input end of the communication unit. The second control signal is a control signal used to control the operation of the communication unit. The communication mode of the communication circuit includes: a first communication mode and a second communication mode. The first communication mode is a communication mode that uses the first communication function for communication. The second communication mode is a communication mode that uses the second communication function for communication. For example: control signal Y is a control signal for control unit 1 to control whether to use UART communication mode or 485 communication mode, and control signal X is a control signal for control unit 1 to control the operation of RS485 communication chip.

[0132] At step S120, a conversion unit is used to convert the communication mode based on the first isolation control signal, that is, based on the first control signal after the isolation process, so as to use the one of the first communication mode and the second communication mode corresponding to the first control signal as the current communication mode, so that the first control unit can communicate with other control units according to the current communication mode. In other words, the communication unit can convert the communication mode based on the communication mode conversion signal, so as to use the one of the first communication function and the second communication function corresponding to the first control signal as the current communication function, so that the first control unit can communicate with other control units according to the current communication function. Other control units are control units of other electrical equipment that need to communicate with the control unit of the first electrical equipment.

[0133] At step S130, through the communication unit, when the current communication mode is the second communication mode, the communication unit itself is in a powered and working state, so that in the powered and working state, according to the second communication mode, combined with the second isolation control signal, communication between the first control unit and other control units is achieved; when the current communication mode is the first communication mode, the communication unit itself is in a powered and non-working state, so that in the powered and non-working state, according to the first communication mode, communication is performed with other control units.

[0134] Among them, the isolation unit, the conversion unit and the communication unit. The isolation unit, such as the isolation circuit 1, the isolation circuit 2, the isolation circuit 3 and the isolation circuit 4. The conversion unit, such as the conversion circuit 1, the conversion circuit 2, the conversion circuit 3 and the conversion circuit 4. The communication unit, such as the 485 communication module. The isolation unit, the conversion unit and the communication unit can form a communication circuit having a first communication function and a second communication function, and can switch between the first communication function and the second communication function. The second communication function, such as the 485 communication function. The first communication function, such as the UART communication function.

[0135] Thus, through the isolation unit, the conversion unit and the communication unit, a communication circuit having a first communication function and a second communication function can be formed, and the switching between the first communication function and the second communication function can be realized through software setting. In this way, the setting only needs to be controlled by software to select a communication circuit of UART communication mode or 485 communication mode, and the UART communication mode or 485 communication mode can be selectively used through software switching, which greatly improves the compatibility and versatility of the mainboard of the electrical equipment, and also reduces the inconvenience in operation and improves efficiency.

[0136] In some embodiments, the communication unit includes: a 485 communication module. The 485 communication module includes a 485 communication chip, namely an RS485 communication chip and its peripheral circuits. The peripheral circuit of the RS485 communication chip includes: resistor R19, resistor R20, resistor R21, resistor R22, TVS tube D1 and TVS tube D2. The DI pin of the RS485 communication chip is the RS485 communication chip driver input terminal, the RO pin of the RS485 communication chip is the RS485 communication chip receiver output terminal, the DE pin of the RS485 communication chip is the RS485 communication chip driver output enable terminal, the RE / pin of the RS485 communication chip is the RS485 communication chip receiver output enable terminal, and the A pin and B pin of the RS485 communication chip are the RS485 communication chip driver output terminal or the RS485 communication chip receiver input terminal.

[0137] The first communication mode includes: UART communication mode. The second communication mode includes: 485 communication mode. For example: after the electrical device is powered on, the control unit 1 controls the output of the signal Y to be high level or low level according to actual needs to select whether to use the UART communication mode or the 485 communication mode. The communication signal TX is the communication signal output by the control unit 1, the communication signal RX is the communication signal received by the communication unit 1, and the communication signal M and the communication signal N are the communication signals between the control unit 1 and other control units such as the control unit 2.

[0138] Through the communication unit, when the current communication mode is the second communication mode, the communication unit itself is in a powered and working state, so as to realize the communication between the first control unit and other control units in the powered and working state according to the second communication mode and in combination with the second isolation control signal; when the current communication mode is the first communication mode, the communication unit itself is in a powered and non-working state, so as to communicate with other control units in the powered and non-working state according to the first communication mode, including any of the following communication situations:

[0139] The first communication situation: when the current communication mode is the UART communication mode, the first control signal is a signal of a first set level, the second control signal is a signal of a first set level, and the communication circuit communicates according to the UART communication mode. The first set level is, for example, a low level. The signal of the first set level is, for example, a low level signal.

[0140] For example: when the UART communication mode is selected, the control signal Y is input at a low level, and the control signal X is input at a low level, and the bases of transistors Q1, Q2, Q3, and Q4 will all change from a low level to a high level. At this time, since the conduction voltage drop of the transistor inside the optocoupler is much smaller than 0.7V, transistors Q3 and Q4 are cut off when the control signal Y is input at a low level. At the same time, although the RS485 communication chip will output a high or low level signal at the RO pin of the RS485 communication chip according to the voltage difference between the A pin of the RS485 communication chip and the B pin of the RS485 communication chip, the emitter voltage of transistor Q3 will not be more than 0.7V greater than the base voltage of transistor Q3, so transistor Q3 is always cut off. Similarly, for transistor Q4, regardless of whether the emitter of transistor Q4 is at a high level or a low level, transistor Q4 is always cut off. Of the entire communication circuit, only the UART communication circuit is working at this time.

[0141] Furthermore, when the communication signal TX is input at a high level, the collector of the transistor Q2 changes from a low level to a high level. Since the base of the transistor Q2 is at a high level and the emitter of the transistor Q2 is at a low level when the collector of the transistor Q2 is at a low level, the transistor Q2 will change from being cut off to being on, the emitter of the transistor Q2 will change from a low level to a high level, and the output of the communication signal N will change from a low level to a high level. In other words, since the base of the transistor Q2 is at a high level and the emitter of the transistor Q2 is at a low level, the transistor Q2 will change from being cut off to being on. When the communication signal TX is input at a low level, the collector of the transistor Q2 changes from a high level to a low level. The transistor Q2 will be cut off, the emitter of the transistor Q2 will change from a high level to a low level, and the output of the communication signal N will change from a high level to a low level. In this way, the high and low level changes of the communication signal TX input cause the communication signal N to also produce corresponding high and low level changes, and the cycle is repeated.

[0142] When the communication signal M is input at a low level, the collector of transistor Q1 is at a low level, transistor Q1 is cut off, and the emitter of transistor Q1 is at a low level, and the communication signal RX outputs a low level. When the communication signal M is input at a high level, the collector of transistor Q1 changes from a low level to a high level. Since the base of transistor Q1 is at a high level and the emitter of transistor Q1 is at a low level when the collector of transistor Q1 is at a low level, transistor Q1 will change from cut off to conduction, and the emitter of transistor Q1 will change from a low level to a high level, and the communication signal RX outputs a high level. It can be understood as "since the base of transistor Q1 is at a high level and the emitter of transistor Q1 is at a low level, transistor Q1 will change from cut off to conduction". "Since the collector of transistor Q2 is at a low level" explains the conduction condition that the collector of transistor Q2 is at a low level. In this way, the high and low level changes of the communication signal M input cause the communication signal RX to also produce corresponding high and low level changes, and the cycle is repeated.

[0143] The second communication situation: when the current communication mode is the 485 communication mode, the first control signal is a signal of a second set level, and the communication circuit communicates according to the 485 communication mode.

[0144] For example: when the 485 communication mode is selected, the control signal Y is input at a high level, and the bases of transistors Q1, Q2, Q3, and Q4 are all at a low level, and transistors Q1 and Q2 will remain cut off and will not conduct. Of the entire communication circuit, only the 485 communication circuit is working at this time.

[0145] Wherein, in the 485 communication mode, when the second control signal is a signal of a first set level, the 485 communication module can implement the first set 485 communication.

[0146] For example: when the control signal X is input at a low level, the DE pin of the RS485 communication chip and the RE / pin of the RS485 communication chip will change from a low level to a high level. At this time, if the communication signal TX is input at a low level, the emitter of transistor Q4 is at a low level, transistor Q4 will not be turned on, and the DI pin of the RS485 communication chip is at a low level. If the communication signal TX is input at a high level, the emitter of transistor Q4 will change from a low level to a high level. Since the collector of transistor Q4 is at a low level when the emitter of transistor Q4 is at a low level, transistor Q4 will be turned on, and the DI pin of the RS485 communication chip will change from a low level to a high level. As the high and low levels of the DI pin of the RS485 communication chip change, the A pin of the RS485 communication chip and the B pin of the RS485 communication chip respectively output a voltage signal that meets a certain 485 communication logic relationship.

[0147] In the 485 communication mode, when the second control signal is a signal of a second set level, the 485 communication module can implement the second set 485 communication.

[0148] For example: when the control signal X inputs a high level, the DE pin of the RS485 communication chip and the RE / pin of the RS485 communication chip are at a low level. At this time, if the A pin voltage of the RS485 communication chip is higher than the B pin voltage of the RS485 communication chip by more than the first set voltage value u1, the RO pin of the RS485 communication chip will output a high level. Since the base of the transistor Q3 is at a low level, the transistor Q3 will be turned on, the collector of the transistor Q3 will change to a high level, and the communication signal RX will change from a low output level to a high level. If the A pin voltage of the RS485 communication chip is lower than the voltage of the BRS485 communication chip by more than the first set voltage value u1, the output at the RO of the RS485 communication chip will change from a high level to a low level. Since the base of the transistor Q3 is at a low level, the transistor Q3 will be turned off, the collector of the transistor Q3 is at a low level, and the communication signal RX will change from a high output level to a low level. In this way, when the control signal X inputs a high level, the voltage difference at the A pin of the RS485 communication chip and the B pin of the RS485 communication chip changes, causing the communication signal RX to also produce corresponding high and low level changes, and the cycle is repeated.

[0149] Thus, through the first control signal, it is possible to select whether the current communication mode is the UART communication mode or the 485 communication mode. Through the second control signal, it is possible to control the operation of the 485 communication module. Thus, it is possible to select whether to use the UART communication mode or the 485 communication mode through software, and the circuit can perform UART communication or 485 communication normally.

[0150] Since the processing and functions implemented by the method of this embodiment basically correspond to the embodiments, principles and examples of the aforementioned electrical equipment, for the details not fully described in this embodiment, please refer to the relevant descriptions in the aforementioned embodiments, and no further elaboration will be made here.

[0151] After a large number of experimental verifications, the technical solution of this embodiment is adopted, by using an isolation circuit, a conversion circuit and an RS485 communication module, a communication circuit with UART communication function and 485 communication function is set, and the communication circuit can be switched to use UART communication mode or 485 communication mode. When the control unit of the electrical equipment selects the communication mode, it is only necessary to control the level of the receiver output end and the driver input end of the RS485 communication module through software settings to control the communication circuit, so that the communication circuit switches to use UART communication mode or 485 communication mode, thereby reducing operational inconvenience and improving efficiency.

[0152] In summary, it is easy for those skilled in the art to understand that, under the premise of no conflict, the above-mentioned advantageous methods can be freely combined and superimposed.

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

Claims

1. A communication device, characterized in that: include: An isolation unit, a conversion unit and a communication unit; the isolation unit, the conversion unit and the communication unit can form a communication circuit having a first communication function and a second communication function, and can switch between the first communication function and the second communication function; in the communication circuit: The isolation unit is configured to receive a first control signal sent by the first control unit, and isolate the first control signal to obtain a first isolated control signal; and is also configured to receive a second control signal sent by the first control unit, and isolate the second control signal to obtain a second isolated control signal; Wherein, the first control unit is a control unit of a first electrical device that needs to communicate; the first control signal is a control signal for selecting the communication mode of the communication circuit by controlling the level of the receiver output terminal and the driver input terminal of the communication unit; the second control signal is a control signal for controlling the operation of the communication unit; the communication mode of the communication circuit includes: a first communication mode and a second communication mode; the first communication mode is a communication mode for communicating using the first communication function; the second communication mode is a communication mode for communicating using the second communication function; The conversion unit is configured to perform communication mode conversion based on the first isolation control signal, so as to use one of the first communication mode and the second communication mode corresponding to the first control signal as the current communication mode, so that the first control unit can communicate with other control units according to the current communication mode; The communication unit is configured to, when the current communication mode is the first communication mode, be in a powered-on and non-operating state, so as to communicate with other control units in the first communication mode in the powered-on and non-operating state; When the current communication mode is the second communication mode, the communication unit itself is in a powered-on and working state, so as to realize communication between the first control unit and other control units in the powered-on and working state according to the second communication mode combined with the second isolation control signal.

2. The communication device according to claim 1, characterized in that: The isolation unit comprises: a first isolation module and a second isolation module; The conversion unit comprises: a first conversion module and a second conversion module; in, The first isolation module is arranged between the input end of the first control signal and the control end of the first conversion module; the output end of the first conversion module is connected to one of the driver output end and the receiver input end of the communication unit; The first isolation module is further arranged between the input end of the first control signal and the control end of the second conversion module; the output end of the second conversion module is connected to the other connection end of the driver output end and the receiver input end of the communication unit; The second isolation module is arranged between the input terminal of the second control signal and the driver output enable terminal and the receiver enable output terminal of the communication unit.

3. The communication device according to claim 2, characterized in that: The first isolation module includes: a first optical coupling module; the second isolation module includes: a second optical coupling module; The first conversion module includes: a first switch tube module; the second conversion module includes: a second switch tube module; in, The cathode on the diode side of the first optical coupling module serves as the input end of the first optical coupling module; the emitter on the transistor side of the first optical coupling module serves as the output end of the first optical coupling module; The cathode on the diode side of the second optical coupling module serves as the input end of the second optical coupling module; the emitter on the transistor side of the second optical coupling module serves as the output end of the second optical coupling module; The base of the first switch tube module serves as a control end of the first switch tube module; the collector of the first switch tube module serves as an output end of the first switch tube module; The base of the second switch tube module serves as a control end of the second switch tube module; the emitter of the second switch tube module serves as an output end of the second switch tube module.

4. The communication device according to claim 2 or 3, characterized in that: The isolation unit further includes: a third isolation module and a fourth isolation module; The conversion unit further includes: a third conversion module and a fourth conversion module; in, The first isolation module is also arranged between the input end of the first control signal and the control end of the third conversion module; the third isolation module is arranged between the signal receiving end of the first control unit and the first connection end of the third conversion module; the second connection end of the third conversion module is connected to the receiver output end of the communication unit; the first connection end of the third conversion module is also connected to the second connection end of the first conversion module, and the first connection end of the first conversion module serves as the output end of the first conversion module; The first isolation module is also arranged between the input end of the first control signal and the control end of the fourth conversion module; the fourth isolation module is arranged between the signal sending end of the first control unit and the second connection end of the fourth conversion module; the first connection end of the fourth conversion module is connected to the driver input end of the communication unit; the first connection end of the fourth conversion module is also connected to the first connection end of the second conversion module, and the second connection end of the second conversion module serves as the output end of the second conversion module.

5. The communication device according to claim 4, characterized in that: The third isolation module includes: a third optical coupling module; the fourth isolation module includes: a fourth optical coupling module; The third conversion module includes: a third switch tube module; the fourth conversion module includes: a fourth switch tube module; in, The emitter on the transistor side of the third optical coupling module serves as the input end of the third optical coupling module; the anode on the diode side of the third optical coupling module serves as the output end of the third optical coupling module; The anode on the diode side of the fourth optical coupling module serves as the input end of the fourth optical coupling module; The base of the third switch tube module serves as the control terminal of the third switch tube module; the collector of the third switch tube module serves as the first connection terminal of the third switch tube module; and the emitter of the third switch tube module serves as the second connection terminal of the third switch tube module; The base of the fourth switch tube module serves as the control end of the fourth switch tube module; the emitter of the fourth switch tube module serves as the first connection end of the fourth switch tube module; and the collector of the fourth switch tube module serves as the second connection end of the fourth switch tube module.

6. The communication device according to claim 5, characterized in that: The third switch tube module further includes: a first voltage dividing module; the first voltage dividing module is arranged at the second connection end of the third switch tube module.

7. The communication device according to claim 5, characterized in that: The fourth switch tube module further includes: a second voltage dividing module; the second voltage dividing module is arranged at the first connecting end of the fourth switch tube module.

8. The communication device according to any one of claims 1 to 3 and 5 to 7, characterized in that: The communication unit includes: a 485 communication module; The first communication method includes: UART communication method; the second communication method includes: 485 communication method; The communication unit, when the current communication mode is the first communication mode, is powered on and in a non-working state, so as to communicate with other control units in the first communication mode in the powered on and non-working state; when the current communication mode is the second communication mode, the communication unit is powered on and in a working state, so as to realize communication between the first control unit and other control units in the powered on and working state in accordance with the second communication mode in combination with the second isolation control signal, including: When the current communication mode is a UART communication mode, the first control signal is a signal of a first set level, the second control signal is a signal of a first set level, and the communication circuit communicates in accordance with the UART communication mode; When the current communication mode is the 485 communication mode, the first control signal is a signal of a second set level, and the communication circuit communicates according to the 485 communication mode; in, In the 485 communication mode, when the second control signal is a signal of a first set level, the 485 communication module can implement the first set 485 communication; In the 485 communication mode, when the second control signal is a signal of a second set level, the 485 communication module can implement the second set 485 communication.

9. An electrical device, characterized in that: include: A communication device as claimed in any one of claims 1 to 8.

10. A communication control method for electrical equipment as claimed in claim 9, characterized in that: include: Receiving, through the isolation unit, a first control signal sent by the first control unit, and isolating the first control signal to obtain a first isolated control signal; also receiving a second control signal sent by the first control unit, and performing isolation processing on the second control signal to obtain a second isolated control signal; Wherein, the first control unit is a control unit of a first electrical device that needs to communicate; the first control signal is a control signal for selecting the communication mode of the communication circuit by controlling the level of the receiver output terminal and the driver input terminal of the communication unit; the second control signal is a control signal for controlling the operation of the communication unit; the communication mode of the communication circuit includes: a first communication mode and a second communication mode; the first communication mode is a communication mode for communicating using the first communication function; the second communication mode is a communication mode for communicating using the second communication function; The conversion unit converts the communication mode based on the first isolation control signal, so as to use the one of the first communication mode and the second communication mode corresponding to the first control signal as the current communication mode, so that the first control unit can communicate with other control units according to the current communication mode; Through the communication unit, when the current communication mode is the second communication mode, the communication unit itself is in a powered and working state, so that in the powered and working state, the second communication mode is used in combination with the second isolation control signal to realize communication between the first control unit and other control units; when the current communication mode is the first communication mode, the communication unit itself is in a powered and non-working state, so that in the powered and non-working state, communication is carried out with other control units according to the first communication mode.

11. The communication control method of electrical equipment according to claim 10, characterized in that: The communication unit includes: a 485 communication module; The first communication method includes: UART communication method; the second communication method includes: 485 communication method; By means of a communication unit, when the current communication mode is the first communication mode, the communication unit itself is in a powered and non-working state, so as to communicate with other control units in the first communication mode in the powered and non-working state; when the current communication mode is the second communication mode, the communication unit itself is in a powered and working state, so as to realize communication between the first control unit and other control units in the powered and working state in accordance with the second communication mode in combination with the second isolation control signal, including: When the current communication mode is a UART communication mode, the first control signal is a signal of a first set level, the second control signal is a signal of a first set level, and the communication circuit communicates in accordance with the UART communication mode; When the current communication mode is the 485 communication mode, the first control signal is a signal of a second set level, and the communication circuit communicates according to the 485 communication mode; in, In the 485 communication mode, when the second control signal is a signal of a first set level, the 485 communication module can implement the first set 485 communication; In the 485 communication mode, when the second control signal is a signal of a second set level, the 485 communication module can implement the second set 485 communication.

Citation Information

Patent Citations

  • Communication device and electrical equipment

    CN215067796U