Serial communication and simulation debugging multiplexing circuit and air conditioner
By designing a serial communication and simulation debugging multiplex circuit, and using simulation units to control the on-off of switching devices, the problem of serial communication circuits in the prior art need to destroy their own circuits to switch simulation debugging is solved, and efficient development and circuit work is achieved.
Patent Information
- Application Number
- CN202421378602.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2034-06-17
AI Technical Summary
In the prior art, the serial communication circuit needs to destroy its own circuit in order to enable the slave controller to switch the serial communication between the master controller to simulate and debug, resulting in low development efficiency and easy connection problems.
A serial communication and simulation debugging multiplex circuit is designed, and the switching devices contained in the main controller or slave controller are controlled through the simulation unit to achieve free switching between serial communication and simulation debugging without cutting the circuit.
It realizes that the slave controller does not need to complete simulation debugging before restoring serial communication, improves development efficiency and circuit work efficiency, reduces costs, and avoids the connection problem caused by the unreliable solder after cutting.
Smart Images

Figure CN222688394U_ABST
Abstract
Description
Technical Field
[0001] The utility model relates to the technical field of regulation, in particular to a serial communication and simulation debugging multiplexing circuit and an air conditioner. Background Art
[0002] In the outdoor unit of a commercial variable-frequency air conditioner, the controller usually includes a master controller and a slave controller; the master controller is responsible for exchanging communication data with the indoor unit hand operator, adjusting the outdoor unit operating status according to the user's power-on requirements, and transmitting the frequency requirements of the outdoor unit compressor and fan to the slave controller; the slave controller is responsible for driving the corresponding motor to work after receiving the compressor and fan power-on and frequency commands from the master controller.
[0003] Currently, the master controller and the slave controller mostly communicate using a serial bus. The program configures the corresponding pins to communicate as RXD reception and TXD transmission functions. At the same time, due to the difference in power supply between the master controller and the slave controller, the serial communication circuit is generally configured as an isolated communication circuit with an optocoupler unit.
[0004] When the slave controller is emulated and debugged, the corresponding pin is directly connected to the simulator. However, due to the existence of the isolated communication circuit, the level of the pin connecting the slave controller to the simulator is inconsistent with the power level of the slave controller, which makes it impossible for the slave controller to connect to the simulator. Therefore, in order to ensure the simulation and debugging of the slave controller, it is generally necessary to cut off the connection between the pin connecting the slave controller to the simulator and the optocoupler unit so that the slave controller can successfully connect to the simulator. After the slave controller completes the simulation and debugging, the cut circuit is connected with flying wires.
[0005] However, this method is not only time-consuming and labor-intensive, but also very easy to cause the optocoupler circuit to become inoperable if the soldering is not secure during the re-flying process after cutting, thus affecting the development efficiency of the slave controller.
[0006] Therefore, in order to solve the problem that the serial communication circuit cannot use the serial communication and simulation debugging functions at the same time, different manufacturers have different design solutions, and the design concepts of different design solutions are different, and the effects produced are also different. Utility Model Content
[0007] In view of this, the utility model provides a serial communication and simulation debugging multiplexing circuit and an air conditioner, which are used to solve the problem in the prior art that the serial communication circuit needs to destroy its own circuit to enable the slave controller to switch the serial communication with the master controller to simulation debugging.
[0008] The technical solution of the utility model is a serial communication and simulation debugging multiplexing circuit, comprising a main controller, a slave controller and a simulation unit;
[0009] The master controller is communicatively connected with the slave controller, and the master controller or the slave controller contains a switch device;
[0010] The simulation unit is in communication connection with the slave controller, and the simulation unit is used to control the on and off of the switch device.
[0011] Furthermore, it also includes a photocoupler U1 and a photocoupler U2;
[0012] The output end of the master controller is connected to the input end of the photocoupler U1, the output end of the photocoupler U1 is connected to the input end of the slave controller, the output end of the slave controller is connected to the input end of the photocoupler U2, and the output end of the photocoupler U2 is connected to the input end of the master controller.
[0013] Further, the simulation unit includes a simulation port EMP, a relay K1A, a relay K2A, a resistor R5 and a resistor R6;
[0014] The first pin of the emulation port EMP is connected to the coil terminal of the relay K1A and the coil terminal of the relay K2A respectively; the contact terminal of the relay K1A is connected to the first end of the resistor R5, and the contact terminal of the relay K2A is connected to the first end of the resistor R6;
[0015] The second pin of the emulation port EMP is connected to the data receiving terminal RX_D of the slave controller;
[0016] The third pin of the emulation port EMP is connected to the data transmitting terminal TX_D of the slave controller;
[0017] The fourth pin of the emulation port EMP is connected to the second end of the resistor R5 and the second end of the resistor R6 respectively.
[0018] Further, the slave controller includes a resistor R3, a resistor R4, a switch K1B and a switch K2B;
[0019] The first end of the resistor R3 and the first end of the resistor R4 are both used to connect to the power supply pin Vcc_D of the slave controller; the second end of the resistor R3 is simultaneously connected to the fourth pin of the photoelectric coupler U1 and the first end of the switch K1B, the second end of the switch K1B is used to connect to the data sending terminal RX_D of the slave controller, and the third pin of the photoelectric coupler U1 is grounded;
[0020] The second end of the resistor R4 is connected to the first pin of the photoelectric coupler U2, the second pin of the photoelectric coupler U2 is connected to the first end of the switch K2B, and the second end of the switch K2B is used to connect to the data sending end TX_D of the slave controller.
[0021] Furthermore, the main controller includes a resistor R1 and a resistor R2;
[0022] The first end of the resistor R1 and the first end of the resistor R2 are both used to connect to the power pin Vcc_M of the main controller, the second end of the resistor R1 is connected to the first pin of the photoelectric coupler U1, and the second pin of the photoelectric coupler U1 is used to connect to the data sending terminal TX_M of the main controller;
[0023] The second end of the resistor R2 and the fourth pin of the photoelectric coupler U2 are both used to connect to the data sending terminal RX_M of the main controller, and the third pin of the photoelectric coupler U2 is grounded.
[0024] Further, the slave controller includes a resistor R9 and a resistor R10;
[0025] The first end of the resistor R9 and the first end of the resistor R10 are both used to connect to the power pin Vcc_D of the slave controller, the second end of the resistor R9 and the fourth pin of the photoelectric coupler U1 are both used to connect to the data sending terminal RX_D of the slave controller, and the third pin of the photoelectric coupler U1 is grounded;
[0026] The second end of the resistor R10 is connected to the first pin of the photoelectric coupler U2 , and the second pin of the photoelectric coupler U2 is used to connect to the data transmitting terminal TX_D of the slave controller.
[0027] Further, the main controller includes a resistor R7, a resistor R8, a switch K1C and a switch K2C;
[0028] The first end of the resistor R7 and the first end of the resistor R8 are both used to connect to the power supply pin Vcc_M of the main controller; the second end of the resistor R7 is connected to the first pin of the photoelectric coupler U1, the second pin of the photoelectric coupler U1 is connected to the first end of the switch K1C, and the second end of the switch K1C is used to connect to the data sending terminal TX_M of the main controller;
[0029] The second end of the resistor R8 is connected to the fourth pin of the photocoupler U2 and the first end of the switch K2C at the same time. The second end of the switch K2C is used to connect to the data sending terminal RX_M of the main controller. The third pin of the photocoupler U2 is grounded.
[0030] Furthermore, the switching device includes any one of a relay, a switch tube, a transfer switch or a micro switch.
[0031] Furthermore, the communication connection between the master controller and the slave controller adopts any one of the UART communication protocol, the HBS communication protocol, the CAN communication protocol or the RS485 communication protocol.
[0032] The utility model also provides an air conditioner, comprising the serial communication and simulation debugging multiplexing circuit mentioned above.
[0033] Compared with the prior art, the utility model has at least the following beneficial effects:
[0034] The utility model controls the switch device contained in the main controller or the slave controller to enter the open / closed state through the simulation unit, so that the communication connection between the main controller and the slave controller is interrupted / uninterrupted, and the slave controller can freely switch the serial communication and simulation debugging with the main controller without cutting the circuit and re-soldering, so as to improve the development efficiency of the slave controller, and can also improve the working efficiency of the whole circuit and reduce the cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present invention; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention; the terms "including" and "having" and any variations thereof in the specification and claims of the present invention and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present invention or the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order.
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0037] Figure 1 A circuit diagram of the first serial communication and simulation debugging multiplexing circuit proposed in the utility model;
[0038] Figure 2 The present invention provides a circuit diagram of the first and second serial communication and simulation debugging multiplexing circuits.
[0039] Reference numerals:
[0040] 10. Main controller;
[0041] 20. From the controller;
[0042] 30. Simulation unit. DETAILED DESCRIPTION
[0043] In order to make the technical problems, technical solutions and beneficial effects to be solved by the utility model clearer, the utility model is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the utility model and are not used to limit the utility model. Thus, a feature indicated in this specification will be used to illustrate one of the features of an embodiment of the utility model, rather than implying that each embodiment of the utility model must have the described features. In addition, it should be noted that this specification describes many features. Although certain features can be combined together to illustrate possible system designs, these features can also be used in other combinations that are not explicitly described. Thus, unless otherwise stated, the described combinations are not intended to be limiting.
[0044] The principle and structure of the present utility model are described in detail below with reference to the accompanying drawings and embodiments.
[0045] Example 1
[0046] See attached Figure 1-2 The utility model provides a serial communication and simulation debugging multiplexing circuit, which includes a main controller 10, a slave controller 20 and a simulation unit 30.
[0047] The master controller 10 is communicatively connected with the slave controller 20 , and the master controller 10 or the slave controller 20 includes a switch device.
[0048] The simulation unit 30 is in communication connection with the slave controller 20 , and the simulation unit 30 is used to control the on and off of the switch device in the master controller 10 or the slave controller 20 .
[0049] The serial communication and simulation debugging multiplexing circuit proposed by the present invention is also provided with a control center (not shown, the same applies to the whole text).
[0050] For ease of understanding, this embodiment is described by taking the switch device included in the slave controller 20 as an example.
[0051] Therefore, when the control unit controls the simulation unit 30 not to work, the switch device contained in the slave controller 20 will maintain a normally closed state, and serial communication will be performed between the main controller 10 and the slave controller 20 at this time; and when the slave controller 20 needs to perform simulation debugging, the control unit controls the simulation unit 30 to work, thereby causing the switch device contained in the slave controller 20 to enter a disconnected state, so that the communication connection between the main controller 10 and the slave controller 20 is interrupted, so that the slave controller 20 no longer receives the communication data sent by the main controller 10, thereby ensuring that the slave controller 20 performs the simulation debugging function. Compared with According to the prior art, the utility model does not need to cut off the connection between the slave controller 20 and the main controller 10, and can also enable the slave controller 20 of the utility model to freely switch between the serial communication and simulation debugging with the main controller 10. Furthermore, the slave controller 20 does not need to complete the simulation debugging and then perform flying wire connection on the cut circuit, thereby improving the development efficiency of the slave controller 20, and can also improve the working efficiency of the entire circuit and reduce costs. In addition, the soldering will not be unreliable during the process of re-flying wires after cutting, resulting in the slave controller 20 and the main controller 10 being unable to communicate, thereby affecting the development efficiency of the slave controller 20.
[0052] In order to effectively prevent the current, voltage or noise at the input end of the main controller 10 or the slave controller 20 from interfering with the output end of the slave controller 20 or the main controller 10, thereby improving the stability and reliability of the circuit, refer to the attached Figure 1 , the multiplexing circuit also includes a photocoupler U1 and a photocoupler U2.
[0053] The output end of the main controller 10 is connected to the input end of the photocoupler U1, the output end of the photocoupler U1 is connected to the input end of the slave controller 20, the output end of the slave controller 20 is connected to the input end of the photocoupler U2, and the output end of the photocoupler U2 is connected to the input end of the main controller 10.
[0054] It should be noted that due to the existence of the optocoupler U1 and the optocoupler U2, the serial communication and simulation debugging multiplexing circuit proposed in the utility model is still an optocoupler isolation communication circuit, and the pins connecting the simulation unit 30 from the controller 20 are the data receiving end RX_D and the data sending end TX_D of the slave controller 20.
[0055] Among them, in order to ensure the simulation debugging of the slave controller 20, it is necessary to control the switching device contained in the slave controller 20 to enter the disconnected state, so that the slave controller 20 no longer receives the communication data sent by the main controller 10, and ensure that the level of the pin connecting the slave controller 20 to the simulation unit 30 is consistent with the level of the power pin of the slave controller 20.
[0056] For details, please refer to the attached Figure 1The simulation unit 30 includes a simulation port EMP, a relay K1A, a relay K2A, a resistor R5 and a resistor R6.
[0057] The first pin of the simulation port EMP is connected to the coil terminal of the relay K1A and the coil terminal of the relay K2A respectively; the contact terminal of the relay K1A is connected to the first end of the resistor R5, and the contact terminal of the relay K2A is connected to the first end of the resistor R6.
[0058] A second pin of the emulation port EMP is connected to a data receiving terminal RX_D of the slave controller 20 .
[0059] The third pin of the emulation port EMP is connected to the data transmitting terminal TX_D of the slave controller 20 .
[0060] The fourth pin of the emulation port EMP is connected to the second end of the resistor R5 and the second end of the resistor R6 respectively.
[0061] It should be noted that the first pin of the simulation port EMP in this embodiment is preferably the simulation power pin Vcc_E, the second pin of the simulation port EMP is preferably the data transmission pin TX_E, the third pin of the simulation port EMP is preferably the data receiving pin RX_E, and the fourth pin of the simulation port EMP is preferably the ground pin GND_E.
[0062] Therefore, when the control unit controls the simulation unit 30 not to work, the simulation port EMP is in an idle state, and there is no voltage difference between the simulation power pin Vcc_E and the ground pin GND_E. Therefore, the relay K1A and the relay K2A are not powered and are both in a disconnected state, which causes the switching device contained in the slave controller 20 to maintain a normally closed state, so that the slave controller 20 continues to receive the communication data sent by the main controller 10. At this time, serial communication is carried out between the main controller 10 and the slave controller 20.
[0063] When the slave controller 20 needs to perform simulation debugging, the control unit controls the simulation unit 30 to work. At this time, the simulation port EMP enters the working state, there is a voltage difference between the simulation power pin Vcc_E and the ground pin GND_E, and a simulation power supply is generated. The simulation power supply passes through relay K1A and relay K2A, so that relay K1A and relay K2A enter a closed state, thereby causing the switching device contained in the slave controller 20 to enter a disconnected state, thereby interrupting the communication connection between the main controller 10 and the slave controller 20, so that the slave controller 20 no longer receives the communication data sent by the main controller 10, thereby ensuring that the slave controller 20 performs the simulation debugging function. The slave controller 20 of the utility model can freely switch between serial communication and simulation debugging with the main controller 10, and the slave controller 20 does not need to complete the simulation debugging and then connect the cut circuit with flying wires, thereby improving the development efficiency of the slave controller 20 and the working efficiency of the entire circuit, reducing costs, and there will be no situation where the soldering is not firm during the process of re-flying the wires after cutting, resulting in the slave controller 20 and the main controller 10 being unable to communicate, thereby affecting the development efficiency of the slave controller 20.
[0064] Specifically, refer to the attached Figure 1 The utility model proposes a circuit structure diagram of a first slave controller 20 , where the slave controller 20 includes a resistor R3 , a resistor R4 , a switch K1B and a switch K2B.
[0065] The first end of the resistor R3 and the first end of the resistor R4 are both used to connect to the power pin Vcc_D of the slave controller 20; the second end of the resistor R3 is simultaneously connected to the fourth pin of the photocoupler U1 and the first end of the switch K1B, the second end of the switch K1B is used to connect to the data sending terminal RX_D of the slave controller 20, and the third pin of the photocoupler U1 is grounded.
[0066] The second end of the resistor R4 is connected to the first pin of the photocoupler U2 , the second pin of the photocoupler U2 is connected to the first end of the switch K2B, and the second end of the switch K2B is used to connect to the data transmitting end TX_D of the slave controller 20 .
[0067] Among them, when the slave controller 20 needs to perform simulation debugging, the control unit controls the simulation unit 30 to work. At this time, the simulation port EMP enters the working state, and the relay K1A and the relay K2A enter the closed state, which causes the switch K1B and the switch K2B to be in the disconnected state, so that the communication connection between the main controller 10 and the slave controller 20 is interrupted, so that the slave controller 20 no longer receives the communication data sent by the main controller 10, thereby ensuring that the slave controller 20 performs the simulation debugging function.
[0068] Correspondingly, the present invention also proposes a circuit structure diagram of a first master controller 10 to match the circuit structure diagram of a first slave controller 20 proposed in this embodiment, so that the slave controller 20 can freely switch between serial communication and simulation debugging with the master controller 10, refer to the attached Figure 1 , the main controller 10 includes a resistor R1 and a resistor R2.
[0069] The first end of resistor R1 and the first end of resistor R2 are both used to connect to the power pin Vcc_M of the main controller 10, the second end of resistor R1 is connected to the first pin of the photocoupler U1, and the second pin of the photocoupler U1 is used to connect to the data sending terminal TX_M of the main controller 10.
[0070] The second end of the resistor R2 and the fourth pin of the photocoupler U2 are both used to connect to the data sending terminal RX_M of the main controller 10, and the third pin of the photocoupler U2 is grounded.
[0071] In order to ensure that the switch device in the slave controller 20 proposed in this embodiment is closed when the relay K1A and the relay K2A are disconnected, or is opened when the relay K1A and the relay K2A are closed, the switch device includes any one of a relay, a switch tube, a conversion switch or a micro switch.
[0072] It should be noted that the photocoupler U1 and the photocoupler U2 proposed in this embodiment are both composed of a light emitting diode and a phototransistor. The first pin of the photocoupler U1 and the photocoupler U2 is preferably the positive electrode of the light emitting diode, the second pin of the photocoupler U1 and the photocoupler U2 is preferably the negative electrode of the light emitting diode, the third pin of the photocoupler U1 and the photocoupler U2 is preferably the emitter of the phototransistor, and the fourth pin of the photocoupler U1 and the photocoupler U2 is preferably the collector of the phototransistor.
[0073] Among them, in order to ensure that the serial communication function between the main controller 10 and the slave controller 20 proposed in this embodiment is normal, the communication connection between the main controller 10 and the slave controller 20 adopts any one of the UART (Universal Asynchronous Receiver / Transmitter) communication protocol, HBS (Home Bus System) communication protocol, CAN (Controller Area Network) communication protocol or RS485 (Recommended Standard 485) communication protocol.
[0074] It should be noted that the communication connection between the master controller 10 and the slave controller 20 can also adopt an I2C (Inter-Integrated Circuit) communication protocol or an SPI (Serial Peripheral Interface) communication protocol or any one of them, which is not limited here.
[0075] Example 2
[0076] See attached Figure 1-2 The utility model provides a serial communication and simulation debugging multiplexing circuit, which includes a main controller 10, a slave controller 20 and a simulation unit 30.
[0077] The master controller 10 is communicatively connected with the slave controller 20 , and the master controller 10 or the slave controller 20 includes a switch device.
[0078] The simulation unit 30 is in communication connection with the slave controller 20 , and the simulation unit 30 is used to control the on and off of the switch device in the master controller 10 or the slave controller 20 .
[0079] The serial communication and simulation debugging multiplexing circuit proposed by the present invention is also provided with a control center (not shown, the same applies to the whole text).
[0080] For ease of understanding, this embodiment is described by taking the main controller 10 as an example in which a switch device is included.
[0081] Therefore, when the control unit controls the simulation unit 30 not to work, the switch device contained in the main controller 10 will maintain a normally closed state, and the main controller 10 and the slave controller 20 will communicate serially at this time; and when the slave controller 20 needs to perform simulation debugging, the control unit controls the simulation unit 30 to work, thereby causing the switch device contained in the main controller 10 to enter a disconnected state, interrupting the communication connection between the main controller 10 and the slave controller 20, so that the slave controller 20 no longer receives the communication data sent by the main controller 10, thereby ensuring that the slave controller 20 performs the simulation debugging function. Compared with According to the prior art, the utility model does not need to cut off the connection between the slave controller 20 and the main controller 10, and can also enable the slave controller 20 of the utility model to freely switch between the serial communication and simulation debugging with the main controller 10. Furthermore, the slave controller 20 does not need to complete the simulation debugging and then perform flying wire connection on the cut circuit, thereby improving the development efficiency of the slave controller 20, and can also improve the working efficiency of the entire circuit and reduce costs. In addition, the soldering will not be unreliable during the process of re-flying wires after cutting, resulting in the slave controller 20 and the main controller 10 being unable to communicate, thereby affecting the development efficiency of the slave controller 20.
[0082] In order to effectively prevent the current, voltage or noise at the input end of the main controller 10 or the slave controller 20 from interfering with the output end of the slave controller 20 or the main controller 10, thereby improving the stability and reliability of the circuit, refer to the attached Figure 2 , the multiplexing circuit also includes a photocoupler U1 and a photocoupler U2.
[0083] The output end of the main controller 10 is connected to the input end of the photocoupler U1, the output end of the photocoupler U1 is connected to the input end of the slave controller 20, the output end of the slave controller 20 is connected to the input end of the photocoupler U2, and the output end of the photocoupler U2 is connected to the input end of the main controller 10.
[0084] It should be noted that due to the existence of the optocoupler U1 and the optocoupler U2, the serial communication and simulation debugging multiplexing circuit proposed in the utility model is still an optocoupler isolation communication circuit, and the pins connecting the simulation unit 30 from the controller 20 are the data receiving end RX_D and the data sending end TX_D of the slave controller 20.
[0085] Among them, in order to ensure the simulation debugging of the slave controller 20, it is necessary to control the switching device contained in the main controller 10 to enter the disconnected state, so that the slave controller 20 no longer receives the communication data sent by the main controller 10, and ensure that the level of the pin connecting the slave controller 20 to the simulation unit 30 is consistent with the level of the power pin of the slave controller 20.
[0086] For details, please refer to the attached Figure 2 The simulation unit 30 includes a simulation port EMP, a relay K1A, a relay K2A, a resistor R5 and a resistor R6.
[0087] The first pin of the simulation port EMP is connected to the coil terminal of the relay K1A and the coil terminal of the relay K2A respectively; the contact terminal of the relay K1A is connected to the first end of the resistor R5, and the contact terminal of the relay K2A is connected to the first end of the resistor R6.
[0088] A second pin of the emulation port EMP is connected to a data receiving terminal RX_D of the slave controller 20 .
[0089] The third pin of the emulation port EMP is connected to the data transmitting terminal TX_D of the slave controller 20 .
[0090] The fourth pin of the emulation port EMP is connected to the second end of the resistor R5 and the second end of the resistor R6 respectively.
[0091] It should be noted that the first pin of the simulation port EMP in this embodiment is preferably the simulation power pin Vcc_E, the second pin of the simulation port EMP is preferably the data transmission pin TX_E, the third pin of the simulation port EMP is preferably the data receiving pin RX_E, and the fourth pin of the simulation port EMP is preferably the ground pin GND_E.
[0092] Therefore, when the control unit controls the simulation unit 30 not to work, the simulation port EMP is in an idle state, and there is no voltage difference between the simulation power pin Vcc_E and the ground pin GND_E. Therefore, the relay K1A and the relay K2A are not powered and are both in a disconnected state, which causes the switching device contained in the main controller 10 to maintain a normally closed state, so that the slave controller 20 continues to receive the communication data sent by the main controller 10. At this time, serial communication is carried out between the main controller 10 and the slave controller 20.
[0093] When the slave controller 20 needs to perform simulation debugging, the control unit controls the simulation unit 30 to work. At this time, the simulation port EMP enters the working state, there is a voltage difference between the simulation power pin Vcc_E and the ground pin GND_E, and a simulation power supply is generated. The simulation power supply passes through relay K1A and relay K2A, so that relay K1A and relay K2A enter a closed state, thereby causing the switching device contained in the main controller 10 to enter a disconnected state, thereby interrupting the communication connection between the main controller 10 and the slave controller 20, so that the slave controller 20 no longer receives the communication data sent by the main controller 10, thereby ensuring that the slave controller 20 performs the simulation debugging function. The slave controller 20 of the utility model can freely switch between serial communication and simulation debugging with the main controller 10, and the slave controller 20 does not need to complete the simulation debugging and then connect the cut circuit with flying wires, thereby improving the development efficiency of the slave controller 20 and the working efficiency of the entire circuit, reducing costs, and there will be no situation where the soldering is not firm during the process of re-flying the wires after cutting, resulting in the slave controller 20 and the main controller 10 being unable to communicate, thereby affecting the development efficiency of the slave controller 20.
[0094] Specifically, refer to the attached Figure 2 The utility model proposes a circuit structure diagram of a second main controller 10, and the main controller 10 includes a resistor R7, a resistor R8, a switch K1C and a switch K2C.
[0095] The first end of the resistor R7 and the first end of the resistor R8 are both used to connect to the power pin Vcc_M of the main controller 10; the second end of the resistor R7 is connected to the first pin of the photoelectric coupler U1, the second pin of the photoelectric coupler U1 is connected to the first end of the switch K1C, and the second end of the switch K1C is used to connect to the data sending end TX_M of the main controller 10.
[0096] The second end of the resistor R8 is connected to the fourth pin of the photocoupler U2 and the first end of the switch K2C. The second end of the switch K2C is used to connect to the data sending terminal RX_M of the main controller 10. The third pin of the photocoupler U2 is grounded.
[0097] Among them, when the slave controller 20 needs to perform simulation debugging, the control unit controls the simulation unit 30 to work. At this time, the simulation port EMP enters the working state, and the relay K1A and the relay K2A enter the closed state, which causes the switch K1C and the switch K2C to be in the disconnected state, so that the communication connection between the main controller 10 and the slave controller 20 is interrupted, so that the slave controller 20 no longer receives the communication data sent by the main controller 10, thereby ensuring that the slave controller 20 performs the simulation debugging function.
[0098] Correspondingly, the present invention also proposes a circuit structure diagram of a second slave controller 20 to match the circuit structure diagram of the second master controller 10 proposed in this embodiment, so that the slave controller 20 can freely switch between serial communication and simulation debugging with the master controller 10, refer to the attached Figure 2 , the slave controller 20 includes a resistor R9 and a resistor R10.
[0099] The first end of resistor R9 and the first end of resistor R10 are both used to connect to the power pin Vcc_D of the slave controller 20, the second end of resistor R9 and the fourth pin of the photocoupler U1 are both used to connect to the data sending terminal RX_D of the slave controller 20, and the third pin of the photocoupler U1 is grounded.
[0100] The second end of the resistor R10 is connected to the first pin of the photoelectric coupler U2 , and the second pin of the photoelectric coupler U2 is used to connect to the data transmitting terminal TX_D of the slave controller 20 .
[0101] In order to ensure that the switch device in the slave controller 20 proposed in this embodiment is closed when the relay K1A and the relay K2A are disconnected, or is opened when the relay K1A and the relay K2A are closed, the switch device includes any one of a relay, a switch tube, a conversion switch or a micro switch.
[0102] It should be noted that the photocoupler U1 and the photocoupler U2 proposed in this embodiment are both composed of a light emitting diode and a phototransistor. The first pin of the photocoupler U1 and the photocoupler U2 is preferably the positive electrode of the light emitting diode, the second pin of the photocoupler U1 and the photocoupler U2 is preferably the negative electrode of the light emitting diode, the third pin of the photocoupler U1 and the photocoupler U2 is preferably the emitter of the phototransistor, and the fourth pin of the photocoupler U1 and the photocoupler U2 is preferably the collector of the phototransistor.
[0103] Among them, in order to ensure that the serial communication function between the main controller 10 and the slave controller 20 proposed in this embodiment is normal, the communication connection between the main controller 10 and the slave controller 20 adopts any one of the UART (Universal Asynchronous Receiver / Transmitter) communication protocol, HBS (Home Bus System) communication protocol, CAN (Controller Area Network) communication protocol or RS485 (Recommended Standard 485) communication protocol.
[0104] Example 3
[0105] The utility model also provides an air conditioner, comprising the serial communication and simulation debugging multiplexing circuit mentioned above.
[0106] Among them, when the main controller 10 and the slave controller 20 in the air conditioner need to be simulated tested, the control unit controls the simulation unit 30 to work, thereby causing the switching device contained in the main controller 10 or the slave controller 20 to enter the disconnected state, thereby interrupting the communication connection between the main controller 10 and the slave controller 20, so that the slave controller 20 no longer receives the communication data sent by the main controller 10, thereby ensuring that the slave controller 20 performs the simulation debugging function.
[0107] Specifically, refer to the attached Figure 1 The utility model provides a serial communication and simulation debugging multiplexing circuit for an air conditioner, comprising:
[0108] The main controller 10 is composed of resistor R1 and resistor R2, the slave controller 20 is composed of resistor R3, resistor R4, switch K1B and switch K2B, the simulation port EMP, relay K1A, relay K2A, resistor R5 and resistor R6, and optocoupler U1 and optocoupler U2 are composed of the simulation unit 30.
[0109] The first end of the resistor R1 and the first end of the resistor R2 are both used to connect to the power pin Vcc_M of the main controller 10, the second end of the resistor R1 is connected to the first pin of the photocoupler U1, and the second pin of the photocoupler U1 is used to connect to the data sending end TX_M of the main controller 10; the second end of the resistor R2 and the fourth pin of the photocoupler U2 are both used to connect to the data sending end RX_M of the main controller 10, and the third pin of the photocoupler U2 is grounded.
[0110] The first end of the resistor R3 and the first end of the resistor R4 are both used to connect to the power pin Vcc_D of the slave controller 20; the second end of the resistor R3 is simultaneously connected to the fourth pin of the photoelectric coupler U1 and the first end of the switch K1B, the second end of the switch K1B is used to connect to the data sending end RX_D of the slave controller 20, and the third pin of the photoelectric coupler U1 is grounded; the second end of the resistor R4 is connected to the first pin of the photoelectric coupler U2, the second pin of the photoelectric coupler U2 is connected to the first end of the switch K2B, and the second end of the switch K2B is used to connect to the data sending end TX_D of the slave controller 20.
[0111] The simulation power supply pin Vcc_E of the simulation port EMP is connected to the coil terminal of the relay K1A and the coil terminal of the relay K2A respectively; the contact terminal of the relay K1A is connected to the first end of the resistor R5, and the contact terminal of the relay K2A is connected to the first end of the resistor R6.
[0112] The data sending pin TX_E of the simulation port EMP is connected to the data receiving terminal RX_D of the slave controller 20; the data receiving pin RX_E of the simulation port EMP is connected to the data sending terminal TX_D of the slave controller 20; the ground pin GND_E of the simulation port EMP is respectively connected to the second end of the resistor R5 and the second end of the resistor R6.
[0113] See attached Figure 2 Another serial communication and simulation debugging multiplexing circuit of the air conditioner proposed by the utility model comprises:
[0114] The main controller 10 is composed of resistor R7, resistor R8, switch K1C and switch K2C, the slave controller 20 is composed of resistor R9 and resistor R10, the simulation port EMP, relay K1A, relay K2A, resistor R5 and resistor R6, and optocoupler U1 and optocoupler U2 are composed of the simulation unit 30.
[0115] The first end of the resistor R7 and the first end of the resistor R8 are both used to connect to the power pin Vcc_M of the main controller 10; the second end of the resistor R7 is connected to the first pin of the photoelectric coupler U1, the second pin of the photoelectric coupler U1 is connected to the first end of the switch K1C, and the second end of the switch K1C is used to connect to the data sending end TX_M of the main controller 10; the second end of the resistor R8 is simultaneously connected to the fourth pin of the photoelectric coupler U2 and the first end of the switch K2C, the second end of the switch K2C is used to connect to the data sending end RX_M of the main controller 10, and the third pin of the photoelectric coupler U2 is grounded.
[0116] The first end of the resistor R9 and the first end of the resistor R10 are both used to connect to the power pin Vcc_D of the slave controller 20, the second end of the resistor R9 and the fourth pin of the photocoupler U1 are both used to connect to the data sending end RX_D of the slave controller 20, and the third pin of the photocoupler U1 is grounded; the second end of the resistor R10 is connected to the first pin of the photocoupler U2, and the second pin of the photocoupler U2 is used to connect to the data sending end TX_D of the slave controller 20.
[0117] The simulation power supply pin Vcc_E of the simulation port EMP is connected to the coil terminal of the relay K1A and the coil terminal of the relay K2A respectively; the contact terminal of the relay K1A is connected to the first end of the resistor R5, and the contact terminal of the relay K2A is connected to the first end of the resistor R6.
[0118] The data sending pin TX_E of the simulation port EMP is connected to the data receiving terminal RX_D of the slave controller 20; the data receiving pin RX_E of the simulation port EMP is connected to the data sending terminal TX_D of the slave controller 20; the ground pin GND_E of the simulation port EMP is respectively connected to the second end of the resistor R5 and the second end of the resistor R6.
[0119] Obviously, the embodiments described above are only some embodiments of the utility model, rather than all embodiments. The preferred embodiments of the utility model are given in the accompanying drawings, but they do not limit the patent scope of the utility model. The utility model can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the utility model more thorough and comprehensive. Although the utility model is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to replace some of the technical features therein with equivalents. Any equivalent structure made using the contents of the utility model specification and the accompanying drawings, directly or indirectly used in other related technical fields, is also within the scope of patent protection of the utility model.
Claims
1. A serial communication and simulation debugging multiplexing circuit, characterized in that: It comprises a master controller (10), a slave controller (20) and a simulation unit (30); The master controller (10) is communicatively connected to the slave controller (20), and the master controller (10) or the slave controller (20) contains a switch device; The simulation unit (30) is communicatively connected to the slave controller (20), and the simulation unit (30) is used to control the on and off of the switch device.
2. The serial communication and simulation debugging multiplexing circuit according to claim 1, characterized in that: Also includes a photocoupler U1 and a photocoupler U2; The output end of the master controller (10) is connected to the input end of the photoelectric coupler U1, the output end of the photoelectric coupler U1 is connected to the input end of the slave controller (20), the output end of the slave controller (20) is connected to the input end of the photoelectric coupler U2, and the output end of the photoelectric coupler U2 is connected to the input end of the master controller (10).
3. The serial communication and simulation debugging multiplexing circuit according to claim 2, characterized in that: The simulation unit (30) comprises a simulation port EMP, a relay K1A, a relay K2A, a resistor R5 and a resistor R6; The first pin of the emulation port EMP is connected to the coil terminal of the relay K1A and the coil terminal of the relay K2A respectively; the contact terminal of the relay K1A is connected to the first end of the resistor R5, and the contact terminal of the relay K2A is connected to the first end of the resistor R6; The second pin of the emulation port EMP is connected to the data receiving terminal RX_D of the slave controller (20); A third pin of the emulation port EMP is connected to a data transmitting terminal TX_D of the slave controller (20); The fourth pin of the emulation port EMP is connected to the second end of the resistor R5 and the second end of the resistor R6 respectively.
4. The serial communication and simulation debugging multiplexing circuit according to claim 3, characterized in that: The slave controller (20) comprises a resistor R3, a resistor R4, a switch K1B and a switch K2B; The first end of the resistor R3 and the first end of the resistor R4 are both used to connect to the power supply pin Vcc_D of the slave controller (20); the second end of the resistor R3 is simultaneously connected to the fourth pin of the photoelectric coupler U1 and the first end of the switch K1B, the second end of the switch K1B is used to connect to the data transmission terminal RX_D of the slave controller (20), and the third pin of the photoelectric coupler U1 is grounded; The second end of the resistor R4 is connected to the first pin of the photoelectric coupler U2, the second pin of the photoelectric coupler U2 is connected to the first end of the switch K2B, and the second end of the switch K2B is used to connect to the data sending end TX_D of the slave controller (20).
5. The serial communication and simulation debugging multiplexing circuit according to claim 4, characterized in that: The main controller (10) comprises a resistor R1 and a resistor R2; The first end of the resistor R1 and the first end of the resistor R2 are both used to connect to a power pin Vcc_M of the main controller (10), the second end of the resistor R1 is connected to a first pin of the photoelectric coupler U1, and the second pin of the photoelectric coupler U1 is used to connect to a data transmission terminal TX_M of the main controller (10); The second end of the resistor R2 and the fourth pin of the photoelectric coupler U2 are both used to connect to the data sending terminal RX_M of the main controller (10), and the third pin of the photoelectric coupler U2 is grounded.
6. The serial communication and simulation debugging multiplexing circuit according to claim 3, characterized in that: The slave controller (20) comprises a resistor R9 and a resistor R10; The first end of the resistor R9 and the first end of the resistor R10 are both used to connect to a power supply pin Vcc_D of the slave controller (20), the second end of the resistor R9 and the fourth pin of the photoelectric coupler U1 are both used to connect to a data transmission terminal RX_D of the slave controller (20), and the third pin of the photoelectric coupler U1 is grounded; The second end of the resistor R10 is connected to the first pin of the photoelectric coupler U2, and the second pin of the photoelectric coupler U2 is used to connect to the data sending terminal TX_D of the slave controller (20).
7. The serial communication and simulation debugging multiplexing circuit according to claim 6, characterized in that: The main controller (10) comprises a resistor R7, a resistor R8, a switch K1C and a switch K2C; The first end of the resistor R7 and the first end of the resistor R8 are both used to connect to a power supply pin Vcc_M of the main controller (10); the second end of the resistor R7 is connected to a first pin of the photoelectric coupler U1, the second pin of the photoelectric coupler U1 is connected to a first end of the switch K1C, and the second end of the switch K1C is used to connect to a data transmission terminal TX_M of the main controller (10); The second end of the resistor R8 is connected to the fourth pin of the photoelectric coupler U2 and the first end of the switch K2C at the same time; the second end of the switch K2C is used to connect to the data sending end RX_M of the main controller (10); and the third pin of the photoelectric coupler U2 is grounded.
8. The serial communication and simulation debugging multiplexing circuit according to claim 1, characterized in that: The switch device includes any one of a relay, a switch tube, a conversion switch or a micro switch.
9. The serial communication and simulation debugging multiplexing circuit according to claim 1, characterized in that: The communication connection between the master controller (10) and the slave controller (20) adopts any one of the UART communication protocol, the HBS communication protocol, the CAN communication protocol or the RS485 communication protocol.
10. An air conditioner, characterized in that: The invention comprises the serial communication and simulation debugging multiplexing circuit as described in any one of claims 1 to 9.