Single-wire communication circuit with isolation realized by single optocoupler
By using a combination of a single optocoupler and an isolation diode in a single-wire communication circuit, the problems of poor isolation effect and high cost in the prior art are solved, achieving low-cost isolation effect, preventing high-voltage crosstalk, and protecting the internal circuit of the MCU.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SUZHOU NIULAIKE ELECTRONICS TECH CO LTD
- Filing Date
- 2022-12-23
- Publication Date
- 2026-06-02
AI Technical Summary
Existing single-wire communication circuits are costly to achieve isolation or can easily damage the internal components of the MCU, especially due to poor isolation performance caused by high voltage. The use of optocouplers or transistors in existing technologies carries the risk of circuit damage.
A combination of a single optocoupler and an isolation diode is used. Isolation is achieved by configuring an isolation optocoupler in the transmitting branch and using an isolation diode in the receiving branch. Combined with the interrupt control branch, this achieves effective isolation of the common communication port.
It achieves low-cost isolation while preventing high-voltage crosstalk, protecting the internal circuitry of the MCU, and reducing the risk of circuit damage.
Smart Images

Figure CN116166593B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of lithium batteries, and in particular to a single-wire communication circuit that achieves isolation using a single optocoupler. Background Technology
[0002] Single-wire communication is widely used in the PACK of small household appliances due to its convenience and cost-effectiveness. Currently, single-wire communication circuits generally fall into two categories: one uses optocouplers in the transmitting and receiving branches to achieve isolation; while this circuit achieves good isolation, it is more expensive. The other uses two transistors for isolation, as shown in the attached diagram. Figure 1 An existing single-wire communication circuit is presented. The single-wire communication bus is connected to the receiving data circuit inside the MCU through diode D3, and is directly connected to the transmitting data circuit inside the MCU through resistor R17. When an external high voltage is introduced into the circuit through the single bus, it will cause damage to the transmitting and receiving data circuit inside the MCU. Summary of the Invention
[0003] To address the aforementioned problems, this invention proposes a single-wire communication circuit that achieves isolation using a single optocoupler.
[0004] The main contents of this invention include:
[0005] A single-wire communication circuit with isolation via a single optocoupler includes a common communication port, an isolation diode, an isolation optocoupler, and an MCU. The MCU's transmitting interface is connected to the common communication port via a transmitting branch. The first and second pins of the isolation optocoupler are connected to a DC power supply and the MCU's transmitting interface, respectively, via the transmitting branch. Its third pin is grounded, and its fourth pin is connected to the common communication port via the transmitting branch. The MCU's receiving interface is connected to the common communication port via a receiving branch. The anode of the isolation diode is connected to the receiving branch, and its cathode is connected to the common communication port.
[0006] Preferably, the receiving branch includes an N-type first transistor, a P-type second transistor, a first receiving resistor, and a second receiving resistor; the collector of the first transistor is connected to the receiving interface of the MCU through the second receiving resistor, and is also connected to a pull-up power supply through the first receiving resistor; the emitter of the first transistor is grounded, and its base is connected to the collector of the second transistor; the emitter of the second transistor is connected to the pull-up power supply, and its base is connected to the positive terminal of the isolation diode.
[0007] Preferably, the receiving branch further includes a first current-limiting resistor, a first pull-down resistor, a second current-limiting resistor, and a second pull-down resistor; the first current-limiting resistor is connected between the base of the first transistor and the collector of the second transistor; the first pull-down resistor is connected between the base and emitter of the first transistor; the second current-limiting resistor is connected between the base of the second transistor and the anode of the isolation diode; and the second pull-down resistor is connected between the base and collector of the second transistor.
[0008] Preferably, the transmitting branch includes a first transmitting resistor and a second transmitting resistor; the first pin of the isolation optocoupler is connected to the DC power supply through the first transmitting resistor; and the second pin of the isolation optocoupler is connected to the transmitting interface of the MCU through the second transmitting resistor.
[0009] Preferably, the transmitting branch further includes a single diode, the positive terminal of which is grounded and the negative terminal is connected to the common communication port.
[0010] Preferably, the single-wire communication circuit further includes an electrostatic resistor and a fuse. One end of the fuse is connected to the common communication port, and the other end is connected to the negative terminal of the isolation diode. One end of the electrostatic resistor is grounded, and the other end is connected to the other end of the fuse.
[0011] Preferably, the single-wire communication circuit further includes an interrupt control branch and an interrupt communication port; one end of the interrupt control branch is connected to the interrupt communication port, and the other end is connected to the transmitting branch and the receiving branch.
[0012] Preferably, the interrupt control branch includes a P-type first interrupt transistor, an N-type second interrupt transistor, a first interrupt diode, and a second interrupt diode; the collector of the first interrupt transistor is connected to the interrupt communication port through a first interrupt resistor, its emitter is connected to the power supply, its base is connected to the anode of the first interrupt diode, the cathode of the first interrupt diode is connected to the collector of the second interrupt transistor, the base of the second interrupt transistor is connected to the cathode of the second interrupt diode, and its emitter is grounded; the anode of the second interrupt diode is connected to the transmitting branch and the receiving branch.
[0013] Preferably, the interrupt control branch further includes a first interrupt current-limiting resistor, a first interrupt pull-down resistor, a second interrupt current-limiting resistor, and a second interrupt pull-down resistor; the first interrupt current-limiting resistor is connected between the base of the first interrupt transistor and the anode of the first interrupt diode; the first interrupt pull-down resistor is connected between the base and emitter of the first interrupt transistor; the second interrupt current-limiting resistor is connected between the cathode of the second interrupt transistor and the cathode of the second interrupt diode; and the second interrupt pull-down resistor is connected between the base and emitter of the second interrupt transistor.
[0014] The beneficial effects of this invention are as follows: This invention proposes a single-wire communication circuit that achieves isolation with a single optocoupler. Isolation is achieved by configuring an isolation optocoupler in the transmitting branch, while the receiving branch is isolated from the common communication port through an isolation diode. This not only prevents high-voltage crosstalk but also reduces costs. Attached Figure Description
[0015] Figure 1 This is a diagram of an existing single-wire communication circuit.
[0016] Figure 2 This is a functional block diagram of the present invention;
[0017] Figure 3 This is the circuit diagram of the present invention. Detailed Implementation
[0018] The technical solution protected by this invention will be described in detail below with reference to the accompanying drawings.
[0019] Please see Figure 2 This invention proposes a single-wire communication circuit with isolation achieved by a single optocoupler, comprising a common communication port SHBUS, an isolation diode D2, an isolation optocoupler U1, an MCU, an interrupt control branch, and an interrupt communication port COM_INT; wherein, the MCU's transmitting interface TX is connected to the common communication port SHBUS through the transmitting branch and the isolation optocoupler U1; the MCU's receiving interface RX is connected to the common communication port SHBUS through the receiving branch and the isolation diode D2; and the interrupt communication port COM_INT is connected to the isolation diode D2 and the isolation optocoupler U1 through the interrupt control branch.
[0020] Specifically, such as Figure 3As shown, the receiving branch includes an N-type first transistor Q3, a P-type second transistor Q1, a first receiving resistor R2, a second receiving resistor R4, a first current-limiting resistor R5, a first pull-down resistor R8, a second current-limiting resistor R3, and a second pull-down resistor R1. The collector of the first transistor Q3 is connected to the MCU's receiving interface RX through the second receiving resistor R4, and is connected to the pull-up power supply VCC_3.3 through the first receiving resistor R2. The emitter of the first transistor Q3 is grounded, and its base is connected to the pull-up power supply VCC_3.3 through the first current-limiting resistor R5. The current-limiting resistor R5 is connected to the collector of the second transistor Q1; the emitter of the second transistor Q1 is connected to the pull-up power supply VCC_3.3, and its base is connected to the positive terminal of the isolation diode D2 through the second current-limiting resistor R3. The negative terminal of the isolation diode D2 is connected to the common communication port SHBUS through the fuse F1; the first pull-down resistor R8 is connected between the base and emitter of the first transistor Q3; and the second pull-down resistor R1 is connected between the base and collector of the second transistor Q1.
[0021] The transmitting branch includes a first transmitting resistor R18, a second transmitting resistor R22, and a single diode DS; the first pin of the isolation optocoupler U1 is connected to the DC power supply VCC_3.3 through the first transmitting resistor R18; the second pin of the isolation optocoupler U1 is connected to the transmitting interface TX of the MCU through the second transmitting resistor R22, its third pin is grounded, and its fourth pin is connected to the common communication port SHBUS; the positive terminal of the single diode DS is grounded, and its negative terminal is connected to the common communication port SHBUS.
[0022] The interrupt control branch includes a P-type first interrupt transistor Q4, an N-type second interrupt transistor Q6, a first interrupt diode D5, a second interrupt diode D6, a first interrupt current-limiting resistor R14, a first interrupt pull-down resistor R9, a second interrupt current-limiting resistor R15, and a second interrupt pull-down resistor R16. The collector of the first interrupt transistor Q4 is connected to the interrupt communication port COM_INT via the first interrupt resistor R16, its emitter is connected to the power supply VCC_16V, and its base is connected to the anode of the first interrupt diode D5 via the first interrupt current-limiting resistor R14. The cathode of the first interrupt diode D5 is connected to the collector of the second interrupt transistor Q6. The base of the second interrupt transistor Q6 is connected to the cathode of the second interrupt diode D6 through the second interrupt current-limiting resistor R15, and its emitter is grounded. The anode of the second interrupt diode D6 is connected to the fourth pin of the isolation optocoupler U1 and the cathode of the isolation diode. The first interrupt pull-down resistor R9 is connected between the base and emitter of the first interrupt transistor Q5. The second interrupt pull-down resistor R19 is connected between the base and emitter of the second interrupt transistor Q6.
[0023] In actual use, in the idle state, the common communication port SHBUS is pulled up to a high level. When data needs to be received, if the common communication port SHBUS receives a high level, the isolation diode D2 is not conducting, and the MCU's receiving interface RX is connected to the pull-up power supply VCC_3.3 through the first receiving resistor R2 and the second receiving resistor R4, so the MCU's receiving interface RX receives a high-level signal. When the common communication port SHBUS receives a low level, the isolation diode D2 conducts, and the second transistor Q1 conducts, providing a base bias voltage for the first transistor Q3, thus turning on the first transistor Q3. At this time, the MCU's receiving interface is pulled down to a low level through the second receiving resistor R4, so that the MCU's receiving interface receives a low level.
[0024] When the MCU's transmit interface TX sends a high level, the isolation optocoupler U1 is not turned on, and the common communication port SHBUS is still pulled up to a high level, so it receives a high level; when the MCU's transmit interface TX sends a low level, the isolation optocoupler U1 is turned on, and the common communication port SHBUS is pulled down to a low level, so the common communication port SHBUS receives a low level.
[0025] In this invention, the isolation diode D2 effectively cuts off the high-voltage crosstalk between the receiving branch and the common communication port, while the isolation optocoupler U1 achieves effective isolation between the MCU's transmitting interface TX and the common communication port SHBUS, thereby achieving the purpose of isolation with a single optocoupler.
[0026] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A single-wire communication circuit with isolation achieved by a single optocoupler, characterized in that, The device includes a common communication port, an isolation diode, an isolation optocoupler, and an MCU. The MCU's transmitting interface is connected to the common communication port via a transmitting branch. The first and second pins of the isolation optocoupler are connected to a DC power supply and the MCU's transmitting interface, respectively, via the transmitting branch. Its third pin is grounded, and its fourth pin is connected to the common communication port via the transmitting branch. The MCU's receiving interface is connected to the common communication port via a receiving branch. The positive terminal of the isolation diode is connected to the receiving branch, and its negative terminal is connected to the common communication port. The receiving branch includes an N-type first transistor, a P-type second transistor, a first receiving resistor, and a second receiving resistor; the collector of the first transistor is connected to the receiving interface of the MCU through the second receiving resistor, and is also connected to the pull-up power supply through the first receiving resistor; the emitter of the first transistor is grounded, and its base is connected to the collector of the second transistor; the emitter of the second transistor is connected to the pull-up power supply, and its base is connected to the positive terminal of the isolation diode.
2. The single-wire communication circuit with isolation achieved by a single optocoupler according to claim 1, characterized in that, The receiving branch further includes a first current-limiting resistor, a first pull-down resistor, a second current-limiting resistor, and a second pull-down resistor; the first current-limiting resistor is connected between the base of the first transistor and the collector of the second transistor; the first pull-down resistor is connected between the base and emitter of the first transistor; the second current-limiting resistor is connected between the base of the second transistor and the anode of the isolation diode; and the second pull-down resistor is connected between the base and collector of the second transistor.
3. A single-wire communication circuit with isolation achieved by a single optocoupler according to claim 1, characterized in that, The transmitting branch includes a first transmitting resistor and a second transmitting resistor; the first pin of the isolation optocoupler is connected to the DC power supply through the first transmitting resistor; the second pin of the isolation optocoupler is connected to the transmitting interface of the MCU through the second transmitting resistor.
4. A single-wire communication circuit for isolation via a single optocoupler according to claim 3, characterized in that, The transmitting branch also includes a single diode, the positive terminal of which is grounded and the negative terminal is connected to the common communication port.
5. A single-wire communication circuit with isolation achieved by a single optocoupler according to any one of claims 1 to 4, characterized in that, The single-wire communication circuit also includes an electrostatic resistor and a fuse. One end of the fuse is connected to the common communication port, and the other end is connected to the negative terminal of the isolation diode. One end of the electrostatic resistor is grounded, and the other end is connected to the other end of the fuse.
6. A single-wire communication circuit with isolation achieved by a single optocoupler according to any one of claims 1 to 4, characterized in that, The single-wire communication circuit also includes an interrupt control branch and an interrupt communication port; one end of the interrupt control branch is connected to the interrupt communication port, and the other end is connected to the transmitting branch and the receiving branch.
7. A single-wire communication circuit for isolation via a single optocoupler according to claim 6, characterized in that, The interrupt control branch includes a P-type first interrupt transistor, an N-type second interrupt transistor, a first interrupt diode, and a second interrupt diode. The collector of the first interrupt transistor is connected to the interrupt communication port through a first interrupt resistor, its emitter is connected to the power supply, its base is connected to the anode of the first interrupt diode, the cathode of the first interrupt diode is connected to the collector of the second interrupt transistor, the base of the second interrupt transistor is connected to the cathode of the second interrupt diode, and its emitter is grounded. The anode of the second interrupt diode is connected to the transmitting branch and the receiving branch.
8. A single-wire communication circuit with isolation achieved by a single optocoupler according to claim 7, characterized in that, The interrupt control branch further includes a first interrupt current-limiting resistor, a first interrupt pull-down resistor, a second interrupt current-limiting resistor, and a second interrupt pull-down resistor; the first interrupt current-limiting resistor is connected between the base of the first interrupt transistor and the anode of the first interrupt diode; the first interrupt pull-down resistor is connected between the base and emitter of the first interrupt transistor; the second interrupt current-limiting resistor is connected between the cathode of the second interrupt transistor and the cathode of the second interrupt diode; and the second interrupt pull-down resistor is connected between the base and emitter of the second interrupt transistor.