Current loop communication circuit, communication clock correction method, circuit board and air conditioning equipment
By replacing the optocoupler device with a digital isolation chip in the air conditioning device and adopting a clock correction method, the communication abnormality and current loop loss problems between the MCUs of the air conditioning device are solved, and communication reliability and efficiency are improved.
Patent Information
- Application Number
- CN202310539594.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-12
- Publication Date
- 2024-11-12
AI Technical Summary
In the prior art, communication between the indoor unit and the outdoor unit MCU of the air conditioning device is abnormal due to the switching delay of the optocoupler device, and the current loop communication circuit has a large loss in the communication state.
The optocoupler device in the current loop communication circuit is replaced with a digital isolation chip, and the power conversion circuit and digital isolation chip are used for signal transmission. The serial port baud rate is adjusted through the clock correction method of the internal and external units to ensure stable communication.
It solves the communication abnormality caused by optocoupler delay, reduces the energy loss of the current loop communication circuit in the state of no communication, and improves the working reliability and communication efficiency of the variable frequency air conditioner.
Smart Images

Figure CN118944706A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of air conditioning, and in particular to a current loop communication circuit, a communication clock correction method, a circuit board and air conditioning equipment. Background Art
[0002] At present, the indoor unit and outdoor unit of the variable frequency air conditioner are controlled by the indoor unit MCU (microcontroller) and the outdoor unit MCU respectively. However, due to the long distance between the indoor unit and the outdoor unit, the communication between the indoor unit MCU and the outdoor unit MCU cannot be directly connected. Therefore, the indoor unit MCU and the outdoor unit MCU can be set up with a current loop communication circuit to enhance the communication signal and resist external interference.
[0003] In the prior art, an optocoupler device is provided on the current loop communication circuit. The ambient temperature will cause a certain switching delay to the optocoupler device. The optocoupler delay will cause communication errors between the internal MCU and the external MCU, resulting in communication abnormalities between the internal MCU and the external MCU. Summary of the invention
[0004] The present application provides a current loop communication circuit, a communication clock correction method, a circuit board and an air-conditioning device to solve the problem of abnormal communication between the indoor unit MCU and the outdoor unit MCU in the prior art, ensure normal communication between the indoor unit and the outdoor unit, and improve the working reliability of the variable frequency air conditioner.
[0005] In a first aspect, the present application provides a current loop communication circuit, including a power conversion circuit, an internal current loop circuit, an external current loop circuit, a first digital isolation chip, and a second digital isolation chip, wherein:
[0006] The first input pin and the second output pin of the first digital isolation chip are used to respectively connect the first transmitting end and the first receiving end of the indoor controller, the second input pin of the first digital isolation chip is connected to the signal end of the indoor current loop circuit, the second output pin of the first digital isolation chip is connected to the control end of the indoor current loop circuit, the input end of the indoor current loop circuit is connected to the output end of the power conversion circuit, the input end of the power conversion circuit is used to connect the live wire of the variable frequency AC power supply, the output end of the indoor current loop circuit is connected to the input end of the external current loop circuit, the output end of the external current loop circuit is used to connect the neutral wire of the variable frequency AC power supply, the control end of the external current loop circuit is connected to the third output pin of the second digital isolation chip, the signal end of the external current loop circuit is connected to the fourth input pin of the second digital isolation chip, and the third input pin and the fourth output pin of the second digital isolation chip are used to respectively connect the second transmitting end and the second receiving end of the outdoor controller.
[0007] In a second aspect, the present application provides a communication clock correction method, which is applied to an air-conditioning device, wherein the air-conditioning device includes an indoor controller, an outdoor controller, and the current loop communication circuit as described in the first aspect, wherein the indoor controller is provided with an internal clock, and the outdoor controller is provided with an external clock, and the method includes:
[0008] The external machine controller transmits a high level signal with a preset pulse width to the current loop communication circuit through the second transmitting end according to the first frequency of the external clock under preset conditions, so that the current loop communication circuit transmits a high level signal to the first receiving end;
[0009] The indoor controller controls the first receiving end to receive the high-level signal of the preset pulse width transmitted by the current loop communication circuit according to the second frequency of the internal clock, and determines the count value when the high-level signal of the preset pulse width is received through the indoor timer, and the indoor timer counts according to the second frequency;
[0010] The indoor controller determines a frequency deviation between the first frequency and the second frequency according to a count value of the indoor timer, and adjusts serial port baud rates of the first receiving end and the first transmitting end according to the frequency deviation.
[0011] In a third aspect, the present application provides a circuit board, comprising the current loop communication circuit as described in the first aspect.
[0012] In a fourth aspect, the present application provides an air conditioning device, comprising an indoor controller, an outdoor controller and the current loop communication circuit as described in the first aspect, wherein the indoor controller is provided with an internal clock, and the outdoor controller is provided with an external clock, wherein:
[0013] The external machine controller is used to transmit a high level signal with a preset pulse width to the current loop communication circuit through the second transmitting end according to the first frequency of the external clock under preset conditions, so that the current loop communication circuit transmits a high level signal to the first receiving end;
[0014] The indoor controller is used to control the first receiving end to receive the high-level signal of the preset pulse width transmitted by the current loop communication circuit according to the second frequency of the internal clock, and determine the count value when the high-level signal of the preset pulse width is received through the indoor timer, and the indoor timer counts according to the second frequency; determine the frequency deviation between the first frequency and the second frequency according to the count value of the indoor timer, and adjust the serial port baud rates of the first receiving end and the first transmitting end according to the frequency deviation.
[0015] In the present application, the optocoupler device in the current loop communication circuit is replaced with a digital isolation chip. The digital isolation chip uses semiconductor process technology to create a transformer or capacitor that transmits data through an isolation barrier. Compared with the optocoupler device, the digital isolation chip has a higher transmission speed, better insulation performance and is less affected by temperature. After replacing the optocoupler device on the current loop communication circuit with a digital isolation chip, the problem of switching delay of the optocoupler device due to temperature changes can be well solved, thereby solving the problem of communication abnormality between the indoor unit MCU and the outdoor unit MCU in the prior art, ensuring normal communication between the indoor unit and the outdoor unit, and improving the working reliability of the variable frequency air conditioner. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a schematic diagram of a traditional N-line current loop communication circuit provided in an embodiment of the present application;
[0017] Figure 2 This is one of the structural schematic diagrams of a current loop communication circuit provided in an embodiment of the present application;
[0018] Figure 3 This is the second structural schematic diagram of a current loop communication circuit provided in an embodiment of the present application;
[0019] Figure 4 is a flow chart of a communication clock correction method provided by an embodiment of the present application;
[0020] Figure 5 It is a schematic diagram of the principle of the second transmitting end sending a high-level signal with a preset pulse width provided in an embodiment of the present application;
[0021] Figure 6 It is a schematic diagram of the principle of a first receiving end receiving a high-level signal with a preset pulse width provided by an embodiment of the present application;
[0022] In the figure, 10, current loop communication circuit; 11, power conversion circuit; 12, first rectification and voltage regulation circuit; 13, first signal reverse circuit; 14, first switch circuit; 15, second rectification and voltage regulation circuit; 16, second signal reverse circuit; 17, second switch circuit; RXD_IDU, first receiving end; TXD_IDU, first transmitting end; RXD_ODU, second receiving end; TXD_ODU, second transmitting end; AC_Source, variable frequency AC power supply; AC_L, live wire; AC_N, neutral wire; U1, first digital isolation chip; IN1, first input pin; OUT1, first output pin; IN2, second input pin; OUT2, second output pin; IN3, third input pin; U2, second digital isolation chip; OUT3, third output pin; IN4, fourth input pin; OUT4, fourth output pin; R1, first resistor; R2, second resistor; R3, third resistor; R4 , the fourth resistor; R5, the fifth resistor; R6, the sixth resistor; R7, the seventh resistor; R8, the eighth resistor; R9, the ninth resistor; R10, the tenth resistor; R11, the eleventh resistor; R12, the twelfth resistor; R13, the thirteenth resistor; R14, the fourteenth resistor; R15, the fifteenth resistor; R16, the sixteenth resistor; D1, the first diode; D2, the second diode; D3, the third diode; ZD1, the first voltage regulator; ZD2, the second voltage regulator ; ZD3, the third voltage regulator; E1, the first electrolytic capacitor; E2, the second electrolytic capacitor; E3, the third electrolytic capacitor; Q1, the first transistor; Q2, the second transistor; Q3, the third transistor; Q4, the fourth transistor; VDD_COM, the driving power supply; VDDIDU, the first power supply; VDDODU, the second power supply; PC1, the first optocoupler; PC2, the second optocoupler; PC3, the third optocoupler; PC4, the fourth optocoupler. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
[0024] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0025] In the more common existing implementation, the indoor and outdoor units of the air conditioner have different tasks that need to be controlled by the corresponding controllers. At the same time, the indoor and outdoor units are far apart, and the communication between the indoor controller and the outdoor controller cannot be directly connected. Therefore, a drive circuit is added between the indoor controller and the outdoor controller to enhance the communication signal between the two and resist external interference. The air conditioner uses an N-line current loop communication circuit as the communication drive circuit between the indoor controller and the outdoor controller to achieve signal transmission over a longer distance. Figure 1 Schematic diagram of a conventional N-wire current loop communication circuit provided in an embodiment of the present application. Figure 1As shown, the conventional N-line current loop communication circuit is provided with a first optocoupler PC1, a second optocoupler PC2, a third optocoupler PC3 and a fourth optocoupler PC4. When the indoor controller sends a signal to the outdoor controller, the second transmitting terminal TXD_ODU of the outdoor controller is set to a high level, and the fourth optocoupler PC4 is always turned on. If the first transmitting terminal TXD_IDU of the indoor controller sends a high-level signal, the first optocoupler PC1 is turned on, the current loop is closed, the second optocoupler PC2 and the third optocoupler PC3 are turned on, and the second receiving terminal RXD_ODU of the outdoor controller receives a high-level signal; if the first transmitting terminal TXD_IDU of the indoor controller sends a low-level signal, the first optocoupler PC1 is turned off, the current loop is disconnected, the second optocoupler PC2 and the third optocoupler PC3 are turned off, and the second receiving terminal RXD_ODU of the outdoor controller receives a low-level signal, thereby realizing the transmission of the communication signal from the indoor unit to the outdoor unit. Similarly, the transmission process of the communication signal from the outdoor unit to the indoor unit can be deduced. Optocouplers are provided on the current loop communication circuit, and the ambient temperature will cause a certain switching delay to the optocouplers. Optocoupler delay may cause communication errors between the indoor and outdoor controllers, resulting in communication abnormalities between the indoor and outdoor controllers. The N-line current loop communication circuit also needs to keep the optocoupler in the on state when it is not communicating, that is, the N-line current loop communication circuit needs to maintain mA-level current, so the N-line current loop communication circuit has a large amount of useless loss. With the development of the electronic control circuits of the indoor and outdoor units of variable-frequency air conditioners, the clocks used by the indoor and outdoor controllers are generally built-in. The built-in clock circuit is more sensitive to temperature, and the deviation of the operating environment of the indoor and outdoor units will cause clock deviations between the indoor and outdoor MCUs. With the addition of clock deviations, communication abnormalities are more likely to occur between the indoor and outdoor controllers.
[0026] To solve the above problems, this embodiment provides a current loop communication circuit to solve the problem of abnormal communication between the indoor unit MCU and the outdoor unit MCU in the prior art, ensure normal communication between the indoor unit and the outdoor unit, and improve the working reliability of the variable frequency air conditioner.
[0027] In one embodiment, Figure 2 This is one of the structural diagrams of a current loop communication circuit provided in an embodiment of the present application. Figure 2As shown, the current loop communication circuit 10 includes a power conversion circuit 11, an internal current loop circuit, an external current loop circuit, a first digital isolation chip U1 and a second digital isolation chip U2. Among them, the first input pin IN1 and the second output pin OUT2 of the first digital isolation chip U1 are used to respectively connect the first transmitting end TXD_IDU and the first receiving end RXD_IDU of the indoor controller, the second input pin IN2 of the first digital isolation chip U1 is connected to the signal end of the indoor current loop circuit, the second output pin OUT2 of the first digital isolation chip U1 is connected to the control end of the indoor current loop circuit, the input end of the indoor current loop circuit is connected to the output end of the power conversion circuit 11, the input end of the power conversion circuit 11 is used to connect the live wire AC_L of the variable frequency AC power supply AC_Source, the output end of the indoor current loop circuit is connected to the input end of the outdoor current loop circuit, the output end of the outdoor current loop circuit is used to connect the neutral wire AC_N of the variable frequency AC power supply AC_Source, the control end of the outdoor current loop circuit is connected to the third output pin OUT3 of the second digital isolation chip U2, the signal end of the outdoor current loop circuit is connected to the fourth input pin IN4 of the second digital isolation chip U2, the third input pin IN3 and the fourth output pin OUT4 of the second digital isolation chip U2 are used to respectively connect the second transmitting end TXD_ODU and the second receiving end RXD_ODU of the outdoor controller.
[0028] In this embodiment, when the digital isolation chip is powered, the input pin of the digital isolation chip and the corresponding output pin have the same level. Since the digital isolation chip uses semiconductor process technology to create a transformer or capacitor that transmits data through an isolation barrier, compared with the optocoupler device, the digital isolation chip has a higher transmission speed, better insulation performance and is less affected by temperature. After replacing the optocoupler device on the current loop communication circuit 10 with a digital isolation chip, the problem of switching delay caused by temperature changes in the optocoupler device can be well solved, thereby solving the problem of abnormal communication between the indoor unit MCU and the outdoor unit MCU in the prior art, ensuring normal communication between the indoor unit and the outdoor unit, and improving the working reliability of the variable frequency air conditioner.
[0029] In this embodiment, the power conversion circuit 11 is used to convert the voltage of the variable frequency AC power supply AC_Source into a driving power supply VDD_COM for the current loop to work, and the signal flow path returns to the driving power supply VDD_COM after passing through the zero line AC_N of the variable frequency AC power supply AC_Source. At this time, the signal flow path forms a closed current loop in the current loop communication circuit 10. The indoor controller and the outdoor controller perform bidirectional communication based on the closed current loop. Exemplarily, when the control end of the indoor current loop circuit is connected to a high level, the switch between the corresponding input end and the output end is closed, and when the control end of the indoor current loop circuit is connected to a low level, the switch between the corresponding input end and the output end is disconnected; similarly, when the control end of the outdoor current loop circuit is connected to a high level, the switch between the corresponding input end and the output end is closed, and when the control end of the outdoor current loop circuit is connected to a low level, the switch between the corresponding input end and the output end is disconnected. When the control end of the indoor current loop circuit and the control end of the outdoor current loop circuit are both connected to a high level, the current flows out from the live wire AC_L of the variable frequency AC power supply AC_Source, and passes through the power conversion circuit 11, the input end and output end of the indoor current loop circuit, and the input end and output end of the outdoor current loop circuit in sequence to form a closed loop. When the control end of the indoor current loop circuit or the control end of the outdoor current loop circuit is connected to a low level, the variable frequency AC power supply AC_Source, the power conversion circuit 11, the input end and output end of the indoor current loop circuit, and the input end and output end of the outdoor current loop circuit do not form a closed loop. When the variable frequency AC power supply AC_Source, the power conversion circuit 11, the input end and output end of the indoor current loop circuit, and the input end and output end of the outdoor current loop circuit form a closed loop, the input end and output end of the indoor current loop circuit have current passing through, the signal end of the indoor current loop circuit outputs a high level, the input end and output end of the outdoor current loop circuit also have current passing through, and the signal end of the outdoor current loop circuit outputs a high level. When the variable frequency AC power supply AC_Source, the power conversion circuit 11, the input and output ends of the indoor current loop circuit, and the input and output ends of the outdoor current loop circuit do not form a closed loop, no current flows through the input and output ends of the indoor current loop circuit, and the signal end of the indoor current loop circuit outputs a low level. No current flows through the input and output ends of the outdoor current loop circuit, and the signal end of the outdoor current loop circuit outputs a low level.
[0030] The communication process between the indoor controller and the outdoor controller is as follows: when the indoor controller is in the signal sending state or idle state, the first receiving end RXD_IDU is set to a high level, and similarly, when the outdoor controller is in the signal sending state or idle state, the second receiving end RXD_ODU is set to a high level. If the indoor controller sends a high-level signal to the outdoor controller, the first transmitting end TXD_IDU sends a high-level signal to the first input pin IN1, and the first output pin OUT1 outputs a high-level signal to act on the control end of the indoor current loop circuit, and the switch between the input end and the output end of the indoor current loop circuit is closed. At the same time, the second transmitting end TXD_ODU is set to a high level, the third input pin IN3 is connected to a high level, the third output pin OUT3 outputs a high level to act on the control end of the external machine current loop circuit, the switch between the input end and the output end of the external machine current loop circuit is closed, the variable frequency AC power supply AC_Source, the power conversion circuit 11, the input end and the output end of the internal machine current loop circuit, and the input end and the output end of the external machine current loop circuit form a closed loop, the input end and the output end of the external machine current loop circuit have current passing through, the signal end of the external machine current loop circuit outputs a high level to the fourth input pin IN4, and the fourth output pin OUT4 outputs a high level signal to the second receiving end RXD_ODU. If the external machine controller sends a high level signal to the internal machine controller, the principle is the same as above, the input end and the output end of the internal machine current loop circuit have current passing through, the signal end of the internal machine current loop circuit outputs a high level to the second input pin IN2, and the second output pin OUT2 outputs a high level signal to the first receiving end RXD_IDU. If the indoor controller sends a low-level signal to the outdoor controller, the first transmitting end TXD_IDU outputs a low-level signal to the first input pin IN1, the first output pin OUT1 outputs a low level to act on the control end of the indoor current loop circuit, and the switch between the input and output ends of the indoor current loop circuit is disconnected. At this time, the variable frequency AC power supply AC_Source, the power conversion circuit 11, the input and output ends of the indoor current loop circuit, and the input and output ends of the outdoor current loop circuit do not form a closed loop, and no current passes through the input and output ends of the outdoor current loop circuit. The signal end of the outdoor current loop circuit outputs a low-level signal to the fourth input pin IN4, the fourth output pin OUT4 outputs a low-level signal, and the second receiving end RXD_ODU receives the low-level signal. If the outdoor controller sends a low-level signal to the indoor controller, the second transmitting end TXD_ODU outputs a low-level signal to the third input pin IN3, the third input pin IN3 outputs a low level to act on the control end of the outdoor current loop circuit, and the switch between the input and output ends of the outdoor current loop circuit is disconnected.At this time, the variable frequency AC power supply AC_Source, the power conversion circuit 11, the input and output ends of the indoor current loop circuit, and the input and output ends of the outdoor current loop circuit do not form a closed loop, no current passes through the input and output ends of the indoor current loop circuit, the signal end of the indoor current loop circuit outputs a low level signal to the second input pin IN2, the second output pin OUT2 outputs a low level signal, and the first receiving end RXD_IDU receives the low level signal.
[0031] In one embodiment, Figure 3 This is the second structural diagram of a current loop communication circuit provided by an embodiment of the present application. Figure 3 As shown, the internal machine current loop circuit includes a first switch circuit 14 and a first signal inversion circuit 13. The second input pin IN2 of the first digital isolation chip U1 is connected to the output end of the first signal inversion circuit 13, the second output pin OUT2 of the first digital isolation chip U1 is connected to the first control end of the first switch circuit 14, the input end of the first switch circuit 14 and the input end of the first signal inversion circuit 13 are connected to the output end of the power conversion circuit 11, and the output end of the first switch circuit 14 is connected to the input end of the external machine current loop circuit. The external machine current loop circuit includes a second switch circuit 17 and a second signal inversion circuit 16, the second switch circuit 17 and the input end and the input end of the second signal inversion circuit 16 are connected to the output end of the internal machine current loop circuit, the output end of the second switch circuit 17 is used to connect the neutral line AC_N of the variable frequency AC power supply AC_Source, the control end of the second switch circuit 17 is connected to the third output pin OUT3 of the second digital isolation chip U2, and the output end of the second signal inversion circuit 16 is connected to the fourth input pin IN4 of the second digital isolation chip U2.
[0032] It is easy to understand that the input end and output end of the first switch circuit 14 are respectively the input end and output end of the inner machine current loop circuit, and the output end of the first signal reverse circuit 13 is the signal end of the inner machine current loop circuit; the input end and output end of the second switch circuit 17 are respectively the input end and output end of the outer machine current loop circuit, and the output end of the second signal reverse circuit 16 is the signal end of the outer machine current loop circuit.
[0033] In this embodiment, the first switch circuit 14 is used to close the path between the corresponding input terminal and the output terminal when a high-level signal is connected to the corresponding control terminal, and disconnect the path between the corresponding input terminal and the output terminal when a low-level signal is connected to the corresponding control terminal; the first signal inversion circuit 13 is used to output a high-level signal when the first switch circuit 14 is in the on state, and output a low-level signal when the first switch circuit 14 is in the off state. The second switch circuit 17 is used to close the path between the corresponding input terminal and the output terminal when a high-level signal is connected to the corresponding control terminal, and disconnect the path between the corresponding input terminal and the output terminal when a low-level signal is connected to the corresponding control terminal; the second signal inversion circuit 16 is used to output a high-level signal when the second switch circuit 17 is in the on state, and output a low-level signal when the second switch circuit 17 is in the off state. Exemplarily, when the indoor controller sends a high-level signal to the outdoor controller, or when the outdoor controller sends a high-level signal to the indoor controller, both the first output pin OUT1 and the third output pin OUT3 output a high level. The control end of the first switch circuit 14 receives a high-level signal, and the corresponding input and output paths are closed. The control end of the second switch circuit 17 receives a high-level signal, and the corresponding input and output paths are closed. At this time, the variable frequency AC power supply AC_Source, the power conversion circuit 11, the input and output ends of the indoor current loop circuit, and the input and output ends of the outdoor current loop circuit form a closed loop. The first switch circuit 14 and the second switch circuit 17 are in a conducting state, and the output end of the first signal reverse circuit 13 and the output end of the second signal reverse circuit 16 output high-level signals to the second input pin IN2 and the fourth input pin IN4 respectively. When the indoor controller sends a low-level signal to the outdoor controller, the first output pin OUT1 outputs a low level. The control end of the first switch circuit 14 is connected to a low-level signal, the corresponding input and output paths are disconnected, the variable frequency AC power supply AC_Source, the power conversion circuit 11, the input and output ends of the indoor current loop circuit, and the input and output ends of the outdoor current loop circuit do not form a closed loop, the second switch circuit 17 is in an open state, and the output end of the second signal reverse circuit 16 transmits a low-level signal to the fourth input pin IN4. When the outdoor controller sends a low-level signal to the indoor controller, the third output pin OUT3 outputs a low level. The control end of the second switch circuit 17 is connected to a low-level signal, the corresponding input and output paths are disconnected, the variable frequency AC power supply AC_Source, the power conversion circuit 11, the input and output ends of the indoor current loop circuit, and the input and output ends of the outdoor current loop circuit do not form a closed loop, the first switch circuit 14 is in an open state, and the output end of the first signal reverse circuit 13 transmits a low-level signal to the second input pin IN2.
[0034] refer to Figure 3The internal machine current loop circuit also includes a first rectifier and voltage regulator circuit 12, the input end of the first rectifier and voltage regulator circuit 12 is connected to the output end of the power conversion circuit 11, and the output end of the first rectifier and voltage regulator circuit 12 is connected to the power end of the first digital isolation chip U1. The external machine current loop circuit also includes a second rectifier and voltage regulator circuit 15, the input end of the second rectifier and voltage regulator circuit 15 is connected to the output end of the internal machine current loop circuit, and the output end of the second rectifier and voltage regulator circuit 15 is connected to the power end of the second digital isolation chip U2. Exemplarily, the first rectifier and voltage regulator circuit 12 is used to convert the voltage output by the power conversion circuit 11 into a voltage of 5V or 3.3V to power the first digital isolation chip U1; the second rectifier and voltage regulator circuit 15 is used to convert the voltage output by the power conversion circuit 11 into a voltage of 5V or 3.3V to power the second digital isolation chip U2.
[0035] In this embodiment, after the optocoupler device in the current loop communication circuit 10 is replaced with a digital isolation chip, the first rectifier and voltage regulator circuit 12 and the second rectifier and voltage regulator circuit 15 respectively supply power to the first digital isolation chip U1 and the second digital isolation chip U2 to ensure the reliable operation of the first digital isolation chip U1 and the second digital isolation chip U2. A current loop is formed by the first switch circuit 14, the second switch circuit 17 and the power conversion circuit 11 to ensure the bidirectional transmission of the communication signal. The first signal reverse circuit 13 and the second signal reverse circuit 16 respectively detect the disconnection state or the conduction state of the first switch circuit 14 and the second switch circuit 17 to determine whether the first switch circuit 14 and the second switch circuit 17 form a current loop, so as to transmit the communication signal to the indoor controller or the outdoor controller with the help of the current loop.
[0036] In this embodiment, reference Figure 3 The power conversion circuit 11 includes a first resistor R1, a first diode D1, a first voltage regulator ZD1, a first electrolytic capacitor E1, and a second resistor R2. The first end of the first resistor R1 is used to connect the live wire AC_L of the variable frequency AC power source AC_Source, the second end of the first resistor R1 is connected to the anode of the first diode D1, the anode of the first voltage regulator ZD1, the first end of the first electrolytic capacitor E1, and the first end of the second resistor R2 are all used to connect the neutral wire AC_N of the variable frequency AC power source AC_Source, and the cathode of the first diode D1, the cathode of the first voltage regulator ZD1, the second end of the first electrolytic capacitor E1, and the second end of the second resistor R2 are all connected to the output end of the power conversion circuit 11. Exemplarily, the power of the variable frequency AC power source AC_Source is half-wave rectified by the first diode D1, limited by the first resistor R1, and shunted by the second current, and then filtered into a DC level by the first electrolytic capacitor E1, and the voltage of the driving power source VDD_COM is stabilized by the second voltage regulator ZD2 to provide a stable voltage for the current loop. It should be noted that the voltage of the first electrolytic capacitor E1 can be regarded as the voltage of the driving power supply VDD_COM.
[0037] In this embodiment, reference Figure 3 , the first rectifying and voltage-stabilizing circuit 12 includes a third resistor R3, a second voltage-stabilizing tube ZD2, a second electrolytic capacitor E2 and a fourth resistor R4. The first end of the third resistor R3 is connected to the output end of the power conversion circuit 11, the anode of the second voltage-stabilizing tube ZD2, the first end of the second electrolytic capacitor E2 and the first end of the fourth resistor R4 are all grounded, and the second end of the third resistor R3, the cathode of the second voltage-stabilizing tube ZD2, the second end of the second electrolytic capacitor E2 and the second end of the fourth resistor R4 are all connected to the output end of the first rectifying and voltage-stabilizing circuit 12. Exemplarily, the voltage of the driving power supply VDD_COM is converted into the voltage of the first power supply VDDIDU of 5V or 3.3V of the first digital isolation chip U1 after voltage division by the third resistor R3 and the fourth current, the second electrolytic capacitor E2 filters the AC level, and the second voltage-stabilizing tube ZD2 stabilizes the voltage of the first power supply VDDIDU.
[0038] refer to Figure 3 , the second rectifying and voltage-stabilizing circuit 15 includes a tenth resistor R10, a third voltage-stabilizing tube ZD3, a third electrolytic capacitor E3 and an eleventh resistor R11. The first end of the tenth resistor R10 is connected to the output end of the first switch circuit 14, the anode of the third voltage-stabilizing tube ZD3, the first end of the third electrolytic capacitor E3 and the eleventh resistor R11 are all grounded, and the second end of the tenth resistor R10, the cathode of the third voltage-stabilizing tube ZD3, the second end of the third electrolytic capacitor E3 and the second end of the eleventh resistor R11 are all connected to the output end of the second rectifying and voltage-stabilizing circuit 15. Similarly, the voltage of the driving power supply VDD_COM is converted into the voltage of the second power supply VDDODU of 5V or 3.3V of the second digital isolation chip U2 after voltage division by the tenth resistor R10 and the eleventh resistor R11, the AC level is filtered by the third electrolytic capacitor E3, and the third voltage-stabilizing tube ZD3 stabilizes the voltage of the second power supply VDDODU.
[0039] In this embodiment, reference Figure 3, the first switch circuit 14 includes a seventh resistor R7, a second triode Q2, a second diode D2, an eighth resistor R8 and a ninth resistor R9. The first end of the seventh resistor R7 is connected to the output end of the power conversion circuit 11, the second end of the seventh resistor R7 is connected to the input end of the second triode Q2, the control end of the second triode Q2 is connected to the first end of the eighth resistor R8 and the first end of the ninth resistor R9, the second end of the ninth resistor R9 is connected to the first output pin OUT1, the second end of the eighth resistor R8, the output end of the second triode Q2 and the anode of the second diode D2 are grounded, and the cathode of the second diode D2 is connected to the output end of the first switch circuit 14. The second switch circuit 17 includes a fourteenth resistor R14, a fourth triode Q4, a third diode D3, a fifteenth resistor R15 and a sixteenth resistor R16. A first end of the fourteenth resistor R14 is connected to the output end of the first switch circuit 14, a second end of the fourteenth resistor R14 is connected to the input end of the fourth transistor Q4, a control end of the fourth transistor Q4 is connected to a first end of the fifteenth resistor R15 and a first end of the sixteenth resistor R16, a second end of the sixteenth resistor R16 is connected to the third output pin OUT3, a second end of the fifteenth resistor R15, an output end of the fourth transistor Q4 and an anode of the third diode D3 are grounded, and a cathode of the third diode D3 is connected to the neutral line AC_N of the variable frequency AC power source AC_Source.
[0040] Exemplarily, when the indoor controller sends a high level signal to the outdoor controller, the first output pin OUT1 outputs a high level, and the third output pin OUT3 also outputs a high level. The high level output by the first output pin OUT1 acts on the control end of the second triode Q2 after the current limiting of the eighth resistor R8 and the voltage division of the ninth resistor R9, so that the input end and the output end of the second triode Q2 are closed. The high level output by the third output pin OUT3 acts on the control end of the fourth triode Q4 after the current limiting of the fifteenth resistor R15 and the voltage division of the sixteenth resistor R16, so that the input end and the output end of the fourth triode Q4 are closed. The current of the driving power supply VDD_COM passes through the seventh resistor R7, the second transistor Q2, the second diode D2, the fourteenth resistor R14, the fourth transistor Q4 and the second transistor Q2, and the zero line AC_N of the variable frequency AC power supply AC_Source and returns to the driving power supply VDD_COM, forming a closed current loop. The first switch circuit 14 and the second switch circuit 17 are in the on state, and the second signal inversion circuit 16 outputs a high level to the fourth input pin IN4, and the fourth input pin IN4 outputs a high level to the second receiving terminal RXD_ODU. The process of the outdoor controller sending a high level signal to the indoor controller is the same as described above, realizing the transmission of high level signals between the indoor controller and the outdoor controller.
[0041] When the indoor controller sends a low level signal to the outdoor controller, the first output pin OUT1 outputs a low level, and the third output pin OUT3 outputs a high level. The low level output by the first output pin OUT1 acts on the control end of the second transistor Q2, so that the input end and the output end of the second transistor Q2 are disconnected. A closed current loop cannot be formed between the driving power supply VDD_COM, the seventh resistor R7, the second transistor Q2, the second diode D2, the fourteenth resistor R14, the fourth transistor Q4, the second transistor Q2 and the zero line AC_N of the variable frequency AC power supply AC_Source, the second switch circuit 17 is in an open state, the second signal reverse circuit 16 outputs a low level to the fourth input pin IN4, and the fourth input pin IN4 outputs a low level to the second receiving end RXD_ODU. When the outdoor controller sends a low level signal to the indoor controller, the third output pin OUT3 outputs a low level, and the first output pin OUT1 outputs a high level. The low level output by the third output pin OUT3 acts on the control end of the fourth transistor Q4, so that the input end and the output end of the fourth transistor Q4 are disconnected. A closed current loop cannot be formed between the driving power supply VDD_COM, the seventh resistor R7, the second transistor Q2, the second diode D2, the fourteenth resistor R14, the fourth transistor Q4, the second transistor Q2 and the neutral line AC_N of the variable frequency AC power supply AC_Source, the first switch circuit 14 is in an open state, the first signal reverse circuit 13 outputs a low level to the second input pin IN2, and the second input pin IN2 outputs a low level to the first receiving terminal RXD_IDU. The above embodiment can realize the transmission of low-level signals between the indoor controller and the outdoor controller. The second diode D2 and the third diode D3 can play a role in preventing reverse connection in the circuit.
[0042] In this embodiment, reference Figure 3The first signal inverting circuit 13 includes a fifth resistor R5, a first transistor Q1 and a sixth resistor R6. A first end of the fifth resistor R5 is connected to the output end of the power conversion circuit 11, a second end of the fifth resistor R5 is connected to the control end of the first transistor Q1, the output end of the first transistor Q1 is grounded, an input end of the first transistor Q1 is connected to a first end of the sixth resistor R6 and a second input pin IN2, and a second end of the sixth resistor R6 is connected to the output end of the first rectifying and voltage stabilizing circuit 12. Exemplarily, when the first output pin OUT1 and the third output pin OUT3 output a high level, the second transistor Q2 and the fourth transistor Q4 are closed, and a closed current loop is formed between the driving power supply VDD_COM, the seventh resistor R7, the second transistor Q2, the second diode D2, the fourteenth resistor R14, the fourth transistor Q4, the second transistor Q2 and the neutral line AC_N of the variable frequency AC power supply AC_Source, and the voltage of the driving power supply VDD_COM is divided by the seventh resistor R7 and the fourteenth resistor R14, and the control terminal voltage of the first transistor Q1 is equivalent to the voltage of the seventh resistor R7. The voltage of the driving power supply VDD_COM is 24V, the voltage of the seventh resistor R7 is approximately 12V, the input terminal voltage of the first transistor Q1 is the voltage of the first power supply VDDIDU, and the voltage of the first power supply VDDIDU is 5V or 3.3V, that is, the control terminal voltage of the first transistor Q1 is greater than the input terminal voltage, the input terminal and the output terminal of the first transistor Q1 are cut off, the second input pin IN2 is connected to the high level provided by the first power supply VDDIDU, the second output pin OUT2 outputs a high level, and the first receiving terminal RXD_IDU receives a high level signal, thereby realizing that the external machine controller sends a high level signal to the internal machine controller. When the first output pin OUT1 outputs a high level and the third output pin OUT3 outputs a high level, the input and output ends of the fourth transistor Q4 are cut off, the voltage of the driving power supply VDD_COM is loaded on the fourth transistor Q4, and the fourth transistor Q4 is in a high impedance state, resulting in the voltage of the seventh resistor R7 being approximately zero, the control end voltage of the first transistor Q1 is lower than the input end voltage, the input and output ends of the first transistor Q1 are closed, the second input pin IN2 is grounded, and the second output pin OUT2 transmits a low level signal to the first receiving end RXD_IDU, thereby realizing that the external machine controller sends a low level signal to the internal machine controller. It should be noted that the fifth resistor R5 can limit the current of the driving power supply VDD_COM to protect the control end of the first transistor Q1, and the sixth resistor R6 can limit the current of the first power supply VDDIDU to protect the input end and the second input pin IN2 of the first transistor Q1.
[0043] In this embodiment, reference Figure 3, the second signal inversion circuit 16 includes a twelfth resistor R12, a third transistor Q3 and a thirteenth resistor R13. The first end of the twelfth resistor R12 is connected to the output end of the first switch circuit 14, the second end of the twelfth resistor R12 is connected to the control end of the third transistor Q3, the output end of the third transistor Q3 is grounded, the input end of the third transistor Q3 is connected to the first end of the thirteenth resistor R13 and the fourth input pin IN4, and the second end of the thirteenth resistor R13 is connected to the output end of the second rectifying and voltage stabilizing circuit 15. Exemplarily, when the first output pin OUT1 and the third output pin OUT3 output a high level, the voltage of the driving power supply VDD_COM is divided by the seventh resistor R7 and the fourteenth resistor R14, and the control end of the third transistor Q3 is equivalent to the voltage of the fourteenth resistor R14. The voltage of the fourteenth resistor R14 is approximately 12V, the input terminal voltage of the third transistor Q3 is the voltage of the second power supply VDDODU, the voltage of the second power supply VDDODU is 5V or 3.3V, that is, the control terminal voltage of the third transistor Q3 is greater than the input terminal voltage, the input terminal and the output terminal of the third transistor Q3 are cut off, the fourth input pin IN4 is connected to the high level provided by the second power supply VDDODU, the fourth output pin OUT4 outputs a high level, and the second receiving terminal RXD_ODU receives a high level signal, thereby realizing that the indoor unit controller sends a high level signal to the outdoor unit controller. When the first output pin OUT1 outputs a low level and the third output pin OUT3 outputs a high level, the input and output ends of the second transistor Q2 are cut off, the voltage of the driving power supply VDD_COM is loaded on the second transistor Q2, and the second transistor Q2 is in a high impedance state, resulting in the voltage of the fourteenth resistor R14 being approximately zero, the voltage of the control end of the third transistor Q3 being lower than the voltage of the input end, the input and output ends of the third transistor Q3 being closed, the fourth input pin IN4 being grounded, and the fourth output pin OUT4 transmitting a low level signal to the second receiving end RXD_ODU, thereby realizing that the indoor controller sends a low level signal to the outdoor controller. It should be noted that the twelfth resistor R12 can limit the current of the driving power supply VDD_COM to protect the control cabinet end of the third transistor Q3, and the thirteenth resistor R13 can limit the current of the second power supply VDDODU to protect the input end of the third transistor Q3 and the fourth input pin IN4.
[0044] Need to explain, Figure 3The transistors shown are MOS transistors (field effect transistors), but the present embodiment may use transistors or bipolar transistors. In the present embodiment, the first transistor Q1 and the third transistor Q3 use PMOS transistors, and the second transistor Q2 and the fourth transistor Q4 use NMOS transistors. The control ends of the first transistor Q1 and the third transistor Q3 are the gates of the PMOS transistors, the input ends of the first transistor Q1 and the third transistor Q3 are the sources of the PMOS transistors, and the output ends of the first transistor Q1 and the third transistor Q3 are the drains of the PMOS transistors. The control ends of the second transistor Q2 and the fourth transistor Q4 are the gates of the NMOS transistors, the input ends of the second transistor Q2 and the fourth transistor Q4 are the drains of the NMOS transistors, and the output ends of the second transistor Q2 and the fourth transistor Q4 are the sources of the NMOS transistors.
[0045] In this embodiment, the switching states of the first transistor Q1, the second transistor Q2, the third transistor Q3 and the fourth transistor Q4 are mainly determined by the driving voltage of the control end. The communication loop composed of the live wire AC_L and the neutral wire AC_N of the variable frequency AC power supply AC_Source, the seventh resistor R7, the second transistor Q2, the second diode D2, the fourteenth resistor R14, the fourth transistor Q4 and the third diode D3 only requires uA-level current to work normally. Therefore, the resistance condition of the first resistor R1 will be reduced by several times compared with the traditional N-line current loop communication circuit, which effectively reduces the loss of the current loop communication circuit in the idle state and the communication process.
[0046] With the development of the electronic control circuits of the indoor and outdoor units of variable frequency air conditioners, the clocks used by the indoor and outdoor controllers are generally built-in. The built-in clock circuit is sensitive to temperature, and the deviation of the operating environment of the indoor and outdoor units will cause clock deviations between the indoor MCU and the outdoor MCU. With the clock deviation, communication anomalies are more likely to occur between the indoor controller and the outdoor controller. In order to solve the problem of communication anomalies between the indoor MCU and the outdoor MCU caused by clock deviation and optocoupler delay, the embodiment of the present application also provides a communication clock correction method.
[0047] The communication clock correction method provided in this embodiment can be executed by an air-conditioning device, and the air-conditioning device is installed with at least one type of operating system, wherein the operating system includes but is not limited to Android system, Linux system and Windows system. The air-conditioning device can install at least one application based on the operating system, and the application can be an application that comes with the operating system, or an application downloaded from a third-party device or server. In this embodiment, the air-conditioning device has at least an application that can execute the communication clock correction method. The air-conditioning device includes an indoor controller, an outdoor controller and the current loop communication circuit described in the above embodiment, the indoor controller is provided with an internal clock, and the outdoor controller is provided with an external clock.
[0048] In this embodiment, the internal controller can configure the second frequency of the internal clock as the serial port baud rate of the first receiving terminal RXD_IDU and the first transmitting terminal TXD_IDU, and the external controller can configure the first frequency of the external clock as the serial port baud rate of the second receiving terminal RXD_ODU and the second transmitting terminal TXD_ODU. When the serial port baud rate of the first receiving terminal RXD_IDU and the first transmitting terminal TXD_IDU is the same as the serial port baud rate of the second receiving terminal RXD_ODU and the second transmitting terminal TXD_ODU, the internal controller and the external controller can maintain normal communication. Among them, the second frequency refers to the actual crystal oscillator frequency of the internal clock, and the first frequency refers to the actual crystal oscillator frequency of the external clock. It should be noted that when the internal clock used by the internal controller and the external clock of the external controller are in the same environment, the actual crystal oscillator frequencies of the internal clock and the external clock are the same, that is, the first frequency is equal to the second frequency. The external clock is not easily affected by the ambient temperature and will always maintain the same crystal oscillator frequency, but the internal clock is easily affected by the ambient temperature and the corresponding crystal oscillator frequency often changes. When the actual crystal oscillator frequency of the external clock deviates from that of the internal clock, if the internal controller still communicates with the external controller according to the actual crystal oscillator frequency of the internal clock, communication errors will occur. Therefore, this embodiment proposes that, under preset conditions, the serial port baud rate of the first receiving end RXD_IDU and the first transmitting end TXD_IDU is adjusted to be the same as the serial port baud rate of the second receiving end RXD_ODU and the second transmitting end TXD_ODU to ensure normal communication between the internal controller and the external controller.
[0049] The communication clock correction method provided in this embodiment can be specifically operated by the indoor controller and the outdoor controller configured in the air-conditioning equipment. Figure 4 A flow chart of a communication clock correction method provided by an embodiment of the present application is given. Figure 4 , the communication clock correction method specifically includes:
[0050] S110. The external machine controller transmits a high level signal with a preset pulse width to the current loop communication circuit through the second transmitting end according to the first frequency of the external clock under preset conditions, so that the current loop communication circuit transmits the high level signal to the first receiving end.
[0051] Among them, the preset condition refers to the condition for correcting the serial port baud rate of the first transmitting terminal TXD_IDU and the first receiving terminal RXD_IDU of the indoor controller. Exemplarily, the preset condition can be that before the outdoor controller and the indoor controller communicate data, the serial port baud rate of the two is adjusted to the same frequency state before the outdoor controller and the indoor controller communicate data, to ensure the normal communication of data between the indoor controller and the outdoor controller, and to avoid the air-conditioning equipment from entering a fault state due to abnormal communication. The preset condition can also be the communication abnormality between the outdoor controller and the indoor controller. When the outdoor controller and the indoor controller have a communication abnormality, it may be caused by the different frequencies of the serial port baud rates of the two. The serial port baud rate of the indoor controller can be adjusted to adjust the serial port baud rates of the indoor controller and the outdoor controller to the same frequency state, so that the air-conditioning equipment can resume normal operation. In addition to the above two situations, the outdoor controller and the indoor controller can also calibrate the serial port baud rate according to a preset period to ensure that the outdoor controller and the indoor controller can maintain normal communication for a long time.
[0052] In this embodiment, the external machine controller configures the first frequency of the external clock as the serial port baud rate of the second transmitting end TXD_ODU and the second receiving end RXD_ODU, that is, the second transmitting end TXD_ODU sends signals according to the first frequency, and the second receiving end RXD_ODU receives signals according to the first frequency. Assuming that the first frequency of the clock signal of the external clock is f1, the first clock period of the clock signal of the external clock is T1=1 / f1, and the preset pulse width is ΔT=N*T1, the external machine controller sets the preset value of the external machine timer to N, and the external machine timer counts according to the clock signal of the external clock, that is, the time for the external machine timer to count once is T1. When the external machine controller enters the clock correction logic, the second transmitting end TXD_ODU is set from a low level to a high level, and the external machine timer starts counting at the same time. When the external machine timer counts to N, an interrupt is triggered, and the interrupt sets the second transmitting end TXD_ODU from a high level to a low level, that is, the second transmitting end TXD_ODU sends a high level signal with a preset pulse width of ΔT=N*T1 to the first receiving end RXD_IDU. Figure 5 Schematic diagram of the principle of the second transmitting end sending a high level signal with a preset pulse width provided by the embodiment of the present application. Figure 5 As shown, the external controller pre-sets the count value N=3 of the external timer. After the second transmitting end TXD_ODU is set from a low level to a high level, the external timer starts counting. The external timer counts once at the rising edge of the clock signal of the external clock. After the clock signal of the external clock has three rising edges, the count value of the external timer is equal to 3, triggering an interrupt to set the second transmitting end TXD_ODU from a high level to a low level. During this period, the second transmitting end TXD_ODU sends a high-level signal with a preset pulse width of ΔT=3*T1.
[0053] When the second transmitting end TXD_ODU sends a high-level signal, the current loop communication circuit 10 is closed so that the first receiving end RXD_IDU of the indoor controller receives the high-level signal. Since the digital isolation chip is used in the current loop communication circuit 10, the transmission delay in the current loop communication circuit 10 can be ignored. The current loop communication circuit 10 can quickly transmit the high-level signal sent by the outdoor controller to the indoor controller, ensuring that the high-level signal with a nearly complete preset pulse width can be transmitted to the first receiving end RXD_IDU, so that the indoor controller can accurately calculate the clock deviation between the indoor controller and the outdoor controller based on the target pulse width of the high-level signal received by the first receiving end RXD_IDU, thereby ensuring the accuracy of clock correction.
[0054] S120, the indoor controller controls the first receiving end to receive the high-level signal of the preset pulse width transmitted by the current loop communication circuit according to the second frequency of the internal clock, and determines the count value when the high-level signal of the preset pulse width is received through the indoor timer, and the indoor timer counts according to the second frequency.
[0055] Exemplarily, the indoor controller configures the second frequency of the internal clock as the serial port baud rate of the first receiving end RXD_IDU, that is, the first receiving end RXD_IDU receives the signal at the second frequency. Assuming that the second frequency of the clock signal of the internal clock is f2, the second clock period of the clock signal of the internal clock is T2=1 / f2, and the indoor timer of the indoor controller counts according to the clock signal of the internal clock, that is, the time for the internal timer to count once is T2. When the high-level signal of the preset pulse width is transmitted to the first receiving end RXD_IDU, the first receiving end RXD_IDU receives the rising edge from the low level to the high level and enters an interrupt, and the interrupt triggers the indoor timer to start counting. When the transmission of the high-level signal of the preset pulse width ends, the first receiving end RXD_IDU receives the falling edge from the high level to the low level and enters an interrupt, and the interrupt triggers the indoor timer to end counting, and saves the count value M of the indoor timer, that is, the first receiving end receives the high-level signal of the preset pulse width of ΔT=M*T2. Figure 6 Schematic diagram of the principle of the first receiving end receiving a high-level signal with a preset pulse width provided by an embodiment of the present application. Figure 6 As shown, the first receiving end RXD_IDU receives a rising edge that switches from a low level to a high level and enters an interrupt. The interrupt triggers the internal timer to start counting. The internal timer counts once at the rising edge of the clock signal of the internal clock. After the clock signal of the internal clock has four rising edges, the count value of the internal timer is equal to 4. At this time, the first receiving end RXD_IDU receives a falling edge that switches from a high level to a low level and enters an interrupt. The interrupt triggers the internal timer to stop counting, and the count value M of the internal timer is equal to 4.
[0056] S130: The indoor controller determines a frequency deviation between the first frequency and the second frequency according to the count value of the indoor timer, and adjusts the serial port baud rates of the first receiving end and the first transmitting end according to the frequency deviation.
[0057] Based on ΔT=M*T2=N*T1, it can be deduced that T2=T1*M / N, so the second frequency of the internal clock can be determined based on the count value M of the internal machine timer and the preset pulse width ΔT. After the internal machine controller determines the second frequency of the current internal clock, it determines the frequency deviation between the internal clock and the external clock based on the pre-stored first frequency and the second frequency. The internal machine controller configures the serial port baud rate of the first receiving end RXD_IDU and the first transmitting end TXD_IDU through the frequency deviation, so that the serial port baud rate of the first receiving end RXD_IDU and the first transmitting end TXD_IDU maintains the same frequency as the serial port baud rate of the second transmitting end TXD_ODU and the second receiving end RXD_ODU.
[0058] In summary, the communication clock correction method provided by the embodiment of the present application replaces the optocoupler device in the current loop communication circuit with a digital isolation chip. At this time, the transmission delay in the current loop communication circuit can be ignored, and the current loop communication circuit can quickly transmit the high-level signal sent by the external controller to the internal controller. The internal controller can accurately calculate the clock deviation between the internal controller and the external controller based on the received high-level signal, and adjust the serial port baud rate of the internal controller based on the clock frequency deviation to keep the serial port baud rate of the internal controller consistent with that of the external controller. When the serial port baud rate of the internal controller and the external controller is consistent and the transmission delay of the current loop communication circuit is small, the internal controller and the external controller can communicate data normally, which solves the problem of abnormal communication between the internal MCU and the external MCU in the prior art, and improves the working reliability of the variable frequency air conditioner. Moreover, the current loop communication circuit also needs to keep the optocoupler device in the on state when it is not in the communication state, that is, the current loop communication circuit needs to maintain mA-level current, so the current loop communication circuit has large useless losses. After replacing the optocoupler device with a digital isolation chip, the current loop communication circuit only needs uA-level current to remain in the non-communication state, reducing the energy loss of the current loop communication circuit in the non-communication state and the communication state.
[0059] Based on the above embodiment, the embodiment of the present application further provides a circuit board, which includes the current loop communication circuit described in the above embodiment. The circuit board can be a single PCB board or multiple PCB boards spliced together.
[0060] The circuit board provided in the embodiment of the present application has the functions and beneficial effects of the current loop communication circuit described in the above embodiment.
[0061] On the basis of the above embodiment, the embodiment of the present application further provides an air conditioning device, the air conditioning device includes an indoor controller, an outdoor controller and the current loop communication circuit described in the above embodiment, the indoor controller is provided with an internal clock, and the outdoor controller is provided with an external clock, wherein:
[0062] The external machine controller is used to transmit a high level signal with a preset pulse width to the current loop communication circuit through the second transmitting end according to the first frequency of the external clock under preset conditions, so that the current loop communication circuit transmits the high level signal to the first receiving end;
[0063] The indoor controller is used to control the first receiving end to receive the high-level signal of the preset pulse width transmitted by the current loop communication circuit according to the second frequency of the internal clock, and determine the count value when the high-level signal of the preset pulse width is received through the indoor timer, and the indoor timer counts according to the second frequency; determine the frequency deviation between the first frequency and the second frequency according to the count value of the indoor timer, and adjust the serial port baud rate of the first receiving end and the first transmitting end according to the frequency deviation.
[0064] As mentioned above, the air-conditioning equipment provided by the embodiment of the present application replaces the optocoupler device in the current loop communication circuit with a digital isolation chip. At this time, the transmission delay in the current loop communication circuit can be ignored. The current loop communication circuit can quickly transmit the high-level signal sent by the external controller to the internal controller. The internal controller can accurately calculate the clock deviation between the internal controller and the external controller based on the received high-level signal, and adjust the serial port baud rate of the internal controller based on the clock frequency deviation to keep the serial port baud rate of the internal controller consistent with that of the external controller. When the serial port baud rate of the internal controller is consistent with that of the external controller and the transmission delay of the current loop communication circuit is small, the internal controller and the external controller can communicate data normally, which solves the problem of abnormal communication between the internal MCU and the external MCU in the prior art, and improves the working reliability of the variable frequency air conditioner. Moreover, the current loop communication circuit also needs to keep the optocoupler device in the on state when it is not in the communication state, that is, the current loop communication circuit needs to maintain mA-level current, so the current loop communication circuit has large useless losses. After replacing the optocoupler device with a digital isolation chip, the current loop communication circuit only needs uA-level current to remain in the non-communication state, reducing the energy loss of the current loop communication circuit in the non-communication state and the communication state.
[0065] The air conditioning equipment provided in the embodiment of the present application can be used to execute the communication clock correction method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0066] An embodiment of the present application also provides a storage medium containing computer executable instructions, which are used to execute a communication clock correction method when executed by a computer processor. The communication clock correction method includes: the external machine controller transmits a high-level signal of a preset pulse width to the current loop communication circuit through the second transmitting end according to the first frequency of the external clock under preset conditions, so that the current loop communication circuit transmits the high-level signal to the first receiving end; the internal machine controller controls the first receiving end to receive the high-level signal of the preset pulse width transmitted by the current loop communication circuit according to the second frequency of the internal clock, and determines the count value when the high-level signal of the preset pulse width is received through the internal machine timer, and the internal machine timer counts according to the second frequency; the internal machine controller determines the frequency deviation between the first frequency and the second frequency according to the count value of the internal machine timer, and adjusts the serial port baud rate of the first receiving end and the first transmitting end according to the frequency deviation.
[0067] Storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROM, floppy disk or tape device; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the first computer system in which the program is executed, or may be located in a different second computer system, which is connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media residing in different locations (for example, in different computer systems connected by a network). The storage medium may store program instructions (for example, embodied as a computer program) that can be executed by one or more processors.
[0068] Of course, the storage medium containing computer executable instructions provided in the embodiment of the present application, whose computer executable instructions are not limited to the above communication clock correction method, can also execute related operations in the communication clock correction method provided in any embodiment of the present application.
[0069] The storage medium and air conditioning equipment provided in the above embodiments can execute the communication clock correction method provided in any embodiment of the present application. For technical details not described in detail in the above embodiments, please refer to the communication clock correction method provided in any embodiment of the present application.
[0070] The above are only preferred embodiments of the present application and the technical principles used. The present application is not limited to the specific embodiments herein, and various obvious changes, readjustments and substitutions that can be made by those skilled in the art will not deviate from the protection scope of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may also include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.
Claims
1. A current loop communication circuit, characterized in that: It includes a power conversion circuit, an internal current loop circuit, an external current loop circuit, a first digital isolation chip and a second digital isolation chip, wherein: The first input pin and the second output pin of the first digital isolation chip are used to respectively connect the first transmitting end and the first receiving end of the indoor controller, the second input pin of the first digital isolation chip is connected to the signal end of the indoor current loop circuit, the second output pin of the first digital isolation chip is connected to the control end of the indoor current loop circuit, the input end of the indoor current loop circuit is connected to the output end of the power conversion circuit, the input end of the power conversion circuit is used to connect the live wire of the variable frequency AC power supply, the output end of the indoor current loop circuit is connected to the input end of the external current loop circuit, the output end of the external current loop circuit is used to connect the neutral wire of the variable frequency AC power supply, the control end of the external current loop circuit is connected to the third output pin of the second digital isolation chip, the signal end of the external current loop circuit is connected to the fourth input pin of the second digital isolation chip, and the third input pin and the fourth output pin of the second digital isolation chip are used to respectively connect the second transmitting end and the second receiving end of the outdoor controller.
2. The current loop communication circuit according to claim 1, characterized in that: The internal machine current loop circuit includes a first switch circuit and a first signal reverse circuit, wherein: The second input pin of the first digital isolation chip is connected to the output end of the first signal inversion circuit, the second output pin of the first digital isolation chip is connected to the first control end of the first switch circuit, the input end of the first switch circuit and the input end of the first signal inversion circuit are connected to the output end of the power conversion circuit, and the output end of the first switch circuit is connected to the input end of the external machine current loop circuit; Among them, the first switch circuit is used to close the path between the corresponding input end and the output end when the corresponding control end is connected to a high-level signal, and to disconnect the path between the corresponding input end and the output end when the corresponding control end is connected to a low-level signal; the first signal inverting circuit is used to output a high-level signal when the first switch circuit is in the on state, and to output a low-level signal when the first switch circuit is in the off state.
3. The current loop communication circuit according to claim 2, characterized in that: The internal current loop circuit also includes a first rectifying and voltage-stabilizing circuit, the input end of the first rectifying and voltage-stabilizing circuit is connected to the output end of the power conversion circuit, and the output end of the first rectifying and voltage-stabilizing circuit is connected to the power end of the first digital isolation chip.
4. The current loop communication circuit according to claim 1, characterized in that: The external machine current loop circuit comprises a second switch circuit and a second signal inversion circuit, wherein: The second switch circuit and the input end and the input end of the second signal inverting circuit are connected to the output end of the internal machine current loop circuit, the output end of the second switch circuit is used to connect the neutral line of the variable frequency AC power supply, the control end of the second switch circuit is connected to the third output pin of the second digital isolation chip, and the output end of the second signal inverting circuit is connected to the fourth input pin of the second digital isolation chip; Among them, the second switch circuit is used to close the path between the corresponding input end and the output end when the corresponding control end is connected to a high-level signal, and to disconnect the path between the corresponding input end and the output end when the corresponding control end is connected to a low-level signal; the second signal inverting circuit is used to output a high-level signal when the second switch circuit is in the on state, and to output a low-level signal when the second switch circuit is in the off state.
5. The current loop communication circuit according to claim 4, characterized in that: The external current loop circuit also includes a second rectifying and stabilizing circuit, the input end of the second rectifying and stabilizing circuit is connected to the output end of the internal current loop circuit, and the output end of the second rectifying and stabilizing circuit is connected to the power supply end of the second digital isolation chip.
6. The current loop communication circuit according to claim 1, characterized in that: The power conversion circuit includes a first resistor, a first diode, a first voltage regulator tube, a first electrolytic capacitor and a second resistor, wherein: The first end of the first resistor is used to connect the live wire of the variable frequency AC power supply, the second end of the first resistor is connected to the anode of the first diode, the anode of the first voltage regulator tube, the first end of the first electrolytic capacitor and the first end of the second resistor are all used to connect the neutral wire of the variable frequency AC power supply, and the cathode of the first diode, the cathode of the first voltage regulator tube, the second end of the first electrolytic capacitor and the second end of the second resistor are all connected to the output end of the power conversion circuit.
7. The current loop communication circuit according to claim 2, characterized in that: The first switch circuit includes a seventh resistor, a second triode, a second diode, an eighth resistor and a ninth resistor, wherein: The first end of the seventh resistor is connected to the output end of the power conversion circuit, the second end of the seventh resistor is connected to the input end of the second transistor, the control end of the second transistor is connected to the first end of the eighth resistor and the first end of the ninth resistor, the second end of the ninth resistor is connected to the first output pin, the second end of the eighth resistor, the output end of the second transistor and the anode of the second diode are grounded, and the cathode of the second diode is connected to the output end of the first switching circuit.
8. The current loop communication circuit according to claim 3, characterized in that: The first signal inverting circuit comprises a fifth resistor, a first transistor and a sixth resistor, wherein: The first end of the fifth resistor is connected to the output end of the power conversion circuit, the second end of the fifth resistor is connected to the control end of the first transistor, the output end of the first transistor is grounded, the input end of the first transistor is connected to the first end of the sixth resistor and the second input pin, and the second end of the sixth resistor is connected to the output end of the first rectifier and voltage stabilization circuit.
9. The current loop communication circuit according to claim 3, characterized in that: The first rectifying and voltage-stabilizing circuit comprises a third resistor, a second voltage-stabilizing tube, a second electrolytic capacitor and a fourth resistor, wherein: The first end of the third resistor is connected to the output end of the power conversion circuit, the anode of the second voltage regulator tube, the first end of the second electrolytic capacitor and the first end of the fourth resistor are all grounded, and the second end of the third resistor, the cathode of the second voltage regulator tube, the second end of the second electrolytic capacitor and the second end of the fourth resistor are all connected to the output end of the first rectifier and voltage stabilization circuit.
10. The current loop communication circuit according to claim 4, characterized in that: The second switch circuit includes a fourteenth resistor, a fourth triode, a third diode, a fifteenth resistor and a sixteenth resistor, wherein: The first end of the fourteenth resistor is connected to the output end of the internal machine current loop circuit, the second end of the fourteenth resistor is connected to the input end of the fourth transistor, the control end of the fourth transistor is connected to the first end of the fifteenth resistor and the first end of the sixteenth resistor, the second end of the sixteenth resistor is connected to the third output pin, the second end of the fifteenth resistor, the output end of the fourth transistor and the anode of the third diode are grounded, and the cathode of the third diode is connected to the neutral line of the variable frequency AC power supply.
11. The current loop communication circuit according to claim 5, characterized in that: The second signal inverting circuit comprises a twelfth resistor, a third transistor and a thirteenth resistor, wherein: The first end of the twelfth resistor is connected to the output end of the internal current loop circuit, the second end of the twelfth resistor is connected to the control end of the third transistor, the output end of the third transistor is grounded, the input end of the third transistor is connected to the first end of the thirteenth resistor and the fourth input pin, and the second end of the thirteenth resistor is connected to the output end of the second rectifying and voltage stabilizing circuit.
12. The current loop communication circuit according to claim 5, characterized in that: The second rectifying and voltage-stabilizing circuit comprises a tenth resistor, a third voltage-stabilizing tube, a third electrolytic capacitor and an eleventh resistor, wherein: The first end of the tenth resistor is connected to the output end of the internal machine current loop circuit, the anode of the third voltage regulator tube, the first end of the third electrolytic capacitor and the eleventh resistor are all grounded, and the second end of the tenth resistor, the cathode of the third voltage regulator tube, the second end of the third electrolytic capacitor and the second end of the eleventh resistor are all connected to the output end of the second rectifier voltage stabilization circuit.
13. A communication clock correction method, characterized in that: Applied to an air conditioning device, the air conditioning device comprises an indoor controller, an outdoor controller and a current loop communication circuit according to any one of claims 1 to 12, the indoor controller is provided with an internal clock, the outdoor controller is provided with an external clock, and the method comprises: The external machine controller transmits a high level signal with a preset pulse width to the current loop communication circuit through the second transmitting end according to the first frequency of the external clock under preset conditions, so that the current loop communication circuit transmits a high level signal to the first receiving end; The indoor controller controls the first receiving end to receive the high-level signal of the preset pulse width transmitted by the current loop communication circuit according to the second frequency of the internal clock, and determines the count value when the high-level signal of the preset pulse width is received through the indoor timer, and the indoor timer counts according to the second frequency; The indoor controller determines a frequency deviation between the first frequency and the second frequency according to a count value of the indoor timer, and adjusts serial port baud rates of the first receiving end and the first transmitting end according to the frequency deviation.
14. A circuit board, characterized in that: Comprising the current loop communication circuit as described in any one of claims 1-12.
15. An air conditioning device, characterized in that: It comprises an internal machine controller, an external machine controller and a current loop communication circuit as claimed in any one of claims 1 to 12, wherein the internal machine controller is provided with an internal clock, and the external machine controller is provided with an external clock, wherein: The external machine controller is used to transmit a high level signal with a preset pulse width to the current loop communication circuit through the second transmitting end according to the first frequency of the external clock under preset conditions, so that the current loop communication circuit transmits a high level signal to the first receiving end; The indoor controller is used to control the first receiving end to receive the high-level signal of the preset pulse width transmitted by the current loop communication circuit according to the second frequency of the internal clock, and determine the count value when the high-level signal of the preset pulse width is received through the indoor timer, and the indoor timer counts according to the second frequency; determine the frequency deviation between the first frequency and the second frequency according to the count value of the indoor timer, and adjust the serial port baud rates of the first receiving end and the first transmitting end according to the frequency deviation.
