MBUS host circuit for improving on-load compatibility and working method thereof
By adopting the improved method of dynamic isolation of sampling control module and single-end amplification of differential sampling in the MBUS host circuit, the problem of difficult balance between cost and performance in the prior art MBUS host receiving circuit is solved, and high load compatibility and low cost under different bus characteristics are achieved.
Patent Information
- Application Number
- CN202411991871.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-02
AI Technical Summary
The existing MBUS host receiving circuit is difficult to balance between cost and performance, and it is difficult to take into account the bus environment with resistance and capacitance characteristics, resulting in insufficient load compatibility under different bus characteristics.
The dynamic isolation method of the sampling control module is adopted, and the improvement of single-ended amplification of differential sampling is increased to improve the resolution of the coupled signal, and the amplitude distortion characteristics of the operational amplifier are used to realize signal amplification and shaping of high-level signals at low cost.
Improves load compatibility under different bus characteristics, reduces costs, and improves signal resolution and anti-interference capability.
Smart Images

Figure CN119922035A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of MBUS host circuit design, and in particular relates to an MBUS host circuit with improved load compatibility and a working method thereof. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] The existing slave-side MBUS circuit generally achieves constant current through fixed resistors, and uses voltage delay comparison circuits to analyze data sent by the host. The access of slave devices to the bus is equivalent to connecting a fixed resistor for constant current and a fixed capacitor for energy storage in parallel on the bus, so that the bus is affected by capacitance and resistance characteristics. As the number of slaves increases, the capacitance and resistance characteristics have a more obvious impact on the bus.
[0004] Among them, the resistance characteristic means that when the bus voltage changes, the bus current will change accordingly; the capacitance characteristic means that when the bus voltage changes from low to high, the fixed capacitor used for energy storage needs to be charged, and the bus current increases. When the resistance characteristic on the bus is greater than the capacitance characteristic, after the MBUS host finishes sending, the bus current quickly returns to the steady-state current (the level before sending); when the capacitance characteristic on the bus is greater than the resistance characteristic, after the MBUS host finishes sending, the bus current will slowly recover from a higher value to the steady-state current.
[0005] Usually, slaves always present resistance characteristics, and their impact on the bus is stronger than their capacitance characteristics. However, as the number of slaves on the bus increases, its overall capacitance characteristics may increase, depending on the specific circuit design of the slave manufacturer and the actual MBUS wiring.
[0006] The host-side MBUS receiving circuit of the prior art generally converts the signal into a voltage signal through a sampling resistor, and then the operational amplifier analyzes the received signal. According to the sampling and operational amplifier processing methods, the mainstream MBUS host receiving circuits on the market can be divided into the following four types: direct sampling single-ended amplification, differential sampling single-ended amplification, direct sampling differential amplification, and differential sampling differential amplification. Considering the comprehensive performance and cost, the differential sampling single-ended amplification method is undoubtedly the best. It has strong universality and anti-interference ability, but it will work abnormally when the slave design is not standardized and the bus load presents a strong resistance characteristic; the single-ended amplification method has low cost, but weak anti-interference ability; while direct sampling has the lowest cost, but anti-interference and load capacity can only be targeted at specific MBUS environments, and it is not very versatile; in addition, differential amplification has the best compatibility, but it has strict requirements on the accuracy of components and has the highest cost. In summary, the existing host-side MBUS receiving circuit is difficult to balance between cost and performance, and it is difficult to take into account the bus environment with resistance characteristics and capacitance characteristics. Summary of the invention
[0007] In order to solve the above problems, the present invention proposes an MBUS host circuit and a working method thereof for improving load compatibility. The present invention utilizes a method of dynamic isolation of a sampling control module to achieve improved load compatibility under different bus characteristics, and makes improvements based on differential sampling single-ended amplification to improve load compatibility and further reduce costs.
[0008] According to some embodiments, a first solution of the present invention provides an MBUS host circuit with improved load compatibility, using the following technical solution:
[0009] An MBUS host circuit for improving load compatibility includes a host sending circuit and a host receiving circuit, wherein the host sending circuit and the host receiving circuit are both connected to an MBUS bus;
[0010] The host receiving circuit includes a signal conversion module, a sampling control module, a differential sampling module, an amplification and shaping module and an optical coupling isolation module connected in sequence;
[0011] The differential sampling module includes a differential capacitor, a differential resistor and a bias resistor, and one end of the differential capacitor, one end of the differential resistor and one end of the bias resistor are all connected to the in-phase input end of the operational amplifier in the amplification and shaping module;
[0012] The output end of the operational amplifier is simultaneously connected to one end of the amplifying current limiting resistor and one end of the first amplification control resistor, the other end of the first amplification control resistor and one end of the second amplification control resistor are both connected to the inverting input end of the operational amplifier; the other end of the amplifying current limiting resistor is connected to the inverting input end of the voltage comparator, the non-inverting input end of the voltage comparator is connected to the output end of the low voltage difference linear regulator, and the output end of the voltage comparator is connected to the optocoupler isolation module.
[0013] Further, the input end of the signal conversion module is connected to the MBUS bus to obtain the slave current signal, and the input end of the signal conversion module is connected to the sampling resistor, and one end of the sampling resistor is grounded;
[0014] The input end of the signal conversion module and the sampling resistor are both connected to the sampling control module.
[0015] Further, the sampling control module includes a first current limiting resistor, a second current limiting resistor and a solid-state relay, the first current limiting resistor is connected to a first load drain of the solid-state relay, and the second current limiting resistor is connected to a second load drain of the solid-state relay;
[0016] The input cathode of the solid-state relay is grounded, and the input anode of the solid-state relay is connected to the control pin of the microcontroller unit and the control pull-up resistor.
[0017] Furthermore, the resistance values of the first current limiting resistor and the second current limiting resistor are much greater than the resistance value of the sampling resistor.
[0018] Furthermore, the input end of the low voltage dropout linear regulator is connected to a power supply, and the output end of the low voltage dropout linear regulator and one end of the voltage stabilizing capacitor are both connected to the non-inverting input end of the voltage comparator;
[0019] One end of the voltage stabilizing capacitor is grounded, and a grounding end of the low voltage difference linear regulator is grounded.
[0020] Furthermore, the other end of the second amplification control resistor is grounded.
[0021] Furthermore, the optical coupling isolation module includes a receiving optical coupler and a resistor, and the input end of the receiving optical coupler is respectively connected to the output end of the voltage comparator in the amplification and shaping module and the resistor.
[0022] Furthermore, the host transmission circuit includes a transmission optocoupler, a triode and a metal oxide semi-conductor field effect transistor;
[0023] The transmitting optical coupler is connected to the micro control unit to obtain the MBUS transmitting signal, and one end of the metal oxide semi-field effect transistor is connected to the MBUS bus to send data to the MBUS slave.
[0024] According to some embodiments, a second solution of the present invention provides a working method of an MBUS host circuit for improving load compatibility, using the following technical solution:
[0025] A working method of an MBUS host circuit for improving load compatibility, comprising:
[0026] After the MBUS bus is powered on for a period of time, the bus current and voltage are stable, and the microcontroller controls the solid-state relay to conduct to charge the differential capacitor until it is fully charged and reaches a steady state.
[0027] When the MBUS host is ready to send data, the microcontroller unit first determines the on / off of the solid-state relay according to the load characteristics of the MBUS bus, and then uses the host sending circuit to send data to the MBUS slave through the MBUS bus;
[0028] After the MBUS host data is sent, the microcontroller controls the solid-state relay to turn on and starts receiving the MBUS slave data;
[0029] The host receiving circuit receives the current signal of the MBUS slave, and the current signal is converted into a voltage signal through a sampling resistor. The voltage signal passes through a sampling control circuit and is differentially sampled by a differential capacitor to obtain a coupling signal.
[0030] The coupled signal is amplified by an operational amplifier to obtain an amplified voltage signal, so that the voltage of the coupled signal is limited to the power supply voltage, thereby realizing high-level signal shaping of the coupled signal;
[0031] The amplified voltage signal and the stable voltage pass through the voltage comparator to achieve low-level shaping and high-low level inversion of the amplified voltage signal, and obtain the RXD signal of the MBUS end;
[0032] The RXD signal at the MBUS end is finally converted into the RX signal at the microcontroller end which can be directly analyzed by the MBUS host through the receiving optical coupler.
[0033] Furthermore, the micro control unit first determines the on / off of the solid-state relay according to the load characteristics of the MBUS bus, specifically:
[0034] The microcontroller unit controls the solid-state relay to be in the on state;
[0035] The microcontroller unit sends some data to the MBUS master's transmit pin TX that will not be replied by the MBUS slave;
[0036] The microcontroller unit detects the level of the MBUS host receiving pin RX. If a low level appears, the MBUS bus presents a resistance characteristic. When sending data to the MBUS slave, the solid-state relay is controlled to disconnect.
[0037] If the low level does not appear, the MBUS bus presents a low resistance characteristic or a capacitance characteristic, and there is no need to control the solid-state relay to disconnect when sending data to the MBUS slave.
[0038] Compared with the prior art, the present invention has the following beneficial effects:
[0039] The present invention utilizes a method of dynamically isolating a sampling control module controlled by a solid-state relay to improve load compatibility under different bus characteristics; improves a differential sampling module, increases a bias resistor to achieve an offset voltage, and thereby improves the resolution of a coupled signal; and utilizes the amplitude distortion characteristics of an operational amplifier to achieve signal amplification and high-level signal shaping at a low cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0041] Figure 1 It is a host receiving circuit diagram in an MBUS host circuit for improving load compatibility in an embodiment of the present invention;
[0042] Figure 2 The present invention is a host sending circuit diagram in an MBUS host circuit for improving load compatibility in an embodiment of the present invention. DETAILED DESCRIPTION
[0043] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0044] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0045] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0046] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0047] Embodiment 1
[0048] like Figure 1 and Figure 2As shown, this embodiment provides an MBUS host circuit that improves load compatibility. In this embodiment, it includes a host sending circuit and a host receiving circuit, and the host sending circuit and the host receiving circuit are both connected to the MBUS bus;
[0049] The host receiving circuit includes a signal conversion module, a sampling control module, a differential sampling module, an amplification and shaping module and an optical coupling isolation module connected in sequence;
[0050] The input end of the signal conversion module is connected to the MBUS bus to obtain the slave current signal, and the input end of the signal conversion module is connected to the sampling resistor, and one end of the sampling resistor is grounded;
[0051] The input end of the signal conversion module and the sampling resistor are both connected to the sampling control module.
[0052] The sampling control module includes a first current limiting resistor, a second current limiting resistor and a solid-state relay, wherein the first current limiting resistor is connected to a first load drain of the solid-state relay, and the second current limiting resistor is connected to a second load drain of the solid-state relay;
[0053] The input cathode of the solid-state relay is grounded, and the input anode of the solid-state relay is connected to the control pin of the microcontroller unit and the control pull-up resistor.
[0054] The differential sampling module includes a differential capacitor, a differential resistor and a bias resistor. One end of the differential capacitor, one end of the differential resistor and one end of the bias resistor are all connected to the in-phase input end of the operational amplifier in the amplification and shaping module.
[0055] The output end of the operational amplifier is simultaneously connected to one end of the amplifying current limiting resistor and one end of the first amplification control resistor, the other end of the first amplification control resistor and one end of the second amplification control resistor are both connected to the inverting input end of the operational amplifier, and the other end of the second amplification control resistor is grounded; the other end of the amplifying current limiting resistor is connected to the inverting input end of the voltage comparator, the non-inverting input end of the voltage comparator is connected to the output end of the low voltage difference linear regulator, and the output end of the voltage comparator is connected to the optocoupler isolation module.
[0056] The input end of the low voltage drop linear regulator is connected to the power supply, and the output end of the low voltage drop linear regulator and one end of the voltage stabilizing capacitor are both connected to the in-phase input end of the voltage comparator;
[0057] One end of the voltage stabilizing capacitor is grounded, and a grounding end of the low voltage difference linear regulator is grounded.
[0058] The optical coupling isolation module comprises a receiving optical coupling and a resistor, and the input end of the receiving optical coupling is respectively connected to the output end of the voltage comparator in the amplification and shaping module and the resistor.
[0059] The host sending circuit includes a sending optical coupler, a triode and a metal oxide semi-conductor field effect transistor;
[0060] The transmitting optical coupler is connected to the micro control unit to obtain the MBUS transmitting signal, and one end of the metal oxide semi-field effect transistor is connected to the MBUS bus to send data to the MBUS slave.
[0061] Specifically, the MBUS host circuit of this embodiment includes two parts: sending and receiving. The receiving circuit is the core content of this patent and includes 5 parts:
[0062] Signal conversion module: uses a very small sampling resistor to sample the ground and convert the current signal into a voltage signal;
[0063] Sampling control module: The microcontroller unit determines whether the isolation of the sampling control module needs to be controlled according to the current load type;
[0064] Differential sampling circuit: Improve the differential circuit to convert the original signal into a coupled signal;
[0065] Amplification and shaping circuit: shapes the coupled signal after differential sampling into an amplified voltage signal, and also has a certain anti-interference effect;
[0066] Optocoupler isolation circuit: Use an optocoupler converter to isolate the MBUS from the microcontroller circuit.
[0067] The MBUS bus is connected to the host transmitting circuit and the host receiving circuit; the MBUS bus is connected to the signal conversion part of the host receiving circuit to convert the current signal sent by the MBUS slave into a voltage signal;
[0068] The signal conversion module of the host receiving circuit is connected to the sampling control module, and the sampling control module is connected to the micro control unit (MCU). The micro control unit uses a level signal to control the sampling control module to achieve dynamic isolation between the back-end circuit and the MBUS bus.
[0069] The sampling control module of the host receiving circuit is also connected to the differential sampling module, the differential sampling module is connected to the amplification and shaping module, the amplification and shaping module is connected to the optocoupler isolation module; the optocoupler isolation module should be connected to the micro control unit.
[0070] The signal conversion module includes a sampling resistor R1, and the sampling resistor R1 should have a small resistance value to achieve better sampling of the signal sent by the MBUS slave under the premise of minimizing interference to the MBUS circuit;
[0071] The sampling control module includes a first current limiting resistor R2 and a second current limiting resistor R3, a solid-state relay U1 and a control pull-up resistor R10. The resistance values of the first current limiting resistor and the second current limiting resistor are much greater than the resistance value of the sampling resistor, and the resistance values of the first current limiting resistor R2 and the second current limiting resistor R3 are similar, and are several hundred times the resistance value of the sampling resistor R1 in the signal conversion module; the control pull-up resistor R10 is a pull-up resistor of the control pin M_CONTRL at the microcontroller MCU end, so as to realize the solid-state relay U1 being turned on when the host is just powered on, so that the back-end receiving circuit quickly enters a state ready to receive.
[0072] The differential sampling module includes differential capacitor C1, bias resistor R4 and differential resistor R5. Differential capacitor C1 and differential resistor R5 are responsible for converting the original voltage signal into a coupled signal; bias resistor R4 is used to offset the Vc voltage to reduce the occurrence of Vc negative voltage and improve signal resolution.
[0073] The amplification and shaping module includes an operational amplifier U2, a voltage comparator U3, a low-dropout linear regulator (LDO) U4, a first amplification control resistor R6, a second amplification control resistor R7, and an amplification current limiting resistor R8.
[0074] The operational amplifier U2, the first amplification control resistor R6 and the second amplification control resistor R7 are responsible for amplifying the coupled signal obtained by differential sampling, and at the same time, the resistance values of R6 / R7 are reasonably selected to saturate and amplify the part of the coupled signal that is higher than a specific value and lower than GND, that is, the maximum voltage of Vn is limited to VCC, so as to achieve preliminary shaping of the high-level part of the coupled signal; that is, the coupled signal is amplified by the operational amplifier to obtain an amplified voltage signal, so that the voltage of the coupled signal is limited between the power supply voltages, so as to achieve high-level signal shaping of the coupled signal, and at the same time have a certain interference removal function.
[0075] The low-dropout linear regulator (LDO) U4 is responsible for generating a stable voltage Vd that is lower than a certain value of VCC; the voltage comparator U3 is responsible for comparing Vn with Vd, realizing low-level shaping and high-low level inversion of Vn to generate the RXD signal at the MBUS end.
[0076] The optocoupler isolation circuit includes a receiving optocoupler U5 and a resistor R9; the input end of the receiving optocoupler U5 is respectively connected to the output end of the voltage comparator U3 in the amplification and shaping module and the resistor R9, and the receiving optocoupler U5 is responsible for converting the RXD signal of the MBUS end into the RX signal of the MCU end to achieve isolation.
[0077] In addition, the microcontroller unit is also connected to the host sending circuit, which includes a sending optocoupler U11, a transistor Q12 and a metal oxide semiconductor field effect transistor Q11; the sending optocoupler U11 is connected to the microcontroller unit to obtain the MBUS sending signal, and one end of the metal oxide semiconductor field effect transistor Q11 is connected to the MBUS bus to send data to the MBUS slave; resistors R11, R12, and R13 act as a voltage divider, R15 is a pull-up resistor, and R14 is a current limiting resistor.
[0078] When the microcontroller sends MBUS, it should first determine whether it is necessary to disconnect the relay U1 of the sampling control circuit based on the internally stored information; then the TX signal sent by the MBUS is converted into the TXD signal of the MBUS end after being isolated by the sending optocoupler U11;
[0079] The TXD signal then controls the on / off of the transistor Q12, and further controls the on / off of the MOS tube Q11, so as to realize whether MBUS+ is connected to VCC_MBUS-H, that is, to control the MBUS+ voltage to be a high level VCC_MBUS-H or a low level VCC_MBUS-L; finally, the conversion from the TTL level at the MCU end to the MBUS level at the MBUS end is realized.
[0080] In addition, the microcontroller unit should autonomously determine the current MBUS bus load characteristics and store the results internally for use when sending MBUS signals:
[0081] MCU controls U1 to be in the on state;
[0082] MCU controls TX to send a piece of data to MBUS that will not be responded by the slave, such as several "0x00" data;
[0083] MCU detects the RX level. If a low level appears, the bus presents a strong resistance characteristic. When sending data to the slave, the solid-state relay U1 should be controlled to disconnect to avoid the bus current quickly recovering to the steady-state current and interfering with the differential sampling. If no low level appears, the bus presents a lower resistance characteristic or a capacitance characteristic. When sending data to the slave, there is no need to control the solid-state relay U1 to disconnect.
[0084] Embodiment 2
[0085] This embodiment provides a working method of an MBUS host circuit for improving load compatibility, including:
[0086] After the MBUS bus is powered on for a period of time, the bus current and voltage are stable, and the microcontroller controls the solid-state relay to conduct to charge the differential capacitor until it is fully charged and reaches a steady state.
[0087] When the MBUS host is ready to send data, the microcontroller unit first determines the on / off of the solid-state relay according to the load characteristics of the MBUS bus, and then uses the host sending circuit to send data to the MBUS slave through the MBUS bus;
[0088] After the MBUS host data is sent, the microcontroller controls the solid-state relay to turn on and starts receiving the MBUS slave data;
[0089] The host receiving circuit receives the current signal of the MBUS slave, and the current signal is converted into a voltage signal through a sampling resistor. The voltage signal passes through a sampling control circuit and is differentially sampled by a differential capacitor to obtain a coupling signal.
[0090] The coupled signal is amplified by an operational amplifier to obtain an amplified voltage signal, so that the voltage of the coupled signal is limited to the power supply voltage, thereby realizing high-level signal shaping of the coupled signal;
[0091] The amplified voltage signal and the stable voltage pass through the voltage comparator to achieve low-level shaping and high-low level inversion of the amplified voltage signal, and obtain the RXD signal of the MBUS end;
[0092] The RXD signal at the MBUS end is finally converted into the RX signal at the microcontroller end which can be directly analyzed by the MBUS host through the receiving optical coupler.
[0093] The microcontroller unit first determines the on / off of the solid-state relay according to the load characteristics of the MBUS bus, specifically:
[0094] The microcontroller unit controls the solid-state relay to be in the on state;
[0095] The microcontroller unit sends some data to the MBUS master's transmit pin TX that will not be replied by the MBUS slave;
[0096] The microcontroller unit detects the level of the MBUS host receiving pin RX. If a low level appears, the MBUS bus presents a resistance characteristic. When sending data to the MBUS slave, the solid-state relay is controlled to disconnect.
[0097] If the low level does not appear, the MBUS bus presents a low resistance characteristic or a capacitance characteristic, and there is no need to control the solid-state relay to disconnect when sending data to the MBUS slave.
[0098] MBUS is a "one master and multiple slaves" communication protocol. This embodiment mainly involves the host receiving and parsing the MBUS signal sent by the slave. The MBUS host sending part is not the focus of this embodiment and will not be elaborated on.
[0099] The serial port TTL level logic is consistent with the MBUS sending logic. That is, logic 1: TX high level corresponds to MBUS sending high level Vmark; logic 0: TX low level corresponds to MBUS sending low level Vspace;
[0100] MBUS receiving logic is opposite to TTL level logic, that is, logic 1: MBUS receiving low current signal Imark corresponds to RX high level; logic 0: MBUS receiving high current signal Ispace corresponds to RX low level.
[0101] In this embodiment, the MBUS host circuit has isolation between the MBUS and the MCU (implemented by using optocouplers and solid-state relays):
[0102] MBUS side: GND, MBUS side chip operating voltage VCC, MBUS transmission voltage VCC_MBUS-L and VCC_MBUS-H, MBUS+, MBUS-.
[0103] MCU side: GND_MCU, MCU side chip operating voltage VCC_MCU, MCU serial port signals TX and RX, and control signal M_CONTRL from MCU.
[0104] like Figure 2 As shown, the MBUS host sends data to the slave, specifically:
[0105] ①The TX signal is converted into the TXD signal in phase by the optocoupler U11;
[0106] ②When TXD is at a high level, transistor Q12 is turned on, the voltage at the intersection of R11 / R12 / R13 decreases, Q11 is turned on, and the MBUS+ voltage is at a high level VCC_MBUS-H;
[0107] ③When TXD is at a low level, transistor Q12 is cut off, the voltage at the intersection of R11 / R12 / R13 increases, Q11 is cut off, and the MBUS+ voltage is at a low level VCC_MBUS-L;
[0108] ④Convert the TXD signal into MBUS+ signal in phase by ②③;
[0109] R11, R12, and R13 act as voltage dividers. Appropriate large resistors should be selected based on the characteristics of Q11. R11>R13>R12>1K should be satisfied.
[0110] like Figure 1 As shown, the MBUS slave sends data to the host, specifically:
[0111] ①MBUS-current signal I m It is converted into a voltage signal V through the ground resistor R1 m ;
[0112] ② Voltage signal V m Then the capacitor C1 is used for differential sampling to obtain V c ;
[0113] ③Sampled signal - coupled signal V c After being amplified by operational amplifier U2, the amplified voltage signal V n , so that the coupled signal V c The voltage is limited to the power supply voltage VCC, realizing high-level signal shaping of the coupled signal, while also having a certain interference removal function;
[0114] ④ The signal V after shaping n With fixed voltage V d Perform TTL level conversion at the voltage comparator U3 to obtain the RXD signal;
[0115] ⑤The RXD signal is finally converted into an RX signal that can be directly analyzed by the host through the optocoupler U4.
[0116] The level conversion relationship of the receiving circuit is shown in Table 1.
[0117] Table 1 Relationship between the level conversions of the receiving circuit
[0118]
[0119] The solid-state relay U1 is used to determine the type of MBUS bus load, and can control the on and off of U1 according to the load type to adapt to the current load (load type adaptation). The specific process is as follows:
[0120] ①MCU controls M_CONTRL to be high level to control the solid-state relay U1 to be on state;
[0121] ②Send a piece of data that the slave will not reply, such as several "0x00";
[0122] ③ Check whether RX is at a low level during the sending phase;
[0123] ④ Repeat ②③ several times, and the MCU will make a judgment based on whether the number of low-level signals received from RX exceeds a specific value n:
[0124] When receiving an RX low level exceeding a certain value n: the bus presents a strong resistance characteristic, and the solid-state relay U1 should be controlled to be disconnected during actual transmission;
[0125] When an RX low level lower than a certain value n is received: the bus presents a weaker resistance characteristic or capacitance characteristic, and the solid-state relay U1 should be controlled to be turned on during actual transmission; (the typical value of this specific value n is 0, and it should be appropriately increased according to actual conditions).
[0126] The MBUS host of the method in this embodiment is not affected by the basic current of the MBUS bus, and the theoretical load capacity is unlimited. However, in actual use, the maximum power of R1 and the withstand voltage of C1 must be considered to limit the load upper limit under the premise of safety.
[0127] When the solid-state relay U1 is disconnected, C1 will discharge slowly and the voltage across C1 will drop slightly, which is related to the sending length of the MBUS host. Normally, the voltage change within an MBUS sending cycle is negligible and will not affect signal acquisition.
[0128] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.
Claims
1. An MBUS host circuit for improving load compatibility, comprising a host transmitting circuit and a host receiving circuit, characterized in that: The host sending circuit and the host receiving circuit are both connected to the MBUS bus; The host receiving circuit includes a signal conversion module, a sampling control module, a differential sampling module, an amplification and shaping module and an optical coupling isolation module connected in sequence; The differential sampling module includes a differential capacitor, a differential resistor and a bias resistor, and one end of the differential capacitor, one end of the differential resistor and one end of the bias resistor are all connected to the in-phase input end of the operational amplifier in the amplification and shaping module; The output end of the operational amplifier is simultaneously connected to one end of the amplifying current limiting resistor and one end of the first amplification control resistor, the other end of the first amplification control resistor and one end of the second amplification control resistor are both connected to the inverting input end of the operational amplifier; the other end of the amplifying current limiting resistor is connected to the inverting input end of the voltage comparator, the non-inverting input end of the voltage comparator is connected to the output end of the low voltage difference linear regulator, and the output end of the voltage comparator is connected to the optocoupler isolation module.
2. The MBUS host circuit for improving load compatibility as claimed in claim 1, characterized in that: The input end of the signal conversion module is connected to the MBUS bus to obtain the slave current signal, and the input end of the signal conversion module is connected to the sampling resistor, and one end of the sampling resistor is grounded; The input end of the signal conversion module and the sampling resistor are both connected to the sampling control module.
3. The MBUS host circuit for improving load compatibility as claimed in claim 1, characterized in that: The sampling control module includes a first current limiting resistor, a second current limiting resistor and a solid-state relay, wherein the first current limiting resistor is connected to a first load drain of the solid-state relay, and the second current limiting resistor is connected to a second load drain of the solid-state relay; The input cathode of the solid-state relay is grounded, and the input anode of the solid-state relay is connected to the control pin of the microcontroller unit and the control pull-up resistor.
4. The MBUS host circuit for improving load compatibility as claimed in claim 3, characterized in that: The resistance values of the first current limiting resistor and the second current limiting resistor are much greater than the resistance value of the sampling resistor.
5. The MBUS host circuit for improving load compatibility as claimed in claim 1, characterized in that: The input end of the low voltage drop linear regulator is connected to the power supply, and the output end of the low voltage drop linear regulator and one end of the voltage stabilizing capacitor are both connected to the in-phase input end of the voltage comparator; One end of the voltage stabilizing capacitor is grounded, and a grounding end of the low voltage difference linear regulator is grounded.
6. The MBUS host circuit for improving load compatibility as claimed in claim 1, characterized in that: The other end of the second amplification control resistor is grounded.
7. The MBUS host circuit for improving load compatibility as claimed in claim 1, characterized in that: The optical coupling isolation module comprises a receiving optical coupling and a resistor, and the input end of the receiving optical coupling is respectively connected to the output end of the voltage comparator in the amplification and shaping module and the resistor.
8. The MBUS host circuit for improving load compatibility as claimed in claim 1, characterized in that: The host sending circuit includes a sending optical coupler, a triode and a metal oxide semi-conductor field effect transistor; The transmitting optical coupler is connected to the micro control unit to obtain the MBUS transmitting signal, and one end of the metal oxide semi-field effect transistor is connected to the MBUS bus to send data to the MBUS slave.
9. A working method of an MBUS host circuit for improving load compatibility, characterized in that: include: After the MBUS bus is powered on for a period of time, the bus current and voltage are stable, and the microcontroller controls the solid-state relay to conduct to charge the differential capacitor until it is fully charged and reaches a steady state. When the MBUS host is ready to send data, the microcontroller unit first determines the on / off of the solid-state relay according to the load characteristics of the MBUS bus, and then uses the host sending circuit to send data to the MBUS slave through the MBUS bus; After the MBUS host data is sent, the microcontroller controls the solid-state relay to turn on and starts receiving the MBUS slave data; The host receiving circuit receives the current signal of the MBUS slave, and the current signal is converted into a voltage signal through a sampling resistor. The voltage signal passes through a sampling control circuit and is differentially sampled by a differential capacitor to obtain a coupling signal. The coupled signal is amplified by an operational amplifier to obtain an amplified voltage signal, so that the voltage of the coupled signal is limited to the power supply voltage, thereby realizing high-level signal shaping of the coupled signal; The amplified voltage signal and the stable voltage pass through the voltage comparator to achieve low-level shaping and high-low level inversion of the amplified voltage signal, and obtain the RXD signal of the MBUS end; The RXD signal at the MBUS end is finally converted into the RX signal at the microcontroller end which can be directly analyzed by the MBUS host through the receiving optical coupler.
10. A working method of an MBUS host circuit for improving load compatibility as claimed in claim 9, characterized in that: The microcontroller unit first determines the on / off of the solid-state relay according to the load characteristics of the MBUS bus, specifically: The microcontroller unit controls the solid-state relay to be in the on state; The microcontroller unit sends some data to the MBUS master's transmit pin TX that will not be replied by the MBUS slave; The microcontroller unit detects the level of the MBUS host receiving pin RX. If a low level appears, the MBUS bus presents a resistance characteristic. When sending data to the MBUS slave, the solid-state relay is controlled to disconnect. If the low level does not appear, the MBUS bus presents a low resistance characteristic or a capacitance characteristic, and there is no need to control the solid-state relay to disconnect when sending data to the MBUS slave.