Communication device and communication method
By adopting a bidirectional current loop structure and a controllable constant current source and voltage stabilization circuit in the composite bus, the shortcomings of traditional composite buses in strong interference, high-speed communication or power requirements are solved, and higher power transmission, communication rate and anti-interference capabilities are achieved.
Patent Information
- Application Number
- CN202411508579.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-03-25
AI Technical Summary
Traditional composite buses are difficult to compete with in applications where strong interference, high-speed communication or power requirements, and there are problems such as small transmission power, low communication speed, and weak anti-interference ability.
The bidirectional current ring structure is adopted to transmit data through the current ring between the master and the slave, and a controllable constant current source and voltage stabilization circuit are used in the current ring to ensure that the load always obtains a stable working voltage and realizes the simultaneous transmission of power and signal.
It improves power transmission, communication rate and anti-interference capabilities, broadens the application scenarios of composite buses, and enables them to work effectively in more complex environments.
Smart Images

Figure CN119696620A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic technology, and in particular to a communication device and a communication method. Background Art
[0002] The bus that uses only two wires to transmit power and signals is called a power signal composite bus (hereinafter referred to as composite bus). In different application scenarios, composite buses have different names. For example, it is called fire-fighting bus 2 in fire protection systems and meter-bus (Mbus) in the field of instruments. The basic principle of composite bus is to use time division multiplexing to separate the transmission of power and signal in time. Composite has significant advantages such as less wires, convenient wiring, and easy maintenance. It is widely used in fire protection systems, meter reading systems and other occasions.
[0003] Traditional composite buses are mostly used in communication systems with a single host and multiple slaves structure to realize the power supply from the host to the slaves and data communication between the master and the slaves. When there is no data transmission on the bus, the host continues to power the slaves and charges the energy storage capacitors on the slaves to provide working power for the slaves during communication; when transmitting data, the power supply is first suspended, and then the host initiates communication, transmitting voltage square wave signals representing binary 0 and 1 data on the bus, and then the slaves transmit data 0 and 1 to the host by changing the current on the bus. The characteristics of the traditional composite bus are summarized as follows: 1. Time-sharing transmission of power and voltage, using capacitors to store electrical energy and then use it during communication; 2. The host uses voltage signals to send data to the slaves; 3. The slaves use current signals to send data to the slaves. From the working principle, it can be seen that the traditional composite bus is suitable for sensor data acquisition occasions with weak interference, low speed, and micro power consumption. Traditional composite buses are not suitable for applications with strong interference, high-speed communication or power requirements. The analysis is as follows: 1. Since energy storage capacitors are used for power supply during communication, it is difficult to maintain the energy of energy storage capacitors in situations where continuous power output is required, such as motors and display screens. 2. In high-speed communication situations, the communication time takes up too much bus time, resulting in the slave not being able to obtain enough power and unable to work, such as in situations where signal waveforms are displayed in real time. 3. The host uses voltage signals to transmit data to the slave. In some situations with strong electromagnetic interference, strong electromagnetic signals can induce very high voltages on the bus, thereby affecting the communication quality, such as radar scanners. Summary of the invention
[0004] In order to solve the problems of low transmission power, low communication rate and weak anti-interference ability existing in the traditional composite bus, the present invention provides a communication device, including a host and a slave, two wires are used to connect the host and the slave, the host includes a first adjustment transistor, a first comparison and amplification module, a first mode switching module, a first current modulation module, a first current measurement module, a first comparator and a first reference voltage module, the host is powered by an external power supply, the slave includes a load, a voltage divider, a second adjustment transistor, a second comparison and amplification module, a second mode switching module, a second current modulation module, a second current measurement module, a second comparator and a second reference voltage module, and the slave supplies power to the external load;
[0005] The base of the first adjustment transistor is connected to the first comparison amplifier module, the collector of the first adjustment transistor is connected to the power supply, and the emitter of the first adjustment transistor is connected to the first current measurement module; the power supply is connected to the first mode switching module, and the power supply is connected to the load through a wire; the first comparison amplifier module is respectively connected to the first mode switching module and the first current modulation module, the first mode switching module is connected to the first comparator, the first reference voltage module is connected between the first mode switching module and the first comparator, the first current measurement module is respectively connected to the first current modulation module and the first comparator, and the first current measurement module is connected to the second current measurement module through another wire;
[0006] The base of the second adjustment transistor is connected to the second comparison amplification module, the collector of the second adjustment transistor is connected to the load, the emitter of the second adjustment transistor is connected to the second current measurement module, and the load is connected to the second current measurement module; the second comparison amplification module is connected to the second mode switching module, the second mode switching module is connected to the second current modulation module, the second reference voltage module is respectively connected to the second comparison amplification module and the second comparator, the second current measurement module is respectively connected to the second current modulation module and the second comparator, one end of the voltage divider is connected to the second current measurement module, and the other end of the voltage divider is connected to the second mode switching module.
[0007] As a further improvement of the present invention, the host includes a controllable constant current source. In the host, the first mode switching module connects the first reference voltage module to the first comparison and amplification module, and the first current measurement module, the first current modulation module, the first comparison and amplification module, and the first adjustment transistor are connected in series to form a closed loop. The first current measurement module outputs a voltage signal after detecting the bus current, which is sent to the first comparison and amplification module through the first current modulation module and compared with the reference voltage. The comparison result is amplified and the first adjustment transistor is driven, so that the current finally reaches the set value. The bus current is changed by sending a signal to realize the controllable constant current source function.
[0008] As a further improvement of the present invention, the slave includes a controllable constant current source. In the slave, the second mode switching module connects the second current modulation module and the second comparison amplification module. The second current measurement module, the second current modulation module, the second comparison amplification module, and the second adjustment transistor are connected in series to form a closed loop. The second current measurement module outputs a voltage signal after detecting the bus current, which is sent to the second comparison amplification module through the second current modulation module and compared with the reference voltage. The comparison result is amplified and the second adjustment transistor is driven, so that the current finally reaches the set value. The bus current is changed by sending a signal to realize the controllable constant current source function.
[0009] As a further improvement of the present invention, the slave includes a voltage stabilizing circuit. In the slave, the second mode switching module connects the voltage divider and the second comparison amplification module. The voltage divider, the second comparison amplification module, and the second adjustment transistor are connected in series to form a closed loop. The load voltage is sent to the second comparison amplification module after passing through the voltage divider, and is compared with the reference voltage at the same time. The comparison result is amplified and then drives the second adjustment transistor, so that the load voltage finally reaches the set value.
[0010] As a further improvement of the present invention, the host sends data, the slave receives data, the second current measurement module measures the current loop current I, and outputs a voltage V2, which is compared with the reference voltage V1 through a second comparator, and the comparison result is used as a received signal. When working, the controllable constant current source of the host outputs a current I, which generates a voltage V3 through a voltage stabilizing circuit to provide a stable working voltage for the load; when sending data 0, V2 is less than V1, and the comparison outputs data 0; when sending data 1, V2 is greater than V1, and the comparison outputs data 1; during the data transmission process, the load always obtains a stable working voltage V3, realizing the simultaneous transmission of power supply and signal.
[0011] As a further improvement of the present invention, the slave sends data and the host receives data, the first mode switching module connects the power supply voltage to the first comparison and amplification module, the first current measurement module measures the current loop current I, and outputs a voltage V2, which is compared with the reference voltage V1 through a first comparator, and the comparison result is used as a received signal; when the slave sends data 0, V2 is less than V1, and the comparison outputs data 0; when sending data 1, V2 is greater than V1, and the comparison outputs data 1; during the data transmission process, the load always obtains the working voltage V3, thereby realizing the simultaneous transmission of power and signal.
[0012] As a further improvement of the present invention, there is one host and multiple slaves, and one host is connected to multiple slaves. When working, the host outputs a loop current, and the current produces a voltage drop on each slave. When the host sends data, it first sends the number of the slave. After receiving the number, the slave compares it with its own number. If the number is consistent with its own, it sends data to the host, otherwise the slave does not respond to the host. In this way, communication between the host and multiple slaves is achieved.
[0013] As a further improvement of the present invention, the first adjustment transistor is an NPN transistor, and the first mode switching module is a one-to-two analog switch chip.
[0014] As a further improvement of the present invention, the second adjustment transistor is a PNP transistor, and the second mode switching module is a dual-channel two-choice analog switch chip.
[0015] The present invention also provides a communication method. When a host transmits data to a slave, a current loop is formed between the host and the slave. The current provided by the host can provide electrical energy to the slave. The host sends data by changing the size of the current on the current loop. When the slave transmits data to the host, a current loop is still formed between the host and the slave. The host can still provide electrical energy to the slave. The slave sends data by controlling the size of the current on the current loop.
[0016] The beneficial effects of the present invention are: the present invention can better solve some deficiencies of the traditional composite bus, thereby broadening the application occasions of the composite bus. The significant feature of the present invention is that it adopts a bidirectional current loop structure to improve power transmission, communication rate and anti-interference ability. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a schematic diagram of the present invention;
[0018] Figure 2 This is the structure diagram of the host controllable constant current source;
[0019] Figure 3 This is a schematic diagram of the saturation conduction of the first adjustment transistor;
[0020] Figure 4 This is the structure diagram of the controllable constant current source of the slave;
[0021] Figure 5 This is a schematic diagram of the slave voltage stabilization circuit;
[0022] Figure 6 This is the structure diagram of the host sending and the slave receiving;
[0023] Figure 7 This is the structure diagram of the slave sending and the host receiving;
[0024] Figure 8 It is a multi-machine communication structure diagram;
[0025] Fig. 9 It is the circuit diagram of the master and slave. DETAILED DESCRIPTION
[0026] In the traditional composite bus, the root of the background technology problem lies in the time-sharing transmission of power supply and data. The present invention can solve the root problem, and other specific problems will be solved. The method is as follows: when the host transmits data to the slave, a current loop is formed between the host and the slave, and the current provided by the host can provide power to the slave. The host sends data 0 and 1 by changing the size of the current on the current loop; when the slave transmits data to the host, a current loop is still formed between the host and the slave, and the host can still provide power to the slave. The slave sends data 0 and 1 by controlling the size of the current on the current loop. Through the above method of using a bidirectional current loop, the host can continuously supply power to the slave and bidirectional data transmission between the master and the slave is achieved. When changing the current size of the current loop to transmit data, because the power supply voltage remains unchanged, it is actually to transmit data by changing the power. In situations of strong electromagnetic interference, electromagnetic waves can induce very high voltages on an open-loop bus (for example, when a traditional composite bus uses voltage to transmit signals, the slave's receiving circuit is in a high-impedance input state), but it is difficult to induce large power on a closed-loop bus (such as a current loop). Therefore, the current loop communication method has strong anti-interference capabilities.
[0027] like Figure 1 As shown, the present invention discloses a communication device, including a host and a slave, wherein two wires are used to connect the host and the slave, wherein the host includes a first adjustment transistor, a first comparison amplification module, a first mode switching module, a first current modulation module, a first current measurement module, a first comparator and a first reference voltage module, and the slave includes a voltage divider, a second adjustment transistor, a second comparison amplification module, a second mode switching module, a second current modulation module, a second current measurement module, a second comparator and a second reference voltage module.
[0028] The host is powered by an external power supply, and the slave supplies power to the external load.
[0029] The base of the first adjustment transistor is connected to the first comparison amplifier module, the collector of the first adjustment transistor is connected to the power supply, and the emitter of the first adjustment transistor is connected to the first current measurement module; the power supply is connected to the first mode switching module, and the power supply is connected to the load through a wire; the first comparison amplifier module is respectively connected to the first mode switching module and the first current modulation module, the first mode switching module is connected to the first comparator, the first reference voltage module is connected between the first mode switching module and the first comparator, the first current measurement module is respectively connected to the first current modulation module and the first comparator, and the first current measurement module is connected to the second current measurement module through another wire.
[0030] The base of the second adjustment transistor is connected to the second comparison amplification module, the collector of the second adjustment transistor is connected to the load, the emitter of the second adjustment transistor is connected to the second current measurement module, and the load is connected to the second current measurement module; the second comparison amplification module is connected to the second mode switching module, the second mode switching module is connected to the second current modulation module, the second reference voltage module is respectively connected to the second comparison amplification module and the second comparator, the second current measurement module is respectively connected to the second current modulation module and the second comparator, one end of the voltage divider is connected to the second current measurement module, and the other end of the voltage divider is connected to the second mode switching module.
[0031] Both the master and slave contain three signals: receive, send and mode. The mode signal is used to switch between receive mode and send mode.
[0032] The first current measurement module and the second current measurement module measure the current of the current loop on the bus and output a voltage signal to indicate the magnitude of the current.
[0033] The first adjusting transistor and the second adjusting transistor are executive components for adjusting the current size of the current loop.
[0034] The first comparison and amplification module and the second comparison and amplification module compare the error signal of the current or voltage, and drive the transistor after amplification.
[0035] The first mode switching module and the second mode switching module are a two-or-one switch for switching between the sending mode and the receiving mode.
[0036] The first current modulation module and the second current modulation module are used to change the current size of the current loop to send 0 or 1 data.
[0037] The first comparator and the second comparator compare the magnitude of the current on the current loop to receive 0 or 1 data.
[0038] The first reference voltage module and the second reference voltage module provide reference voltages for the voltage stabilization circuit, the constant current source and the comparator.
[0039] Voltage divider: Modulate the voltage divider ratio to set the voltage regulation value.
[0040] The functional modules of the present invention can be combined in different modes to realize a controllable constant current source circuit and a voltage stabilizing circuit, which are respectively introduced below.
[0041] The controllable constant current source circuit of the host is as follows Figure 2 As shown, the first mode switching module connects the first reference voltage module to the first comparison amplification module, so Figure 2 The two modules are connected by wires. The first current measurement module, the first current modulation module, the first comparison amplifier module, and the first adjustment transistor are connected in series to form a closed loop. The first current measurement module detects the bus current and outputs a voltage signal, which is sent to the first comparison amplifier module through the first current modulation module and compared with the reference voltage. The comparison result (error signal) is amplified and then driven to drive the first adjustment transistor, so that the current finally reaches the set value. The bus current is changed by sending a signal to realize the controllable constant current source function. The output current I of the constant current source is determined by multiple parameters, namely the conversion coefficient K1 of the first current measurement module, the unit is V / A; the voltage transmission ratio K2 of the first current modulation module; the reference voltage V1. The formula is as follows:
[0042]
[0043] When V1 and K1 are fixed, K2 is changed by sending a signal, thereby changing the current and achieving current modulation.
[0044] When the first mode switching module connects the power supply voltage to the first comparison amplifier module, since the power supply voltage is much higher than the reference voltage, the first comparison amplifier circuit will output a large voltage to drive the first adjustment transistor to deep saturation, which is equivalent to a short circuit between the collector and the emitter of the first adjustment transistor, and the power supply voltage is fully added to the bus. Figure 3 shown.
[0045] The constant current source circuit in the slave is as follows Figure 4 As shown, the second mode switching module connects the second current modulation module and the second comparison amplification module, so Figure 4 The two modules are connected by wires. The second current measurement module, the second current modulation module, the second comparison amplification module, and the second adjustment transistor are connected in series to form a closed loop. The working principle is the same as that of the host constant current source, which will not be repeated here.
[0046] The voltage stabilization circuit in the slave is as follows Figure 5 The second mode switching module connects the voltage divider and the second comparison amplifier module, so Figure 5 The two modules are connected by wires. The voltage divider, the second comparison amplifier module, and the second adjustment transistor are connected in series to form a closed loop. The load voltage is sent to the second comparison amplifier module after passing through the voltage divider, and is compared with the reference voltage at the same time. The comparison result (error signal) is amplified and then drives the second adjustment transistor, and finally the load voltage reaches the set value. Assuming the reference voltage is V1 and the voltage division coefficient is K, the voltage regulation value is V=V1 / K.
[0047] The following is a detailed introduction to the two working modes: master sends and slave receives, and slave sends and master receives.
[0048] Master sends and slave receives mode:
[0049] In this mode, the host sends data and the slave receives data. To facilitate the description of the working principle, the simplified structure diagram is as follows Figure 6 In the host, multiple modules constitute Figure 2 In the slave, multiple modules constitute a controllable constant current source. Figure 4 The necessity of the voltage stabilization circuit is as follows: The control method of the constant current source is to increase the output voltage to increase the output current. If the load is a constant power device, the higher the supply voltage, the smaller the current, which is contrary to the control law of the constant current source. This will cause the constant current source control loop to enter a positive feedback state and be unable to adjust the output current. If the load voltage is stabilized by a voltage stabilizer, the constant current source can enter a normal negative feedback state and stabilize the output current. The second current measurement module measures the current loop current I, and outputs a voltage V2, which is compared with the reference voltage V1 through a second comparator, and the comparison result is used as a received signal.
[0050] When the circuit is working, the controllable constant current source of the host outputs current I, which generates voltage V3 through the voltage stabilizing circuit to provide a stable working voltage for the load. When sending data 0, the current loop current I is small, making V2 smaller than V1, and the comparison output data is 0; when sending data 1, the current loop current I is large, making V2 greater than V1, and the comparison output data is 1. During the data transmission process, the load always obtains a stable working voltage V3, thus realizing the simultaneous transmission of power and signal.
[0051] Slave sends and master receives mode:
[0052] In this mode, the slave sends data and the host receives data. The simplified structure diagram is as follows Figure 7 In the host, the first mode switching module connects the power supply voltage to the first comparison amplifier module, and the first adjustment transistor is equivalent to a short circuit, so Figure 7The first current measurement module measures the current loop current I1 and outputs a voltage V2, which is compared with the reference voltage V1 through a first comparator, and the comparison result is used as a receiving signal. In the slave, multiple modules constitute Figure 3 Because the load is connected in parallel at both ends of the adjustment transistor, the load does not affect the current control, so there is no need for a voltage stabilization circuit. When designing the circuit parameters, just ensure that the load voltage is not lower than the minimum operating voltage.
[0053] When the circuit is working, the constant current source controls the current loop current I, part of the current is supplied to the load, and part of the current passes through the transistor. When the slave sends data 0, the current loop current I is small, making V2 smaller than V1, and the comparison output data is 0; when sending data 1, the current loop current I is large, making V2 greater than V1, and the comparison output data is 1. During the data transmission process, the load always obtains the working voltage V3, thus realizing the simultaneous transmission of power and signal.
[0054] Multi-machine communication:
[0055] The bus of the present invention is also called a novel composite bus. When the novel composite bus is used for multi-machine communication, multiple buses are connected in series to the host to form a current loop. Figure 8 This is the connection of 4 slaves. When the system is working, the host outputs loop current, and the current generates a voltage drop on each slave, so they can all obtain the composite bus voltage from the current loop. When the host sends data, it first sends the slave number. After receiving the number, the slave compares it with its own number. If the number is consistent with its own, it sends data to the host, otherwise the slave does not respond to the host. In this way, communication between the host and multiple slaves is realized.
[0056] according to Figure 1 The overall structure diagram in the design of the specific circuit is as follows Fig. 9 shown.
[0057] In the host circuit part, the circuit structure of each functional module is as follows:
[0058] 1) The first current measurement module: The current measurement circuit is composed of resistors R1, R2, R3, R4, R5 and op amp U3, where R1 is a current sampling resistor, and R2-R5 and U3 form a classic differential amplifier circuit to amplify the voltage on R1. When R2 = R3, R4 = R5, the transmission coefficient K1 of the current measurement circuit is: K1 = R1R4 / R2.
[0059] 2) The first comparison amplification module: completed by operational amplifier U2.
[0060] 3) The first adjustment transistor: It is completed by NPN transistor Q1.
[0061] 4) The first mode switching module is implemented by a two-choice analog switch chip S1.
[0062] 5) The first comparator is completed by the operational amplifier U1.
[0063] 6) The first reference voltage module: provided by a voltage regulator diode or a reference voltage chip, Fig. 9 The reference voltage 1 is denoted as V1.
[0064] 7) The first current modulation module is composed of R6, R7, R8 and NPN transistor Q2.
[0065] When switch S1 connects the reference voltage 1 to the positive input of U2, a controllable constant current source circuit is formed. The output current of the constant current source is determined by the voltage transfer ratio K2 of the current modulation module. When Q2 is cut off, the value of K2 is:
[0066]
[0067] When Q2 is turned on and saturated, R7 and R8 form a parallel relationship, and the value of K2 is approximately:
[0068]
[0069] The output current of the constant current source is:
[0070]
[0071] In the slave circuit part, the circuit structure of each functional module is as follows:
[0072] 1) Second current measurement module: The current measurement circuit is composed of resistors R9, R10, R11, R12, R3 and op amp U4, where R9 is a current sampling resistor, and R10-R13 and U4 form a classic differential amplifier circuit to amplify the voltage on R9. When R10 = R11, R12 = R13, the transmission coefficient K1 of the current measurement circuit is: K1 = R9R 12 / R 10 .
[0073] 2) The second comparison amplifier module: completed by operational amplifier U5.
[0074] 3) The second adjustment transistor: It is completed by PNP transistor Q3.
[0075] 4) Second mode switching module: It is completed by the dual-channel two-to-one analog switch chip S2, which switches the feedback source and the polarity of the op amp input terminal.
[0076] 5) The second comparator is implemented by op amp U6.
[0077] 6) The second reference voltage module: provided by a voltage stabilizing diode or a reference voltage chip, is the reference voltage 2 in the figure, denoted as V2.
[0078] 7) The second current modulation module: consists of R16, R17, R18 and NPN transistor Q4.
[0079] 8) Voltage divider: composed of R14 and R15.
[0080] Switch S2 switches the transmission or reception mode, which actually switches the two working modes of constant current source and voltage regulator. When switch S2 connects the current modulation circuit to the positive input of U5 and connects the reference voltage 2 to the negative input, a controllable constant current source circuit is formed. The output current of the constant current source is determined by the voltage transfer ratio K2 of the current modulation module. When Q4 is turned off, the value of K2 is:
[0081]
[0082] When Q4 is turned on and saturated, R17 and R18 form a parallel relationship, and the value of K2 is:
[0083]
[0084] The output current of the constant current source is:
[0085]
[0086] When S2 connects the voltage divider to the inverting input of U5 and connects the reference voltage 2 to the non-inverting input, a voltage stabilization circuit is formed, and the voltage stabilization value V is:
[0087]
[0088] Advantages of the present invention:
[0089] (1) Strong power supply capability: Uninterruptible power supply is achieved in bus communication devices.
[0090] (2) High communication rate: The host does not occupy communication time while supplying power to the slave.
[0091] (3) Strong anti-interference ability: Using bidirectional current loop communication can effectively improve the anti-interference ability.
[0092] (4) The circuit is simple and low-cost: It is built using classic circuits such as constant current sources and voltage regulators, and uses common components such as operational amplifiers and transistors without the need for dedicated chips, so the circuit cost is low.
[0093] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A communication device, characterized in that: The invention comprises a host and a slave, wherein two wires are used to connect the host and the slave, wherein the host comprises a first adjustment transistor, a first comparison amplification module, a first mode switching module, a first current modulation module, a first current measurement module, a first comparator and a first reference voltage module, and the host is powered by an external power supply, and the slave comprises a voltage divider, a second adjustment transistor, a second comparison amplification module, a second mode switching module, a second current modulation module, a second current measurement module, a second comparator and a second reference voltage module, and the slave supplies power to an external load; The base of the first adjustment transistor is connected to the first comparison amplifier module, the collector of the first adjustment transistor is connected to the power supply, and the emitter of the first adjustment transistor is connected to the first current measurement module; the power supply is connected to the first mode switching module, and the power supply is connected to the load through a wire; the first comparison amplifier module is respectively connected to the first mode switching module and the first current modulation module, the first mode switching module is connected to the first comparator, the first reference voltage module is connected between the first mode switching module and the first comparator, the first current measurement module is respectively connected to the first current modulation module and the first comparator, and the first current measurement module is connected to the second current measurement module through another wire; The base of the second adjustment transistor is connected to the second comparison amplification module, the collector of the second adjustment transistor is connected to the load, the emitter of the second adjustment transistor is connected to the second current measurement module, and the load is connected to the second current measurement module; the second comparison amplification module is connected to the second mode switching module, the second mode switching module is connected to the second current modulation module, the second reference voltage module is respectively connected to the second comparison amplification module and the second comparator, the second current measurement module is respectively connected to the second current modulation module and the second comparator, one end of the voltage divider is connected to the second current measurement module, and the other end of the voltage divider is connected to the second mode switching module.
2. The communication device according to claim 1, characterized in that: The host includes a controllable constant current source. In the host, a first mode switching module connects the first reference voltage module to the first comparison and amplification module. The first current measurement module, the first current modulation module, the first comparison and amplification module, and the first adjustment transistor are connected in series to form a closed loop. The first current measurement module outputs a voltage signal after detecting the bus current, which is sent to the first comparison and amplification module through the first current modulation module and compared with the reference voltage. The comparison result is amplified and the first adjustment transistor is driven to finally make the current reach a set value. The bus current is changed by sending a signal to realize the controllable constant current source function.
3. The communication device according to claim 1, characterized in that: The slave includes a controllable constant current source. In the slave, a second mode switching module connects a second current modulation module and a second comparison amplification module. A second current measurement module, a second current modulation module, a second comparison amplification module, and a second adjustment transistor are connected in series to form a closed loop. The second current measurement module detects the bus current and outputs a voltage signal, which is sent to the second comparison amplification module through the second current modulation module and compared with a reference voltage. The comparison result is amplified and then the second adjustment transistor is driven, so that the current finally reaches a set value. The bus current is changed by sending a signal to realize the controllable constant current source function.
4. The communication device according to claim 2, characterized in that: The slave includes a voltage stabilizing circuit. In the slave, a second mode switching module connects a voltage divider and a second comparison and amplification module. The voltage divider, the second comparison and amplification module, and a second adjustment transistor are connected in series to form a closed loop. The load voltage is sent to the second comparison and amplification module after passing through the voltage divider, and is compared with a reference voltage at the same time. The comparison result is amplified and then drives the second adjustment transistor, so that the load voltage finally reaches a set value.
5. The communication device according to claim 4, characterized in that: The host sends data and the slave receives data. The second current measurement module measures the current loop current I and outputs a voltage V2, which is compared with the reference voltage V1 through the second comparator. The comparison result is used as a received signal. When working, the controllable constant current source of the host outputs a current I, which generates a voltage V3 through a voltage stabilizing circuit to provide a stable working voltage for the load. When sending data 0, V2 is less than V1, and the comparison outputs data 0; when sending data 1, V2 is greater than V1, and the comparison outputs data 1. During the data transmission process, the load always obtains a stable working voltage V3, realizing the simultaneous transmission of power and signal.
6. The communication device according to claim 3, characterized in that: The slave sends data, the host receives data, the first mode switching module connects the power supply voltage to the first comparison and amplification module, the first current measurement module measures the current loop current I, and outputs the voltage V2, which is compared with the reference voltage V1 through the first comparator, and the comparison result is used as the receiving signal; when the slave sends data 0, V2 is less than V1, and the comparison outputs data 0; when sending data 1, V2 is greater than V1, and the comparison outputs data 1; During data transmission, the load always obtains the operating voltage V3, thereby achieving simultaneous transmission of power and signal.
7. The communication device according to claim 1, characterized in that: There is one host and multiple slaves. One host is connected to multiple slaves. When working, the host outputs loop current, and the current produces a voltage drop on each slave. When the host sends data, it first sends the number of the slave. After receiving the number, the slave compares it with its own number. If the number is consistent with its own, it sends data to the host, otherwise the slave does not respond to the host. In this way, communication between the host and multiple slaves is achieved.
8. The communication device according to claim 1, characterized in that: The first adjustment transistor is an NPN transistor, and the first mode switching module is a one-to-two analog switch chip.
9. The communication device according to claim 1, characterized in that: The second adjustment transistor is a PNP transistor, and the second mode switching module is a dual-channel two-to-one analog switch chip.
10. A communication method, characterized in that: When the host transmits data to the slave, a current loop is formed between the host and the slave. The current provided by the host can provide power to the slave, and the host sends data by changing the size of the current on the current loop. When the slave transmits data to the host, a current loop is still formed between the host and the slave. The host can still provide power to the slave, and the slave sends data by controlling the size of the current on the current loop.