BUS COMMUNICATION CIRCUIT AND DEVICE.

MX431072BActive Publication Date: 2026-02-25WASION GROUP HLDG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
MX2022009773
Authority / Receiving Office
MX · MX
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-12-25
Filing Date
2022-08-09
Publication Date
2026-02-25
Estimated Expiration
2041-04-08

AI Technical Summary

Technical Problem

The existing M-BUS bus communication mode in remote meter reading systems faces challenges with insufficient anti-interference ability and adaptive adjustment for different meter specifications and noise interference, leading to data transmission abnormalities.

Method used

A bus communication circuit with a main station signal sending module, communication protection module, signal conversion resistor, signal receiving module, and programmable reference voltage adjustment module, which includes diodes, resistors, capacitors, and optocouplers to adjust reference voltages and enhance noise tolerance and adaptability.

Benefits of technology

The solution improves the applicability and anti-interference ability of the bus communication circuit by adapting to different slave station devices and external environments, ensuring reliable data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure MX431072B0
    Figure MX431072B0
Patent Text Reader

Abstract

A bus communication circuit is described, which includes a main station signal sending module, a communication protection module, a signal conversion resistor, a main station signal receiving module, and a programmable reference voltage adjustment module. An output terminal of the main station signal sending module is connected to the communication protection module, the programmable reference voltage adjustment module and the main station signal receiving module through the signal conversion resistor, the programmable reference voltage adjustment module is further connected to the main station signal receiving module, and an output terminal of the main station signal receiving module is connected to a main station signal receiving terminal.
Need to check novelty before this filing date? Find Prior Art

Description

BUS COMMUNICATION CIRCUIT AND DEVICE CROSS-REFERENCE TO RELATED APPLICATIONS The present application claims priority from a Chinese patent application filed with the China Patent Office on December 25, 2020, under application number 202011573828.8 and entitled Bus Communication Device and Circuit, all of which are incorporated herein by reference. TECHNICAL FIELD This application relates to the field of circuit electronics, in particular to a bus communication circuit and a bus communication device. BACKGROUND The existing remote meter reading system, namely the M-BUS communication mode, is a master-slave half-duplex transmission bus that uses a call / response method for communication between the two terminals. That is, after the master station sends a query, the slave station transmits data to the master station. Specifically, the master station can supply power to the slave station and send a logic signal of 1 or 0 to the slave station by changing the amplitude of the bus voltage to transmit data. The slave station can send a logic signal of 1 or 0 to the master station by adding a pulse current to its normal current.In other words, the master station can send a signal to the slave station through the bus while supplying power to the slave station, so that a battery placed in the slave station's meter is only used as a backup power source, reducing the requirements for the slave station, such as regular maintenance and battery replacement. However, in the existing remote reading system, the pulse currents generated by different meters vary due to differing specifications and models. The module responsible for pulse current identification in the bus communication cannot accurately identify the logic signal when the pulse current changes. Furthermore, due to the bus's length, the noise signal generated by the external environment is relatively high, and data transmission abnormalities are also likely to occur under the influence of this noise. Therefore, the existing bus communication method has limited applicability when dealing with meters of different specifications at the slave station or with noise interference in various environments. SUMMARY OF THE INVENTION The main purpose of this application is to provide a bus communication circuit and device, which aims to solve the problem of insufficient anti-interference capability and insufficient adaptive tuning capability of the existing bus communication mode. To achieve the above purpose, the present application provides a bus communication circuit that includes a main station signal sending module, a communication protection module, a signal conversion resistor, a main station signal receiving module, and a programmable reference voltage adjustment module, in particular: An input terminal of the main station's signal sending module is connected to a signal sending terminal of a main station; an output terminal of the main station's signal sending module is connected to a first terminal of the communication protection module through the signal conversion resistor; and a second terminal of the communication protection module is connected to a slave station. The first terminal of the communication protection module is further connected to a first input terminal of the main station's signal receiving module and an input terminal of the programmable reference voltage adjustment module. An output terminal of the programmable reference voltage adjustment module is connected to a second input terminal of the main station's signal receiving module.and an output terminal of the main station's signal receiving module is connected to a signal receiving terminal of the main station; The main station's signal sending module is configured to adjust a first output voltage according to a data signal sent by the main station; The communication protection module is configured to send the first output voltage to the slave station, so that the slave station receives the data signal sent by the main station according to the first output voltage, and it is also configured to adjust a first output current according to a data signal sent by the slave station; The signal conversion resistor is configured to reduce the first output voltage according to the first output current to obtain a first signal voltage or a second signal voltage; The programmable reference voltage adjustment module is configured to adjust an output reference voltage between the voltage of the first signal and the voltage of the second signal; The main station's signal receiving module is configured to receive the voltage of the first signal or the voltage of the second signal and compare the voltage of the first signal or the voltage of the second signal with the reference voltage, to obtain the data signal sent by the slave station and send the data signal to the main station. In one embodiment, the programmable reference voltage adjustment module includes a first diode and a plurality of resistor unit circuits connected in parallel; One anode of the first diode is connected to the first terminal of the communication protection module, one cathode of the first diode is connected to a first terminal of each resistor unit circuit, and a second terminal of each resistor unit circuit is connected to the second input terminal of the main station signal receiving module; The programmable reference voltage adjustment module is configured to adjust an equivalent resistance of the programmable reference voltage adjustment module by controlling the activation and deactivation of the plurality of resistance unit circuits. In one embodiment, each of the resistor unit circuits includes an adjustment resistor, a first switching tube, a first resistor, a second resistor, a first capacitor, and a first control unit; The cathode of the first diode is connected to a first terminal of the first capacitor, a first terminal of the first resistor and a first terminal of the first switch tube; a control terminal of the first switch tube is connected to a second terminal of the first capacitor, a second terminal of the first resistor and a first terminal of the second resistor; a second terminal of the second resistor is connected to a control terminal of the first control unit; a controlled terminal of the first control unit is connected to the main station; and a second terminal of the first switch tube is connected to a second input terminal of the signal receiver module of the main station. The first control unit is configured to control the switching on and off of the first switch according to a control signal sent by the main station. In one embodiment, the first control unit is a first optocoupler or a second switching tube. In one embodiment, the adjustment resistors of the resistor unit circuits are different from each other. In one embodiment, the main station's signal receiving module includes a first comparator, a third resistor, a fourth resistor, a second capacitor, and a second optocoupler; A first input terminal of the first comparator is connected to the first terminal of the communication protection module through the third resistor, a second input terminal of the first comparator is connected to the second terminal of each resistor unit circuit, the second terminal of the first comparator is connected to ground through the fourth resistor, the second capacitor is connected in parallel with the fourth resistor, and an output terminal of the first comparator is connected to a control terminal of the second optocoupler, the control terminal of the second optocoupler is connected to the signal receiving terminal of the main station; The second optocoupler is configured to send a corresponding high or low level signal to the main station's signal receiving terminal in accordance with a high or low level signal emitted by the first comparator. In one embodiment, the main station's signal sending module includes a third optocoupler, a voltage stabilizer chip, a first voltage stabilizer diode, and a second voltage stabilizer diode; A controlled terminal of the third optocoupler is connected to the signal sending terminal of the main station, an output anode and an output cathode of the third optocoupler are connected to a cathode and an anode of the second voltage stabilizer diode respectively, and an input terminal of the voltage stabilizer chip is connected to a bus voltage, a ground terminal of the voltage stabilizer chip is connected to a cathode of the first voltage stabilizer diode and an anode of the first voltage stabilizer diode is connected to the cathode of the second voltage stabilizer diode, the anode of the second voltage stabilizer diode is connected to ground and an output terminal of the voltage stabilizer chip is the output terminal of the signal sending module of the main station. In one embodiment, the communications protection module includes a second diode, a transient diode, a third capacitor, and a thermistor; The anode of the second diode is the first terminal of the communication protection module; the anode of the second diode is grounded through the third capacitor; the cathode of the second diode is connected to a positive electrode of the slave station through the thermistor; a negative electrode of the slave station is grounded; and the cathode of the second diode is grounded through the transient diode. In one embodiment, the communications protection module is further configured to receive the first output voltage to supply power to the slave station. Furthermore, to accomplish the above purpose, the present application further provides a bus communication apparatus comprising a master station, a slave station, and a bus communication circuit connected to the master station and the slave station respectively, in particular the bus communication circuit is configured as the bus communication circuit in accordance with the above. In this application, a programmable reference voltage adjustment module is provided. When faced with signal interference caused by different terminals on slave station devices or varying external environments, the reference voltage received by the main station's signal receiver module can be adjusted. By adjusting the magnitude of the reference voltage to an optimal value between the first and second signal voltages, the bus communication circuit can be adapted to various slave station devices, thus improving its applicability. By adjusting the reference voltage to approximate the optimal value of the first and second signal voltages, the communication circuit can ensure maximum noise tolerance and anti-interference capability. iviA / a / zuzz / uuu i tó BRIEF DESCRIPTION OF THE DRAWINGS To illustrate more clearly the technical solutions in the embodiments of this application or in the related art, the drawings to be used in the description of the embodiments or the related art are briefly presented below. Obviously, the drawings in the following description are only some embodiments of this application. For those skilled in the art, on the condition that the creative work is not paid for, other drawings based on the structure shown in these drawings may also be obtained. Figure 1 is a module diagram of an implementation of a bus communication circuit of the present application. Figure 2 is a circuit structure diagram of the implementation of Figure 1. Figure 3 is a circuit diagram of a first control unit in the implementation of Figure 2. Figure 4 is a schematic diagram of the circuit structure of the first control unit according to another embodiment of Figure 2. The implementation, functional characteristics and advantages of the purpose of this application will be explained in more detail with reference to the drawings together with the implementations. Description of the reference numbers: Grade Name Grade Name 10 Main Station Signal Sending Module Ri Adjustment Resistor 20 Communications Protection Module DI ~ D2 First Diode ~ Second Diode 30 Main Station Signal Receiving Module Q1 ~ Q2 First Switch Tube ~ Second Switch Tube 40 Programmable Reference Voltage Adjustment Module R1 - R4 First Resistor ~ Fourth Resistor 41 Resistor Unit Circuit C1 ~ C3 First Capacitor ~ Third Capacitor 42 First Control Unit NI ~ N3 First Optocoupler ~ Third Optocoupler PTC Thermistor ZD1 First Voltage Stabilizing Diode U1 Voltage Stabilizing Chip ZD2 Second Voltage Stabilizing Diode To the first comparator TVS Transient diode R Signal conversion resistor 50 Main station 60 Slave station DETAILED DESCRIPTION OF THE ACHIEVEMENTS It should be understood that the specific realizations described here are intended to explain disclosure only and are not intended to limit disclosure. The following description will clearly and completely outline the technical aspects of the embodiments covered by this application, with reference to the drawings. Obviously, the embodiments described are only a portion of the embodiments covered by this application, not all of them. Based on the embodiments covered by this application, all other embodiments obtained through ordinary technical skill without creative work fall within the scope of this application. It should be noted that all directional indications (such as up, down, left, right, forward, backward, ...) in the realizations of this application are only used to explain the relative position relationship, the situation of movement, etc., between the components in a certain posture (as shown in the drawings). If the specific posture changes, the directional indications will change accordingly. Furthermore, the descriptions of "first," "second," and so on in this application are used for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly indicating the number of technical features listed. Therefore, the functions defined by "first" and "second" may explicitly or implicitly include at least one of the functions. Additionally, technical solutions from various embodiments may be combined, but this combination must be based on the practical application of common skills in the field. Where the combination of technical solutions is contradictory or impossible, such a combination shall be deemed not to exist and is not within the scope claimed in this application. This application provides a bus communication circuit, which is applied to a bus communication device. The bus communication device can perform data communication between a master station and multiple slave stations. According to Figure 1 in one embodiment, the bus communication circuit includes a master station signal sending module 10, a communication protection module 20, a signal conversion resistor R, a master station signal receiving module 30, and a programmable reference voltage adjustment module 40. An input terminal of the master station signal sending module 10 is connected to a master station signal sending terminal 50, an output terminal of the master station signal sending module 10 is connected to a first communication protection module terminal 20 through the signal conversion resistor R, and a second communication protection module terminal 20 is connected to a slave station 60.The first terminal of the communication protection module 20 is further connected to a first input terminal of the main station signal receiving module 30 and the input terminal of the programmable reference voltage adjustment module 40, an output terminal of the programmable reference voltage adjustment module 40 is connected to a second input terminal of the main station signal receiving module 30, and an output terminal of the main station signal receiving module 30 is connected to a main station signal receiving terminal 50. The main station 50 can send a corresponding data signal, such as a logic 1 or 0 signal, to the input terminal of the main station 10 signal transmission module. The main station 10 signal transmission module adjusts its initial output voltage according to the data signal. That is, the initial output voltage emitted by the main station 10 signal transmission module corresponding to the reception of a logic 1 signal is not the same as the initial output voltage emitted corresponding to the reception of a logic 0 signal; there is a significant difference in voltage amplitude between them, so the rear-end terminals can identify the two different initial output voltages. When the communication protection module 20 receives the first output voltage, the communication protection module 20 can send the first output voltage to the slave station 60, and the slave station 60 can determine the corresponding data signal according to a voltage amplitude of the first output voltage, to carry out the data transmission process from the main station 50 to the slave station 60. The communication protection module 20, also iviA / a / zuzz / uuu / ij, can receive a data signal from the slave station 60 and adjust a first output current according to the data signal. Specifically, the first output voltage is the output voltage from the output terminal of the main station's signal sending module 10, and the first output current is a current in a current circuit composed of the main station's signal sending module 10, the signal conversion resistor R, and the communication protection module 20.For example, the data signal sent by slave station 60 can be a logic 0 or 1 signal, and slave station 60 can keep the first output current unchanged when sending signal 1, and adding a pulse current to the original first output current when sending signal 0, and the signal data sent by slave station 60 can be determined by detecting a current amplitude of the first output current. When slave station 60 is not generating the pulse current, the magnitude of the voltage drop across the first output voltage after passing through the signal conversion resistor R is the product of the resistance value of the signal conversion resistor R and the current value of the first normal output current. When slave station 60 generates the pulse current, the voltage drop across the signal conversion resistor R increases, and the increased voltage amplitude is the product of the current value of the pulse current and the resistance value of the signal conversion resistor R.That is, when the pulse current is generated in the current loop, the voltage drop generated in the signal conversion resistor R increases, so that the voltage value at one end of the signal conversion resistor R away from the main station's signal sending module 10 is further reduced relative to the voltage value at this end of the signal conversion resistor R when the pulse current is not generated. The main station's signal receiving module 30 can receive two different initial output voltages after being reduced by the signal conversion resistor R. These are the first signal voltage and the second signal voltage. The first signal voltage is the voltage received by the main station's signal receiving module 30 after the first output voltage is reduced by the signal conversion resistor R when the pulse current is generated by the slave station 60. The second signal voltage is the voltage received by the main station's signal receiving module 30 after the first output voltage is reduced by the signal conversion resistor R when the pulse current is not generated by the slave station 60.It can be understood that when the pulse current is generated in the current loop, the voltage drop across the signal conversion resistor R increases, and the voltage drop of the first signal voltage after passing through the signal conversion resistor R is greater, i.e., the voltage of the first signal is lower than the voltage of the second signal. The programmable reference voltage adjustment module 40 adjusts an output reference voltage, so that when no pulse current is generated, the voltage of the second signal received by the main station signal receiving module 30 is higher than the reference voltage; and when the pulse current is generated, the voltage of the first signal received by the main station signal receiving module 30 is lower than the reference voltage, i.e., by adjusting the reference voltage, the magnitude of the reference voltage is between the voltage of the first signal and the voltage of the second signal.By comparing an actual signal voltage with the reference voltage, it can be determined that the actual signal voltage is the voltage of the second signal when it is greater than the reference voltage, and it is the voltage of the first signal when it is less than the reference voltage. Then, it is determined whether the pulse current is generated in the current loop to obtain the data signal from slave station 60. After determining the data signal sent by slave station 60, the signal receiving module of the main station 30 can send the data signal to the signal receiving terminal of the main station 50, to carry out the data transmission process from slave station 60 to main station 50. It should be noted that, for meters of different specifications at the slave station, the amplitude of the generated pulse current is not the same. Therefore, the voltage amplitude of the first output voltage after reduction will change; that is, the voltage of the first signal and the voltage of the second signal change with the change in specification of the slave station's meter. At this time, if the voltage of the first signal and the voltage of the second signal are both higher or lower than the reference voltage, the signal receiving module of the main station 30 cannot determine whether a pulse current is being generated by comparing the signal voltage with the reference voltage. Therefore, the data signal sent by the slave station 60 cannot be determined.By using the programmable reference voltage adjustment module 40, when faced with the terminal devices of different slave stations 60, the output reference voltage is adjusted so that the magnitude of the reference voltage is between the voltage of the first signal and the voltage of the second signal. The slave station 60 sending a data signal can then be determined using the actual signal voltage. That is, for the terminals of devices of different slave stations 60, the reference voltage is tested and adjusted by the programmable reference voltage adjustment module 40, and the corresponding reference voltages for the terminals of devices of different slave stations 60 can be obtained respectively. This allows the bus communication circuit to be adapted to the device terminals of different slave stations 60, thus improving the applicability of the bus communication circuit. According to Figure 1, in the bus communication circuit, the number of slave stations 60 can be set to one or more, each slave station 60 is connected to one terminal of the signal conversion resistor R through a corresponding communication protection module 20, and the other terminal of the signal conversion resistor R is connected to the signal sending module of the main station 10. Similarly, when the reference voltage is set between the voltage of the first signal and the voltage of the second signal, but the voltage difference between the reference voltage and the voltage of the first signal is small, when the voltage of the first signal increases due to the superposition of noise signals in the external environment, the voltage of the first signal after the superposition of the interference signal is likely to be higher than the reference voltage, which affects the determination of the data signal by the signal receiver module of the main station 30. That is, the reference voltage should not only be set between the voltage of the first signal and the voltage of the second signal, but it should also have a certain voltage difference with both the voltage of the first signal and the voltage of the second signal to provide noise tolerance.It can be understood that, by establishing the reference voltage as an average value of the voltage of the first signal and the voltage of the second signal, a maximum theoretical noise tolerance value can be obtained, and the maximum theoretical noise tolerance value is. 1 / 2 of the difference between the voltage of the first signal and the voltage of the second signal, thus improving the anti-interference capability of the bus communication circuit. In this embodiment, the programmable reference voltage adjustment module 40 is provided to adjust the reference voltage obtained by the signal receiver module of the main station 30 when it encounters signal interference caused by the device terminals of different slave stations 60 or by different external environments. By adjusting the amplitude of the reference voltage so that it lies between the voltage of the first signal and the voltage of the second signal, the bus communication circuit can be adapted to various devices of the slave station 60, and the applicability of the bus communication circuit is improved. By adjusting the amplitude of the reference voltage so that it is close to the average value of the voltage of the first signal and the voltage of the second signal, a higher theoretical noise tolerance value can be obtained, and the anti-interference capability of the bus communication circuit can be improved. According to Figure 1 and Figure 2, the programmable reference voltage adjustment module 40 may include a first diode DI and a plurality of parallel resistor unit circuits 41. A positive electrode of the first diode DI is connected to the first terminal of the communication protection module 20, a negative electrode of the first diode DI is connected to a first terminal of each resistor unit circuit 41, and a second terminal of each resistor unit circuit 41 is connected to the second input terminal of the main station signal receiver module 30. The programmable reference voltage adjustment module 40 can control the switching on or off of the plurality of resistor unit circuits 41 to adjust an equivalent resistance of the programmable reference voltage adjustment module 40. The equivalent resistance of the entire programmable reference voltage adjustment module 40 is the resistance value after connecting in parallel the equivalent resistances of the circuits 41 of the conductive resistor unit.The ground input impedance at the second terminal of the main station signal receiving module 30 and the equivalent resistance of the programmable reference voltage adjustment module 40 form a voltage divider circuit. The equivalent resistance of the programmable reference voltage adjustment module 40 is the pull-up resistor, and the ground input impedance at the second terminal of the main station signal receiving module 30 is the pull-down resistor. Therefore, the reference voltage obtained by the second terminal of the main station signal receiving module 30 is the voltage value of the first output voltage divided by the voltage divider circuit. It can be understood that for the voltage divider circuit, when the pull-down resistor value remains unchanged, the pull-up resistor increases, and the output voltage after voltage division decreases. That is, the reference voltage can be reduced by increasing the equivalent resistance of the entire programmable reference voltage adjustment module 40, and the reference voltage can be increased by reducing the equivalent resistance of the entire programmable reference voltage adjustment module 40. The programmable reference voltage adjustment module 40 can generate multiple different equivalent resistances by controlling the activation or deactivation of multiple resistor unit circuits 41.After the resulting equivalent resistances are arranged from lowest to highest, a range of reference voltage values ​​can be determined by testing whether the reference voltage obtained for each equivalent resistance falls between the voltage of the first signal and the voltage of the second signal. Taking three circuits with a resistance of 41 as an example, when the equivalent resistances of the circuits are not the same, there are eight combinations in total. If the infinite equivalent resistance of the three circuits being disconnected is disregarded, there are seven combinations of equivalent resistance. After arranging these seven combinations in order of size, effective combinations can be obtained by traversing each equivalent resistance combination.For example, in the first and second combinations, where the equivalent resistances are lowest among the seven combinations, the generated reference voltage is not between the voltage of the first signal and the voltage of the second signal. However, the reference voltages generated in the third through seventh combinations are between the voltage of the first signal and the voltage of the second signal. It can be determined that the reference voltage corresponding to the third through seventh combinations is sufficient for the signal data transmission of the terminal device of slave station 60.Furthermore, the reference voltage corresponding to the fifth combination can be selected from the third to seventh combinations, so that the reference voltage is closer to the average value of the voltage of the first signal and the voltage of the second signal, so that the main station 30 signal receiving module has some noise tolerance capability when comparing the actual signal voltage with the reference voltage. Each resistor unit circuit 41 includes an adjustment resistor Ri, a first switching tube Ql, a first resistor Rl, a second resistor R2, a first capacitor C1, and a first control unit 42.A negative electrode of the first diode DI is connected to a first terminal of the first capacitor Cl, a first terminal of the first resistor Rl and a first terminal of the first switch tube Ql, a control terminal of the first switch tube Ql is connected to a second terminal of the first capacitor Cl, a second terminal of the first resistor Rl and a first terminal of the second resistor R2, and a second terminal of the second resistor R2 is connected to a control terminal of the first control unit 42, a controlled terminal of the first control unit 42 is connected to the main station 50, and a second terminal of the first switch tube Ql is connected to the second input terminal of the signal receiver module of the main station 30. The main station 50 can control the switching of each resistor unit circuit 41 by sending a control signal. The first switching tube Q1 can be either a PNP transistor or a P-channel MOS tube, and Figure 2 shows a schematic circuit diagram of the resistor unit 41 circuit when the first switching tube Q1 is a PNP transistor. The main station 50 can send either an on or an off signal to the first control unit 42. When the first control unit 42 receives the on signal, the control terminal of the first switching tube Q1 is grounded, turning the first switching tube Q1 on; when the first control unit 42 receives the off signal, the control terminal of the first switching tube Q1 is grounded, turning the first switching tube Q1 off.According to Figure 2, in the programmable reference voltage adjustment module 40 composed of three resistor unit circuits 41, the main station 50 can control the first control unit 42 in each resistor unit circuit 41 through a CTR1 port, a CTR2 port, and a CTR3 port respectively. The first capacitor C1 and the first resistor R1 can prevent the control terminal of the first switch from Q1 suffers fluctuations caused by the external signal, and avoid malfunction of the first switch Q1. The first diode DI can be understood as a load diode, the first capacitor C1 as an energy storage capacitor, and the pulse current is typically 11 mA to 20 mA. When no pulse current is generated, the voltage across the first resistor R1 is the voltage of the second signal, and the first capacitor C1 charges. When the pulse current is generated, causing the voltage of the second signal to drop to the voltage of the first signal, the first capacitor C1 can maintain the voltage across the first resistor R1 at the voltage of the second signal by discharging.The first resistor R1 and the second resistor R2 form a voltage divider circuit. The resistance value of the first resistor R1 is much higher than the resistance value of the second resistor R2. Therefore, when the second resistor R2 is grounded, the voltage at the control terminal of the first switch Q1 is low, and the first switch Q1 is on. When the second resistor R2 is not grounded, the voltage at the control terminal of the first switch Q1 is high, and the first switch Q1 is off. The signal conversion resistor R can be a wire-wound resistor, with a resistance value no less than 100 Ω and no greater than 3 Ω. The first resistor R1 can be set to at least ten times the value of the second resistor R2, and the second resistor R2 can be set to at least 10 kΩ. The voltage level at the control terminal of the first switching tube Q1, after the voltage divider across the second resistor R2, is below the conduction level to ensure that the first switching tube Q1 is saturated and turned on. The first diode DI can be a Schottky diode with a small reverse current and low forward voltage drop, such as a BAT54 Schottky diode with a forward voltage drop of approximately 0.2 V and a reverse leakage current of less than 0.1 mA.The first switching tube Q1 can be a PNP transistor, such as a germanium tube with a voltage drop of 0.4V to 0.2V when saturated and turned on with a small current. The first capacitor C1 in each resistor circuit 41 prevents interference and malfunction. When selecting the fourth resistor R4 and the second capacitor C2 in the main station's signal receiving module 30, a larger time constant τ = RC is required so that the capacitor can store more energy. When the first switch Q1 is turned on, the resistance unit circuit 41 is turned on. When some of the resistance unit circuits 41 in the plurality of resistance unit circuits 41 are in a conducting state, the overall equivalent resistance of the plurality of resistance unit circuits 41 is a resistance value of the unit adjustment resistors Ri of the conducting resistance circuits 41 connected in parallel. It should be noted that, to obtain different combinations of equivalent resistance, the adjustment resistors Ri in each of the resistance unit 41 circuits can be configured to be different from each other. When the resistance values ​​of the adjustment resistors Ri are not the same, and a number of resistance unit 41 circuits is n, a number of combinations of all equivalent resistances that can be obtained is 2n, and a number of combinations of effective equivalent resistances after the infinite equivalent resistance with all resistance unit 41 circuits turned off is removed is (2n-l) after removing the infinite equivalent resistance with all resistance unit 41 circuits turned off is (2n-1). It can be understood that when the number of resistance unit circuits 41 is large, (2n-l) is large, and it becomes time-consuming to use the cross-sectional method to determine if the reference voltage corresponding to the equivalent resistance of each combination meets the requirement. After determining the equivalent resistance of each combination and listing all the equivalent resistances in order of size, the efficiency of determining the effective combinations can also be improved through segmented testing. For example, if two adjacent equivalent resistance combinations xyy are selected, the equivalent resistance of combination x is less than the equivalent resistance of combination y.In a determination that the reference voltages obtained under combinations x and y are both greater than the voltage of the first and second signals, when the equivalent resistance is reduced further, the reference voltage increases even more. Since the reference voltage under combination y is already higher than the voltage of the first and second signals, there is no doubt that a larger reference voltage would also not meet the requirement. Therefore, other equivalent resistance combinations with lower equivalent resistances than combination y no longer need to be tested, thus saving testing time and improving test efficiency. Referring to Figure 3, when the bus communication circuit has an isolation requirement, the first control unit 42 can be a first NI optocoupler, and when the main station 50 sends an on signal to the first NI optocoupler, the first NI optocoupler can ground the second terminal of the second resistor R2; and when the main station 50 sends an off signal to the first NI optocoupler, the first NI optocoupler can suspend the second terminal. Referring to Figure 4, when the bus communication circuit does not need to isolate the control part from the communication part, the first control unit 42 can be a second switching tube Q2, and when the main station 50 sends an on signal to the second switching tube Q2, the second switching tube Q2 can ground the second terminal of the second resistor R2; when the main station 50 sends an off signal to the second switching tube Q2, the second switching tube Q2 can suspend the second terminal of the second resistor. R2. The second switching tube Q2 can be either a transistor or a MOS tube, and Figure 4 only shows a schematic circuit diagram of the first control unit 42 in which the second switching tube is a transistor. With reference to Figure 2, the main station's signal receiving module 30 may include a first comparator Al, a third resistor R3, a fourth resistor R4, a second capacitor C2, and a second optocoupler N2. A first input terminal of the first comparator Al is connected to the first terminal of the communication protection module 20 through the third resistor R3, a second input terminal of the first comparator Al is connected to the second terminal of each resistor unit circuit 41, a second terminal of the first comparator Al is grounded through the fourth resistor R4, the second capacitor C2 is connected in parallel with the fourth resistor R4, an output terminal of the first comparator Al is connected to the control terminal of the second optocoupler N2, and the control terminal of the second optocoupler N2 is connected to the main station's signal receiving terminal 50. The first input terminal of the first comparator can receive either the voltage of the first signal or the voltage of the second signal, and the second input terminal of the first comparator can receive the reference voltage. After receiving a real signal voltage at the first terminal, the first comparator can determine whether the real signal voltage is the voltage of the first signal or the voltage of the second signal by comparing it to the reference voltage. When the real signal voltage is greater than the reference voltage, the real signal voltage is the voltage of the second signal; and when the real signal voltage is less than the reference voltage, the real signal voltage is the voltage of the first signal. When the first comparator A1 receives the voltage from the first signal, it can output a low-level signal; and when the first comparator A1 receives the voltage from the second signal, it can output a high-level signal. When the second optocoupler N2 receives a low-level signal, it can send a corresponding low-level signal to the main station's signal receiving terminal 50; when the second optocoupler N2 receives a high-level signal, it can send a corresponding high-level signal to the main station's signal receiving terminal 50, and logic signals can be transmitted through the high-level and low-level signals. It can be understood that, in the above embodiment, the second optocoupler N2 isolates the main station 50 from the bus communication circuit, and the reference voltage at the input terminal of the first comparator Al and the actual signal voltage are both approximately 30V. By providing optocoupler isolation, the higher voltage in the communication section can be prevented from affecting the low-voltage signal from the main station 50. Depending on the isolation requirement, the optocoupler isolation section can be added or omitted to suit different application scenarios. For example, optocoupler isolation is necessary when safety isolation between high and low current is required. The output terminal of the first comparator Al is directly connected to the signal receiving terminal of the main station 50 to reduce device cost. The signal transmission module of the main station 10 may include a third optocoupler N3, a voltage stabilizer chip Ul, a first voltage stabilizer diode ZD1, and a second voltage stabilizer diode ZD2. One controlled terminal of the third optocoupler N3 is connected to the signal transmission terminal of the main station 50. An output anode and an output cathode of the third optocoupler N3 are respectively connected to an anode and a cathode of the second voltage stabilizer diode ZD2. An input terminal of the voltage stabilizer chip U1 receives the bus voltage. A ground terminal of the voltage stabilizer chip U1 is connected to the cathode of the first voltage stabilizer diode ZD1. An anode of the second voltage stabilizer diode ZD2 is connected to ground. The output terminal of the voltage stabilizer chip U1 is the output terminal of the signal transmission module of the main station 10. When the output anode and output cathode of the third optocoupler N3 are not connected, the ground terminal of the voltage regulator chip U1 is connected to ground through the two voltage regulator diodes. At this time, the voltage of the ground terminal of the voltage regulator chip U1 with respect to ground is the sum of the breakdown voltages of the two voltage regulator diodes. The signal transmit terminal 50 of the main station can transmit high-level and low-level signals as logic 0 and 1 signals, respectively. When the third optocoupler N3 receives a low-level signal, it can short-circuit the second voltage regulator diode ZD2. At this moment, the voltage of the ground terminal of voltage regulator chip U1 with respect to ground is the breakdown voltage of a voltage regulator diode. For example, when the breakdown voltage of the two voltage regulator diodes is 13 V and the bus voltage is 31 V, if the third optocoupler N3 receives a high-level signal, the output terminal of voltage regulator chip U1 will have a voltage of 31 V with respect to ground. If the third optocoupler N3 receives a low-level signal, the second voltage regulator diode ZD2 will short-circuit, and the output terminal of voltage regulator chip U1 will have a voltage of 18 V with respect to ground. The logic signal sent by the signal transmission terminal of the main station 50 can be determined by detecting the output voltage of voltage regulator chip U1, in order to perform a signal transmission process. When the output anode and output cathode of the third optocoupler N3 are not connected, the ground terminal of the voltage regulator chip Ul is grounded through the two voltage regulator diodes. At this time, the voltage of the ground terminal of the voltage regulator chip Ul with respect to ground is the sum of the breakdown voltages of the two voltage regulator diodes. The signal transmission terminal 50 of the main station can transmit high-level and low-level signals as logic 0 and 1 signals, respectively. In Figure 2, a TX terminal can be understood as the signal transmitting terminal of the main station 50, and an RX terminal as the signal receiving terminal of the main station 50. The first optocoupler NI can be an ordinary optocoupler. The second optocoupler N2 and the third optocoupler N3 can be ordinary optocouplers or high-speed optocouplers, depending on the actual communication speed in baud. The communication protection module 20 may include a second diode D2, a transient voltage switch (TVS), a third capacitor C3, and a PTC thermistor. The anode of the second diode D2 is the first terminal of the communication protection module 20; one anode of the second diode D2 is grounded through the third capacitor C3; one cathode of the second diode D2 is connected to a positive electrode of the slave station 60 through the PTC thermistor; one negative electrode of the slave station 60 is grounded; and the negative electrode of the second diode D2 is grounded through the transient voltage switch (TVS). The transient voltage regulator (TVS) absorbs spike pulse signals such as static electricity and lightning generated between the interfaces of the main station 50 and the slave station 60 to protect the communication circuit. When the current in the circuit becomes too high, the resistance value of the PTC thermistor increases with temperature, eventually disconnecting the circuit to protect the power supply of the main station 50 and prevent external short circuits and overloads that could damage it. It is noticeable that when the temperature of the PTC thermistor decreases, the current loop can be reactivated. The third capacitor, C3, performs a filtering function and filters out AC interference signals. It should be noted that when slave station 60 receives the first output voltage, this voltage will change with the distance and current on the bus. Slave station 60 can then determine the corresponding logic signal (0 or 1) by detecting whether this voltage differs from the dynamic reference voltage by a preset voltage threshold. For example, slave station 60 can implement dynamic level recognition using a TSS721A interface chip. The dynamic reference voltage of the interface chip is obtained by charging the capacitor on the chip with the voltage received from a specific access point on station 60. If the baud rate is higher than 300, there is a higher output voltage for every 11 bits in the transmitted bit stream, which ensures that the dynamic reference voltage remains stable near the highest output voltage.When the interface chip receives an actual output voltage, the corresponding logic signal 0 or 1 is determined by judging whether the difference between the actual output voltage and the dynamic reference voltage exceeds 10V. It can be understood that, in the above embodiment, the voltage of the first signal or the voltage of the second signal sent by the signal sending module of the main station 10 is higher than the working voltage of the slave station device 60, and a static reserve current of the slave station 60 is the first output current, then the first output voltage after being reduced obtained by the communication protection module 20 is regulated by the two voltage stabilizing diodes and can be used as the working voltage of the slave station 60 to be supplied to the slave station 60. According to Figure 2, in one embodiment, a formula for calculating the reference voltage received by the second terminal of the first comparator Al can be: r(t / mark- / mark* / ?-t / dl-[ / ql)*7?bt / rer =--------------------------------------------- / ?b + Rcombination Umark is the first output voltage, Imark is the first output current, R is the resistance value of the signal conversion resistor R, Udl is the conduction voltage drop of the first diode DI, Uql is the conduction voltage drop of the first switch Ql, Rb is the equivalent resistance of the fourth resistor R4 connected in parallel, the equivalent DC impedance of the second capacitor C2 and the input impedance of the first comparator Al to ground, the combination R is the equivalent resistance of the adjustment resistors Ri of all the conductive resistance unit circuits connected in parallel 41. This application further provides a bus communication device. The bus communication device includes a master station 50, a slave station 60, and a bus communication circuit connected to the master station 50 and the slave station 60. The structure of the bus communication circuit may be based on previous embodiments. As expected, since the bus communication device of this embodiment adopts the technical solution of the aforementioned bus communication circuit, the bus communication device 50 has all the beneficial effects of the aforementioned bus communication circuit. The foregoing is only an optional embodiment of the present application and, therefore, does not limit the scope of the present application; any equivalent structure or equivalent process transformation made using the specification and drawings of the present application, or any direct or indirect application in other related technical fields, is included in the claimed scope of the present application.

Claims

CLAIMS 1. A bus communication circuit comprising a master station signal sending module, a communication protection module, a signal conversion resistor, a master station signal receiving module, and a programmable reference voltage adjustment module, wherein: an input terminal of the master station signal sending module is connected to a signal sending terminal of a master station, an output terminal of the master station signal sending module is connected to a first terminal of the communication protection module through the signal conversion resistor, and a second terminal of the communication protection module is connected to a slave station,The first terminal of the communication protection module is further connected to a first input terminal of the main station's signal receiving module and an input terminal of the programmable reference voltage adjustment module; an output terminal of the programmable reference voltage adjustment module is connected to a second input terminal of the main station's signal receiving module, and an output terminal of the main station's signal receiving module is connected to a signal receiving terminal of the main station; the main station's signal sending module is configured to adjust a first output voltage according to a data signal sent by the main station; the communication protection module is configured to send the first output voltage to the slave station.so that the slave station receives the data signal sent by the main station according to the first output voltage, and is also configured to adjust a first output current according to a data signal sent by the slave station; the signal conversion resistor is configured to reduce the first output voltage according to the first output current to obtain a first signal voltage or a second signal voltage; the programmable reference voltage adjustment module is configured to adjust an output reference voltage between the first signal voltage and the second signal voltage; the main station's signal receiver module is configured to receive the first signal voltage or the second signal voltage and compare the first signal voltage or the second signal voltage with the reference voltage.to obtain the data signal sent by the slave station and send the data signal to the master station.

2. The bus communication circuit according to claim 1, wherein the programmable reference voltage adjustment module comprises a first diode and a plurality of resistor unit circuits connected in parallel; an anode of the first diode is connected to the first terminal of the communication protection module, a cathode of the first diode is connected to a first terminal of each resistor unit circuit, and a second terminal of each resistor unit circuit is connected to the second input terminal of the main station signal receiving module; the programmable reference voltage adjustment module is configured to adjust an equivalent resistance of the programmable reference voltage adjustment module by controlling the activation and deactivation of the plurality of resistor unit circuits.

3. The bus communication circuit according to claim 2, wherein each of the resistor unit circuits comprises an adjustment resistor, a first switching tube, a first resistor, a second resistor, a first capacitor, and a first control unit;The cathode of the first diode is connected to a first terminal of the first capacitor, a first terminal of the first resistor, and a first terminal of the first switch tube; a control terminal of the first switch tube is connected to a second terminal of the first capacitor, a second terminal of the first resistor, and a first terminal of the second resistor; a second terminal of the second resistor is connected to a control terminal of the first control unit; a controlled terminal of the first control unit is connected to the main station; and a second terminal of the first switch tube is connected to a second input terminal of the signal receiver module of the main station. The first control unit is configured to control the switching on and off of the first switch according to a control signal sent by the main station.

4. The bus communication circuit according to claim 3, wherein the first control unit is a first optocoupler or a second switching tube.

5. The bus communication circuit according to claim 3, wherein the adjustment resistors of the resistor unit circuits are different from each other.

6. The bus communication circuit according to claim 2, wherein the main station signal receiving module comprises a first comparator, a third resistor, a fourth resistor, a second capacitor, and a second optocoupler; a first input terminal of the first comparator is connected to the first terminal of the communication protection module through the third resistor, a second input terminal of the first comparator is connected to the second terminal of each resistor unit circuit, the second terminal of the first comparator is grounded through the fourth resistor, the second capacitor is connected in parallel with the fourth resistor, and an output terminal of the first comparator is connected to a control terminal of the second optocoupler, the control terminal of the second optocoupler being connected to the signal receiving terminal of the main station;The second optocoupler is configured to send a corresponding high or low level signal to the main station's signal receiving terminal in accordance with a high or low level signal emitted by the first comparator.

7. The bus communication circuit according to any of claims 1 to 6, wherein the main station signal sending module comprises a third optocoupler, a voltage stabilizer chip, a first voltage stabilizer diode, and a second voltage stabilizer diode;A controlled terminal of the third optocoupler is connected to the signal sending terminal of the main station; an output anode and an output cathode of the third optocoupler are connected to a cathode and an anode of the second voltage stabilizing diode respectively; an input terminal of the voltage stabilizing chip is connected to a bus voltage; a ground terminal of the voltage stabilizing chip is connected to a cathode of the first voltage stabilizing diode; an anode of the first voltage stabilizing diode is connected to the cathode of the second voltage stabilizing diode; the anode of the second voltage stabilizing diode is connected to ground; and an output terminal of the voltage stabilizing chip is the output terminal of the signal sending module of the main station.

8. The bus communication circuit according to any of claims 1 to 6, wherein the communication protection module comprises a second diode, a transient diode, a third capacitor, and a thermistor; an anode of the second diode is the first terminal of the communication protection module, the anode of the second diode is grounded through the third capacitor, a cathode of the second diode is connected to a positive electrode of the slave station through the thermistor, a negative electrode of the slave station is grounded, and the cathode of the second diode is grounded through the transient diode.

9. The bus communication circuit according to claim 8, wherein the communication protection module is further configured to receive the first output voltage to supply power to the slave station.

10. A bus communication apparatus comprising a master station, a slave station and the bus communication circuit according to any of claims 1 to 9 connected to the master station and the slave station.