UART expansion circuit based on USB conversion and terminal equipment

By designing a UART expansion circuit based on USB conversion and using the combination of USB Hub control module and power switch module, the problem of being unable to distinguish the addresses of multiple USB-to-UART chips is solved, and the MCU can efficiently identify and control multiple UART devices. Suitable for application scenarios of multiple USB and UART devices.

CN221631960UActive Publication Date: 2024-08-30SHENZHEN JIESHUN SCI & TECH IND
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202323618004.X
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2023-12-27
Publication Date
2024-08-30
Estimated Expiration
2033-12-27

AI Technical Summary

Technical Problem

The existing technology cannot distinguish multiple identical USB to UART chip addresses, resulting in the MCU being unable to recognize different UART extension device addresses and unable to effectively control multiple UART devices.

Method used

Design a UART expansion circuit based on USB conversion, including a microcontroller, USB Hub control module, M expansion serial port modules and M power switch modules. The USB Hub control module converts 1 USB input signal into M USB outputs. signal, and switches the power supply according to the switch control signal of the microcontroller through the power switch module to realize the power supply to the extended serial port module and ensure that the MCU can recognize multiple USB to UART chip addresses.

Benefits of technology

MCU can efficiently identify and control UART devices extended by multiple USB-to-UART expansion chips, and is suitable for application scenarios that require USB-HUB to expand multiple USB interfaces and multiple UART peripherals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN221631960U
    Figure CN221631960U
Patent Text Reader

Abstract

The utility model relates to the technical field of data interface conversion, and discloses a universal serial bus (USB) conversion-based universal asynchronous receiver / transmitter (UART) expansion circuit and terminal equipment, and the circuit comprises M expansion serial port modules which are connected with a USB Hub control module; one expansion serial port module is correspondingly connected with one power switch module, and each power switch module is also connected with the microcontroller; the USB Hub control module is used for converting one path of USB input signals transmitted by the microcontroller into M paths of USB output signals; each power switch module is used for switching the working state of the power switch module according to a switch control signal transmitted by the microcontroller so as to control the access of the power supply to supply power to the expansion serial port module correspondingly connected with the power switch module; and the expansion serial port module is used for expanding the path of USB output signal after normal power supply to obtain N paths of UART (Universal Asynchronous Receiver / Transmitter) signals, so that a plurality of identical USB-to-UART chip addresses can be efficiently identified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data interface conversion, and in particular to a UART expansion circuit and terminal equipment based on USB conversion. Background Art

[0002] When there are multiple USB and multiple UART devices in use, and the MCU's USB interface or UART (UART: Universal Asynchronous Receiver Transmitter) interface is insufficient, it is necessary to add a USB HUB (hub) expansion chip and a USB to UART expansion chip. However, the existing method is that the power supply of the USB to UART expansion chip is not controlled to be powered on at the same time, and the MCU cannot distinguish multiple identical USB to UART chip addresses, and thus cannot identify different UART expansion device addresses. Utility Model Content

[0003] In view of this, an embodiment of the present application provides a UART expansion circuit and terminal device based on USB conversion, which can effectively solve the problem in the prior art that multiple identical USB-to-UART chip addresses cannot be distinguished.

[0004] In a first aspect, an embodiment of the present application provides a UART expansion circuit based on USB conversion, comprising: a microcontroller, a USB Hub control module, M expansion serial port modules and M power switch modules; the M expansion serial port modules are all connected to the USB Hub control module; one expansion serial port module is correspondingly connected to one power switch module, and each power switch module is also connected to the microcontroller;

[0005] The USB Hub control module is used to convert 1 USB input signal transmitted by the microcontroller into M USB output signals; each of the power switch modules is used to switch its own working state according to the switch control signal transmitted by the microcontroller to control the access of the power supply to power the expansion serial port module corresponding to the power switch module; the expansion serial port module is used to expand the USB output signal to obtain N UART signals after normal power supply.

[0006] In some embodiments, the microcontroller is used to transmit the switch control signal to all the power switch modules in sequence according to the target order, so as to control the power supply to supply power to the correspondingly connected expansion serial port modules in sequence when the power switch modules are in normal working state in sequence.

[0007] In some embodiments, each of the power switch modules includes: a switch unit and a filter unit; the switch unit is used to control its own switch state according to the switch control signal, and when in a closed state, transmits the power supply voltage to the filter unit; the filter unit is used to filter the supply voltage to power the expansion serial port module corresponding to the power switch module.

[0008] In some embodiments, the USB Hub control module includes: a USB input signal port, a USB Hub controller chip, M USB output signal ports, a first capacitor, a second capacitor, a third capacitor, a fourth capacitor, a fifth capacitor, a sixth capacitor, a seventh capacitor, an eighth capacitor, a first resistor, a second resistor, a third resistor, a fourth resistor, a fifth resistor and a sixth resistor; the USB input signal port is used to connect to the microcontroller; each of the USB output signal ports is used to connect to a corresponding expansion serial port module;

[0009] The first overcurrent detection input terminal of the USB Hub controller chip is connected to one end of the first resistor, and the other end of the first resistor is connected to the power supply; the second overcurrent detection input terminal of the USB Hub controller chip is connected to one end of the second resistor, and the other end of the second resistor is connected to the power supply;

[0010] The first power supply terminal of the USB Hub controller chip is respectively connected to one end of the first capacitor and one end of the second capacitor, and the other end of the second capacitor and the other end of the second capacitor are both grounded; the second power supply terminal of the USB Hub controller chip is respectively connected to one end of the third capacitor and one end of the fourth capacitor, and the other end of the third capacitor and the other end of the fourth capacitor are both grounded;

[0011] The third power supply terminal of the USB Hub controller chip is respectively connected to one end of the fifth capacitor and one end of the sixth capacitor, and the other end of the fifth capacitor and the other end of the sixth capacitor are both grounded; the third overcurrent detection input terminal of the USB Hub controller chip is connected to one end of the third resistor, and the other end of the third resistor is connected to the power supply; the fourth overcurrent detection input terminal of the USB Hub controller chip is connected to one end of the fourth resistor, and the other end of the fourth resistor is connected to the power supply;

[0012] The upstream USB signal reverse input terminal of the USB Hub controller chip is connected to one end of the fifth resistor, and the other end of the fifth resistor is connected to the microcontroller; the upstream USB signal forward input terminal of the USB Hub controller chip is connected to one end of the sixth resistor, and the other end of the sixth resistor is connected to the microcontroller.

[0013] In some embodiments, the switch unit includes: a timing input port, a seventh resistor, an eighth resistor, a ninth resistor, a tenth resistor, an eleventh resistor, a triode, a MOS tube, a ninth capacitor, a tenth capacitor and a magnetic bead;

[0014] The base of the transistor is connected to one end of the seventh resistor and one end of the eighth resistor respectively, the collector of the transistor is connected to one end of the ninth resistor and the gate of the MOS transistor respectively, the emitter of the transistor and the other end of the eighth resistor are both grounded; the other end of the seventh resistor is connected to the microcontroller;

[0015] The source of the MOS tube, the other end of the ninth resistor and one end of the tenth resistor are all connected to the power supply, and the drain of the MOS tube is respectively connected to the other end of the tenth resistor, one end of the eleventh resistor, one end of the ninth capacitor, one end of the tenth capacitor and one end of the magnetic bead; the other end of the eleventh resistor, the other end of the ninth capacitor and the other end of the tenth capacitor are all grounded; the other end of the magnetic bead is connected to the filtering unit.

[0016] In some embodiments, the filtering unit includes: an eleventh capacitor, a twelfth capacitor, a thirteenth capacitor, and a fourteenth capacitor;

[0017] One end of the eleventh capacitor, one end of the twelfth capacitor, one end of the thirteenth capacitor, one end of the fourteenth capacitor and the other end of the magnetic bead are all connected to the corresponding expansion serial port module; the other end of the eleventh capacitor, the other end of the twelfth capacitor, the other end of the thirteenth capacitor and the other end of the fourteenth capacitor are all grounded.

[0018] In some embodiments, each of the expansion serial port modules includes: an expansion serial port chip, a twelfth resistor, a thirteenth resistor, a fifty-first resistor, and a fifty-second resistor;

[0019] The first power supply terminal, the second power supply terminal, the third power supply terminal, the fourth power supply terminal and the fifth power supply terminal of the expansion serial port chip are respectively connected to one end of the eleventh capacitor, one end of the twelfth capacitor, one end of the thirteenth capacitor, one end of the fourteenth capacitor and the other end of the magnetic bead, and the serial data input terminal of the expansion serial port chip is connected to one end of the twelfth resistor;

[0020] The serial clock input end of the extended serial port chip is connected to one end of the thirteenth resistor, and the other end of the twelfth resistor and the other end of the thirteenth resistor are respectively connected to one end of the eleventh capacitor, one end of the twelfth capacitor, one end of the thirteenth capacitor, one end of the fourteenth capacitor and the other end of the magnetic bead.

[0021] In some embodiments, the USB Hub control module further includes: a fourteenth resistor, a fifteenth resistor, a sixteenth resistor, and a seventeenth resistor;

[0022] The power supply mode configuration end of the USB Hub controller chip is respectively connected to one end of the fourteenth resistor and one end of the fifteenth resistor, the other end of the fourteenth resistor is connected to the power supply, and the other end of the fifteenth resistor is grounded;

[0023] The overcurrent protection end of the USB Hub controller chip is respectively connected to one end of the sixteenth resistor and one end of the fifteenth resistor, the other end of the sixteenth resistor is connected to the power supply, and the other end of the seventeenth resistor is grounded.

[0024] In some embodiments, the timing input port is used to sequentially receive the switch control signals transmitted by the microcontroller according to target sorting; the other end of the seventh resistor is connected to the microcontroller via the timing input port.

[0025] In a second aspect, an embodiment of the present application provides a USB extended multi-channel UART terminal device, including a PCB board, on which the UART expansion circuit based on USB conversion as described above is arranged.

[0026] The embodiments of the present application have the following beneficial effects:

[0027] The MCU can efficiently identify multiple identical USB-to-UART chip addresses, and thus can control multiple UART devices expanded through USB-to-UART expansion chips. It can be used in various application scenarios that require USB-HUB to expand multiple USB interfaces and multiple USB to expand multiple UART peripherals. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0029] Figure 1The structure block diagram of the UART expansion circuit based on USB conversion in the embodiment of the present application is shown;

[0030] Figure 2 A schematic diagram of the circuit structure of an extended serial port module in a UART expansion circuit based on USB conversion in an embodiment of the present application is shown;

[0031] Figure 3 A circuit structure diagram of a USB Hub control module in a UART expansion circuit based on USB conversion in an embodiment of the present application is shown.

[0032] Description of main component symbols:

[0033] 1: power supply; 10: microcontroller; 20: USB Hub control module; 30: expansion serial port module; 40: power switch module; 41: switch unit; 42: filter unit; Q1: transistor; Q2: MOS tube; U1: USB Hub controller chip; U2: expansion serial port chip; LB1: magnetic bead. DETAILED DESCRIPTION

[0034] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.

[0035] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0036] Hereinafter, the terms "including", "having" and their cognates that can be used in various embodiments of the present application are intended only to indicate specific features, numbers, steps, operations, elements, components or a combination of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or a combination of the foregoing items or increasing the possibility of one or more features, numbers, steps, operations, elements, components or a combination of the foregoing items. In addition, the terms "first", "second", "third" and the like are only used to distinguish descriptions and cannot be understood as indicating or implying relative importance.

[0037] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present application.

[0038] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0039] The UART expansion circuit based on USB conversion is described below in conjunction with some specific embodiments.

[0040] See also Figure 1 The embodiment of the present application provides a UART expansion circuit based on USB conversion, including: a microcontroller 10, a USB Hub control module 20, M expansion serial port modules 30 and M power switch modules 40; the M expansion serial port modules 30 are all connected to the USB Hub control module 20; one expansion serial port module 30 and one power switch module 40 are correspondingly connected, and each power switch module 40 is also connected to the microcontroller 10, thereby forming M branches from the expansion serial port module 30 to the power switch module 40.

[0041] The USB Hub control module 20 is used to convert 1 USB input signal transmitted by the microcontroller 10 into M USB output signals; each power switch module 40 is used to switch its own working state according to the switch control signal transmitted by the microcontroller 10, so as to control the access of the power supply 1 to power the expansion serial port module 30 corresponding to the power switch module 40; the expansion serial port module 30 is used to expand the USB output signal to obtain N UART signals after normal power supply.

[0042] Wherein, M and N are both positive integers; the switch control signal includes: a high level signal; the working state includes: a normal working state and an abnormal working state. In order to distinguish, the first expansion serial port module is marked as 31, the second expansion serial port module is marked as 32, and the Mth expansion serial port module is marked as 3M; similarly, the first power switch module is marked as 41, the second power switch module is marked as 42, and the Mth power switch module is marked as 4M.

[0043] Specifically, the UART expansion circuit based on USB conversion is implemented as follows:

[0044] First, the USB Hub control module 20 converts one USB input signal transmitted by the microcontroller 10 into M USB output signals, for example, four USB output signals.

[0045] Then, on each branch, the power switch module 40 switches its own working state according to the switch control signal (high level signal) transmitted by the microcontroller 10: normal working state and abnormal working state, so as to control the access of the power supply 1 to supply power to the expansion serial port module 30 connected to the power switch module 40. Finally, after normal power supply, the expansion serial port module 30 expands the USB output signal to obtain N UART signals.

[0046] The USB Hub control module 20 converts 1 USB input signal transmitted by the microcontroller 10 into M USB output signals, and then each expansion serial port module 30 expands the USB output signal to obtain N UART signals, thereby expanding 1 USB input signal into M*N UART signals to realize automatic recognition of multiple UART addresses.

[0047] Furthermore, the microcontroller 10 is used to transmit the switch control signal to all the power switch modules 40 in sequence according to the target order, so that when the power switch modules 40 are in normal working state in sequence, the power supply 1 is controlled to supply power to the corresponding connected expansion serial port modules 30 in sequence.

[0048] Specifically, the microcontroller 10 generates switch control signals in sequence according to the target sorting and transmits them to the corresponding power switch module 40, that is, the power-on timing assigned to each power switch module 40 is output by using multiple IO ports on the microcontroller 10, and each expansion serial port module 30 is sorted with marks 1, 2, M, etc. according to the power-on timing, and then power is supplied in sequence according to the sorting marks, so that the MCU can recognize the addresses of multiple identical expansion serial port modules 30, and thus can control multiple UART devices expanded by the expansion serial port module 30.

[0049] Furthermore, in the M branches from the expansion serial port module 30 to the power switch module 40, each power switch module 40 includes: a switch unit 41 and a filter unit 42; the switch unit 41 is used to control its own switch state according to the switch control signal, and when in a closed state, transmits the power supply voltage to the filter unit 42; the filter unit 42 is used to filter the supply voltage to power the expansion serial port module 30 corresponding to the power switch module 40.

[0050] Among them, for the purpose of distinction, the first switch unit is marked as 411, the second switch unit is marked as 412, and so on until the Mth switch unit is marked as 41M; similarly, the first filter unit is marked as 421, the second filter unit is marked as 422, and so on until the Mth filter unit is marked as 42M.

[0051] Specifically, the microcontroller 10 transmits the switch control signal to all the switch units 41 in sequence according to the target order, and then the switch unit 41 controls its own switch state: closed or open according to the switch control signal.

[0052] When the switch unit 41 is in a closed state, the power supply circuit on the power switch module 40 is connected, and the power supply 1 provides a power supply voltage which is filtered by the filter unit 42 and then transmitted to the corresponding connected expansion serial port module 30 for power supply, thereby powering the UART device on the expansion serial port module 30.

[0053] For further information, see Figure 2 Each switch unit 41 in the branch from the expansion serial port module 30 to the power switch module 40 includes: a timing input port, a seventh resistor R7, an eighth resistor R8, a ninth resistor R9, a tenth resistor R10, an eleventh resistor R11, a transistor Q1, a MOS tube Q2, a ninth capacitor C9, a tenth capacitor C10 and a magnetic bead LB1.

[0054] The timing input port is used to sequentially receive the switch control signals transmitted by the microcontroller 10 according to the target sequence; the other end of the seventh resistor R7 is connected to the microcontroller 10 via the timing input port.

[0055] The base of the transistor Q1 is respectively connected to one end of the seventh resistor R7 and one end of the eighth resistor R8, the collector of the transistor Q1 is respectively connected to one end of the ninth resistor R9 and the gate of the MOS transistor Q2, the emitter of the transistor Q1 and the other end of the eighth resistor R8 are both grounded; the other end of the seventh resistor R7 is connected to the microcontroller 10.

[0056] The source of the MOS tube Q2, the other end of the ninth resistor R9 and one end of the tenth resistor R10 are all connected to the power supply 1, and the drain of the MOS tube Q2 is respectively connected to the other end of the tenth resistor R10, one end of the eleventh resistor R11, one end of the ninth capacitor C9, one end of the tenth capacitor C10 and one end of the magnetic bead LB1; the other end of the eleventh resistor R11, the other end of the ninth capacitor C9 and the other end of the tenth capacitor C10 are all grounded; the other end of the magnetic bead LB1 is connected to the filtering unit 42.

[0057] Specifically, a transistor Q1 and a MOS tube Q2 are used to form an on-off control circuit, and a microcontroller 10 is used to output a high-level switch control signal to sequentially control the on and off of the transistor Q1 and the MOS tube Q2 through a timing input port to connect the loop on the power supply 1.

[0058] Among them, the seventh resistor R7 is 10KΩ, the eighth resistor R8 is 10KΩ, the ninth resistor R9 is 10KΩ, the eleventh resistor R11 is 100KΩ, the ninth capacitor C9 is 10uf, the tenth capacitor C10 is 1uf, and the frequency of the magnetic bead LB1 is 100MHz.

[0059] Furthermore, in each branch from the expansion serial port module 30 to the power switch module 40, the filter unit 42 includes: an eleventh capacitor C11, a twelfth capacitor C12, a thirteenth capacitor C13 and a fourteenth capacitor C14;

[0060] One end of the eleventh capacitor C11, one end of the twelfth capacitor C12, one end of the thirteenth capacitor C13, one end of the fourteenth capacitor C14 and the other end of the magnetic bead LB1 are all connected to the corresponding expansion serial port module 30; the other end of the eleventh capacitor C11, the other end of the twelfth capacitor C12, the other end of the thirteenth capacitor C13 and the other end of the fourteenth capacitor C14 are all grounded.

[0061] Specifically, the eleventh capacitor C11 is 1uf, the twelfth capacitor C12 is 1uf, the thirteenth capacitor C13 is 1uf, and the fourteenth capacitor C14 is 1uf.

[0062] For further information, see Figure 3 The USB Hub control module 20 includes: a USB input signal port (including an upstream USB signal reverse input terminal and an upstream USB signal positive input terminal, corresponding to the USB input port in this embodiment) Figure 3 A USB input signal: USB_DM and USB_DP), USB Hub controller chip U1, M USB output signal ports (including the upstream USB signal reverse output terminal USB_DMM and the upstream USB signal positive output terminal USB_DPM, corresponding to the embodiment Figure 3The USB input signal port is used to connect the microcontroller 10. The USB input signal port is used to connect the microcontroller 10; each USB output signal port is used to connect a corresponding expansion serial port module 30.

[0063] The first over-current detection input terminal of the USB Hub controller chip U1 (corresponding to Figure 3 The 25th foot of the USB Hub controller chip U1 is connected to one end of the first resistor R1, and the other end of the first resistor R1 is connected to the power supply 1; the second overcurrent detection input end of the USB Hub controller chip U1 (corresponding to Figure 3 The 24th pin of the resistor is connected to one end of the second resistor R2, and the other end of the second resistor R2 is connected to the power supply 1.

[0064] The first power supply terminal of the USB Hub controller chip U1 (corresponding to Figure 3 The 27th pin of the USB Hub controller chip U1 is connected to one end of the first capacitor C1 and one end of the second capacitor C2 respectively, and the other end of the second capacitor C2 and the other end of the second capacitor C2 are both grounded; the second power supply terminal of the USB Hub controller chip U1 (corresponding to Figure 3 The 28th pin of the third capacitor C3 is connected to one end of the third capacitor C3 and one end of the fourth capacitor C4 respectively, and the other end of the third capacitor C3 and the other end of the fourth capacitor C4 are grounded.

[0065] The third power supply terminal of the USB Hub controller chip U1 (corresponding to Figure 3 The 21st pin of the USB Hub controller chip U1 is connected to one end of the fifth capacitor C5 and one end of the sixth capacitor C6 respectively, and the other end of the fifth capacitor C5 and the other end of the sixth capacitor C6 are both grounded; the fourth power supply terminal of the USB Hub controller chip U1 (corresponding to Figure 3 The 14th pin in the USB Hub controller chip U1 is connected to one end of the seventh capacitor C7 and one end of the eighth capacitor C8 respectively, and the other end of the seventh capacitor C7 and the other end of the eighth capacitor C8 are both grounded; the third overcurrent detection input terminal of the USB Hub controller chip U1 (corresponding to Figure 3 The 20th pin in the USB Hub controller chip U1 is connected to one end of the third resistor R3, and the other end of the third resistor R3 is connected to the power supply 1; the fourth overcurrent detection input terminal of the USB Hub controller chip U1 (corresponding to Figure 3 The 19th pin of the resistor is connected to one end of the fourth resistor R4, and the other end of the fourth resistor R4 is connected to the power supply 1.

[0066] USB Hub controller chip U1 upstream USB signal reverse input terminal (corresponding to Figure 3 The first pin in the middle is connected to one end of the fifth resistor R5, and the other end of the fifth resistor R5 is connected to the microcontroller 10; the upstream USB signal positive input end of the USB Hub controller chip U1 (corresponding to Figure 3 The second pin of the first resistor is connected to one end of the sixth resistor R6, and the other end of the sixth resistor R6 is connected to the microcontroller 10.

[0067] Specifically, the USB Hub controller chip U1 is a USB-hub chip, which is used to convert one USB input signal into four USB output signals.

[0068] Among them, the first capacitor C1 is 10uf, the second capacitor C2 is 100nf, the third capacitor C3 is 10uf, the fourth capacitor C4 is 100nf, the fifth capacitor C5 is 1uf, the sixth capacitor C6 is 100nf, the seventh capacitor C7 is 1uf, the eighth capacitor C8 is 100nf, the first resistor R1 is 2.2Ω, the second resistor R2 is 2.2Ω, the third resistor R3 is 10KΩ, the fourth resistor R4 is 10KΩ, the fifth resistor R5 is 10KΩ, and the sixth resistor R6 is 10KΩ.

[0069] Furthermore, the USB Hub control module 20 further includes: a fourteenth resistor R14, a fifteenth resistor R15, a sixteenth resistor R16 and a seventeenth resistor R17.

[0070] USB Hub controller chip U1 power mode configuration terminal (corresponding to Figure 3 The 22nd pin of the resistor R1 is respectively connected to one end of the fourteenth resistor R14 and one end of the fifteenth resistor R15, the other end of the fourteenth resistor R14 is connected to the power supply 1, and the other end of the fifteenth resistor R15 is grounded.

[0071] The overcurrent protection terminal of USB Hub controller chip U1 (corresponding to Figure 3 The 23rd pin of the resistor R17 is respectively connected to one end of the 16th resistor R16 and one end of the 15th resistor R15, the other end of the 16th resistor R16 is connected to the power supply 1, and the other end of the 17th resistor R17 is grounded.

[0072] Specifically, the fourteenth resistor R14 is 10KΩ, the fifteenth resistor R15 is 10KΩ, the sixteenth resistor R16 is 10KΩ, and the seventeenth resistor R17 is 10KΩ.

[0073] Furthermore, in each branch from the expansion serial port module 30 to the power switch module 40, each expansion serial port module 30 includes: an expansion serial port chip U2, a twelfth resistor R12, a thirteenth resistor R13, a fifty-first resistor R51 and a fifty-second resistor R52;

[0074] The first power supply terminal of the expansion serial port chip U2 (corresponding to Figure 2 The 5th pin in the middle), the second power supply terminal (corresponding to Figure 2 The 18th pin in the middle), the third power supply terminal (corresponding to Figure 2 33rd pin in the middle), the fourth power supply terminal (corresponding to Figure 2 Pin 44) and the fifth power supply terminal (corresponding to Figure 2 The 55th pin of the pin is respectively connected to one end of the eleventh capacitor C11, one end of the twelfth capacitor C12, one end of the thirteenth capacitor C13, one end of the fourteenth capacitor C14 and the other end of the magnetic bead LB1.

[0075] The serial data input terminal of the expansion serial port chip U2 (corresponding to Figure 2 The 35th foot in the middle) is connected to one end of the twelfth resistor R12; the serial clock input end of the expansion serial port chip U2 (corresponding to Figure 2 The 36th pin in the middle) is connected to one end of the thirteenth resistor R13; the USB signal reverse input end of the expansion serial port chip U2 (corresponding to Figure 2 The 42nd foot in the middle) is connected to one end of the 51st resistor R51 to expand the USB signal positive input end of the serial port chip U2 (corresponding to Figure 2 The 43rd pin of the circuit is connected to one end of the fifty-second resistor R52.

[0076] The other end of the twelfth resistor R12 and the other end of the thirteenth resistor R13 are respectively connected to one end of the eleventh capacitor C11, one end of the twelfth capacitor C12, one end of the thirteenth capacitor C13, one end of the fourteenth capacitor C14 and the other end of the magnetic bead LB1; the other end of the fifty-first resistor R51 is connected to the upstream USB signal reverse output terminal USB_DMM of the USB Hub controller chip U1 (corresponding to Figure 3 The other end of the fifty-second resistor R52 is connected to the upstream USB signal positive output terminal USB_DPM (in this embodiment, corresponding to the USB_DM1 of the USB Hub controller chip U1) of the USB Hub controller chip U1. Figure 3 Connect the 4th pin USB_DP1, 7th pin USB_DP2, 13th pin USB_DP3 or 16th pin USB_DP4) in the USB port.

[0077] Specifically, the expansion serial port chip U2 is a one-channel USB to four-channel UART serial port chip, which is used to convert one-channel USB output signal into four-channel UART signals, and the four-channel UART is then connected to four different serial port peripherals.

[0078] The twelfth resistor R12 is 0Ω, and the thirteenth resistor R13 is 0Ω.

[0079] Furthermore, each expansion serial port module 30 also includes: an eighteenth resistor R18, a nineteenth resistor R19, a twentieth resistor R20, a twenty-first resistor R21, a twenty-second resistor R22, a twenty-third resistor R23, a twenty-fourth resistor R24, a twenty-fifth resistor R25, a twenty-sixth resistor R26, a twenty-seventh resistor R27, a twenty-eighth resistor R28, a twenty-ninth resistor R29, a thirtieth resistor R30, a thirty-first resistor R31, a thirty-second resistor R32, a thirty-third resistor R33, a thirty-fourth resistor R34, a thirty-fifth resistor R35, a thirty-sixth resistor R36, a thirty-seventh resistor R37, a thirty-eighth resistor R38, a thirty-ninth resistor, a fortieth resistor R40, a forty-first resistor R41, a forty-second resistor R42, a forty-third resistor R43, a forty-fourth resistor R44, a forty-fifth resistor R45, a forty-sixth resistor R46, a forty-seventh resistor R47, a forty-eighth resistor R48, a forty-ninth resistor R49, and a fiftieth resistor R50.

[0080] The second pin of the expansion serial port chip U2 is connected to one end of the eighteenth resistor R18, the third pin of the expansion serial port chip U2 is connected to one end of the nineteenth resistor R19, the sixth pin of the expansion serial port chip U2 is connected to one end of the twentieth resistor R20, the seventh pin of the expansion serial port chip U2 is connected to one end of the twenty-first resistor R21, the tenth pin of the expansion serial port chip U2 is connected to one end of the twenty-second resistor R22, the eleventh pin of the expansion serial port chip U2 is connected to one end of the twenty-third resistor R23, the twelfth pin of the expansion serial port chip U2 is connected to one end of the twenty-fourth resistor R24, the 13th pin of the expansion serial port chip U2 is connected to one end of the twenty-fifth resistor R25, and the fourteenth pin of the expansion serial port chip U2 is connected to one end of the twenty-sixth resistor R26.

[0081] The other end of the eighteenth resistor R18, the other end of the nineteenth resistor R19, the other end of the twentieth resistor R20, the other end of the twenty-first resistor R21, the other end of the twenty-second resistor R22, the other end of the twenty-third resistor R23, the other end of the twenty-fourth resistor R24, the other end of the twenty-fifth resistor R25 and the other end of the twenty-sixth resistor R26 are all connected to the power switch module 40. The first pin of the expansion serial port chip U2, the fourth pin of the expansion serial port chip U2, the 19th pin of the expansion serial port chip U2, the 32nd pin of the expansion serial port chip U2, the 40th pin of the expansion serial port chip U2 and the 41st pin of the expansion serial port chip U2 are all grounded.

[0082] The 39th pin of the expansion serial port chip U2 is connected to one end of the 27th resistor R27, the 38th pin of the expansion serial port chip U2 is connected to one end of the 28th resistor R28, the 22nd pin of the expansion serial port chip U2 is connected to one end of the 29th resistor R29, the 23rd pin of the expansion serial port chip U2 is connected to one end of the 30th resistor R30, the 9th pin of the expansion serial port chip U2 is connected to one end of the 31st resistor R31, the 8th pin of the expansion serial port chip U2 is connected to one end of the 32nd resistor R32, the 31st pin of the expansion serial port chip U2 is connected to one end of the 33rd resistor R33, the 30th pin of the expansion serial port chip U2 is connected to one end of the 34th resistor R34, and the 48th pin of the expansion serial port chip U2 is connected to one end of the 35th resistor R35.

[0083] The 47th pin of the expansion serial port chip U2 is connected to one end of the 36th resistor R36, the 46th pin of the expansion serial port chip U2 is connected to one end of the 37th resistor R37, the 37th pin of the expansion serial port chip U2 is connected to one end of the 38th resistor R38, the 34th pin of the expansion serial port chip U2 is connected to one end of the 39th resistor, the 29th pin of the expansion serial port chip U2 is connected to one end of the 40th resistor R40, the 28th pin of the expansion serial port chip U2 is connected to one end of the 41st resistor R41, the 27th pin of the expansion serial port chip U2 is connected to one end of the 42nd resistor R42, the 26th pin of the expansion serial port chip U2 is connected to the 4 One end of the thirteenth resistor R43 is connected, the 25th pin of the expansion serial port chip U2 is connected to one end of the forty-fourth resistor R44, the 24th pin of the expansion serial port chip U2 is connected to one end of the forty-fifth resistor R45, the 21st pin of the expansion serial port chip U2 is connected to one end of the forty-sixth resistor R46, the 20th pin of the expansion serial port chip U2 is connected to one end of the forty-seventh resistor R47, the 17th pin of the expansion serial port chip U2 is connected to one end of the forty-eighth resistor R48, the 16th pin of the expansion serial port chip U2 is connected to one end of the forty-ninth resistor R49, and the 15th pin of the expansion serial port chip U2 is connected to one end of the fiftieth resistor R50.

[0084] The other end of the thirty-fifth resistor R35, the other end of the thirty-sixth resistor R36, the other end of the thirty-seventh resistor R37, the other end of the thirty-eighth resistor R38, the other end of the thirty-ninth resistor, the other end of the fortieth resistor R40, the other end of the forty-first resistor R41, the other end of the forty-second resistor R42 and the other end of the forty-third resistor R43, the other end of the forty-fourth resistor R44, the other end of the forty-fifth resistor R45, the other end of the forty-sixth resistor R46, the other end of the forty-seventh resistor R47, the other end of the forty-eighth resistor R48, the other end of the forty-ninth resistor R49 and the other end of the fiftieth resistor R50 are all grounded.

[0085] Specifically, the eighteenth resistor R18 is 10KΩ, the nineteenth resistor R19 is 10KΩ, the twentieth resistor R20 is 10KΩ, the twenty-first resistor R21 is 10KΩ, the twenty-second resistor R22 is 10KΩ, the twenty-third resistor R23 is 10KΩ, the twenty-fourth resistor R24 ​​is 10KΩ, the twenty-fifth resistor R25 is 10KΩ, and the twenty-sixth resistor R26 is 10KΩ; the twenty-seventh resistor R27 is 22Ω, the twenty-eighth resistor R28 is 22Ω, the twenty-ninth resistor R29 is 22Ω, the thirtieth resistor R30 is 22Ω, the thirty-first resistor R31 is 22Ω, the thirty-second resistor R32 is 22Ω, the thirty-third resistor R33 is 22Ω, and the thirty-fourth resistor R34 is 22Ω.

[0086] The thirty-fifth resistor R35 is 10KΩ, the thirty-sixth resistor R36 is 10KΩ, the thirty-seventh resistor R37 is 10KΩ, the thirty-eighth resistor R38 is 10KΩ, the thirty-ninth resistor is 10KΩ, the fortieth resistor R40 is 10KΩ, the forty-first resistor R41 is 10KΩ, the forty-second resistor R42 is 10KΩ, the forty-third resistor R43 is 10KΩ, the forty-fourth resistor R44 is 10KΩ, the forty-fifth resistor R45 is 10KΩ, the forty-sixth resistor R46 is 10KΩ, the forty-seventh resistor R47 is 10KΩ, the forty-eighth resistor R48 is 10KΩ, the forty-ninth resistor R49 is 10KΩ, and the fiftieth resistor R50 is 10KΩ.

[0087] In order to better understand the present invention, the following Figure 2 and Figure 3 The working principle of the UART expansion circuit based on USB conversion of the utility model is described in detail:

[0088] In this embodiment, one USB Hub control module 20 is connected to four expansion serial port modules 30, each expansion serial port module 30 is connected to one power switch module 40, and the USB Hub control module 20 converts one USB input signal into four USB output signals, and each USB output signal is expanded into four UART signals. At this time, M=N=4.

[0089] MCU (microcontroller 10) receives a USB input signal through the USB input signal port (applied Figure 3 The USB Hub controller chip U1 converts 1-way USB input signal into 4-way USB input signals (corresponding to Figure 3 Among them, there are four signals: USB_DM1 and USB_DP1, USB_DM2 and USB_DP2, USB_DM3 and USB_DP3, and USB_DM4 and USB_DP4).

[0090] Then, the MCU sorts the four expansion serial port chips U2 connected to it and numbers them 1-4, so four branches numbered 1-4 are formed. Then, the MCU transmits the high-level switch control signal to the base of the transistor Q1 in sequence (from number 1 to number 4) according to the target sorting. At this time, the transistor Q1 is turned on, the MOS tube Q2 is also turned on, the power supply circuit is turned on, and the power supply 1 provides the power supply voltage (corresponding to Figure 3 VCC_3V3 in the circuit is filtered by the eleventh capacitor C11, the twelfth capacitor C12, the thirteenth capacitor C13 and the fourteenth capacitor C14 to supply power to the corresponding expansion serial port chip U2:

[0091] That is, firstly, the expansion serial port chip U2 on the first path is powered on, so as to identify the USB device on the expansion serial port chip U2 in the first path, and then identify the 4-way UART device address expanded on the first path; then, the expansion serial port chip U2 on the second path is powered on, so as to identify the USB device on the expansion serial port chip U2 in the second path, and then identify the 4-way UART device address expanded on the second path, and so on, until all branches are powered on. By controlling the power-on timing of multiple USB to UART chips, one USB input device expands into four USB output devices, and each USB output device expands into four UART devices, thereby realizing automatic identification of one USB device expanding into 16 UART devices.

[0092] In the utility model, a conversion circuit structure of one USB to multiple USB and then to UART is formed first, and an IO port and a MOS tube Q2 are added to each USB device to control the power supply of the USB device, and the corresponding USB to UART device address is specified by the power-on sequence of the USB to UART device, so that different USB devices can be powered on in sequence, so as to identify the powered-on USB devices in sequence, and the MCU can identify multiple identical USB to UART chip addresses, and then control multiple UART devices expanded by the USB to UART expansion chip. Then, it can be used in various application scenarios that require USB-HUB to expand multiple USB interfaces and multiple USB to expand multiple UART peripherals.

[0093] Furthermore, the embodiment of the present application provides a USB extended multi-channel UART terminal device, including a PCB board, on which the above-mentioned UART expansion circuit based on USB conversion is arranged. Since the above-mentioned UART expansion circuit based on USB conversion is described in detail, it will not be repeated here.

[0094] In summary, the utility model provides a UART expansion circuit and terminal equipment based on USB conversion, the circuit includes: a microcontroller, a USB Hub control module, M expansion serial port modules and M power switch modules; the M expansion serial port modules are all connected to the USB Hub control module; one expansion serial port module and one power switch module are correspondingly connected, and each power switch module is also connected to the microcontroller; the USB Hub control module is used to convert 1 USB input signal transmitted by the microcontroller into M USB output signals; each power switch module is used to switch its own working state according to the switch control signal transmitted by the microcontroller, so as to control the access of the power supply to power the expansion serial port module corresponding to the power switch module; the expansion serial port module is used to expand the USB output signal after normal power supply to obtain N UART signals, thereby realizing efficient identification of multiple identical USB to UART chip addresses.

[0095] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. A UART expansion circuit based on USB conversion, characterized in that: include: A microcontroller, a USB Hub control module, M expansion serial port modules and M power switch modules; the M expansion serial port modules are all connected to the USB Hub control module; one expansion serial port module is correspondingly connected to one power switch module, and each power switch module is also connected to the microcontroller; The USB Hub control module is used to convert 1 USB input signal transmitted by the microcontroller into M USB output signals; each of the power switch modules is used to switch its own working state according to the switch control signal transmitted by the microcontroller, so as to control the access of the power supply to power the expansion serial port module corresponding to the power switch module; The expansion serial port module is used to expand the USB output signal to obtain N UART signals after normal power supply.

2. The UART expansion circuit based on USB conversion according to claim 1, characterized in that: The microcontroller is used to transmit the switch control signal to all the power switch modules in sequence according to the target order, so as to control the power supply to supply power to the correspondingly connected expansion serial port modules in sequence when the power switch modules are in normal working state in sequence.

3. The UART expansion circuit based on USB conversion according to claim 1, characterized in that, Each of the power switch modules includes: a switch unit and a filter unit; the switch unit is used to control its own switch state according to the switch control signal, and when in a closed state, transmits the power supply voltage to the filter unit; the filter unit is used to filter the supply voltage to power the expansion serial port module corresponding to the power switch module.

4. The UART expansion circuit based on USB conversion according to claim 3, characterized in that: The USB Hub control module includes: a USB input signal port, a USB Hub controller chip, M USB output signal ports, a first capacitor, a second capacitor, a third capacitor, a fourth capacitor, a fifth capacitor, a sixth capacitor, a seventh capacitor, an eighth capacitor, a first resistor, a second resistor, a third resistor, a fourth resistor, a fifth resistor and a sixth resistor; the USB input signal port is used to connect to the microcontroller; each of the USB output signal ports is used to connect to a corresponding one of the expansion serial port modules; The first overcurrent detection input terminal of the USB Hub controller chip is connected to one end of the first resistor, and the other end of the first resistor is connected to the power supply; the second overcurrent detection input terminal of the USB Hub controller chip is connected to one end of the second resistor, and the other end of the second resistor is connected to the power supply; The first power supply terminal of the USB Hub controller chip is respectively connected to one end of the first capacitor and one end of the second capacitor, and the other end of the second capacitor and the other end of the second capacitor are both grounded; the second power supply terminal of the USB Hub controller chip is respectively connected to one end of the third capacitor and one end of the fourth capacitor, and the other end of the third capacitor and the other end of the fourth capacitor are both grounded; The third power supply terminal of the USB Hub controller chip is respectively connected to one end of the fifth capacitor and one end of the sixth capacitor, and the other end of the fifth capacitor and the other end of the sixth capacitor are both grounded; the third overcurrent detection input terminal of the USB Hub controller chip is connected to one end of the third resistor, and the other end of the third resistor is connected to the power supply; the fourth overcurrent detection input terminal of the USB Hub controller chip is connected to one end of the fourth resistor, and the other end of the fourth resistor is connected to the power supply; The upstream USB signal reverse input terminal of the USB Hub controller chip is connected to one end of the fifth resistor, and the other end of the fifth resistor is connected to the microcontroller; the upstream USB signal forward input terminal of the USB Hub controller chip is connected to one end of the sixth resistor, and the other end of the sixth resistor is connected to the microcontroller.

5. The UART expansion circuit based on USB conversion according to claim 3, characterized in that: The switch unit includes: a timing input port, a seventh resistor, an eighth resistor, a ninth resistor, a tenth resistor, an eleventh resistor, a triode, a MOS tube, a ninth capacitor, a tenth capacitor and a magnetic bead; The base of the transistor is connected to one end of the seventh resistor and one end of the eighth resistor respectively, the collector of the transistor is connected to one end of the ninth resistor and the gate of the MOS transistor respectively, the emitter of the transistor and the other end of the eighth resistor are both grounded; the other end of the seventh resistor is connected to the microcontroller; The source of the MOS tube, the other end of the ninth resistor and one end of the tenth resistor are all connected to the power supply, and the drain of the MOS tube is respectively connected to the other end of the tenth resistor, one end of the eleventh resistor, one end of the ninth capacitor, one end of the tenth capacitor and one end of the magnetic bead; the other end of the eleventh resistor, the other end of the ninth capacitor and the other end of the tenth capacitor are all grounded; the other end of the magnetic bead is connected to the filtering unit.

6. The UART expansion circuit based on USB conversion according to claim 5, characterized in that: The filtering unit comprises: an eleventh capacitor, a twelfth capacitor, a thirteenth capacitor and a fourteenth capacitor; One end of the eleventh capacitor, one end of the twelfth capacitor, one end of the thirteenth capacitor, one end of the fourteenth capacitor and the other end of the magnetic bead are all connected to the corresponding expansion serial port module; the other end of the eleventh capacitor, the other end of the twelfth capacitor, the other end of the thirteenth capacitor and the other end of the fourteenth capacitor are all grounded.

7. The UART expansion circuit based on USB conversion according to claim 6, characterized in that: Each of the expansion serial port modules comprises: an expansion serial port chip, a twelfth resistor, a thirteenth resistor, a fifty-first resistor and a fifty-second resistor; The first power supply terminal, the second power supply terminal, the third power supply terminal, the fourth power supply terminal and the fifth power supply terminal of the expansion serial port chip are respectively connected to one end of the eleventh capacitor, one end of the twelfth capacitor, one end of the thirteenth capacitor, one end of the fourteenth capacitor and the other end of the magnetic bead, and the serial data input terminal of the expansion serial port chip is connected to one end of the twelfth resistor; The serial clock input end of the extended serial port chip is connected to one end of the thirteenth resistor, and the other end of the twelfth resistor and the other end of the thirteenth resistor are respectively connected to one end of the eleventh capacitor, one end of the twelfth capacitor, one end of the thirteenth capacitor, one end of the fourteenth capacitor and the other end of the magnetic bead.

8. The UART expansion circuit based on USB conversion according to claim 4, characterized in that: The USB Hub control module further includes: a fourteenth resistor, a fifteenth resistor, a sixteenth resistor and a seventeenth resistor; The power supply mode configuration end of the USB Hub controller chip is respectively connected to one end of the fourteenth resistor and one end of the fifteenth resistor, the other end of the fourteenth resistor is connected to the power supply, and the other end of the fifteenth resistor is grounded; The overcurrent protection end of the USB Hub controller chip is respectively connected to one end of the sixteenth resistor and one end of the fifteenth resistor, the other end of the sixteenth resistor is connected to the power supply, and the other end of the seventeenth resistor is grounded.

9. The UART expansion circuit based on USB conversion according to claim 5, characterized in that: The timing input port is used to sequentially receive the switch control signals transmitted by the microcontroller according to target sorting; the other end of the seventh resistor is connected to the microcontroller via the timing input port.

10. A USB extended multi-channel UART terminal device, comprising a PCB board, characterized in that: The PCB board is provided with a UART expansion circuit based on USB conversion as described in any one of claims 1-9.