Protocol conversion circuit and system for USB and infrared communication of electric energy terminal equipment
By designing a protocol conversion circuit for USB and infrared communication in a power terminal device, and utilizing the cooperation of the USB interface module, the main control module, and the infrared transceiver module, the one-way communication problem between the USB device and the infrared device was solved, achieving bidirectional communication and protocol compatibility, and improving communication efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2026-03-24
AI Technical Summary
One-way communication between USB devices and infrared devices results in a 40%-60% decrease in communication efficiency, and the poor protocol compatibility of the converter affects the integrity and accuracy of the communication data.
Design a protocol conversion circuit for USB and infrared communication in a power terminal device, including a USB interface module, a main control module, and an infrared transceiver module. The circuit achieves bidirectional communication through the cooperation between the modules and is compatible with multiple communication protocols.
It enables bidirectional communication between USB devices and infrared devices, improving communication efficiency and enhancing the integrity and accuracy of data transmission.
Smart Images

Figure CN224035890U_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication circuit, more particularly, to a protocol conversion circuit and system for USB and infrared communication of electric energy terminal device. BACKGROUND
[0002] The communication between the USB (Universal Serial Bus) device and the infrared device is usually one-way communication. Due to the one-way communication between the USB device and the infrared device, the interaction efficiency between the USB device and the infrared device is reduced by 40%-60%.
[0003] In the related art, a converter is further provided between the USB device and the infrared device. Due to poor protocol compatibility of the converter, the protocol mismatching easily occurs, so that the converter cannot work normally, thereby affecting the communication between the USB device and the infrared device, and further affecting the communication efficiency between the USB device and the infrared device. CONTENT OF THE UTILITY MODEL
[0004] In view of the above problems, the present application provides a protocol conversion circuit and system for USB and infrared communication of electric energy terminal device, which can realize the bidirectional communication between the USB device and the infrared device, and compatible with multiple communication protocols, thereby improving the communication efficiency between the USB device and the infrared device.
[0005] In a first aspect, the present application provides a protocol conversion circuit for USB and infrared communication of electric energy terminal device, comprising: a USB interface module, a master control module and an infrared transceiver module, the master control module is connected with the USB interface module and the infrared transceiver module, wherein: the USB interface module is used for converting USB data into serial port data when receiving the USB data sent from an external USB device, and converting serial port data into USB data when receiving the serial port data sent by the master control module, so as to send the USB data to the external USB device; the master control module is used for converting the serial port data into infrared data when receiving the serial port data sent by the USB interface module, and sending the infrared data to the infrared device through the infrared transceiver module; the master control module is further used for converting the infrared data into serial port data when receiving the infrared data sent by the infrared transceiver module, and transmitting the serial port data to the USB interface module.
[0006] In a second aspect, the application further provides a protocol conversion system for USB and infrared communication of an electric energy terminal device, which comprises an external USB device, an infrared device and the protocol conversion circuit for USB and infrared communication of the electric energy terminal device as described above, and the protocol conversion circuit for USB and infrared communication of the electric energy terminal device is connected with the external USB device and the infrared device respectively, wherein the external USB device is configured to send USB data to the protocol conversion circuit for USB and infrared communication of the electric energy terminal device and receive USB data sent by the protocol conversion circuit for USB and infrared communication of the electric energy terminal device; and the infrared device is configured to send infrared data to the protocol conversion circuit for USB and infrared communication of the electric energy terminal device and receive infrared data sent by the protocol conversion circuit for USB and infrared communication of the electric energy terminal device.
[0007] The protocol conversion circuit for USB and infrared communication of the electric energy terminal device comprises a USB interface module, a master control module and an infrared transceiver module, and the master control module is connected with the USB interface module and the infrared transceiver module respectively, wherein the USB interface module is configured to convert USB data into serial port data when receiving the USB data sent by the external USB device and convert serial port data into USB data when receiving the serial port data sent by the master control module, so as to send the USB data to the external USB device; the master control module is configured to convert serial port data into infrared data when receiving the serial port data sent by the USB interface module and send the infrared data to the infrared device through the infrared transceiver module; and the master control module is further configured to convert infrared data into serial port data when receiving the infrared data sent by the infrared transceiver module and transmit the serial port data to the USB interface module. Thus, when the USB interface module receives the USB data sent by the external USB device, the USB interface module and the master control module cooperate with each other to convert the USB data into serial port data and convert the serial port data into infrared data readable by the infrared device; and when the infrared transceiver module receives the infrared data sent by the infrared device, the USB interface module and the master control module cooperate with each other to convert the infrared data into corresponding serial port data and convert the serial port data into USB data readable by the external USB device. Thus, bidirectional communication between the USB device and the infrared device is realized, and the protocol conversion circuit for USB and infrared communication of the electric energy terminal device can be compatible with more communication protocols, thereby improving the communication efficiency between the USB device and the infrared device. BRIEF DESCRIPTION OF DRAWINGS
[0008] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments description will be briefly introduced. Obviously, the drawings in the following description only represent some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments and drawings obtained by those skilled in the art without creative labor fall within the scope of the present application.
[0009] Figure 1 is a structural schematic diagram of a protocol conversion circuit for USB and infrared communication of an electric energy terminal device provided by the embodiments of the present application.
[0010] Figure 2 is a structural schematic diagram of another protocol conversion circuit for USB and infrared communication of an electric energy terminal device provided by the embodiments of the present application.
[0011] Figure 3 is a structural schematic diagram of still another protocol conversion circuit for USB and infrared communication of an electric energy terminal device provided by the embodiments of the present application.
[0012] Figure 4 is a structural schematic diagram of yet another protocol conversion circuit for USB and infrared communication of an electric energy terminal device provided by the embodiments of the present application.
[0013] Figure 5 is a structural schematic diagram of still another protocol conversion circuit for USB and infrared communication of an electric energy terminal device provided by the embodiments of the present application.
[0014] Figure 6 is a structural schematic diagram of yet another protocol conversion circuit for USB and infrared communication of an electric energy terminal device provided by the embodiments of the present application.
[0015] Figure 7 is a structural schematic diagram of still another protocol conversion circuit for USB and infrared communication of an electric energy terminal device provided by the embodiments of the present application.
[0016] Figure 8 is a structural schematic diagram of a protocol conversion system for USB and infrared communication of an electric energy terminal device provided by the embodiments of the present application. DETAILED DESCRIPTION
[0017] In order to make the purpose, technical solutions and advantages of the present application more clear, the present application will be further described in detail below with reference to the drawings, and the described embodiments should not be regarded as limiting the present application. All other embodiments obtained by those skilled in the art without creative labor fall within the scope of the present application.
[0018] In the following description, "some embodiments" are described with reference to a subset of possible embodiments, but it is understood that "some embodiments" can be a same subset or different subset of all possible embodiments, and can be combined with each other, if not in conflict.
[0019] In the following description, the term "first\second" is merely to distinguish similar objects, and does not represent a specific order of the objects. It can be understood that "first\second" can be interchanged in a specific order or sequence as allowed, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the application only, and is not intended to be limiting of the application.
[0021] The communication between the USB (Universal Serial Bus) device and the infrared device is usually one-way communication. In the related art, a converter (for example, a USB-to-infrared transmitter) is usually added between the USB device and the infrared device to realize the communication between the USB device and the infrared device. However, due to the one-way transmission function of the converter, the communication data can only be transmitted from the USB device to the infrared device, or the communication data can only be transmitted from the infrared device to the USB device, and it is impossible to realize that the communication data can be transmitted from the USB device to the infrared device and from the infrared device to the USB device.
[0022] Due to the one-way communication between the USB device and the infrared device, the exchange and interaction of the communication data between the USB device and the infrared device is reduced by 40%-60% in efficiency. And due to the poor protocol compatibility of the converter, protocol mismatching easily occurs, and the converter cannot work normally, thereby affecting the integrity and accuracy of the communication data and the communication efficiency between the USB device and the infrared device.
[0023] In order to improve the above problems, the application provides a protocol conversion circuit and system for USB and infrared communication of an electric energy terminal device. The protocol conversion circuit for USB and infrared communication of the electric energy terminal device comprises a USB interface module, a master control module and an infrared transceiver module, the master control module is connected with the USB interface module and the infrared transceiver module respectively, wherein: the USB interface module is used for converting USB data into serial port data when receiving the USB data sent from an external USB device, and converting serial port data into USB data when receiving the serial port data sent by the master control module, so as to send the USB data to the external USB device; the master control module is used for converting the serial port data into infrared data when receiving the serial port data sent from the USB interface module, and sending the infrared data to an infrared device through the infrared transceiver module; the master control module is also used for converting the infrared data into serial port data when receiving the infrared data sent from the infrared transceiver module, and transmitting the serial port data to the USB interface module.
[0024] Therefore, when the USB interface module receives the USB data sent from the external USB device, the USB interface module and the master control module cooperate with each other to convert the USB data into corresponding serial port data, and convert the serial port data into infrared data which can be read by the infrared device; when the infrared transceiver module receives the infrared data sent from the infrared device, the USB interface module and the master control module cooperate with each other to convert the infrared data into corresponding serial port data, and convert the serial port data into USB data which can be read by the external USB device. Thus, the bidirectional communication between the USB device and the infrared device is realized, and the protocol conversion circuit for USB and infrared communication of the electric energy terminal device can be compatible with more communication protocols, thereby improving the communication efficiency between the USB device and the infrared device.
[0025] The technical solutions in the embodiments of the application will be clearly and completely described below with reference to the drawings in the embodiments of the application.
[0026] Please refer to Figure 1 , Figure 1 It is a structure schematic diagram of the protocol conversion circuit for USB and infrared communication of the electric energy terminal device provided by the embodiments of the application. As shown in Figure 1 , Figure 1 The protocol conversion circuit 100 in the embodiments of the application comprises a USB interface module 110, a master control module 120 and an infrared transceiver module 130, the master control module 120 is connected with the USB interface module 110 and the infrared transceiver module 130 respectively.
[0027] The USB interface module 110 is configured to convert the USB data into serial port data when receiving the USB data sent by the external USB device, and convert the serial port data into the USB data when receiving the serial port data sent by the master control module 120, so as to send the USB data to the external USB device.
[0028] The master control module 120 is configured to convert the serial port data into infrared data when receiving the serial port data sent by the USB interface module 110, and send the infrared data to the infrared device through the infrared transceiver module 130.
[0029] The master control module 120 is further configured to convert the infrared data into serial port data when receiving the infrared data sent by the infrared transceiver module 130, and transmit the serial port data to the USB interface module 110.
[0030] That is, when the USB interface module 110 receives the USB data sent by the external USB device, the USB interface module 110 converts the USB data into corresponding serial port data and sends the serial port data to the master control module 120; the master control module 120 converts the serial port data into infrared data readable by the infrared device, and then sends the infrared data to the infrared device through the infrared transceiver module 130, so as to realize the communication loop from the external USB device to the infrared device.
[0031] When the infrared transceiver module 130 receives the infrared data sent by the infrared device, the infrared transceiver module 130 transmits the infrared data to the master control module 120, the master control module 120 converts the infrared data into corresponding serial port data and sends the serial port data to the USB interface module 110, and the USB interface module 110 converts the serial port data into USB data readable by the external USB device, so as to realize the communication loop from the infrared device to the external USB device.
[0032] Therefore, through the mutual cooperation among the USB interface module 110, the master control module 120 and the infrared transceiver module 130, the bidirectional communication between the USB device and the infrared device is realized, and the protocol conversion circuit of the power terminal device USB and infrared communication can be compatible with more communication protocols, thereby improving the communication efficiency between the USB device and the infrared device.
[0033] In some embodiments, the external USB device can include a computer, a mouse, a keyboard, a computer storage device, a camera and the like. It can be understood that the specific device of the external USB device is not limited in the present application.
[0034] In some embodiments, the USB data is a data packet transmitted by the USB interface module 110 according to a corresponding protocol. The data packet can include corresponding data for controlling the working state of the infrared device. That is, the USB interface module 110 actually decodes the data packet corresponding to the USB data sent by the infrared device, and then encodes the decoded data according to a data form recognizable by the host module 120 and the like to form serial port data. Alternatively, the USB interface module 110 decodes the serial port data sent by the host module 120, and then compiles the decoded data into USB data readable by the external USB device.
[0035] In some embodiments, the infrared data is information required for the working of the infrared device. When the infrared device receives the infrared data, the infrared device can perform a corresponding operation according to the infrared data. The infrared data can also be information required for the working of the external USB device. When the external USB device receives USB data corresponding to the infrared data, the external USB device can perform a corresponding operation according to the USB data corresponding to the infrared data.
[0036] Therefore, the USB interface module 110 realizes mutual cooperation with the host module 120 and the infrared transceiver module 130 by converting the USB data into serial port data and converting the serial port data into USB data, thereby realizing bidirectional communication between the USB device and the infrared device. Specifically, in some embodiments, please refer to Figure 2 , Figure 2 is another structure diagram of a protocol conversion circuit for USB and infrared communication of an electric energy terminal device provided by an embodiment of the present application. As shown in Figure 2 , Figure 2 The USB interface module 110 in the structure diagram includes a USB interface 111 and a USB processing unit 112, the USB interface 111 is connected with the USB processing unit 112, and the USB processing unit 112 is further connected with the host module 120.
[0037] The USB interface 111 is configured to transmit the USB data transmitted from the external USB device to the USB processing unit 112, and the USB processing unit 112 is configured to convert the USB data transmitted from the USB interface 111 into serial port data and transmit the serial port data to the host module 120.
[0038] The USB processing unit 112 is further configured to convert the serial port data transmitted from the host module 120 into USB data and transmit the USB data to the USB interface 111, and the USB interface 111 is further configured to transmit the USB data transmitted from the USB processing unit 112 to the external USB device.
[0039] That is, in the one-way communication loop from the external USB device to the infrared device, the USB data sent by the external USB device is received by the USB interface 111, and then transmitted to the USB processing unit 112 by the external USB device, and the USB processing unit 112 converts the USB data into corresponding serial port data, and then transmits the serial port data to the host module 120 by the USB processing unit 112, and then cooperates between the host module 120 and the infrared transceiver module 130 to transmit the corresponding information in the USB data to the infrared device.
[0040] And in the one-way communication loop from the infrared device to the external USB device, the infrared data sent by the infrared device is converted into the corresponding serial port data of the USB interface 111 by cooperating between the host module 120 and the infrared transceiver module 130, and then the serial port data is transmitted to the USB processing unit 112 by the host module 120, and then the USB processing unit 112 converts the serial port data into USB data that can be read by the external USB device, and then the USB data is transmitted to the USB interface 111 by the USB processing unit 112, and then the USB data is transmitted to the external USB device by the USB interface 111.
[0041] Specifically, in a specific embodiment, please refer to Figure 3 , Figure 3 is another protocol conversion circuit structure diagram for USB and infrared communication of the power terminal device provided by the embodiment of the application. As shown in Figure 3 , Figure 3 , the USB interface 111 in the embodiment includes a connector U1, a first resistor R1 and a second resistor R2.
[0042] The first end of the connector U1 is connected with the first end of the first resistor R1, and the second end of the first resistor R1 is connected with the first end of the USB processing unit; the second end of the connector U1 is connected with the first end of the second resistor R2, and the second end of the second resistor R2 is connected with the second end of the USB processing unit; the third end of the connector U1 is connected with the power module; and the fourth end of the connector U1 is connected with the ground end.
[0043] In some embodiments, the specific model of the connector U1 can be USB 250708. It can be understood that the application does not limit the specific model of the connector U1, and the specific model of the connector U1 can be flexibly set according to the actual situation.
[0044] The first end of the connector U1 can be the pin D+ of the connector U1, the second end of the connector U1 can be the pin D- of the connector U1, the third end of the connector U1 can be the pin VCC of the connector U1, and the fourth end of the connector U1 can be the pin GND of the connector U1.
[0045] The pin VCC of the connector U1 can be connected with a power module to obtain a working voltage, so as to ensure that the connector U1 can obtain the USB data sent by an external USB device. In a specific embodiment, the power module can provide a 5V working voltage for the connector U1.
[0046] The first resistor R1 and the second resistor R2 serve to limit the current, so as to ensure that the connector U1 and the USB processing unit 112 can work normally.
[0047] In a specific embodiment, please refer to Figure 3 The USB processing unit 112 includes a USB processing chip U2, a first end of the USB processing chip U2 is connected with a first end of the first resistor R1; a second end of the USB processing chip U2 is connected with a second end of the second resistor R2; a third end of the USB processing chip U2 is connected with a first end of the main control module 120; and a fourth end of the USB processing chip U2 is connected with a second end of the main control module 120.
[0048] In some embodiments, the model of the USB processing chip U2 can be CP2104. It can be understood that the specific model of the USB processing chip U2 is not limited in the present application. Other models of chips can be flexibly used as the USB processing chip U2 according to actual conditions.
[0049] The first end of the USB processing chip U1 can be a pin D+ of the USB processing chip U2, the second end of the USB processing chip U2 can be a pin D- of the USB processing chip U2, the third end of the USB processing chip U2 can be a pin TXD of the USB processing chip U2, and the fourth end of the USB processing chip U2 can be a pin RXD of the USB processing chip U2. The USB processing chip U2 transmits serial port data to the main control module 120 through the pin TXD, and the USB processing chip receives serial port data sent by the main control module 120 through the pin RXD.
[0050] In order to further protect the communication between the USB processing chip U2 and the main control module 120, the third end of the USB processing chip U2 is further connected with an eighth resistor R8, and the fourth end of the USB processing chip U2 is further connected with a ninth resistor R9. That is, the eighth resistor R8 and the ninth resistor R9 serve to limit the current.
[0051] In addition, the pin VDD of the USB processing chip U2 is connected with the power module, so that the power module provides a 3.3V working voltage for the USB processing chip. The pin VID of the USB processing chip is also connected with the power module, so as to identify the specific voltage value provided by the power module for the USB processing chip U2. The pin REGIN of the USB processing chip U2 is used for resetting.
[0052] The pin VBUS of the USB processing chip U2 is also connected with a power module, which provides 5V working voltage for the USB bus. The pin VBUS of the USB processing chip is also connected with the tenth resistor R10 and the eleventh resistor R11, which functions as current limiting and filtering.
[0053] In order to ensure that the USB processing chip U2 can work more stably, the USB processing chip U2 is also provided with filter resistors and filter capacitors, such as the resistor R12 and the capacitor C2.
[0054] Up to now, through the above specific devices contained in the USB interface 111 and the USB processing unit 112, the USB data provided by the external USB device can be converted into serial port data, or the serial port data provided by the host module 120 can be converted into USB data. The host module 120 is responsible for converting the serial port data into infrared data or converting the serial port data transmitted by the infrared transceiver module 130 into USB data.
[0055] In some embodiments, the host module 120 can be an MCU (Microcontroller Unit). Specifically, please refer to Figure 4 , Figure 4 is another structure diagram of a protocol conversion circuit for USB and infrared communication of an electric energy terminal device provided by the embodiment of the present application. As shown in Figure 4 , the first end of the host module 120 is the pin PC.0 / TX1 of the MCU, and the second end of the host module 120 is the pin PC.1 / TX1 of the MCU. The pin PC.2 / RX0 and the pin PC.3 / RX0 of the MCU are connected with the infrared transceiver module 130 respectively.
[0056] In addition, the pin DSC0 and the pin DSC1 of the MCU are connected with the first end and the second end of the crystal oscillator Y1 respectively, and the third end and the fourth end of the crystal oscillator Y1 are used for grounding, so as to provide the clock signal for the MCU. The pin VCC of the MCU is connected with a power module, which provides 2.8V working voltage for the MCU. In addition, a filter capacitor is arranged between the pin VCC of the MCU and the power module, such as the capacitor C3, the capacitor C4 and the capacitor C5.
[0057] In order to ensure that the MCU can work normally, other pins of the MCU are also connected with other devices. For example, the pin PE.7 / LVDIN0 of the MCU is connected with a 3.9V power supply through the resistor R13, and the pin PE.7 / LVDIN0 of the MCU is also connected with the ground through the resistor R14, so as to detect whether the MCU is in low voltage. For another example, the pin TEST of the MCU is also connected with a 2.8V power supply through the resistor R15, and the pin TEST of the MCU is also connected with the ground through the capacitor C6, so as to realize the test and debugging of the circuit.
[0058] Since the connection of other pins of the MCU is a conventional technology, the connection of other pins of the MCU is not described in detail in the present application, and the specific connection of other pins of the MCU can be referred to Figure 5 .
[0059] Therefore, the USB data is converted into infrared data or the infrared data is converted into USB data through the cooperation between the USB interface 111, the USB processing unit 112 and the MCU. The infrared transceiver module 130 is used for receiving the infrared data transmitted by the infrared device and transmitting the infrared data transmitted by the MCU to the infrared device.
[0060] Specifically, in some embodiments, please refer to Figure 5 , Figure 5 is another structure diagram of a protocol conversion circuit for USB and infrared communication of an electric energy terminal device provided by an embodiment of the present application. As shown in Figure 5 , the infrared transceiver module 130 includes an infrared receiving unit 131 and an infrared transmitting unit 132, and the infrared receiving unit 131 and the infrared transmitting unit 132 are connected with the master control module 120 respectively.
[0061] Among them, the infrared receiving unit 131 is used for transmitting the infrared data transmitted by the infrared device to the master control module 120; and the infrared transmitting unit 132 is used for transmitting the infrared data transmitted by the master control module 120 to the infrared device.
[0062] That is to say, when the master control module 120 transmits the infrared data to the infrared transceiver module 130, the infrared transmitting unit 132 transmits the infrared data to the infrared device. When the infrared device transmits the infrared data to the infrared transceiver module 130, the infrared receiving unit 131 receives the infrared data and transmits the infrared data to the master control module 120.
[0063] Further, in some embodiments, please refer to Figure 6 , Figure 6 is another structure diagram of a protocol conversion circuit for USB and infrared communication of an electric energy terminal device provided by an embodiment of the present application. As shown in Figure 6As shown, the infrared receiving unit 131 includes an infrared receiving processing subunit U3, a third resistor R3, a fourth resistor R4, and a first capacitor C1. The first and second ends of the infrared receiving processing subunit U3 are connected to a ground terminal. The third end of the infrared receiving processing subunit U3 is connected to a power supply, the first end of the fourth resistor R4, and the first end of the first capacitor C1. The fourth end of the infrared receiving processing subunit U3 is connected to the first end of the third resistor R3. The second end of the third resistor R3 is connected to the second end of the fourth resistor R4, the ground terminal, and the main control module 120. The second end of the first capacitor C1 is connected to the ground terminal.
[0064] The infrared receiving processing subunit U3 acquires the infrared data sent by the infrared device and sends the infrared data to the main control module 120 through the second end of the third resistor R3, so as to realize one-way communication between the infrared device and the external USB device through the mutual cooperation of the infrared receiving unit 131, the main control module 120, the USB interface 111, and the USB processing unit 112.
[0065] The third resistor R3 can play a role of current limiting to protect the circuit. The fourth resistor R4 and the first capacitor C1 can play a role of filtering to ensure that the infrared receiving processing subunit U3 can work more stably.
[0066] Further, in some embodiments, please continue to refer to Figure 6 , the infrared sending unit includes a fifth resistor R5, a sixth resistor R6, a transistor T1, an infrared diode L, and a seventh resistor R7.
[0067] The first end of the fifth resistor R5 is connected to the main control module 120 and the first end of the sixth resistor R6. The second end of the fifth resistor R5 is connected to the first end of the transistor T1. The second end of the transistor T1 is connected to the second end of the sixth resistor R6. The third end of the transistor T1 is connected to the positive electrode of the infrared diode L. The negative electrode of the infrared diode L is connected to the first end of the seventh resistor R7. The second end of the seventh resistor R7 is connected to a ground terminal.
[0068] The main control module 120 converts the serial port data sent by the USB processing unit 112 into infrared data, outputs a low voltage at the first end of the fifth resistor R5, so that the transistor T1 is turned on, so that the infrared diode L can work, and releases information corresponding to the USB data corresponding to the infrared data.
[0069] In addition, in some embodiments, please refer to Figure 7 , Figure 7 is another structure diagram of a protocol conversion circuit for USB and infrared communication of an electric energy terminal device provided by the embodiments of the present application. As shown in Figure 7As shown, the protocol conversion circuit 100 further comprises a power module 140, which is connected with the USB interface module 110, and is configured to provide working voltage for the USB interface module 110.
[0070] Specifically, the power module 140 is configured to provide the USB interface module 110 with a first working voltage and a second working voltage. In a specific embodiment, the power module 140 can be of the model HT7833.
[0071] The VIN end of the power module 140 is connected with the VCC end of the connector U1, so as to provide the connector U2 with 5V working voltage. The Vout end of the power module 140 is connected with the VDD end of the USB processing chip, so as to provide the USB processing chip with 3.3V working voltage.
[0072] That is, the first voltage can be the 5V working voltage provided by the power module 140 for the connector U2. The second voltage can be the 3.3V working voltage provided by the power module 140 for the USB processing chip.
[0073] Please refer to Figure 8 , Figure 8 is a structural schematic diagram of a protocol conversion system for USB and infrared communication of an electric energy terminal device provided by the embodiment of the present application. As shown in Figure 8 , the protocol conversion system comprises an external USB device 200, an infrared device 300 and the protocol conversion circuit 100 described above, and the protocol conversion circuit 100 is connected with the external USB device 200 and the infrared device 300 respectively.
[0074] Among them, the external USB device 200 is configured to send USB data to the protocol conversion circuit 100 and receive USB data sent by the protocol conversion circuit 100; the infrared device 300 is configured to send infrared data to the protocol conversion circuit 100 and receive infrared data sent by the protocol conversion circuit 100.
[0075] As to how the external USB device 200 and the protocol conversion circuit 100 cooperate with each other, please refer to the description above, which will not be repeated here.
[0076] The application provides a protocol conversion circuit and system for USB and infrared communication of an electric energy terminal device, the protocol conversion circuit for USB and infrared communication of the electric energy terminal device comprising a USB interface module, a master control module and an infrared transceiver module, the master control module being connected with the USB interface module and the infrared transceiver module, wherein: the USB interface module is configured to convert USB data into serial port data when receiving the USB data sent by an external USB device, and convert serial port data into USB data when receiving the serial port data sent by the master control module, so as to send the USB data to the external USB device; the master control module is configured to convert the serial port data into infrared data when receiving the serial port data sent by the USB interface module, and send the infrared data to an infrared device through the infrared transceiver module; the master control module is further configured to convert the infrared data into serial port data when receiving the infrared data sent by the infrared transceiver module, and transmit the serial port data to the USB interface module. Thus, when the USB interface module receives the USB data sent by the external USB device, the USB interface module and the master control module cooperate with each other to convert the USB data into corresponding serial port data, and convert the serial port data into infrared data readable by the infrared device; and when the infrared transceiver module receives the infrared data sent by the infrared device, the USB interface module and the master control module cooperate with each other to convert the infrared data into corresponding serial port data, and convert the serial port data into USB data readable by the external USB device. Thus, bidirectional communication between the USB device and the infrared device is realized, and the protocol conversion circuit for USB and infrared communication of the electric energy terminal device can be compatible with more communication protocols, thereby improving the communication efficiency between the USB device and the infrared device.
[0077] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the application, and not to limit them; although the application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not drive the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the application.
Claims
1. A protocol conversion circuit for USB and infrared communication in a power terminal device, characterized in that, The protocol conversion circuit for USB and infrared communication in the power terminal device includes a USB interface module, a main control module, and an infrared transceiver module. The main control module is connected to both the USB interface module and the infrared transceiver module. The USB interface module is used to convert USB data received from an external USB device into serial port data, and to convert serial port data received from the main control module into USB data, so as to send the USB data to the external USB device; the USB interface module includes a USB interface and a USB processing unit, the USB interface is connected to the USB processing unit, and the USB processing unit is also connected to the main control module; The USB interface is used to transmit USB data from the external USB device to the USB processing unit; the USB interface includes a connector U1, a first resistor R1 and a second resistor R2, a first end of the connector U1 is connected to a first end of the first resistor R1, and a second end of the first resistor R1 is connected to a first end of the USB processing unit. The second end of the connector U1 is connected to the first end of the second resistor R2, and the second end of the second resistor R2 is connected to the second end of the USB processing unit. The third end of the connector U1 is connected to the power module; The fourth end of the connector U1 is connected to the grounding end; The USB processing unit is used to convert the USB data transmitted from the USB interface into serial port data, and transmit the serial port data to the main control module; The USB processing unit is further configured to convert the serial port data transmitted from the main control module into USB data, and transmit the USB data to the USB interface; The USB interface is also used to transmit the USB data from the USB processing unit to the external USB device; The main control module is used to convert the serial port data received from the USB interface module into infrared data, and then send the infrared data to the infrared device through the infrared transceiver module. The main control module is further configured to, upon receiving infrared data sent from the infrared transceiver module, convert the infrared data into serial port data and transmit the serial port data to the USB interface module.
2. The protocol conversion circuit for USB and infrared communication in a power terminal device according to claim 1, characterized in that, The USB processing unit includes a USB processing chip, wherein: The first terminal of the USB processing chip is connected to the first terminal of the first resistor R1; the second terminal of the USB processing chip is connected to the second terminal of the second resistor R2; the third terminal of the USB processing chip is connected to the first terminal of the main control module; and the fourth terminal of the USB processing chip is connected to the second terminal of the main control module.
3. The protocol conversion circuit for USB and infrared communication in a power terminal device according to claim 1, characterized in that, The infrared transceiver module includes an infrared receiving unit and an infrared transmitting unit, which are respectively connected to the main control module, wherein: The infrared receiving unit is used to transmit the infrared data sent from the infrared device to the main control module; The infrared transmitting unit is used to transmit the infrared data sent from the main control module to the infrared device.
4. The protocol conversion circuit for USB and infrared communication in a power terminal device according to claim 3, characterized in that, The infrared receiving unit includes an infrared receiving and processing subunit, a third resistor R3, a fourth resistor R4, and a first capacitor C1. The first and second ends of the infrared receiving and processing subunit are used to connect to the ground terminal. The third end of the infrared receiving and processing subunit is used to connect to the power supply, the first end of the fourth resistor R4, and the first end of the first capacitor C1. The fourth end of the infrared receiving and processing subunit is connected to the first end of the third resistor R3. The second end of the third resistor R3 is connected to the second end of the fourth resistor R4, the ground terminal, and the main control module. The second end of the first capacitor C1 is connected to the ground terminal.
5. The protocol conversion circuit for USB and infrared communication in a power terminal device according to claim 4, characterized in that, The infrared transmitting unit includes a fifth resistor R5, a sixth resistor R6, a transistor T1, an infrared diode L, and a seventh resistor R7, wherein: The first end of the fifth resistor R5 is connected to the first end of the main control module and the first end of the sixth resistor R6. The second end of the fifth resistor R5 is connected to the first end of the transistor T1. The second end of the transistor T1 is connected to the second end of the sixth resistor R6. The third end of the transistor T1 is connected to the positive terminal of the infrared diode L. The negative terminal of the infrared diode L is connected to the first end of the seventh resistor R7. The second end of the seventh resistor R7 is connected to the ground terminal.
6. The protocol conversion circuit for USB and infrared communication in a power terminal device according to claim 1, characterized in that, The protocol conversion circuit for USB and infrared communication in the power terminal device also includes a power module, which is connected to the USB interface module. The power module is used to provide operating voltage to the USB interface module.
7. The protocol conversion circuit for USB and infrared communication in a power terminal device according to claim 6, characterized in that, The power module is specifically used to provide a first operating voltage and a second operating voltage to the USB interface module.
8. A protocol conversion system for USB and infrared communication in a power terminal device, characterized in that, Includes an external USB device, an infrared device, and a protocol conversion circuit for USB-to-infrared communication of a power terminal device as described in any one of claims 1-7, wherein the protocol conversion circuit is connected to the external USB device and the infrared device respectively, wherein: The external USB device is used to send USB data to the protocol conversion circuit for USB and infrared communication of the power terminal device, and to receive the USB data sent from the protocol conversion circuit for USB and infrared communication of the power terminal device. The infrared device is used to send infrared data to the protocol conversion circuit and receive the infrared data sent from the protocol conversion circuit.