Communication circuit and printer communication system

By designing a communication circuit that integrates power supply and communication, the problem of complexity and high cost of master-slave communication in traditional technology is solved. The slave machine only needs two connecting lines to realize power supply and communication, which improves the efficiency of the system. Scalability.

CN116170244BActive Publication Date: 2025-01-21HANGZHOU CHIPJET TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211572042.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-08
Publication Date
2025-01-21
Estimated Expiration
2042-12-08

AI Technical Summary

Technical Problem

In traditional master-slave communication systems, when the host supplies power to the slave and sends communication signals, at least four contacts are required to connect four connection lines, resulting in complex circuits, high wiring difficulty, high maintenance costs, and limiting the use scenarios of slaves. and scalability.

Method used

A communication circuit is designed, which integrates power supply and communication into one connection line through the power supply control module, the first communication module and the switch module, so that the host can realize power supply and communication data transmission to the slave machine through one connection line.

Benefits of technology

It realizes that the slave machine only needs to connect two connection lines to receive power supply and communication signals from the host machine, which reduces circuit complexity and wiring difficulty, reduces maintenance costs, and improves the scalability of the slave machine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116170244B_ABST
    Figure CN116170244B_ABST
Patent Text Reader

Abstract

The present application relates to a communication circuit and a printer communication system. The communication circuit includes a power supply control module, a first communication module and a switch module, wherein the power supply control module and the first communication module are respectively connected to the host, wherein the power supply control module and the first communication module are also respectively connected to the switch module, the switch module is connected to the first port of the slave, and the second port of the slave is connected to the first DC power supply; the power supply control module is used to control the on and off of the switch module based on the first host signal output by the host, and to supply power to the slave when the switch module is turned on; the first communication module is used to generate a first communication signal based on the second host signal output by the host, and output the first communication signal to the slave when the switch module is turned on. The present application can receive the power supply of the host and the communication signal sent by the host when the slave is connected to two connecting lines, which reduces the complexity of the circuit and the difficulty of wiring, and further improves the scalability of the slave.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a communication circuit and a printer communication system. Background Art

[0002] With the development of communication technology, the communication technology of master and slave has been widely used in various industries and products, such as printer communication system, mobile charging communication system, etc. In traditional technology, data transmission between master and slave is usually carried out in a four-wire connection mode, including a power line, two data lines, and a ground line. During communication, the power line provides power, and the two data lines are used to provide communication clock and send and receive data respectively.

[0003] However, in traditional technology, when the host supplies power to the slave and sends communication signals, the slave needs at least four contacts connected to four connecting wires to receive power supply and communication signals sent by the host. On the one hand, the circuit is relatively complex, the wiring is difficult, and the maintenance or repair cost is high; on the other hand, the four connecting wires also limit the use scenarios of the slave, and it is difficult to expand. Summary of the invention

[0004] Based on this, it is necessary to provide a communication circuit and a printer communication system in which a slave can receive power supply from a host and a communication signal sent by the host through two connecting wires to address the above technical problems.

[0005] In a first aspect, the present application provides a communication circuit. The communication circuit comprises a power supply control module, a first communication module and a switch module, wherein the power supply control module and the first communication module are respectively connected to a host, wherein:

[0006] The power supply control module and the first communication module are also connected to the switch module respectively, the switch module is connected to the first port of the slave, and the second port of the slave is connected to the first DC power supply;

[0007] The power supply control module is used to control the on and off of the switch module based on the first host signal output by the host, and to supply power to the slave when the switch module is turned on;

[0008] The first communication module is used to generate a first communication signal based on a second host signal output by the host, and output the first communication signal to the slave when the switch module is turned on.

[0009] In one embodiment, the first communication module includes a first resistor, a second resistor, a third resistor, and a first transistor, wherein:

[0010] The collector of the first transistor is respectively connected to one end of the first resistor, one end of the second resistor, and the switch module, the base is respectively connected to the other end of the second resistor and one end of the third resistor, the emitter and the other end of the third resistor are respectively grounded, and the other end of the first resistor is connected to the first port of the host.

[0011] In one embodiment, the second host signal includes a first level signal that turns on the first transistor and a second level signal that turns off the first transistor, and the first communication module is used to generate the first communication signal based on the second host signal output by the host, including:

[0012] The first communication module generates the first communication signal according to the duration ratio of the first level signal and / or the duration ratio of the second level signal within a first preset time, and the first communication signal includes a digital signal.

[0013] In one embodiment, the power supply control module includes a fourth resistor, a fifth resistor, a sixth resistor, and a second transistor, wherein:

[0014] One end of the fourth resistor is respectively connected to the second port of the host and one end of the fifth resistor, the other end of the fifth resistor is grounded, the gate of the second transistor is connected to the other end of the fourth resistor, the source is grounded, the drain is connected to one end of the sixth resistor, and the other end of the sixth resistor is connected to the switch module.

[0015] In one embodiment, the switch module includes a seventh resistor, an eighth resistor, a third transistor, and a first DC power supply, wherein:

[0016] The collector of the third transistor is grounded, the base is respectively connected to one end of the seventh resistor and the power supply control module, the emitter is respectively connected to one end of the eighth resistor, the first port of the slave, and the first communication module, and the other end of the seventh resistor and the other end of the eighth resistor are respectively connected to the first DC power supply.

[0017] In one embodiment, the first host signal includes a third level signal for turning on the second transistor and a fourth level signal for turning off the second transistor, and the power supply control module is used to control the on and off of the switch module based on the first host signal output by the host, and supply power to the slave when the switch module is turned on, including:

[0018] The power supply control module controls the third transistor to be turned on when receiving the third level signal, or controls the third transistor to be turned off when receiving the fourth level signal;

[0019] When the third transistor is turned on, the switch module is controlled to be turned on to supply power to the slave device.

[0020] In one embodiment, the communication circuit further includes a second communication module, which is connected to the second port of the host and the second port of the slave respectively, and is used to generate a second communication signal based on the slave signal output by the slave and transmit it to the host.

[0021] In one embodiment, the second communication module includes a ninth resistor, a tenth resistor, an eleventh resistor, a twelfth resistor, a thirteenth resistor, a comparator, a first DC power supply and a second DC power supply, wherein:

[0022] One end of the tenth resistor is connected to the first DC power supply, and the other end is respectively connected to one end of the eleventh resistor and one end of the twelfth resistor, the other end of the eleventh resistor is grounded, the other end of the twelfth resistor is connected to the first input end of the comparator, the second input end of the comparator is respectively connected to one end of the ninth resistor and the second port of the slave, the other end of the ninth resistor is connected to the first DC power supply, the output end of the comparator is respectively connected to one end of the thirteenth resistor and the third port of the host, and the other end of the thirteenth resistor is connected to the second DC power supply.

[0023] In one embodiment, the slave signal includes a fifth level signal greater than a preset threshold and a sixth level signal less than a preset threshold, the preset threshold is a voltage value of the first DC power supply input to the first input terminal of the comparator after voltage division by the tenth resistor and the twelfth resistor, the fifth level signal is generated by the slave keeping power consumption unchanged, and the sixth level signal is generated by the slave increasing preset power consumption;

[0024] The generating a second communication signal based on the slave signal output by the slave and transmitting the second communication signal to the host comprises:

[0025] The second communication module generates the second communication signal according to the proportion of the fifth level signal duration and / or the proportion of the sixth level signal duration within the second preset time, and the second communication signal includes a digital signal.

[0026] In a second aspect, the present application further provides a printer communication system. The printer communication system comprises a host, a slave, a power module, and a communication circuit as described in any one of the first aspects, wherein the power module is connected to the host, the host is connected to the slave through the communication circuit, the host comprises a printer, and the slave comprises a consumable chip.

[0027] The above communication circuit and printer communication system integrate power supply and communication into one connection line through the first communication module, the power supply control module and the switch module, so that the host can power the slave and send communication data through one connection line. The communication circuit and printer communication system provided by the present application can realize receiving power supply from the host and communication signals sent by the host when the slave only needs to connect two connection lines. On the one hand, it reduces the complexity of the circuit and the difficulty of wiring, and also reduces the cost of inspection or maintenance; on the other hand, it enables the slave or communication system to be applied in more scenarios, and further improves the scalability of the slave.

[0028] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0030] Figure 1 It is a block diagram of the structure of the communication between the host and the slave in the traditional technology;

[0031] Figure 2 A block diagram of the master-slave communication structure in one embodiment;

[0032] Figure 3 A circuit diagram of a master-slave communication in one embodiment;

[0033] Figure 4 is a schematic diagram of a voltage difference between two ends of a slave in one embodiment;

[0034] Figure 5 A waveform diagram of a host sending data to a slave through a first communication module in an embodiment;

[0035] Figure 6 A block diagram of the master-slave communication structure in another embodiment;

[0036] Figure 7 A schematic diagram of a host sending data to a slave through a first communication module in an embodiment;

[0037] Figure 8 A schematic diagram of data communication between a master and a slave in one embodiment;

[0038] Fig. 9 A waveform diagram showing data fed back from a slave to a host via a second communication module in one embodiment;

[0039] Fig.10FIG. 4 is a structural block diagram of a printer communication system in one embodiment. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0041] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the", "these" and the like in this application do not represent quantitative restrictions, and they can be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether directly or indirectly. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. Usually, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0042] The terms "module", "unit", etc. used below are a combination of software and / or hardware that can implement a predetermined function. Although the devices described in the following embodiments are preferably implemented in hardware, the implementation of software, or a combination of software and hardware is also possible and conceivable.

[0043] With the development of communication technology, the communication technology of master and slave has been widely used in various industries and products, such as printer communication system, mobile charging communication system, etc. In traditional technology, such as Figure 1As shown, the master and slave machines usually transmit data in a four-wire connection, including a power line VCC, two data lines, and a ground line GND. During communication, the power line VCC provides power, and the two data lines CLK and DATA are used to provide the communication clock and send and receive data respectively. R1 and R2 are pull-up resistors. When the host and the slave do not communicate, CLK and DATA are both high level. However, in traditional technology, when the host supplies power to the slave and sends communication signals, the slave needs at least four contacts to connect four connecting lines to receive power from the host and the communication signals sent by the host. On the one hand, the circuit is more complex, the wiring is difficult, and the maintenance or repair cost is high; on the other hand, the four connecting lines also limit the use scenarios of the slave, and it is difficult to expand.

[0044] Based on this, an embodiment of the present application provides a communication circuit, such as Figure 2 As shown, it includes a power supply control module, a first communication module and a switch module, the power supply control module and the first communication module are respectively connected to the host, wherein the power supply control module and the first communication module are also respectively connected to the switch module, the switch module is connected to the first port of the slave, and the second port of the slave is connected to the first DC power supply; the power supply control module is used to control the on and off of the switch module based on the first host signal output by the host, and to power the slave when the switch module is turned on; the first communication module is used to generate a first communication signal based on the second host signal output by the host, and output the first communication signal to the slave when the switch module is turned on.

[0045] In an embodiment of the present application, the power supply control module receives a first host signal output by the host, and controls whether the switch module is turned on based on the first host signal, thereby controlling whether the host supplies power to the slave. In some embodiments, the switch module includes a first DC power supply connected to the first port of the slave, and the power supply control module and the switch module may include a switch element, such as a triode, a field effect tube, etc. When the first host signal output by the host meets the conduction condition of the switch element of the power supply control module, the power supply control module can change the potential at the connection with the switch module, thereby meeting the conduction condition of the switch module. For example, when the switch element of the power supply control module is a field effect tube and the switch element of the switch module is a PNP triode, when the first host signal meets the conduction threshold of the field effect tube, the conduction of the field effect tube can reduce the base potential of the PNP triode, thereby turning on the PNP triode. When the switch element of the power supply control module and the switch module are both turned on, a DC path of the first DC power supply-the switch element of the switch module-the switch element of the power supply control module-grounding can be formed, thereby lowering the potential of the switch module and the connection point of the slave. Since both ends of the slave are connected to the first DC power supply, the voltage difference across the slave is zero when the switch module is not turned on, and the host does not power the slave; when the potential of the connection point between the switch module and the slave is reduced, a voltage difference is generated across the slave, so that the host can power the slave.

[0046] In other embodiments, when the first host signal does not meet the conduction condition of the switch element of the power supply control module, the potential at the connection between the power supply control module and the switch module remains unchanged, and the switch module is not turned on, so the potential at the connection between the switch module and the slave remains unchanged. At this time, the voltage at both ends of the slave is the voltage of the first DC power supply, the voltage difference at both ends of the slave is zero, and the host does not power the slave. The first DC power supply described in the embodiment of the present application can be provided by a power conversion module connected to the host, such as a DC-DC (direct current power conversion) chip connected to the host, and the host DC power input is converted into a first DC power output. In other implementations, the first DC power supply can also be provided by an independent power supply module, which is not limited in this application.

[0047] In an embodiment of the present application, the first communication module receives the second host signal output by the host to generate the first communication signal, and outputs the first communication signal to the slave when the switch module is turned on. In some embodiments, the first communication module may include a switch element, such as a triode or a field effect tube, and may also include a comparator. When the second host signal output by the host meets the conduction condition of the switch element of the first communication module, a DC path of the first DC power supply-the switch unit of the switch module-the switch element of the first communication module-grounding can be formed, thereby changing the potential at the connection between the switch module and the slave; and when the second host signal output by the host does not meet the conduction condition of the switch element of the first communication module, the potential at the connection between the switch module and the slave is not affected by the first communication module. Based on this, the first communication module generates a first communication signal based on the proportion of the duration of the second host signal that meets and / or does not meet the conduction condition of the switch element of the first communication module received within a preset time period, and outputs the first communication signal to the slave when the switch module is turned on. For example, within the preset time of 10 μs, the proportion of the duration of the second host signal that meets the on-condition of the switch element of the first communication module is 60%, that is, the time duration is 6 μs, and the proportion of the duration of the second host signal that does not meet the on-condition of the switch element of the first communication module is 40%, that is, the time duration is 4 μs, then a digital signal with a value of 1 is generated as the first communication signal. It can be understood that if the proportion of the duration of the second host signal that meets the on-condition of the switch element of the first communication module is 40%, that is, the time duration is 4 μs, and the proportion of the duration of the second host signal that does not meet the on-condition of the switch element of the first communication module is 60%, that is, the time duration is 6 μs, then a digital signal with a value of 0 is generated as the first communication signal. In other embodiments, the first communication module may also generate the first communication signal based on the duration of the second host signal that meets and / or does not meet the conduction condition of the switch element of the first communication module. For example, when the duration of the second host signal that meets and does not meet the conduction condition of the switch element of the first communication module is 7μs and 3μs respectively, a digital signal with a value of 1 is generated as the first communication signal; when the duration of the second host signal that meets and does not meet the conduction condition of the switch element of the first communication module is 2μs and 8μs respectively, a digital signal with a value of 0 is generated as the first communication signal. The present application does not limit the specific method of generating the first communication signal.

[0048] The communication circuit provided in the present application can realize receiving power supply from the host and communication signals sent by the host when the slave only needs to connect two connecting lines. On the one hand, it reduces the complexity of the circuit and the difficulty of wiring, and also reduces the cost of inspection or maintenance; on the other hand, it enables the slave or communication system to be used in more scenarios, and further improves the scalability of the slave.

[0049] The following describes the possible circuit structures of each module and the corresponding functions it implements through specific embodiments.

[0050] In the present application embodiment, Figure 3 As shown, the power supply control module includes a fourth resistor R4, a fifth resistor R5, a sixth resistor R6, and a second transistor Q2, wherein one end of the fourth resistor R4 is respectively connected to the second port Singal2 of the host and one end of the fifth resistor R5, the other end of the fifth resistor R5 is grounded, the gate of the second transistor Q2 is connected to the other end of the fourth resistor R4, the source is grounded, the drain is connected to one end of the sixth resistor R6, and the other end of the sixth resistor R6 is connected to the switch module.

[0051] In some embodiments, the resistance of the fourth resistor R4 may be 9-11 kΩ, the resistance of the fifth resistor R5 may be 19-24 kΩ, the resistance of the sixth resistor R6 may be 0.9-1.1 kΩ, and the second transistor Q2 may include a field effect transistor, and in a specific embodiment, an N-channel enhancement type MOS field effect transistor may be selected. JP1 represents each port of the host, and the power supply control module receives the first host signal through the second port Singal2 of the host.

[0052] In the present application embodiment, Figure 3 As shown, the switch module includes a seventh resistor R7, an eighth resistor R8, a third transistor Q3, and a first DC power supply VCC, wherein the collector of the third transistor Q3 is grounded, the base is respectively connected to one end of the seventh resistor R7 and the power supply control module, the emitter is respectively connected to one end of the eighth resistor R8, the first port of the slave, and the first communication module, and the other end of the seventh resistor R7 and the other end of the eighth resistor R8 are respectively connected to the first DC power supply VCC.

[0053] In some embodiments, the resistance of the seventh resistor R7 can be 320-400Ω, the resistance of the eighth resistor R8 can be 420-520Ω, and the third transistor Q3 can include a PNP-type triode. The first DC power supply VCC can be provided by the output end of the power conversion module IC1, and IC1 is a DC-DC conversion chip. The input end of the power conversion module IC1 is connected to the DC power output end VCCA of the host, and VCCA can be 21-27V. The first DC power supply VCC output after conversion can be 4.8-5.8V.

[0054] In some embodiments, the communication circuit also includes a second filter capacitor C2, one end of which is respectively connected to the power supply control module and the switch module, and the other end is grounded. The switch module may also include a third filter capacitor C3 and a fourth filter capacitor C4, one end of the third filter capacitor C3 is respectively connected to the emitter of the third transistor Q3 and the first port of the slave, and the other end is respectively connected to the other end of the seventh resistor R7 and the first DC power supply VCC, and one end of the fourth filter capacitor C4 is respectively connected to the emitter of the third transistor Q3 and the first port of the slave, and the other end is grounded. In a specific embodiment, the second filter capacitor C2 can be 0.9~1.1μF, the third filter capacitor C3 can be 1.3~1.7nF, and the fourth filter capacitor C4 can be 610~750pF.

[0055] In an embodiment of the present application, the first host signal includes a third level signal that turns on the second transistor Q2 and a fourth level signal that turns off the second transistor Q2. The power supply control module is used to control the on and off of the switch module based on the first host signal output by the host, and supplying power to the slave when the switch module is turned on includes: the power supply control module controls the third transistor Q3 to be turned on when receiving the third level signal, or controls the third transistor Q3 to be turned off when receiving the fourth level signal; when the third transistor Q3 is turned on, controls the switch module to be turned on to supply power to the slave.

[0056] In the embodiment of the present application, the first host signal received by the power supply control module includes a third level signal for turning on the second transistor Q2 and a fourth level signal for turning off the second transistor Q2. The third level signal can be a high level signal. When the power supply control module receives the third level signal, the third level signal is not less than the turn-on threshold Vgs of the second transistor Q2, so that the second transistor Q2 is turned on. Since the source of the second transistor Q2 is grounded, a DC path of the first DC power supply VCC-the seventh resistor R7-the sixth resistor R6-the second transistor Q2-ground can be formed. When the path is formed, the potential at the connection between the power supply control module and the switch module is reduced, that is, the base voltage Vb of the third transistor Q3 is reduced, and the voltage difference Ube between the base voltage Vb and the emitter voltage Ve of the third transistor Q3 meets the conduction condition to turn on the third transistor Q3. When the third transistor Q3 is turned on, the potential of the emitter is also reduced, that is, the voltage Output1 of the first port of the slave is reduced, and the first port of the slave is connected to the first DC power supply, so the voltage difference between the two ends of the slave increases. At this time, the power supply control module controls the switch module to turn on and supply power to the slave. Figure 4As shown, the ordinate V represents the voltage difference between the second port voltage Output2 and the first port voltage Output1 of the slave, and the abscissa Time represents time. When the power supply control module controls the switch module to turn on to supply power to the slave, the voltage difference V increases from V1 to V2.

[0057] In a specific embodiment, when the second transistor Q2 is turned on, the base voltage Vb of the third transistor Q3 is reduced to 1.34V. When the third transistor Q3 is turned on, the emitter voltage Ve is the first DC voltage VCC divided by the sixth resistor R6 and the seventh resistor R7, minus the voltage difference Ube between the base voltage Vb and the emitter voltage Ve of the third transistor Q3. Ube is -0.7V. Therefore, the emitter voltage Ve of the third transistor Q3, that is, the first port voltage Output1 of the slave, is 2.04V. At this time, the voltage difference V2 between the second port voltage Output2 of the slave and the first port voltage Output1 is 3.26V.

[0058] In other embodiments, the fourth level signal may be a low level signal. When the power supply control module receives the fourth level signal, the fourth level signal is less than the conduction threshold Vgs of the second transistor Q2, so that the second transistor Q2 is turned off. At this time, since the switch module and the power supply module do not form a DC path, the base voltage of the third transistor Q3 is still the voltage of the first DC power supply, and the conduction condition of the third transistor Q3 is not met. Therefore, the power supply control module controls the third transistor Q3 to be turned off. Therefore, the voltage of the first port of the slave is still the first DC power supply VCC, and the voltage difference between the two ends of the slave is zero. Figure 4 As shown in V1, the power supply control module controls the switch module to disconnect and not supply power to the slave device.

[0059] In the present application embodiment, Figure 3 As shown, the first communication module includes a first resistor R1, a second resistor R2, a third resistor R3, and a first transistor Q1, wherein the collector of the first transistor Q1 is respectively connected to one end of the first resistor R1, one end of the second resistor R2, and the switch module, the base is respectively connected to the other end of the second resistor R2 and one end of the third resistor R3, the emitter and the other end of the third resistor R3 are respectively grounded, and the other end of the first resistor R1 is connected to the first port Singal1 of the host.

[0060] In some embodiments, the resistance of the first resistor R1 may be 730-900Ω, the resistance of the second resistor R2 may be 135-165Ω, the first resistor R1 and the second resistor R2 are used for current limiting, the resistance of the third resistor R3 may be 1-1.3kΩ, and the first transistor may include an NPN transistor. The first communication module receives the second host signal through the first port Singal1 of the host. In other embodiments, the first communication module may also include a first filter capacitor C1, one end of the first filter capacitor C1 is respectively connected to one end of the first resistor R1 and one end of the second resistor R2, and the other end of the first filter capacitor C1 is respectively connected to the collector of the first transistor Q1 and the switch module. The first filter capacitor C1 may be 1-1.4nF.

[0061] In an embodiment of the present application, the second host signal includes a first level signal that turns on the first transistor and a second level signal that turns off the first transistor, and the first communication module is used to generate a first communication signal based on the second host signal output by the host, including: the first communication module generates the first communication signal according to the proportion of the time occupied by the first level signal and / or the proportion of the time occupied by the second level signal within a first preset time, and the first communication signal includes a digital signal.

[0062] In an embodiment of the present application, when the power supply control module controls the switch module to supply power to the slave, the first communication module generates a first communication signal based on the second host signal output by the host to send data to the slave, and the second host signal includes a first level signal that turns on the first transistor and a second level signal that turns off the first transistor. In some embodiments, the first level signal can be a high level signal. When the first communication module receives the first level signal, the base voltage of the first transistor Q1 increases, and the first transistor Q1 is turned on when the turn-on condition is met. After the first transistor Q1 is turned on, the voltage Output1 of the first port of the slave is further reduced, that is, the voltage difference V at both ends of the slave is further increased, such as Figure 4 On the other hand, the second level signal can be a low level signal. When the first communication module receives the second level signal, the voltage increase of the first transistor Q1 is small or unchanged. When the conduction condition is not met, the first transistor Q1 is turned off. At this time, the voltage Output1 of the first port of the slave remains unchanged, that is, the voltage difference between the two ends of the slave is still Figure 4 Based on this, the first communication module can generate a corresponding first communication signal based on the first level signal and the second level signal of different lengths to send data to the slave.

[0063] In some embodiments, the first communication module may generate the first communication signal according to the time ratio of the first level signal and / or the time ratio of the second level signal within the first preset time, and the first communication signal may include a digital signal with a value of 1 or 0. If the time ratio of the first level signal is greater than the time ratio of the second level signal within the first preset time, the digital signal value corresponding to the first preset time is 1; conversely, if the time ratio of the second level signal is greater than the time ratio of the first level signal, the digital signal value corresponding to the first preset time is 0. For example, the first preset time is the time required for the host to send 1 bit of data to the slave, which can be 10μs, the first level signal duration is 6μs, the duration ratio is 60%, the second level signal duration is 4μs, the duration ratio is 40%, at this time, within the first preset time of 10μs, the first communication module generates a digital signal with a value of 1 as the first communication signal, and sends data 1 to the slave. On the other hand, if the duration of the first level signal is 4 μs, the duration ratio is 40%, and the duration of the second level signal is 6 μs, the duration ratio is 60%, the first communication module generates a digital signal with a value of 0 as the first communication signal, and sends data 0 to the slave. It can be understood that in other embodiments, the first communication module can also generate the first communication signal according to the duration ratio of the first level signal in the first preset time, or the duration ratio of the second level signal, such as within the first preset time of 10 μs, the duration of the first level signal is 6 μs, the duration ratio is 60%, and the second level signal is not sent. The first communication module generates a digital signal with a value of 1 as the first communication signal, and sends data 1 to the slave; within the first preset time of 10 μs, the duration of the first level signal is 4 μs, the duration ratio is 40%, and the second level signal is not sent. The first communication module generates a digital signal with a value of 0 as the first communication signal, and sends data 0 to the slave. This application does not limit the specific method for the first communication module to generate the first communication signal.

[0064] In a specific embodiment, the waveform diagram when the first communication module sends data 10100000000011 to the slave by receiving the host signal is as follows: Figure 5 shown.

[0065] In the present application embodiment, Figure 6 As shown, the communication circuit further includes a second communication module, which is connected to the second ports of the host and the slave respectively, and is used to generate a second communication signal based on the slave signal output by the slave and transmit it to the host.

[0066] In some embodiments of the present application, Figure 3As shown, the second communication module includes a ninth resistor R9, a tenth resistor R10, an eleventh resistor R11, a twelfth resistor R12, a thirteenth resistor R13, a comparator IC2, a first DC power supply VCC and a second DC power supply VCC1, wherein one end of the tenth resistor R10 is connected to the first DC power supply VCC, and the other end is respectively connected to one end of the eleventh resistor R11 and one end of the twelfth resistor R12, the other end of the eleventh resistor R11 is grounded, the other end of the twelfth resistor R12 is connected to the first input end of the comparator IC2, the second input end of the comparator IC2 is respectively connected to one end of the ninth resistor R9 and the second port of the slave, the other end of the ninth resistor R9 is connected to the first DC power supply VCC, the output end of the comparator IC2 is respectively connected to one end of the thirteenth resistor R13 and the third port Singal3 of the host, and the other end of the thirteenth resistor R13 is connected to the second DC power supply VCC1.

[0067] In some embodiments, the slave signal includes a fifth level signal greater than a preset threshold and a sixth level signal less than a preset threshold, the preset threshold being the voltage value of the first DC power supply VCC input to the first input terminal of the comparator IC2 after being divided by the tenth resistor R10 and the twelfth resistor R12, the fifth level signal is generated by the slave keeping the power consumption unchanged, and the sixth level signal is generated by the slave increasing the preset power consumption; the generating of the second communication signal based on the slave signal output by the slave and transmitting it to the host includes: the second communication module generates the second communication signal according to the proportion of the duration of the fifth level signal and / or the proportion of the duration of the sixth level signal within the second preset time, and the second communication signal may include a digital signal with a value of 1 or 0.

[0068] In some embodiments, the resistance of the ninth resistor R9 can be 35-43Ω, the resistance of the tenth resistor R10 can be 4.2-5.2kΩ, the resistance of the eleventh resistor can be 24-30kΩ, the resistance of the twelfth resistor can be 0.9-1.1kΩ, and the resistance of the thirteenth resistor as a pull-up resistor can be 0.9-1.1kΩ. The comparator IC2 also includes a power supply terminal and a ground terminal, the power supply terminal is connected to the first DC power supply, and the ground terminal is grounded. The first DC power supply VCC can be provided by the power conversion module IC1, and the second DC power supply VCC1 can be provided by the host. In other embodiments, the second communication module may also include a fifth filter capacitor C5, one end of the fifth filter capacitor C5 is respectively connected to the second input terminal of the comparator IC2, one end of the ninth resistor R9, and the second port of the slave, and the other end is grounded. The first DC power supply VCC and the second DC power supply VCC1 described in the embodiment of the present application can be output by the power conversion module, or provided by an independent power supply, and the present application does not limit this.

[0069] In the embodiment of the present application, if the data received by the slave is 0101, Figure 7 As shown, the data sent by the first communication module to the slave in the time period from t1 to t2 is 0, the data sent by the first communication module to the slave in the time period from t2 to t3 is 1, the data sent by the first communication module to the slave in the time period from t3 to t4 is 0, and the data sent by the first communication module to the slave in the time period from t4 to t5 is 1. At t5, the first communication module completes sending data to the slave, and at this time, the host continues to send data 1 for four time periods to the slave through the first communication module to receive the signal fed back by the slave. In some embodiments, the communication between the host and the slave can be implemented based on a communication protocol, so that the slave can know the time or data position when the host finishes sending communication data. For example, data can be transmitted based on a communication protocol such as fixed beginning-data length-data-check data.

[0070] In the embodiment of the present application, the voltage V- at the first input terminal of the comparator IC2 is the voltage value of the first DC power source VCC after being divided by the tenth resistor R10 and the twelfth resistor R12. V- can be obtained by formula (1):

[0071] V-=VCC*R11 / (R11+R10) (1)

[0072] The slave signal includes a fifth level signal greater than a preset threshold and a sixth level signal less than a preset threshold, and V- is used as a preset threshold. If the second communication module receives the fifth level signal fed back by the slave, the comparator IC2 compares the fifth level signal to be greater than the preset threshold, and the comparator IC2 generates a digital signal with a value of 1 as the second communication signal, and sends data 1 to the host; if the second communication module receives the sixth level signal fed back by the slave, the comparator IC2 compares the sixth level signal to be less than the preset threshold, and the comparator IC2 generates a digital signal with a value of 0 as the second communication signal, and sends data 0 to the host. Wherein, when the slave keeps the power consumption unchanged, the voltage of the second port of the slave can be made the first DC power supply voltage VCC, which is input to the comparator IC2 as the fifth level signal; when the slave increases the preset power consumption, the voltage of the second port of the slave can be reduced to below the preset threshold, which is input to the comparator IC2 as the sixth level signal. In some embodiments, the slave can increase its own power consumption by making a feedback module (feedback module) work.

[0073] In one embodiment, Figure 8 As shown, after the host sends data 0101 to the slave through the first communication module, the slave can reduce the voltage of the second port of the slave by increasing the preset power consumption in the time period t5-t6, thereby reducing the voltage difference between the two ends of the slave to V4 to feedback data 0. Figure 8V5 in the figure is the voltage difference between the preset threshold V- and the first port of the slave. During the time period t6-t7, the slave can maintain the voltage difference between the two ends of the slave at V3 by keeping the original power consumption unchanged to feedback data 1. Figure 8 As shown in FIG. 1 , after receiving data at time t5, the slave device continues to receive and feedback data of 0100. In another embodiment, as shown in FIG. Fig. 9 As shown, the host can receive the data fed back by the slave by reading the output value of the comparator IC2 at the falling edge of the first port Singal1. After the slave consumable chip SIN increases its power consumption, the waveform to ground is displayed as a low level. When the waveform to ground of the slave consumable chip SIN is low, the voltage waveform output by the comparator IC2 to ground is also low. By reading the voltage waveform output by the comparator IC2 to ground at the falling edge of the first port Singal1 of the host, it can be seen that Fig. 9 The data fed back from the slave to the master is shown as 0100.

[0074] In the embodiment of the present application, the first port of the slave is a GND (ground) port and / or a data receiving port, and the second port is a SIN (communication) port. On the one hand, the embodiment of the present application enables the host to send data to the slave by changing the voltage of the first port of the slave, and whether the host sends data to the slave or not does not affect the host's power supply to the slave; on the other hand, the slave feeds back data to the host by changing the voltage of the second port, that is, the slave feeds back data by keeping the power consumption unchanged and / or increasing its own power consumption, making the way of feeding back data from the slave more simple and easy to control, and improving the efficiency of data communication between the master and the slave.

[0075] Based on the same inventive concept, the embodiment of the present application also provides a printer communication system for implementing the communication circuit involved above, such as Fig.10 As shown, the printer communication system includes a host, a slave, a power module and a communication circuit as described in any of the above embodiments, wherein the power module is connected to the host, the host is connected to the slave through the communication circuit, the host includes a printer, and the slave includes a consumable chip.

[0076] Each module in the above communication circuit and printer communication system can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0077] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0078] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0079] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0080] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A communication circuit, characterized in that: It includes a power supply control module, a first communication module and a switch module, wherein the power supply control module and the first communication module are connected to the host respectively, wherein: The power supply control module and the first communication module are also connected to the switch module respectively, the switch module is connected to the first port of the slave, and the second port of the slave is connected to the first DC power supply; The power supply control module is used to control the on and off of the switch module based on the first host signal output by the host, and to supply power to the slave when the switch module is turned on; The first communication module is used to generate a first communication signal based on the second host signal output by the host, and output the first communication signal to the slave when the switch module is turned on; When the switch module is turned on, the voltage of the first port decreases, and the voltage difference between the first port and the second port increases; The power supply control module includes a fourth resistor, a fifth resistor, a sixth resistor, and a second transistor, wherein: One end of the fourth resistor is respectively connected to the second port of the host and one end of the fifth resistor, the other end of the fifth resistor is grounded, the gate of the second transistor is connected to the other end of the fourth resistor, the source is grounded, the drain is connected to one end of the sixth resistor, and the other end of the sixth resistor is connected to the switch module.

2. The communication circuit according to claim 1, characterized in that: The first communication module includes a first resistor, a second resistor, a third resistor, and a first transistor, wherein: The collector of the first transistor is respectively connected to one end of the first resistor, one end of the second resistor, and the switch module, the base is respectively connected to the other end of the second resistor and one end of the third resistor, the emitter and the other end of the third resistor are respectively grounded, and the other end of the first resistor is connected to the first port of the host.

3. The communication circuit according to claim 2, characterized in that: The second host signal includes a first level signal that turns on the first transistor and a second level signal that turns off the first transistor, and the first communication module is used to generate a first communication signal based on the second host signal output by the host, including: The first communication module generates the first communication signal according to the duration ratio of the first level signal and / or the duration ratio of the second level signal within a first preset time, and the first communication signal includes a digital signal.

4. The communication circuit according to claim 1, characterized in that: The switch module includes a seventh resistor, an eighth resistor, a third transistor, and a first DC power supply, wherein: The collector of the third transistor is grounded, the base is respectively connected to one end of the seventh resistor and the power supply control module, the emitter is respectively connected to one end of the eighth resistor, the first port of the slave, and the first communication module, and the other end of the seventh resistor and the other end of the eighth resistor are respectively connected to the first DC power supply.

5. The communication circuit according to claim 4, characterized in that: The first host signal includes a third level signal for turning on the second transistor and a fourth level signal for turning off the second transistor, and the power supply control module is used to control the on and off of the switch module based on the first host signal output by the host, and supply power to the slave when the switch module is turned on, including: The power supply control module controls the third transistor to be turned on when receiving the third level signal, or controls the third transistor to be turned off when receiving the fourth level signal; When the third transistor is turned on, the switch module is controlled to be turned on to supply power to the slave device.

6. The communication circuit according to any one of claims 1 to 5, characterized in that: The communication circuit further includes a second communication module, which is connected to the second ports of the host and the slave respectively, and is used to generate a second communication signal based on the slave signal output by the slave and transmit the second communication signal to the host.

7. The communication circuit according to claim 6, characterized in that: The second communication module includes a ninth resistor, a tenth resistor, an eleventh resistor, a twelfth resistor, a thirteenth resistor, a comparator, a first DC power supply and a second DC power supply, wherein: One end of the tenth resistor is connected to the first DC power supply, and the other end is respectively connected to one end of the eleventh resistor and one end of the twelfth resistor, the other end of the eleventh resistor is grounded, the other end of the twelfth resistor is connected to the first input end of the comparator, the second input end of the comparator is respectively connected to one end of the ninth resistor and the second port of the slave, the other end of the ninth resistor is connected to the first DC power supply, the output end of the comparator is respectively connected to one end of the thirteenth resistor and the third port of the host, and the other end of the thirteenth resistor is connected to the second DC power supply.

8. The communication circuit according to claim 7, characterized in that: The slave signal includes a fifth level signal greater than a preset threshold and a sixth level signal less than a preset threshold, the preset threshold is a voltage value of the first DC power supply input to the first input terminal of the comparator after voltage division by the tenth resistor and the twelfth resistor, the fifth level signal is generated by the slave keeping the power consumption unchanged, and the sixth level signal is generated by the slave increasing the preset power consumption; The generating a second communication signal based on the slave signal output by the slave and transmitting the second communication signal to the host comprises: The second communication module generates the second communication signal according to the proportion of the fifth level signal duration and / or the proportion of the sixth level signal duration within the second preset time, and the second communication signal includes a digital signal.

9. A printer communication system, characterized in that: It includes a host, a slave, a power module and a communication circuit as described in any one of claims 1 to 8, wherein the power module is connected to the host, the host is connected to the slave through the communication circuit, the host includes a printer, and the slave includes a consumable chip.

Citation Information

Patent Citations

  • Two-wire communication circuit and electronic equipment

    CN216981916U