Self-adaptive multi-node UART optocoupler isolation communication circuit and air conditioner

By using automatic adjustment modules and digital potentiometers in the multi-node UART optocoupler isolation communication circuit to adjust the sampling voltage, the problem of signal not being within the identifiable range is solved, ensuring the normal operation of the communication circuit and the accurate transmission of the signal.

CN221977375UInactive Publication Date: 2024-11-08GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202323367999.7
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2023-12-11
Publication Date
2024-11-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the existing multi-node UART optocoupler isolation communication circuit, due to factors such as external temperature, the signals received by the host may not be within the identifiable range or be identified incorrectly, resulting in communication failure.

Method used

An adaptive multi-node UART optocoupler isolation communication circuit is designed, using an automatic adjustment module between the host MCU and the slave MCU. The sampling voltage is adjusted through a digital potentiometer and sampling resistor, so that it can be identified in the host MCU. Within the scope, ensure normal communication.

Benefits of technology

It effectively avoids communication failures, ensures normal signal transmission between the host MCU and the slave MCU, and realizes accurate signal identification and processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN221977375U_ABST
    Figure CN221977375U_ABST
Patent Text Reader

Abstract

The self-adaptive multi-node UART optocoupler isolation communication circuit comprises a host circuit, the host circuit is connected with at least one slave circuit, and each slave circuit comprises a first sending module which is used for receiving a control signal sent by a slave MCU; the host circuit comprises an automatic adjusting module which contains a digital potentiometer and a sampling resistor; the first sending module is connected; the host MCU is provided with a preset voltage; and the control module is connected with the automatic adjusting module, subtracts the sampling voltage of the sampling resistor from the preset voltage, and can control the digital potentiometer to adjust the self resistance value so as to adjust the sampling voltage. And if the sampling voltage received by the host MCU is not within the recognizable range or is wrongly recognized, the host MCU can pull up the resistor through the digital potentiometer, so that the sampling voltage is reduced to be within the recognizable range of the host MCU or is correctly recognized, and the communication between the host MCU and the slave MCU is normal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model relates to the technical field of electronic circuits, and in particular to an adaptive multi-node UART optical coupling isolation communication circuit and an air conditioner. Background Art

[0002] Existing household and commercial air conditioners are generally used in situations where multi-node low-cost inter-board isolated communication is required, and the current multi-node UART optocoupler isolated communication circuit in the machine is generally a one-master-multiple-slave communication mode.

[0003] Among them, in the serial communication circuit, between the host's signal reception and the slave's signal transmission, the current may fluctuate abnormally due to the influence of the optocoupler on the external temperature and other factors, causing the signal received by the host to be out of the recognizable range or to be misrecognized, thus causing communication failure. Utility Model Content

[0004] In view of this, the utility model provides an adaptive multi-node UART optocoupler isolation communication circuit and an air conditioner, which are used to solve the problem in the prior art that the signal received by the host in the multi-node UART optocoupler isolation communication circuit is not within the recognizable range or is recognized incorrectly, thereby causing communication failure.

[0005] To achieve one or part or all of the above purposes or other purposes, the technical solution of the utility model is an adaptive multi-node UART optical coupling isolation communication circuit, including a host circuit, the host circuit is connected to at least one slave circuit, each of the slave circuits includes:

[0006] The slave MCU is used to send a control signal to the outside;

[0007] A first sending module, including a first optical coupler, is used to receive the control signal and control the opening and closing of the first optical coupler;

[0008] The host circuit comprises:

[0009] An automatic adjustment module, including a digital potentiometer and a sampling resistor; used for connecting to the first sending module;

[0010] The host MCU is provided with a preset voltage; it is used to connect the automatic adjustment module, subtract the sampling voltage of the sampling resistor from the preset voltage, and can control the digital potentiometer to adjust its own resistance value, thereby adjusting the sampling voltage.

[0011] Furthermore, the host circuit further includes:

[0012] A second sending module, used for connecting to the host MCU and amplifying the detection signal sent by the host MCU;

[0013] Each of the slave circuits further comprises:

[0014] The receiving module includes a second optical coupler, which is used to control the opening and closing of the second optical coupler and transmit the amplified detection signal to the slave MCU to ensure normal communication of the communication circuit.

[0015] Furthermore, the first sending module includes a first optical coupler U2 and a resistor R10;

[0016] The first end of the first optocoupler U2 is connected to the first end of the resistor R10, and the second end of the resistor R10 is connected to the VCC pin; the second end of the first optocoupler U2 is connected to the TXS pin of the slave MCU, and the third end of the first optocoupler U2 is simultaneously connected to the VCC pin and the third interface of the port CN2, and the third interface of the port CN2 is also connected to the automatic adjustment module; the fourth end of the first optocoupler U2 is grounded.

[0017] Further, the first sending module includes a first optical coupler U2, a resistor R9, a resistor R10 and a port CN2;

[0018] The first end of the first optocoupler U2 is connected to the first end of the resistor R10, and the second end of the resistor R10 is connected to the VCC pin; the second end of the first optocoupler U2 is connected to the TXS pin of the slave MCU, the third end of the first optocoupler U2 is simultaneously connected to the third interface of the port CN2 and the first end of the resistor R9, the second end of the resistor R9 is connected to the VCC pin, and the third interface of the port CN2 is also connected to the automatic adjustment module; the fourth end of the first optocoupler U2 is grounded.

[0019] Furthermore, the automatic adjustment module includes a digital potentiometer U3, a sampling resistor R6 and a capacitor C10;

[0020] Pin 1 of the digital potentiometer U3 is connected to the INC pin of the host MCU, pin 2 of the digital potentiometer U3 is connected to the U / D pin of the host MCU, pin 7 of the digital potentiometer U3 is connected to the CS pin of the host MCU, pins 3 and 8 of the digital potentiometer U3 are simultaneously connected to the VCC pin, pin 5 of the digital potentiometer U3 is simultaneously connected to the third interface of port CN1, the first end of the sampling resistor R6 and the positive electrode of the capacitor C3, the third interface of the port CN1 is connected to the third interface of the port CN2, and the second end of the sampling resistor R6 is connected to the RX pin of the host MCU; the negative electrode of the capacitor C3 and pins 4 and 6 of the digital potentiometer U3 are all grounded.

[0021] Further, the second sending module includes a switch tube Q1, a switch tube Q2, a transient suppression diode TVS1, a resistor R1, a resistor R2, a resistor R3, a resistor R4, a resistor R5, a capacitor C1 and a capacitor C2;

[0022] The base of the switch tube Q1 is connected to the first end of the resistor R1 and the first end of the resistor R2 at the same time, and the second end of the resistor R1 is connected to the TX pin of the host MCU; the emitter of the switch tube Q1, the second end of the resistor R2, the second end of the resistor R5 and the first interface of the port CN1 are connected to the VCC pin at the same time, and the first interface of the port CN1 is connected to the receiving module; the collector of the switch tube Q1 is connected to the first end of the resistor R3;

[0023] The base of the switch tube Q2 is simultaneously connected to the second end of the resistor R3, the first end of the resistor R4 and the positive electrode of the capacitor C1, the collector of the switch tube Q2 is simultaneously connected to the first end of the resistor R5, the positive electrode of the capacitor C2, the negative electrode of the transient suppression diode TVS1 and the second interface of the port CN1, and the second interface of the port CN1 is also connected to the receiving module; the emitter of the switch tube Q2, the second end of the resistor R4, the negative electrode of the capacitor C1, the negative electrode of the capacitor C2 and the positive electrode of the transient suppression diode TVS1 are all grounded.

[0024] Furthermore, the switch tube Q1 is a PNP switch tube, and the switch tube Q2 is an NPN switch tube.

[0025] Further, the receiving module includes a second optical coupler U1, a resistor R7, a resistor R8 and a capacitor C4;

[0026] The first end of the second optical coupler U1 is connected to the first end of the resistor R7 and the positive electrode of the capacitor C4 at the same time; the second end of the second optical coupler U1 is connected to the negative electrode of the capacitor C4 and the second interface of the port CN2 at the same time, and the second interface of the port CN2 is also connected to the second interface of the port CN1; the third end of the second optical coupler U1 is connected to the first end of the resistor R8 and the RXS pin of the slave MCU at the same time; the fourth end of the second optical coupler U1 is grounded;

[0027] The second end of the resistor R7, the second end of the resistor R8 and the first interface of the port CN2 are simultaneously connected to the VCC pin.

[0028] Furthermore, the preset voltage of the host MCU is (0, 0.3V].

[0029] An air conditioner comprises the above-mentioned adaptive multi-node UART optical coupling isolation communication circuit.

[0030] Compared with the prior art, the utility model has at least the following beneficial effects:

[0031] When the control signal sent by the slave MCU of the utility model reaches the sampling resistor through the first sending module, the sampling resistor will generate a sampling voltage. If the sampling voltage received by the host MCU at this time is not within the recognizable range or is recognized incorrectly, the host MCU can pull up the resistor through the digital potentiometer to reduce the sampling voltage to the recognizable range of the host MCU or correctly recognize it, so that the communication between the host MCU and the slave MCU is normal and no communication failure occurs. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] 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.

[0033] 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.

[0034] Figure 1 This is a circuit diagram of one of the utility models;

[0035] Figure 2 Another circuit diagram of the utility model;

[0036] Figure 3 This is another circuit diagram of the utility model.

[0037] Reference numerals:

[0038] 10. Host circuit;

[0039] 101. Automatic adjustment module;

[0040] 102. Host MCU;

[0041] 103. A second sending module;

[0042] 20. Slave circuit;

[0043] 201, a first sending module;

[0044] 202, slave MCU;

[0045] 203. Receiving module. DETAILED DESCRIPTION

[0046] 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.

[0047] The principle and structure of the present utility model are described in detail below with reference to the accompanying drawings and embodiments.

[0048] In one embodiment, referring to the attached Figure 1-2 The utility model provides an adaptive multi-node UART optical coupling isolation communication circuit, including a host circuit 10, the host circuit 10 is connected to at least one slave circuit 20, each of the slave circuits 20 includes:

[0049] The slave MCU202 is used to send out a control signal; the control signal is an electrical signal.

[0050] The first sending module 201 includes a first optical coupler and is used to receive the control signal and control the opening and closing of the first optical coupler.

[0051] The host circuit 10 comprises:

[0052] The automatic adjustment module 101 includes a digital potentiometer and a sampling resistor; it is used to connect to the first sending module 201; the host MCU 102 is provided with a preset voltage; it is used to connect to the automatic adjustment module 101, subtract the sampling voltage of the sampling resistor from the preset voltage, and can control the digital potentiometer to adjust its own resistance value, thereby adjusting the sampling voltage.

[0053] Among them, when the entire adaptive multi-node UART optocoupler isolation communication circuit is powered on and the serial port communication initialization is completed, if the slave MCU202 sends a high-level control signal, after the first optocoupler U2 of the first sending module 201 receives the high-level control signal, the light-emitting diode inside the first optocoupler U2 will be in a cut-off state, causing the first optocoupler U2 to be non-conductive. At this time, the RX pin of the host MCU102 will detect a high level due to the digital potentiometer U3, which indicates that the communication of the adaptive multi-node UART optocoupler isolation communication circuit of the utility model is normal.

[0054] If the slave MCU202 sends a low-level control signal, after the first optocoupler U2 of the first sending module 201 receives the low-level control signal, the light-emitting diode inside the first optocoupler U2 will be in the on state and emit light, thereby causing the base of the photosensitive transistor inside the first optocoupler U2 to generate a photocurrent and be turned on. At this time, the RX pin of the host MCU102 will detect the low-level sampling voltage, but if the low-level sampling voltage at this time is greater than 0.3V and less than or equal to 1V, it will cause the low-level sampling voltage received by the host MCU102 to be out of the recognizable range or to be recognized incorrectly. At this time, the host MCU102 needs to control the pull-up resistor of the digital potentiometer U3 to reduce the sampling voltage to 0.3V or below. At this time, the host MCU102 can accurately identify the received low-level sampling voltage, so that the communication between the host MCU102 and the slave MCU202 is normal, and the communication of the adaptive multi-node UART optocoupler isolation communication circuit of the utility model is normal, and no communication failure will occur.

[0055] Therefore, when the host MCU102 receives signals and the slave MCU202 sends signals, the first optocoupler U2 may be affected by other factors such as external temperature, causing abnormal current fluctuations, so that the sampling voltage received by the host MCU102 is greater than 0.3V and less than or equal to 1V. At this time, the host MCU102 will control the pull-up resistor of the digital potentiometer U3 to reduce the sampling voltage to 0.3V and below. At this time, the sampling voltage is within the recognizable range of the host MCU102 or the signal recognition is correct, so that the communication between the host MCU102 and the slave MCU202 is normal, which in turn causes the host MCU102 to correctly issue instructions, and the slave host MCU202 can receive the corresponding instructions to execute and feed back the processing results to the host MCU102.

[0056] In one embodiment, referring to the attached Figure 3 , the host circuit 10 further includes:

[0057] The second sending module 103 is used to connect to the host MCU 102 and amplify the detection signal sent by the host MCU 102; the detection signal is an electrical signal.

[0058] Each of the slave circuits 20 further includes:

[0059] The receiving module 203 includes a second optical coupler, which is used to control the opening and closing of the second optical coupler and transmit the amplified detection signal to the slave MCU 202 to ensure normal communication of the communication circuit. The communication circuit refers to the adaptive multi-node UART optical coupler isolation communication circuit proposed by the utility model.

[0060] Among them, when the entire adaptive multi-node UART optocoupler isolation communication circuit is powered on and the serial port communication initialization is completed, it is necessary to first detect whether the adaptive multi-node UART optocoupler isolation communication circuit of the utility model can receive signals and operate normally. The detection method is:

[0061] The TX pin of the host MCU102 sends a high-level detection signal, and the second sending module 103 does not work after receiving the high-level detection signal. At this time, the RXS pin of the slave MCU202 will be kept in a high-level state by a pull-up resistor, resulting in the RXS pin of the slave MCU202 receiving a high level. On the contrary, the TX pin of the host MCU102 sends a low-level detection signal, and the second sending module 103 starts to work after receiving the low-level detection signal, and transmits the amplified low-level detection signal to the slave MCU202 through the receiving module 203. At this time, the RXS pin of the slave MCU202 will receive a low-level detection signal. Therefore, the above results indicate that the adaptive multi-node UART optocoupler isolation communication circuit of the utility model can receive signals and operate normally.

[0062] In a specific embodiment, referring to the attached Figure 1 The first sending module 201 includes a first optical coupler U2 and a resistor R10.

[0063] The first end of the first optocoupler U2 is connected to the first end of the resistor R10, and the second end of the resistor R10 is connected to the VCC pin; the second end of the first optocoupler U2 is connected to the TXS pin of the slave MCU202, and the third end of the first optocoupler U2 is simultaneously connected to the VCC pin and the third interface of the port CN2, and the third interface of the port CN2 is also connected to the automatic adjustment module 101; the fourth end of the first optocoupler U2 is grounded.

[0064] The first optical coupler U2 is illustrated as having four pins or four terminals, and the first optical coupler U2 is composed of a light emitting diode and a phototransistor. Therefore, the first terminal of the first optical coupler U2 is the positive electrode of the light emitting diode, the second terminal of the first optical coupler U2 is the negative electrode of the light emitting diode, the third terminal of the first optical coupler U2 is the collector of the phototransistor, and the fourth terminal of the first optical coupler U2 is the emitter of the phototransistor.

[0065] Therefore, when the second end of the first optocoupler U2 receives a high-level control signal, the light-emitting diode of the first optocoupler U2 will be in a cut-off state, causing the first optocoupler U2 to be non-conductive; when the second end of the first optocoupler U2 receives a low-level control signal, the light-emitting diode of the first optocoupler U2 will be in a conductive state and emit light, thereby causing the base of the phototransistor of the first optocoupler U2 to generate a photocurrent and conduct, causing the first optocoupler U2 to be conductive.

[0066] In another specific embodiment, referring to the attached Figure 2 The first sending module 201 includes a first optical coupler U2, a resistor R9, a resistor R10 and a port CN2.

[0067] The first end of the first optical coupler U2 is connected to the first end of the resistor R10, and the second end of the resistor R10 is connected to the VCC pin; the second end of the first optical coupler U2 is connected to the TXS pin of the slave MCU202, the third end of the first optical coupler U2 is simultaneously connected to the third interface of the port CN2 and the first end of the resistor R9, the second end of the resistor R9 is connected to the VCC pin, and the third interface of the port CN2 is also connected to the automatic adjustment module 101; the fourth end of the first optical coupler U2 is grounded.

[0068] The resistor R9 is a reserved resistor, which can reserve a position for the resistor in advance according to the requirements of the first sending module 201, so that a resistor with a corresponding resistance value can be connected later according to actual requirements.

[0069] In a specific embodiment, referring to the attached Figure 2 The automatic adjustment module 101 includes a digital potentiometer U3, a sampling resistor R6 and a capacitor C10.

[0070] Pin 1 of the digital potentiometer U3 is connected to the INC pin of the host MCU102, pin 2 of the digital potentiometer U3 is connected to the U / D pin of the host MCU102, pin 7 of the digital potentiometer U3 is connected to the CS pin of the host MCU102, pins 3 and 8 of the digital potentiometer U3 are simultaneously connected to the VCC pin, pin 5 of the digital potentiometer U3 is simultaneously connected to the third interface of port CN1, the first end of the sampling resistor R6 and the positive electrode of the capacitor C3, the third interface of the port CN1 is connected to the third interface of the port CN2, and the second end of the sampling resistor R6 is connected to the RX pin of the host MCU102; the negative electrode of the capacitor C3 and pins 4 and 6 of the digital potentiometer U3 are all grounded.

[0071] Among them, when the first optical coupler U2 is turned on, and then the current output by the first sending module 201 reaches the sampling resistor R6, it will generate a low-level sampling voltage (and the value range of the low-level sampling voltage is [0, 1V]) for detection by the RX end of the host MCU102, and then the low-level sampling voltage is subtracted from the preset voltage. If the result is (0, 0.7V], then the sampling voltage is too high at this time, so the host MCU102 will control the digital potentiometer U3 pull-up resistor to increase the resistance value to reduce the sampling voltage to 0.3V and below. And each time the digital potentiometer U3 is powered on, it will be restored to the preset value.

[0072] Among them, refer to the attached Figure 2 , pin 1 of the digital potentiometer U3 is the INC pin, pin 2 of the digital potentiometer U3 is the U / D pin, and pin 7 of the digital potentiometer U3 is the CS pin.

[0073] Refer to the working mode table of the digital potentiometer pins:

[0074] CS INC U / D Way Low level High to Low Transition High level Swipe up Low level High to Low Transition Low level Slide down Low to High state transition High level High level or low level Storing the slider position High level High level or low level High level or low level Waiting current Low to High state transition Low level High level or low level Do not store, return and wait

[0075] Specifically, the working mode of the digital potentiometer U3 is as follows:

[0076] Mode 1: When pin 1 of the digital potentiometer U3 is in a high level state and switches to a low level state, pin 2 of the digital potentiometer U3 is in a high level state, and pin 7 of the digital potentiometer U3 is in a low level state, the digital potentiometer U3 will slide upward to increase the resistance value.

[0077] Mode 2: When pin 1 of the digital potentiometer U3 is in a high level state and switches to a low level state, pin 2 of the digital potentiometer U3 is in a low level, and pin 7 of the digital potentiometer U3 is in a low level, the digital potentiometer U3 will slide downward to reduce the resistance value.

[0078] Mode three: When pin 1 of the digital potentiometer U3 is at a high level, pin 2 of the digital potentiometer U3 is at a high level or a low level, and pin 7 of the digital potentiometer U3 is in a low level state converted to a high level state, and the digital potentiometer U3 is in the storage sliding end position, it means that the digital potentiometer U3 is in an initial state or an inactive state.

[0079] Mode 4: When pin 1 of the digital potentiometer U3 is at a high level or a low level, pin 2 of the digital potentiometer U3 is at a high level or a low level, and pin 7 of the digital potentiometer U3 is at a high level, the digital potentiometer U3 is in a waiting current state, which means that the digital potentiometer U3 is ready, but needs to wait for input current before proceeding to the next operation.

[0080] Mode 5: When pin 1 of the digital potentiometer U3 is at a low level, pin 2 of the digital potentiometer U3 is at a high level or a low level, and pin 7 of the digital potentiometer U3 is in a low level to high level state, the digital potentiometer U3 is in a non-storage state and returns to a waiting state, which means that the digital potentiometer U3 has completed the current task or operation and is in a state of waiting for the next instruction or task.

[0081] In a specific embodiment, referring to the attached Figure 2 The second sending module 103 includes a switch tube Q1, a switch tube Q2, a transient suppression diode TVS1, a resistor R1, a resistor R2, a resistor R3, a resistor R4, a resistor R5, a capacitor C1 and a capacitor C2.

[0082] The base of the switch tube Q1 is connected to the first end of the resistor R1 and the first end of the resistor R2 at the same time, and the second end of the resistor R1 is connected to the TX pin of the host MCU102; the emitter of the switch tube Q1, the second end of the resistor R2, the second end of the resistor R5 and the first interface of the port CN1 are connected to the VCC pin at the same time, and the first interface of the port CN1 is also connected to the receiving module 203; the collector of the switch tube Q1 is connected to the first end of the resistor R3.

[0083] The base of the switch tube Q2 is simultaneously connected to the second end of the resistor R3, the first end of the resistor R4 and the positive electrode of the capacitor C1, the collector of the switch tube Q2 is simultaneously connected to the first end of the resistor R5, the positive electrode of the capacitor C2, the negative electrode of the transient suppression diode TVS1 and the second interface of the port CN1, and the second interface of the port CN1 is also connected to the receiving module 203; the emitter of the switch tube Q2, the second end of the resistor R4, the negative electrode of the capacitor C1, the negative electrode of the capacitor C2 and the positive electrode of the transient suppression diode TVS1 are all grounded.

[0084] Among them, when the TX pin of the host MCU102 sends a high-level detection signal, the switch tube Q1 and the switch tube Q2 are in the cut-off state, causing the receiving module 203 to be in a non-conducting state. At this time, the RXS pin of the slave MCU202 will be kept in a high-level state by a pull-up resistor, causing the RXS pin of the slave MCU202 to receive a high level. On the contrary, the TX pin of the host MCU102 sends a low-level detection signal, and the switch tube Q1 and the switch tube Q2 are in the conducting state. At this time, the switch tube Q1 is a PNP switch tube, which plays the role of amplifying the signal and the reverse signal; the switch tube Q2 is an NPN switch tube, which plays the role of amplifying the signal, and the switch tube Q2 is also protected by the anti-static transient suppression diode TVS1, thereby causing the receiving module 203 to be in the conducting state, so that the amplified low-level detection signal is transmitted to the slave MCU202 through the receiving module 203, and at this time, the RXS pin of the slave MCU202 receives the low-level detection signal.

[0085] In a specific embodiment, referring to the attached Figure 2 The receiving module 203 includes a second optical coupler U1, a resistor R7, a resistor R8 and a capacitor C4.

[0086] The first end of the second optocoupler U1 is connected to the first end of the resistor R7 and the positive electrode of the capacitor C4 at the same time; the second end of the second optocoupler U1 is connected to the negative electrode of the capacitor C4 and the second interface of the port CN2 at the same time, and the second interface of the port CN2 is connected to the second interface of the port CN1; the third end of the second optocoupler U1 is connected to the first end of the resistor R8 and the RXS pin of the slave MCU202 at the same time; the fourth end of the second optocoupler U1 is grounded.

[0087] The second end of the resistor R7, the second end of the resistor R8 and the first interface of the port CN2 are simultaneously connected to the VCC pin.

[0088] The resistor R8 is a pull-up resistor in the receiving module 203. When the receiving module 203 is in a non-conducting state, the resistor R8 will keep the RXS pin of the slave MCU 202 in a high level state.

[0089] The second optical coupler U1 is illustrated as having four pins or four terminals, and the second optical coupler U1 is composed of a light emitting diode and a phototransistor. Therefore, the first terminal of the second optical coupler U1 is the positive electrode of the light emitting diode, the second terminal of the second optical coupler U1 is the negative electrode of the light emitting diode, the third terminal of the second optical coupler U1 is the collector of the phototransistor, and the fourth terminal of the second optical coupler U1 is the emitter of the phototransistor.

[0090] In one embodiment, the preset voltage of the host MCU102 is (0, 0.3V]. Once the sampling voltage of the sampling resistor R6 is at a low level and is at (0.3V, 1V], the main control MCU102 subtracts the preset voltage from the detected sampling voltage, which will result in a subtraction result of (0, 0.7V]. This indicates that the sampling voltage at this time is too high, resulting in the low-level sampling voltage received by the host MCU102 at this time not being within the recognizable range or being recognized incorrectly. At this time, the host MCU102 needs to control the pull-up resistor of the digital potentiometer U3 to reduce the sampling voltage to 0.3V and below. At this time, the host MCU102 can accurately identify the received low-level sampling voltage, thereby enabling the communication of the adaptive multi-node UART optocoupler isolation communication circuit of the utility model to be normal.

[0091] The use process of the adaptive multi-node UART optical coupling isolation communication circuit of the utility model is as follows:

[0092] When the entire adaptive multi-node UART optocoupler isolation communication circuit is powered on and the serial port communication is initialized, if the slave MCU202 sends a low-level control signal, the first optocoupler U2 is turned on, so the sampling voltage of the sampling resistor R6 is at a low level. If the sampling voltage has a value range of (0.3V, 1V] at this time, the host MCU102 will control the digital potentiometer U3 to pull up the resistor to increase the resistance value, so as to reduce the sampling voltage to (0, 0.3V]. At this time, the host MCU102 can accurately identify the received low-level sampling voltage, thereby making the communication of the adaptive multi-node UART optocoupler isolation communication circuit of the utility model normal.

[0093] In one embodiment, the utility model further provides an air conditioner, comprising the adaptive multi-node UART optocoupler isolation communication circuit described in any one of the above.

[0094] In one embodiment, referring to the attached Figure 2 The adaptive multi-node UART optical coupling isolation communication circuit proposed by the utility model includes a host circuit 10 and a slave circuit 20 connected in series.

[0095] The automatic adjustment module 101 includes a digital potentiometer U3, a sampling resistor R6 and a capacitor C10; the second sending module 103 includes a switch tube Q1, a switch tube Q2, a transient suppression diode TVS1, a resistor R1, a resistor R2, a resistor R3, a resistor R4, a resistor R5, a capacitor C1 and a capacitor C2; the first sending module 201 includes a first optical coupler U2, a resistor R9 and a resistor R10; the receiving module 203 includes a second optical coupler U1, a resistor R7, a resistor R8 and a capacitor C4.

[0096] The port CN1 and the port CN2 are both described as having four interfaces.

[0097] The first end of the first optocoupler U2 is connected to the first end of the resistor R10, the second end of the first optocoupler U2 is connected to the TXS pin of the slave MCU202, the third end of the first optocoupler U2 is simultaneously connected to the third interface of the port CN2 and the first end of the resistor R9, the third interface of the port CN2 is connected to the third interface of the port CN1 through a wire, the third interface of the port CN1 is simultaneously connected to the 5th pin of the digital potentiometer U3, the first end of the sampling resistor R6 and the positive electrode of the capacitor C3, the second end of the sampling resistor R6 is connected to the RX pin of the host MCU102; the 1st pin of the digital potentiometer U3 is connected to the INC pin of the host MCU102, the 2nd pin of the digital potentiometer U3 is connected to the U / D pin of the host MCU102, and the 7th pin of the digital potentiometer U3 is connected to the CS pin of the host MCU102.

[0098] The TX pin of the host MCU102 is connected to the second end of the resistor R1, the first end of the resistor R1 and the first end of the resistor R2 are both connected to the base of the switch tube Q1, and the collector of the switch tube Q1 is connected to the first end of the resistor R3; the second end of the resistor R3, the first end of the resistor R4 and the positive electrode of the capacitor C1 are all connected to the base of the switch tube Q2, and the collector of the switch tube Q2 is simultaneously connected to the first end of the resistor R5, the positive electrode of the capacitor C2, the negative electrode of the transient suppression diode TVS1 and the second interface of the port CN1, and the second interface of the port CN1 is connected to the second interface of the port CN2 through a wire, and the second interface of the port CN2 is also simultaneously connected to the second end of the second optical coupler U1 and the negative electrode of the capacitor C4, and the first end of the second optical coupler U1 is simultaneously connected to the first end of the resistor R7 and the positive electrode of the capacitor C4; the third end of the second optical coupler U1 is simultaneously connected to the first end of the resistor R8 and the RXS pin of the slave MCU202.

[0099] The second end of the resistor R2, the second end of the resistor R5, the second end of the resistor R7, the second end of the resistor R8, the second end of the resistor R9, the second end of the resistor R10, the first interface of the port CN1, the first interface of the port CN2, the emitter of the switch tube Q1, and the 3rd and 8th pins of the digital potentiometer U3 are all connected to the VCC pin.

[0100] The negative electrode of capacitor C1, the negative electrode of capacitor C2, the negative electrode of capacitor C3, the second end of resistor R4, the emitter of switch tube Q2, the positive electrode of transient suppression diode TVS1, the fourth end of the first optocoupler U2, the fourth end of the second optocoupler U1, the fourth interface of port CN1, the fourth interface of port CN2, and pins 4 and 6 of digital potentiometer U3 are all grounded.

[0101] In another embodiment, referring to the attached Figure 3The adaptive multi-node UART optical coupling isolation communication circuit proposed by the utility model includes a host circuit 10 and three slave circuits 20 arranged in parallel with the host circuit 10.

[0102] The second interface of port CN1 of the host circuit 10 is connected to the second interfaces of ports CN2 of the three slave circuits 20 at the same time, and the third interface of port CN1 of the host circuit 10 is connected to the third interfaces of ports CN2 of the three slave circuits 20 at the same time. The specific connection relationship of the components in the remaining host circuit 10 and the slave circuit 20 has been described above and will not be repeated here.

[0103] 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. An adaptive multi-node UART optical coupler isolation communication circuit, characterized in that: The invention comprises a host circuit (10), wherein the host circuit (10) is connected to at least one slave circuit (20), and each of the slave circuits (20) comprises: The slave MCU (202) is used to send a control signal to the outside; A first sending module (201), comprising a first optical coupler, used for receiving the control signal and controlling the opening and closing of the first optical coupler; The host circuit (10) comprises: An automatic adjustment module (101), comprising a digital potentiometer and a sampling resistor; and used for connecting to the first sending module (201); The host MCU (102) is provided with a preset voltage and is used to connect to the automatic adjustment module (101), subtract the sampled voltage of the sampling resistor from the preset voltage, and can control the digital potentiometer to adjust its own resistance value, thereby adjusting the sampled voltage.

2. The adaptive multi-node UART optical coupler isolation communication circuit according to claim 1, characterized in that: The host circuit (10) further includes: A second sending module (103), used for connecting to the host MCU (102) and amplifying a detection signal sent by the host MCU (102); Each of the slave circuits (20) further comprises: The receiving module (203) contains a second optical coupler and is used to control the opening and closing of the second optical coupler and transmit the amplified detection signal to the slave MCU (202), thereby ensuring normal communication of the communication circuit.

3. The adaptive multi-node UART optical coupling isolation communication circuit according to claim 2, characterized in that: The first sending module (201) comprises a first optical coupler U2 and a resistor R10; The first end of the first optical coupler U2 is connected to the first end of the resistor R10, and the second end of the resistor R10 is connected to a VCC pin; the second end of the first optical coupler U2 is connected to a TXS pin of a slave MCU (202); the third end of the first optical coupler U2 is simultaneously connected to the VCC pin and a third interface of a port CN2, and the third interface of the port CN2 is also connected to the automatic adjustment module (101); and the fourth end of the first optical coupler U2 is grounded.

4. The adaptive multi-node UART optical coupler isolation communication circuit according to claim 2, characterized in that: The first sending module (201) comprises a first optical coupler U2, a resistor R9, a resistor R10 and a port CN2; The first end of the first optical coupler U2 is connected to the first end of the resistor R10, and the second end of the resistor R10 is connected to a VCC pin; the second end of the first optical coupler U2 is connected to a TXS pin of a slave MCU (202); the third end of the first optical coupler U2 is simultaneously connected to a third interface of a port CN2 and a first end of a resistor R9, the second end of the resistor R9 is connected to a VCC pin, and the third interface of the port CN2 is also connected to the automatic adjustment module (101); and the fourth end of the first optical coupler U2 is grounded.

5. The adaptive multi-node UART optical coupling isolation communication circuit according to claim 3 or 4, characterized in that: The automatic adjustment module (101) comprises a digital potentiometer U3, a sampling resistor R6 and a capacitor C10; Pin 1 of the digital potentiometer U3 is connected to the INC pin of the host MCU (102), pin 2 of the digital potentiometer U3 is connected to the U / D pin of the host MCU (102), pin 7 of the digital potentiometer U3 is connected to the CS pin of the host MCU (102), pins 3 and 8 of the digital potentiometer U3 are simultaneously connected to the VCC pin, pin 5 of the digital potentiometer U3 is simultaneously connected to the third interface of port CN1, the first end of a sampling resistor R6 and the positive electrode of a capacitor C3, the third interface of port CN1 is connected to the third interface of port CN2, the second end of the sampling resistor R6 is connected to the RX pin of the host MCU (102); the negative electrode of the capacitor C3, pins 4 and 6 of the digital potentiometer U3 are all grounded.

6. The adaptive multi-node UART optical coupling isolation communication circuit according to claim 2, characterized in that: The second sending module (103) comprises a switch tube Q1, a switch tube Q2, a transient suppression diode TVS1, a resistor R1, a resistor R2, a resistor R3, a resistor R4, a resistor R5, a capacitor C1 and a capacitor C2; The base of the switch tube Q1 is simultaneously connected to the first end of the resistor R1 and the first end of the resistor R2, and the second end of the resistor R1 is connected to the TX pin of the host MCU (102); the emitter of the switch tube Q1, the second end of the resistor R2, the second end of the resistor R5 and the first interface of the port CN1 are simultaneously connected to the VCC pin, and the first interface of the port CN1 is connected to the receiving module (203); the collector of the switch tube Q1 is connected to the first end of the resistor R3; The base of the switch tube Q2 is simultaneously connected to the second end of the resistor R3, the first end of the resistor R4 and the positive electrode of the capacitor C1; the collector of the switch tube Q2 is simultaneously connected to the first end of the resistor R5, the positive electrode of the capacitor C2, the negative electrode of the transient suppression diode TVS1 and the second interface of the port CN1; the second interface of the port CN1 is also connected to the receiving module (203); the emitter of the switch tube Q2, the second end of the resistor R4, the negative electrode of the capacitor C1, the negative electrode of the capacitor C2 and the positive electrode of the transient suppression diode TVS1 are all grounded.

7. The adaptive multi-node UART optical coupling isolation communication circuit according to claim 6, characterized in that: The switch tube Q1 is a PNP switch tube, and the switch tube Q2 is an NPN switch tube.

8. The adaptive multi-node UART optical coupling isolation communication circuit according to claim 6, characterized in that: The receiving module (203) comprises a second optical coupler U1, a resistor R7, a resistor R8 and a capacitor C4; The first end of the second optical coupler U1 is simultaneously connected to the first end of the resistor R7 and the positive electrode of the capacitor C4; the second end of the second optical coupler U1 is simultaneously connected to the negative electrode of the capacitor C4 and the second interface of the port CN2, and the second interface of the port CN2 is also connected to the second interface of the port CN1; the third end of the second optical coupler U1 is simultaneously connected to the first end of the resistor R8 and the RXS pin of the slave MCU (202); the fourth end of the second optical coupler U1 is grounded; The second end of the resistor R7, the second end of the resistor R8 and the first interface of the port CN2 are simultaneously connected to the VCC pin.

9. The adaptive multi-node UART optical coupling isolation communication circuit according to claim 1, characterized in that: The preset voltage of the host MCU (102) is (0, 0.3V].

10. An air conditioner, characterized in that: The air conditioner comprises the adaptive multi-node UART optocoupler isolation communication circuit as described in any one of claims 1-9.

Citation Information

Cited By

  • Self-adaptive multi-node UART optocoupler isolation communication circuit and air conditioner

    CN117453604A

  • Adaptive multi-node UART optocoupler isolation communication circuit and air conditioner

    CN117453604B