CN116049068B - Current backflow prevention circuit for USB HUB and method thereof - Google Patents

Current backflow prevention circuit for USB HUB and method thereof Download PDF

Info

Publication number
CN116049068B
CN116049068B CN202310315689.6A CN202310315689A CN116049068B CN 116049068 B CN116049068 B CN 116049068B CN 202310315689 A CN202310315689 A CN 202310315689A CN 116049068 B CN116049068 B CN 116049068B
Authority
CN
China
Prior art keywords
circuit
capacitor
resistor
vbus
usb hub
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310315689.6A
Other languages
Chinese (zh)
Other versions
CN116049068A (en
Inventor
王芳勤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Xfanic Technology Co Ltd
Original Assignee
Shenzhen Xfanic Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Xfanic Technology Co Ltd filed Critical Shenzhen Xfanic Technology Co Ltd
Priority to CN202310315689.6A priority Critical patent/CN116049068B/en
Publication of CN116049068A publication Critical patent/CN116049068A/en
Application granted granted Critical
Publication of CN116049068B publication Critical patent/CN116049068B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/266Arrangements to supply power to external peripherals either directly from the computer or under computer control, e.g. supply of power through the communication port, computer controlled power-strips
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K17/00Electronic switching or gating, i.e. not by contact-making and –breaking
    • H03K17/51Electronic switching or gating, i.e. not by contact-making and –breaking characterised by the components used
    • H03K17/56Electronic switching or gating, i.e. not by contact-making and –breaking characterised by the components used by the use, as active elements, of semiconductor devices
    • H03K17/687Electronic switching or gating, i.e. not by contact-making and –breaking characterised by the components used by the use, as active elements, of semiconductor devices the devices being field-effect transistors
    • H03K17/6871Electronic switching or gating, i.e. not by contact-making and –breaking characterised by the components used by the use, as active elements, of semiconductor devices the devices being field-effect transistors the output circuit comprising more than one controlled field-effect transistor
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M1/00Analogue/digital conversion; Digital/analogue conversion
    • H03M1/12Analogue/digital converters
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0042Universal serial bus [USB]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Direct Current Feeding And Distribution (AREA)

Abstract

The invention belongs to the technical field of USB HUB, and relates to a current backflow prevention circuit and a current backflow prevention method for the USB HUB, wherein the circuit comprises the following components: through MCU master control circuit, first signal conditioning circuit, hot plug detection circuit, switch drive circuit, second signal conditioning circuit, vbus power input circuit and DC power input circuit of electrical connection, vbus power input circuit is used for supplying power to the Vbus power input, DC power input circuit is used for DC power input power supply, MCU master control circuit is used for the control of the anti-current backflow circuit that is used for USB HUB, first signal conditioning circuit is used for reducing Vbus signal output impedance, hot plug detection circuit is used for detecting the hot plug of Vbus signal. The invention can effectively prevent the current of the DC end from flowing backward to the Vbus end, effectively protect the host computers such as computers and mobile phones, and improve the quality of the products and the use satisfaction of users.

Description

Current backflow prevention circuit for USB HUB and method thereof
Technical Field
The invention relates to the technical field of USB HUB, in particular to a current backflow prevention circuit for a USB HUB and a method thereof.
Background
Currently in USB HUB with DC power supply, the Vbus of the USB is not effectively isolated from the DC supply voltage. The result is that: as long as the voltage at one end of the computer host is low, the current at the other end can flow backward to the end of the host, so that the computer can be burnt out, and potential safety hazards are brought to products. At present, a lot of products are returned often because of the power supply problem of the products, and the power supply problem is closely related to whether the power supply is isolated, so that the user experience can be better improved by solving the power supply isolation problem.
Disclosure of Invention
The technical problem to be solved by the invention is that in the current USB HUB with DC power supply, the Vbus of the USB is not effectively isolated from the DC power supply voltage, so that the current at one end of the host machine can flow backward to the end of the host machine as long as the voltage at the other end of the host machine is low, and potential safety hazard is caused. In view of the foregoing drawbacks of the prior art, in one aspect, the present invention provides an anti-current backflow circuit for a USB HUB, comprising: the MCU main control circuit is respectively connected with the first signal conditioning circuit, the hot plug detection circuit, the switch driving circuit and the second signal conditioning circuit, the Vbus power input circuit and the DC power input circuit, the first signal conditioning circuit is connected with the Vbus power input circuit, the second signal conditioning circuit is connected with the DC power input circuit, the Vbus power input circuit is used for supplying power to the Vbus power input of the current backflow prevention circuit for the USB HUB, the DC power input circuit is used for supplying power to the DC power input of the current backflow prevention circuit for the USB HUB, the MCU main control circuit is used for controlling the current backflow prevention circuit for the USB HUB, the first signal conditioning circuit is used for reducing the output impedance of a bus signal, the hot plug detection circuit is used for detecting the Vbus hot plug, the switch driving circuit is used for driving a tube, and the second signal conditioning circuit is used for reducing the DC impedance of the bus signal output;
the first signal conditioning circuit includes: the positive power end 4 of the amplifier U3-D is respectively connected with one end of the capacitor C13 and one end of the capacitor C12, the other end of the capacitor C13 and the other end of the capacitor C12 are connected and grounded, the GND end 11 of the amplifier U3-D is connected with one end of the resistor RA20, the non-inverting input end 12 and the output end 14 of the amplifier U3-D are connected with ADC_VBUS signals, the inverting input end 13 of the amplifier U3-D is respectively connected with one end of the resistor RA19 and the other end of the resistor RA20, the other end of the resistor RA19 is connected with one end of the capacitor C14, and the other end of the capacitor C14 is grounded; the non-inverting input end 5 and the output end 7 of the amplifier U5-B are connected with ADC_VBUSM signals, the inverting input end 6 of the amplifier U5-B is respectively connected with one end of a resistor RA21 and one end of a resistor RA22, the other end of the resistor RA21 is connected with one end of a capacitor C17, and the other end of the capacitor C17 and the other end of the resistor RA22 are grounded;
the second signal conditioning circuit includes: the non-inverting input end 5 and the output end 7 of the amplifier U4-B are connected with ADC_D5VM signals, the inverting input end 6 of the amplifier U4-B is respectively connected with one end of a resistor RA15 and one end of a resistor RA16, the other end of the resistor RA15 is connected with one end of a capacitor C8, and the other end of the capacitor C8 and the other end of the resistor RA16 are grounded; the non-inverting input end 5 and the output end 7 of the amplifier U3-B are connected with ADC_DC5V signals, the inverting input end 6 of the amplifier U3-B is respectively connected with one end of a resistor RA17 and one end of a resistor RA18, the other end of the resistor RA17 is connected with one end of a capacitor C11, and the other end of the capacitor C11 and the other end of the resistor RA18 are grounded.
Preferably, the MCU master control circuit comprises an MCU control chip circuit, an MCU upgrading circuit and an MCU power supply circuit which are electrically connected.
Preferably, the hot plug detection circuit includes: the capacitor C9, the resistor RA3, the resistor RA9, and the resistor RA10 connected in series receive the hot PLUG signal vbus_plug from the connection point between the resistor RA9 and the resistor RA 10.
Preferably, the switch driving circuit includes: the drain D of the field effect transistor QA1 is respectively connected with the positive electrode of the capacitor C15, one end of the capacitor C16 and the drain D of the field effect transistor QB1, the negative electrode of the capacitor C15 and the other end of the capacitor C16 are grounded, the source S of the field effect transistor QB1 is respectively connected with one end of the resistor RA6, the positive electrode of the capacitor C6 and one end of the capacitor C7, the negative electrode of the capacitor C6 and the other end of the capacitor C7 are grounded, the gate G of the field effect transistor QB1 is connected with one end of the resistor RA1 and the other end of the resistor RA6, the source S of the field effect transistor QA1 is respectively connected with the other end of the resistor RA5 and one end of the resistor RA2, the gate G of the field effect transistor QA1 is respectively connected with one end of the resistor RA13 and one end of the resistor RA7, the source S of the field effect transistor Q5 is connected with the other end of the resistor RA7, the drain D of the field effect transistor Q5 is connected with the other end of the resistor RA2, and the drain D of the field effect transistor Q1 is connected with one end of the resistor RA1 and one end of the resistor RA8 is respectively connected with one end of the resistor RA1 and one end of the resistor RA 8.
Preferably, the Vbus power input circuit includes: the pin 1 of the audio-video connector U2 is respectively connected with one end of a diode D10, one end of a diode D9, the anode of a capacitor C3 and one end of a capacitor C4, and the other end of the diode D10, the other end of the diode D9, the cathode of the capacitor C3 and the other end of the capacitor C4 are grounded.
Preferably, the MCU power supply circuit includes: the pin 1 of the three-terminal voltage regulator U1 is connected with one end of the capacitor C53, the pin 2 of the three-terminal voltage regulator U1 is connected with one end of the capacitor C29 and one end of the capacitor C51 respectively, the other end of the capacitor C29 and the other end of the capacitor C51 are grounded, and the pin 3 of the three-terminal voltage regulator U1 is connected with one end of the capacitor C52 and one end of the capacitor C53 respectively, and the other end of the capacitor C52 is grounded.
Preferably, the DC power input circuit includes: the capacitor C1 is connected in series with the capacitor C2.
On the other hand, the invention also provides a current backflow prevention method for the USB HUB, which adopts the circuit and executes the following steps:
initializing an MCU main control circuit, and detecting hot plug signals of Vbus and Vdc;
ADC sampling through the first signal conditioning circuit and the second signal conditioning circuit, and when the voltages of the Vbus end and the Vdc end are detected to be larger than 4.2V, switching on a field effect transistor QA;
the voltage of the Vbus terminal and the voltage of the Vdc terminal are compared in a polling way;
when the Vbus terminal voltage is greater than the Vdc terminal voltage, the field effect transistor QA is turned off, or when the Ibus current is not less than 2A, the field effect transistor QA is turned off.
The current backflow prevention circuit for the USB HUB and the method thereof have the following beneficial effects: through the arrangement of the MCU main control circuit, the first signal conditioning circuit, the hot plug detection circuit, the switch driving circuit, the second signal conditioning circuit, the Vbus power input circuit and the DC power input circuit which are electrically connected, the Vbus power input circuit supplies power to the Vbus power input, the DC power input circuit supplies power to the DC power input, the MCU main control circuit controls the current backflow prevention circuit for the USB HUB, the first signal conditioning circuit reduces the output impedance of Vbus signals, the hot plug detection circuit detects the hot plug of the Vbus, the switch driving circuit drives the MOS tube, and the second signal conditioning circuit reduces the output impedance of the DC signals; the invention can effectively prevent the current of the DC end from flowing backward to the Vbus end, can effectively protect the host computers such as computers and mobile phones, and can improve the quality of the product and the use satisfaction of users.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to the structures shown in these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of an anti-current back-flow circuit for a USB HUB according to the present invention;
FIG. 2 is a circuit diagram of an MCU control chip used in the current backflow prevention circuit of the USB HUB of the present invention;
FIG. 3 is a circuit diagram of an MCU upgrade circuit in the current backflow prevention circuit for a USB HUB of the present invention;
FIG. 4 is a circuit diagram of the MCU supply circuit in the current backflow prevention circuit for the USB HUB of the present invention;
FIG. 5 is a circuit diagram of a first signal conditioning circuit in the anti-current sink circuit for a USB HUB of the present invention;
FIG. 6 is a circuit diagram of a second signal conditioning circuit in the anti-current sink circuit of the present invention for a USB HUB;
FIG. 7 is a circuit diagram of a hot plug detection circuit, switch drive circuit, vbus power input circuit, and DC power input circuit for use in the anti-current sink circuit of a USB HUB of the present invention;
FIG. 8 is a flow chart of the current backflow prevention method for the USB HUB.
In the figure, a 10-MCU main control circuit, a 20-first signal conditioning circuit, a 30-hot plug detection circuit, a 40-switch driving circuit, a 50-second signal conditioning circuit, a 60-Vbus power input circuit and a 70-DC power input circuit are arranged.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that, if directional indications (such as up, down, left, right, front, and rear … …) are included in the embodiments of the present invention, the directional indications are merely used to explain the relative positional relationship, movement conditions, etc. between the components in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indications are correspondingly changed.
In addition, if there is a description of "first", "second", etc. in the embodiments of the present invention, the description of "first", "second", etc. is for descriptive purposes only and is not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present invention.
Example 1
Fig. 1 is a schematic structural diagram of a current backflow prevention circuit for USB HUB according to the present invention. As shown in fig. 1, in the current backflow prevention circuit for a USB HUB according to the first embodiment of the present invention, at least: the MCU master control circuit 10 is respectively connected with the first signal conditioning circuit 20, the hot plug detection circuit 30, the switch driving circuit 40, the second signal conditioning circuit 50, the Vbus power input circuit 60 and the DC power input circuit 70 through electrical connection, wherein the MCU master control circuit 10 is connected with the first signal conditioning circuit 20, the hot plug detection circuit 30, the switch driving circuit 40 and the second signal conditioning circuit 50, the first signal conditioning circuit 20 is connected with the Vbus power input circuit 60, the second signal conditioning circuit 50 is connected with the DC power input circuit 70, the Vbus power input circuit 60 is used for supplying power to the DC power input of the anti-current backflow circuit for the USB HUB, the DC power input circuit 70 is used for supplying power to the DC power input of the anti-current backflow circuit for the USB HUB, the MCU master control circuit 10 is used for controlling the anti-current backflow circuit for the USB HUB, the first signal conditioning circuit 20 is used for reducing the output impedance of the Vbus signal, the hot plug detection circuit 30 is used for detecting the Vbus hot plug, the switch driving circuit 40 is used for driving a tube, and the second signal conditioning circuit 50 is used for reducing the DC output impedance. The Vbus signal output impedance refers to: at the Vbus signal output, the ratio of the output voltage to the output current is the Vbus signal output impedance. The DC signal output impedance refers to: at the DC signal output, the ratio of the output voltage to the output current is the DC signal output impedance.
When the DC power supply is not connected, no current backflow phenomenon exists; when the DC power supply is connected, no current flows backward to the computer without connecting with the computer host; when the DC power supply and the computer host are connected, no matter what power supply has internal resistance, the larger the load is, the worse the load is, and the faster the voltage drops. The MCU obtains the sampled values of the Vbus terminal voltage and the Vdc terminal voltage (e.g., vbus=0x34; vdc=0x45) from the first signal conditioning circuit 20 and the second signal conditioning circuit 50, and then converts the sampled values to calculate the true voltage value (e.g., vbus=5.02V, vdc=5.02V). Comparing the sizes of Vbus and Vdc, if Vbus is larger than or equal to Vdc, vout, vbus, vdc, the relation between the three is: vout < Vdc < Vbus, indicating that the current load is lighter and the field effect transistor QA does not need to be turned off; if Vbus < Vdc, the relationship among the three Vout, vbus, vdc is: vbus < Vout < Vdc or Vout < Vbus < Vdc indicates that the current load is heavy and that there is a risk of backflow to the computer from the Vbus side.
The MCU master control circuit 10 comprises an MCU control chip circuit, an MCU upgrade circuit and an MCU power supply circuit which are electrically connected. Fig. 2 is a circuit diagram of an MCU control chip used in the current backflow prevention circuit of the USB HUB of the present invention. As shown in fig. 2, the MCU control chip circuit includes: and (3) an MCU. The MCUs include, but are not limited to, N76E003, stm32F030, CH552, etc., as long as they can output PWM waveforms, and the present embodiment selects N76E 003. The N76E003 pin 9 is respectively connected with one end of the capacitor C5 and one end of the capacitor C178, and the voltage input is DC3.3V. The N76E003 does not need to be externally connected with a clock crystal oscillator, a minimum system can be formed only by a reset circuit, and the reset circuit also uses a 10K resistor and a10 uf capacitor, so that N76E003 hardware reset is realized by pressing a button. Two LEDs, a power LED and a GPIO LED are arranged in the N76E003, and the GPIO LED can be lightened to indicate the running state of a program when debugging codes. N76E003 is a new Tang Gaosu T8051 single chip microcomputer series product, 18 KB Flash ROM, can be configured with Dataflash and high-capacity 1 KB SRAM, supports 2.4V to 5.5V wide working voltage and-40 ℃ to 105 ℃ working temperature, and has high anti-interference capability of 7 kVESD/4 kV EFT. N76E003 provides up to 18I/O pins under a20 pin package; the periphery contains dual serial ports, SPI, IC, 6 channel PWM outputs.
Fig. 3 is a circuit diagram of an MCU upgrade circuit in the current backflow prevention circuit for USB HUB of the present invention. As shown in fig. 3, the MCU upgrade circuit includes: resistor R8 is connected in series with capacitor C181. The bootloader program is burnt into the MCU storage area, so that the ISP is convenient to upgrade. The ISP upgrade protocol is a standard file transmission protocol, and the program can be upgraded through a serial port. Different MCU starting modes can be set by configuring different levels of a BOOT pin. In ISP mode, BOOT0 is set to be 1, BOOT1 is set to be 0, and MCU upgrading function can be achieved.
Fig. 4 is a circuit diagram of the MCU power supply circuit in the current backflow prevention circuit for USB HUB of the present invention. As shown in fig. 4, the pin 1 of the three-terminal voltage regulator U1 is connected to one end of the capacitor C53, the pin 2 of the three-terminal voltage regulator U1 is connected to one end of the capacitor C29 and one end of the capacitor C51, the other end of the capacitor C29 and the other end of the capacitor C51 are grounded, the pin 3 of the three-terminal voltage regulator U1 is connected to one end of the capacitor C52 and one end of the capacitor C53, and the other end of the capacitor C52 is grounded. In this embodiment, the three terminal regulator U1 selects AMS1117-3.3. The voltage stabilizing adjustment tube of the AMS1117 consists of a PNP driven NPN tube, and two versions of fixed and adjustable are available. AMS1117 provides current limiting and thermal protection, and the circuit contains 1 zener regulated bandgap reference voltage to ensure accuracy of the output voltage to within ±1%. AMS1117 series has LLP, TO-263, SOT-223, TO-220, and TO-252D-PAK packages. The AMS1117 output requires a tantalum capacitance of at least 10uF to improve transient response and stability. The AMS1117 is a voltage-adjustable version, and an output voltage range of 1.25-13.8V can be realized through 2 external resistors. The fixed output voltage may be: 1.2V,1.5V,1.8V,2.5V,2.85V,3.0V,3.3V and 5.0V. AMS1117-3.3 is a forward low dropout regulator with an output voltage of 3.3V, and is suitable for high efficiency linear regulators.
Fig. 5 is a circuit diagram of a first signal conditioning circuit 20 in the current sink prevention circuit for a USB HUB of the present invention. As shown in fig. 5, the first signal conditioning circuit 20 includes: the positive power end 4 of the amplifier U3-D is respectively connected with one end of the capacitor C13 and one end of the capacitor C12, one end of the capacitor C13 and one end of the capacitor C12 are connected and grounded, the GND end 11 of the amplifier U3-D is connected with one end of the resistor RA20, the non-inverting input end 12 and the output end 14 of the amplifier U3-D are connected with ADC_VBUS signals, the inverting input end 13 of the amplifier U3-D is respectively connected with one end of the resistor RA19 and the other end of the resistor RA20, the other end of the resistor RA19 is connected with one end of the capacitor C14, and the other end of the capacitor C14 is grounded; the non-inverting input end 5 and the output end 7 of the amplifier U5-B are connected with ADC_VBUSM signals, the inverting input end 6 of the amplifier U5-B is respectively connected with one end of a resistor RA21 and one end of a resistor RA22, the other end of the resistor RA21 is connected with one end of a capacitor C17, and the other end of the capacitor C17 and the other end of the resistor RA22 are grounded. Resistor RA19, resistor RA20 and amplifier U3-D form a voltage follower which is an op-amp based voltage follower circuit. Because the input impedance of the ADC in the MCU is relatively large, the voltage change of the current backflow prevention circuit for the USB HUB needs to be monitored in real time, and the monitoring requirement is high, the operational amplifier is required to be buffered, so that the signal output impedance is reduced.
Because the input impedance of the ADC in the MCU is relatively large, the current backflow prevention circuit for the USB HUB needs to monitor the voltage change in real time and needs higher precision, so that the operational amplifier is needed to buffer, and the signal output impedance is reduced. Resistors RA19, RA20 and amplifiers U3-D form a voltage follower.
Fig. 6 is a circuit diagram of a second signal conditioning circuit 50 in the current sink prevention circuit for a USB HUB of the present invention. As shown in fig. 6, the second signal conditioning circuit 50 includes: the non-inverting input end 5 and the output end 7 of the amplifier U4-B are connected with ADC_D5VM signals, the inverting input end 6 of the amplifier U4-B is respectively connected with one end of a resistor RA15 and one end of a resistor RA16, the other end of the resistor RA15 is connected with one end of a capacitor C8, and the other end of the capacitor C8 and the other end of the resistor RA16 are grounded; the non-inverting input end 5 and the output end 7 of the amplifier U3-B are connected with ADC_DC5V signals, the inverting input end 6 of the amplifier U3-B is respectively connected with one end of a resistor RA17 and one end of a resistor RA18, the other end of the resistor RA17 is connected with one end of a capacitor C11, and the other end of the capacitor C11 and the other end of the resistor RA18 are grounded. Resistor RA15, resistor RA16 and amplifier U4-B form a voltage follower which is an op-amp based voltage follower circuit. Because the input impedance of the ADC in the MCU is relatively large, the voltage change of the current backflow prevention circuit for the USB HUB needs to be monitored in real time, and the monitoring requirement is high, the operational amplifier is required to be buffered, so that the signal output impedance is reduced.
Fig. 7 is a circuit diagram of the hot plug detection circuit 30, the switch drive circuit 40, the Vbus power input circuit 60, and the DC power input circuit 70 used in the current backflow prevention circuit of the USB HUB of the present invention. As shown in fig. 7, the resistors RA3 and RA4 are sampling resistors.
The hot plug detection circuit 30 includes: the capacitor C9, the resistor RA3, the resistor RA9, and the resistor RA10 connected in series receive the hot PLUG signal vbus_plug from the connection point between the resistor RA9 and the resistor RA 10. When there is a hot PLUG signal, the signal VBUS_PLUG is high, resulting from the voltage division between resistors RA9, RA 10.
The switch driving circuit 40 includes: the drain D of the field effect transistor QA1 is respectively connected with the positive electrode of the capacitor C15, one end of the capacitor C16 and the drain D of the field effect transistor QB1, the negative electrode of the capacitor C15 and the other end of the capacitor C16 are grounded, the source S of the field effect transistor QB1 is respectively connected with one end of the resistor RA6, the positive electrode of the capacitor C6 and one end of the capacitor C7, the negative electrode of the capacitor C6 and the other end of the capacitor C7 are grounded, the gate G of the field effect transistor QB1 is connected with one end of the resistor RA1 and the other end of the resistor RA6, the source S of the field effect transistor QA1 is respectively connected with the other end of the resistor RA5 and one end of the resistor RA2, the gate G of the field effect transistor QA1 is respectively connected with one end of the resistor RA13 and one end of the resistor RA7, the source S of the field effect transistor Q5 is connected with the other end of the resistor RA7, the drain D of the field effect transistor Q5 is connected with the other end of the resistor RA2, and the drain D of the field effect transistor Q1 is connected with one end of the resistor RA1 and one end of the resistor RA8 is respectively connected with one end of the resistor RA1 and one end of the resistor RA 8. N mos tube Q5, resistance RA5, RA13, RA7 and RA2 constitute the control circuit of P mos tube QA1, obtain VBUS and DC power voltage through ADC measurement. When the voltage Vbus is larger than or equal to Vdc, the MCU controls IO P01 to output high level, and the N MOS tube Q5 is opened. When the N mos transistor Q5 is turned on, the voltage at the terminal RA of the resistor is pulled down, so that the voltage difference between the gate G and the source S of the P mos transistor QA1 is greater than the threshold voltage Vgs, and the P mos transistor QA1 is turned on. Whereas P mos tube QA1 is turned off when Vdc > Vbus.
Vbus power input circuit 60 includes: pin 1 of USB connector U2 is connected to one end of diode D10, one end of diode D9, the positive electrode of capacitor C3, and one end of capacitor C4, respectively, and the other end of diode D10, the other end of diode D9, the negative electrode of capacitor C3, and the other end of capacitor C4 are all grounded. The capacitor C3 and the capacitor C4 are added, so that the voltage is more stable, and the diode D9 and the diode D10 are TVS protection tubes, so that the rear-end elements are protected from being burnt out due to transient high voltage caused by plugging.
The DC power input circuit 70 includes: the capacitor C1 is connected in series with the capacitor C2. Through capacitor C1 and capacitor C2 series connection, carry out the power filtering, increase capacitor C1 and capacitor C2, make the voltage smoother, stable.
The implementation of the embodiment has the following beneficial effects: through the arrangement of the MCU main control circuit, the first signal conditioning circuit, the hot plug detection circuit, the switch driving circuit, the second signal conditioning circuit, the Vbus power input circuit and the DC power input circuit which are electrically connected, the Vbus power input circuit supplies power to the Vbus power input, the DC power input circuit supplies power to the DC power input, the MCU main control circuit controls the current backflow prevention circuit for the USB HUB, the first signal conditioning circuit reduces the output impedance of Vbus signals, the hot plug detection circuit detects the hot plug of the Vbus, the switch driving circuit drives the MOS tube, and the second signal conditioning circuit reduces the output impedance of the DC signals; the invention can effectively prevent the current of the DC end from flowing backward to the Vbus end, can effectively protect the host computers such as computers and mobile phones, and can improve the quality of the product and the use satisfaction of users.
Example two
FIG. 8 is a flow chart of the current backflow prevention method for the USB HUB. As shown in fig. 8, the present invention also provides a current backflow prevention method for a USB HUB, which is performed by the current backflow prevention circuit for a USB HUB of the first embodiment, and performs the following steps:
s1, initializing an MCU main control circuit, and detecting hot plug signals of Vbus and Vdc.
And electrifying the MCU, resetting the internal chip of the MCU main control circuit, and detecting whether the Vbus and Vdc hot plug signals exist. As shown in fig. 7, the resistors RA10 and RA9 form a voltage dividing circuit, and when Vbus is accessed, voltage division is generated, and the singlechip detects a vbus_plug point signal, which indicates that the plugging action exists. Similarly, the resistors RA11 and RA12 form a voltage dividing circuit, when the Vdc is accessed, voltage division is generated, and the singlechip detects the Vdc_Plug point signal, so that the plugging action is indicated.
S2, ADC sampling through the first signal conditioning circuit and the second signal conditioning circuit, and when the voltages of the Vbus terminal and the Vdc terminal are detected to be larger than 4.2V, switching on a field effect transistor QA.
Since the Vbus terminal and Vdc terminal voltages are both lower than 4.2V and are not operated, 4.2V is taken as the detection minimum. Typically, the voltage range of the Vbus terminal and Vdc terminal is 4.2V to 5.5V. N mos tube Q5, resistance RA5, RA13, RA7 and RA2 constitute the control circuit of P mos tube QA1, obtain VBUS and DC power voltage through ADC measurement. When the voltage Vbus is larger than or equal to Vdc, the MCU controls the IO P01 to output a high level, the N MOS tube Q5 is opened, and when the Q5 is conducted, the voltage of the end of the resistor RA2 is pulled down, so that the voltage difference between the pole QA 1G and the pole S of the P MOS tube is larger than the threshold voltage Vgs, and the P MOS tube QA1 is conducted. VBUS and DC supply voltage are obtained through ADC measurement in the same way as QA.
S3, polling and comparing the voltage of the Vbus terminal and the voltage of the Vdc terminal.
The magnitude of the Vbus terminal and Vdc terminal voltages may be compared by a While dead loop.
S4, when the voltage of the Vbus terminal is smaller than the voltage of the Vdc terminal, the field effect transistor QA is turned off, and when the current of the Ibus is more than or equal to 2A, the field effect transistor QA is turned off.
Typically, the power adapter is 5v2A,10w, and protection is required beyond 2A. The Ibus current is compared to 2A here and when 2A is exceeded protection is required. RA3 and RA4 are sampling resistors respectively, ADC_VBUS and ADC_VBUSM are values obtained through an ADC signal conditioning circuit, delta U is obtained by taking the difference value of the two values, and current is obtained through the formula I=U/R.
N mos tube Q5, resistance RA5, RA13, RA7 and RA2 constitute the control circuit of P mos tube QA1, obtain VBUS and DC power voltage through ADC measurement. When the voltage Vbus > Vdc, the MCU controls the IO P01 to output a low level, the N MOS tube Q5 is closed, and when the Q5 is closed, the voltage at the end of the resistor RA is increased, so that the voltage difference between the pole QA 1G and the pole S of the P MOS tube is smaller than the threshold voltage Vgs, and the P MOS tube QA1 is cut off.
Sampling to obtain the voltage difference value between two ends of the sampling resistor through the resistor, obtaining the current through the formula I=U/R, and controlling the IO port to output high and low level to control the mos to be turned off when the current exceeds 2A.
Through the design of the embodiment, the invention has the beneficial effects that: the invention can effectively prevent the current of the DC end from flowing backward to the Vbus end, can effectively protect the host computers such as computers and mobile phones, and can improve the quality of the product and the use satisfaction of users.
While the invention has been described with reference to certain embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted without departing from the scope of the invention. In addition, many modifications may be made to adapt a particular situation to the teachings of the invention without departing from its scope. Therefore, it is intended that the invention not be limited to the particular embodiment disclosed, but that the invention will include all embodiments falling within the scope of the appended claims.

Claims (8)

1. A current backflow prevention circuit for a USB HUB, comprising:
the MCU main control circuit is respectively connected with the first signal conditioning circuit, the hot plug detection circuit, the switch driving circuit and the second signal conditioning circuit, the Vbus power input circuit and the DC power input circuit, the first signal conditioning circuit is connected with the Vbus power input circuit, the second signal conditioning circuit is connected with the DC power input circuit, the Vbus power input circuit is used for supplying power to the Vbus power input of the current backflow prevention circuit for the USB HUB, the DC power input circuit is used for supplying power to the DC power input of the current backflow prevention circuit for the USB HUB, the MCU main control circuit is used for controlling the current backflow prevention circuit for the USB HUB, the first signal conditioning circuit is used for reducing the output impedance of Vbus signals, the hot plug detection circuit is used for detecting the hot plug of the Vbus, the switch driving circuit is used for driving a tube, and the second signal conditioning circuit is used for reducing the DC output impedance of the current backflow prevention circuit;
the first signal conditioning circuit includes: the positive power end 4 of the amplifier U3-D is respectively connected with one end of the capacitor C13 and one end of the capacitor C12, and is connected with DC3V3, the other end of the capacitor C13 and the other end of the capacitor C12 are connected with each other and grounded, the GND end 11 of the amplifier U3-D is connected with one end of the resistor RA20, the non-inverting input end 12 and the output end 14 of the amplifier U3-D are both connected with ADC_VBUS signals, the inverting input end 13 of the amplifier U3-D is respectively connected with one end of the resistor RA19 and the other end of the resistor RA20, the other end of the resistor RA19 is connected with one end of the capacitor C14 and is connected with VBUS signals, and the other end of the capacitor C14 is grounded; the non-inverting input end 5 and the output end 7 of the amplifier U5-B are connected with ADC_VBUSM signals, the inverting input end 6 of the amplifier U5-B is respectively connected with one end of a resistor RA21 and one end of a resistor RA22, the other end of the resistor RA21 is connected with one end of a capacitor C17, and the other end of the capacitor C17 and the other end of the resistor RA22 are grounded;
the second signal conditioning circuit includes: the non-inverting input end 5 and the output end 7 of the amplifier U4-B are connected with ADC_D5VM signals, the inverting input end 6 of the amplifier U4-B is respectively connected with one end of a resistor RA15 and one end of a resistor RA16, the other end of the resistor RA15 is connected with one end of a capacitor C8 and connected with VDC5VM, and the other end of the capacitor C8 and the other end of the resistor RA16 are grounded; the non-inverting input end 5 and the output end 7 of the amplifier U3-B are connected with ADC_DC5V signals, the inverting input end 6 of the amplifier U3-B is respectively connected with one end of a resistor RA17 and one end of a resistor RA18, the other end of the resistor RA17 is connected with one end of a capacitor C11 and connected with VDC5V, and the other end of the capacitor C11 and the other end of the resistor RA18 are grounded.
2. The current backflow prevention circuit for the USB HUB according to claim 1, wherein the MCU master control circuit comprises an MCU control chip circuit, an MCU upgrade circuit and an MCU power supply circuit electrically connected.
3. The current backflow prevention circuit for a USB HUB of claim 1, wherein the hot plug detection circuit comprises: the capacitor C9, the resistor RA3, the resistor RA9, and the resistor RA10 connected in series receive the hot PLUG signal vbus_plug from the connection point between the resistor RA9 and the resistor RA 10.
4. The current backflow prevention circuit for a USB HUB according to claim 1, wherein the switch driving circuit comprises: the drain D of the field effect transistor QA1 is respectively connected with the positive electrode of the capacitor C15, one end of the capacitor C16 and the drain D of the field effect transistor QB1, and outputs VOUT signals, the negative electrode of the capacitor C15 and the other end of the capacitor C16 are grounded, the source S of the field effect transistor QB1 is respectively connected with one end of the resistor RA6, the positive electrode of the capacitor C6 and one end of the capacitor C7 and is connected with VDC5VM signals, the negative electrode of the capacitor C6 and the other end of the capacitor C7 are grounded, the gate G of the field effect transistor QB1 is connected with one end of the resistor RA1 and the other end of the resistor RA6, the source S of the field effect transistor QA1 is connected with one end of the resistor RA5 and is connected with VBUSM signals, the gate G of the field effect transistor QA1 is respectively connected with the other end of the resistor RA5 and one end of the resistor RA2, the gate G of the field effect transistor Q5 is respectively connected with one end of the resistor RA13 and one end of the resistor RA7, the other end of the resistor RA13 is connected with the other end of the resistor RA7, the other end of the resistor RA13 is connected with the other end of the resistor RA1 and the other end of the resistor RA1 is connected with the other end of the resistor RA 1.
5. The current-sink prevention circuit for a USB HUB of claim 1, wherein the Vbus power input circuit comprises: the pin 1 of the audio-video connector U2 is respectively connected with one end of a diode D10, one end of a diode D9, the anode of a capacitor C3 and one end of a capacitor C4, and the other end of the diode D10, the other end of the diode D9, the cathode of the capacitor C3 and the other end of the capacitor C4 are grounded.
6. The current backflow prevention circuit for a USB HUB according to claim 2, wherein the MCU power supply circuit comprises: the pin 1 of the three-terminal voltage regulator U1 is connected with one end of the capacitor C53, the pin 2 of the three-terminal voltage regulator U1 is connected with one end of the capacitor C29 and one end of the capacitor C51 respectively, the other end of the capacitor C29 and the other end of the capacitor C51 are grounded, and the pin 3 of the three-terminal voltage regulator U1 is connected with one end of the capacitor C52 and the other end of the capacitor C53 respectively, and the other end of the capacitor C52 is grounded.
7. The current backflow prevention circuit for a USB HUB according to any one of claims 1 to 6, wherein the DC power input circuit comprises: the capacitor C1 is connected in parallel with the capacitor C2.
8. The current backflow prevention method for the USB HUB is characterized by comprising the following steps of: a circuit as claimed in any one of claims 1 to 7, and performing the steps of:
initializing an MCU main control circuit, and detecting hot plug signals of Vbus and Vdc;
ADC sampling through the first signal conditioning circuit and the second signal conditioning circuit, and when the voltages of the Vbus end and the Vdc end are detected to be larger than 4.2V, switching on a field effect transistor QA;
the voltage of the Vbus terminal and the voltage of the Vdc terminal are compared in a polling way;
when the Vbus terminal voltage is greater than the Vdc terminal voltage, the field effect transistor QA is turned off, or when the Ibus current is not less than 2A, the field effect transistor QA is turned off.
CN202310315689.6A 2023-03-29 2023-03-29 Current backflow prevention circuit for USB HUB and method thereof Active CN116049068B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310315689.6A CN116049068B (en) 2023-03-29 2023-03-29 Current backflow prevention circuit for USB HUB and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310315689.6A CN116049068B (en) 2023-03-29 2023-03-29 Current backflow prevention circuit for USB HUB and method thereof

Publications (2)

Publication Number Publication Date
CN116049068A CN116049068A (en) 2023-05-02
CN116049068B true CN116049068B (en) 2023-09-08

Family

ID=86116634

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310315689.6A Active CN116049068B (en) 2023-03-29 2023-03-29 Current backflow prevention circuit for USB HUB and method thereof

Country Status (1)

Country Link
CN (1) CN116049068B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103166166A (en) * 2011-12-08 2013-06-19 迈普通信技术股份有限公司 Hot plug controller protective circuit
CN104253956A (en) * 2014-09-17 2014-12-31 广州视源电子科技股份有限公司 Low-power-consumption stable voltage backlight control circuit and television
CN112380080A (en) * 2020-12-02 2021-02-19 深圳慧能泰半导体科技有限公司 USB equipment detection system and method
CN212749654U (en) * 2020-08-13 2021-03-19 杭州万德激光有限公司 Constant current source circuit with current monitoring function
CN217063266U (en) * 2021-12-10 2022-07-26 武汉市蓝电电子股份有限公司 Current backflow prevention circuit applied to battery detection equipment
CN217087499U (en) * 2022-02-09 2022-07-29 深圳市洛仑兹技术有限公司 Anti-backflow control circuit
CN115825821A (en) * 2022-11-22 2023-03-21 深圳市湘凡科技有限公司 Differential pair detection method and related device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101668369A (en) * 2009-10-01 2010-03-10 英飞特电子(杭州)有限公司 High-efficiency constant-current LED driver
CN104993562B (en) * 2015-08-05 2017-12-05 青岛海信移动通信技术股份有限公司 Can directly be charged source adapter

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103166166A (en) * 2011-12-08 2013-06-19 迈普通信技术股份有限公司 Hot plug controller protective circuit
CN104253956A (en) * 2014-09-17 2014-12-31 广州视源电子科技股份有限公司 Low-power-consumption stable voltage backlight control circuit and television
CN212749654U (en) * 2020-08-13 2021-03-19 杭州万德激光有限公司 Constant current source circuit with current monitoring function
CN112380080A (en) * 2020-12-02 2021-02-19 深圳慧能泰半导体科技有限公司 USB equipment detection system and method
CN217063266U (en) * 2021-12-10 2022-07-26 武汉市蓝电电子股份有限公司 Current backflow prevention circuit applied to battery detection equipment
CN217087499U (en) * 2022-02-09 2022-07-29 深圳市洛仑兹技术有限公司 Anti-backflow control circuit
CN115825821A (en) * 2022-11-22 2023-03-21 深圳市湘凡科技有限公司 Differential pair detection method and related device

Also Published As

Publication number Publication date
CN116049068A (en) 2023-05-02

Similar Documents

Publication Publication Date Title
US20070118322A1 (en) Testing circuit for a data interface
CN105718012B (en) Method and circuit for automatically switching Vbus voltage in master-slave mode of OTG (on-the-go) equipment
US7710099B2 (en) Power control apparatus for motherboard
US8935544B2 (en) Indicator light control circuit for controlling different indicator lights via GPIO port according to different operating options set into a BIOS IC
CN101359247B (en) Power adapter circuit for motherboard
WO2013149464A1 (en) Host-slave compatibility method, device and system for usb device
WO2016026268A1 (en) Electric quantity detection method and apparatus, terminal and storage medium
US9317088B2 (en) Power on circuit
US20140188424A1 (en) Fan test device
CN210804404U (en) Display with USB Type C interface
CN116049068B (en) Current backflow prevention circuit for USB HUB and method thereof
CN110955627B (en) Double-screen display
US9477297B2 (en) Computer system and matching circuit thereof
US9557789B2 (en) Power control device
CN110955623A (en) Display with USB Type C interface
CN214492776U (en) USB slave controller power-on control circuit and vehicle
CN210804415U (en) Double-screen display
CN112485696B (en) Power supply testing device and method and server
CN110535342B (en) Voltage control device and system
CN207676169U (en) A kind of house dog MCU monitoring circuit
US9231432B2 (en) Electronic device and charging circuit thereof
CN112946400A (en) Screen assembly burns record test box
CN116010323B (en) USB docking station with cooling function and cooling method thereof
US20140189412A1 (en) Time sequence circuit for power supply unit
CN216981548U (en) 52.5W power output USB data charging device based on TI chip

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant