USB plugging test circuit

By designing a USB plug-in/plug-out test circuit, and utilizing a combination of a comparison unit, a charge/discharge unit, and a delay unit, the USB plug-in/plug-out process is simulated, solving the problems of low testing efficiency and shortened USB port lifespan in existing tests, and achieving efficient USB compatibility testing.

CN223808548UActive Publication Date: 2026-01-16FUJIAN CENTM INFORMATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202423042443.5
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2026-01-16
Estimated Expiration
2034-12-10

AI Technical Summary

Technical Problem

Existing USB interface testing methods are inefficient and frequent plugging and unplugging shorten the lifespan of USB ports.

Method used

Design a USB plug-in/plug-out test circuit. By combining first and second comparison units, charging and discharging units, delay units and inverters, the circuit enables the USB to connect by first connecting the power supply and then the data switch enable signal, and disconnect the power supply and then the data switch enable signal when unplugging the USB, thus simulating continuous plugging and unplugging to complete the test.

Benefits of technology

It improves testing efficiency, avoids the problem of shortened lifespan caused by frequent plugging and unplugging of USB ports, and achieves efficient USB compatibility testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN223808548U_ABST
    Figure CN223808548U_ABST
Patent Text Reader

Abstract

The utility model discloses a USB plugging test circuit. The output end of a first charging and discharging unit is connected with the inverted input end of a first comparison unit, and the input end of the first charging and discharging unit is connected with the output end of the first comparison unit; the normal phase input end of the first comparison unit is connected with a first reference voltage; the output end of the second charging and discharging unit is connected with the inverted input end of the second comparison unit, and the input end is connected with the output end of the second comparison unit; the non-inverting input end of the second comparison unit is connected with a second reference voltage; the first charge-discharge unit and the second charge-discharge unit have the same charge-discharge duration; the output end of the first comparison unit is connected with the input end of the delay unit and is connected with a USB power switch enable signal; the output end of the delay unit is connected with the input end of the phase inverter; the output end of the phase inverter is connected with the output end of the second charging and discharging unit; and the output end of the second comparison unit is connected with the USB data switch enable signal. When the USB is accessed, a power supply is accessed firstly and then data is accessed; and the power supply and the data are switched off when being pulled out.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The utility model relates to USB test technical field especially relates to a USB plug -in test circuit. BACKGROUND

[0002] When the device with USB interface communicates with external device, it needs to communicate with different PC end USB port through USB interface. In the communication process, it needs to confirm whether different PC end can normally identify the device and can be identified after multiple plug -in and plug -out, so as to ensure the compatibility of device USB communication.

[0003] Therefore, the existing USB interface test mode is usually: through the continuous plug -in and plug -out of USB port, whether the device manager of PC end can normally identify the device is viewed. However, the frequent plug -in and plug -out of USB interface is low in test efficiency, and the continuous plug -in and plug -out of USB interface shortens the service life of the USB interface of the matching machine PC end. UTILITY MODEL CONTENTS

[0004] The utility model solves the technical problem that: provide a kind of USB plug -in test circuit, improve test efficiency, and do not shorten USB port socket service life.

[0005] In order to solve the above technical problem, the technical scheme that the utility model adopts is as follows:

[0006] A kind of USB plug -in test circuit, comprising:

[0007] First comparison unit, first charge and discharge unit, second comparison unit, second charge and discharge unit, delay unit and inverter;

[0008] The output end of the first charge and discharge unit is connected with the inverting input end of the first comparison unit, and the input end of the first charge and discharge unit is connected with the output end of the first comparison unit;The positive input end of the first comparison unit is connected with first reference voltage;

[0009] The output end of the second charge and discharge unit is connected with the inverting input end of the second comparison unit, and the input end of the second charge and discharge unit is connected with the output end of the second comparison unit;The positive input end of the second comparison unit is connected with second reference voltage;

[0010] The charge and discharge time length of the first charge and discharge unit and the second charge and discharge unit is same;

[0011] The output end of the first comparison unit is connected with the input end of the delay unit, and is used to be connected with USB power switch enable signal;

[0012] The output end of the delay unit is connected with the input end of the inverter;

[0013] an output terminal of the inverter is connected with an output terminal of the second charge-discharge unit;

[0014] an output terminal of the second comparison unit is used for being connected with a USB data switch enable signal.

[0015] Further, the first charge-discharge unit comprises a charge-discharge component and a time adjustment component; the time adjustment component is connected with the positive phase input terminal of the first comparison unit and the output terminal of the first comparison unit and the input terminal of the charge-discharge component respectively; the output terminal of the charge-discharge component is connected with the inverting input terminal of the first comparison unit.

[0016] Further, the charge-discharge component comprises a first resistor and a first capacitor; one end of the first resistor is connected with one end of the first capacitor and the inverting input terminal of the first comparison unit respectively; the other end of the first resistor is connected with the output terminal of the first comparison unit; the other end of the first capacitor is grounded.

[0017] Further, the time adjustment component comprises a second resistor, a third resistor and a fourth resistor; one end of the second resistor is used for being connected with a power supply; the other end of the second resistor is connected with one end of the third resistor, one end of the fourth resistor and the positive phase input terminal of the first comparison unit respectively; the other end of the third resistor is connected with the output terminal of the first comparison unit; the other end of the fourth resistor is used for being grounded.

[0018] Further, the second charge-discharge unit comprises a charge-discharge component and a time adjustment component.

[0019] Further, the delay unit comprises a fifth resistor and a second capacitor; one end of the fifth resistor is connected with the output terminal of the first comparison unit; the other end of the fifth resistor is connected with one end of the second capacitor and the input terminal of the inverter respectively; the other end of the second capacitor is grounded.

[0020] Further, a charge control unit is further comprised; a power supply input terminal of the charge control unit is used for being connected with a power supply; the charge control unit comprises a first state and a second state; the first state turns on the inverting input terminal of the first comparison unit and the inverting input terminal of the second comparison unit with the power supply; the second state turns off the inverting input terminal of the first comparison unit and the inverting input terminal of the second comparison unit with the power supply.

[0021] Further, the charging control unit comprises a switch, a first triode and a second triode; one end of the switch is grounded, and the other end is connected with the base of the first triode and the base of the second triode respectively; the emitter of the first triode and the emitter of the second triode are used for being connected with a power supply respectively; the collector of the first triode is connected with the inverting input end of the first comparison unit; the collector of the second triode is connected with the inverting input end of the second comparison unit.

[0022] Further, a diode is further included; the anode of the diode is connected with the inverting input end of the second comparison unit, and the cathode of the diode is connected with the output end of the second comparison unit.

[0023] Further, a third capacitor is further included; one end of the third capacitor is connected with the output end of the inverter; the other end of the third capacitor is connected with the inverting input end of the second comparison unit.

[0024] The USB plug-in test circuit has the advantages that the inverse voltage of the first comparison unit is adjusted through the first charging and discharging unit, the inverse voltage of the second comparison unit is adjusted through the second charging and discharging unit, the output end of the first comparison unit outputs a high level before the output end of the second comparison unit outputs a high level, the output end of the first comparison unit outputs a low level before the output end of the second comparison unit outputs a low level, the power supply is connected first and then the data switch enable signal is connected when the USB is connected, the power supply is disconnected first and then the data switch enable signal is disconnected when the USB is pulled out, the analog USB is plugged in and pulled out, and the test is completed. BRIEF DESCRIPTION OF DRAWINGS

[0025] Figure 1 It is a circuit structure schematic view of the USB plug-in test circuit in the utility model embodiment;

[0026] Figure 2 It is a test application connection schematic view of the USB plug-in test circuit in the utility model embodiment;

[0027] Label explanation:

[0028] 1, first charging and discharging unit; 11, charging and discharging assembly; 12, time adjusting assembly; 2, second charging and discharging unit; 3, delay unit; 4, charging control unit;

[0029] U1A, first comparison unit; U1B, second comparison unit; U2A, inverter; R1, first resistor; R2, second resistor; R3, third resistor; R4, fourth resistor; R5, fifth resistor; C1, first capacitor; C2, second capacitor; C3, third capacitor; S1, switch; Q1, first triode; Q2, second triode; D1, diode. DETAILED DESCRIPTION

[0030] In order to make the technical content, the purposes and effects of the utility model clear, the following will be described in detail in combination with the embodiments and the drawings.

[0031] The utility model relates to a USB plug -in test circuit, include: first comparison unit, first charge -discharge unit, second comparison unit, second charge -discharge unit, delay unit and inverter, the output of first charge -discharge unit is connected with the inverting input of first comparison unit, and the input of first charge -discharge unit is connected with the output of first comparison unit, the non -inverting input of first comparison unit is connected first reference voltage, the output of second charge -discharge unit is connected with the inverting input of second comparison unit, and the input of second charge -discharge unit is connected with the output of second comparison unit, and the non -inverting input of second comparison unit is connected second reference voltage, and the charge -discharge time length of first charge -discharge unit and second charge -discharge unit is same, and the output of first comparison unit is connected with the input of delay unit and is used for with USB power switch enable signal connection, and the output of delay unit is connected with the input of inverter, and the output of inverter is connected with the output of second charge -discharge unit, and the output of second comparison unit is used for with USB data switch enable signal connection.

[0032] From the above description, the utility model has the beneficial effects that the first comparison unit is adjusted to the inverse voltage through the first charge -discharge unit respectively, and the second comparison unit is adjusted to the inverse voltage through the second charge -discharge unit, and the first comparison unit and second comparison unit are connected through delay unit and inverter, so that the output of first comparison unit is outputted high level before the output of second comparison unit, and the output of first comparison unit is outputted low level before the output of second comparison unit, so that when USB is accessed, the power is accessed first and then the data switch enable signal is accessed, when USB is pulled out, the power is disconnected first and then the data switch enable signal is disconnected, the simulation USB is realized unplug -in, and the test is completed.

[0033] Further, the first charge-discharge unit comprises a charge-discharge component and a time adjustment component; the time adjustment component is connected with the non-inverting input terminal of the first comparison unit and the output terminal of the first comparison unit and the input terminal of the charge-discharge component respectively; and the output terminal of the charge-discharge component is connected with the inverting input terminal of the first comparison unit.

[0034] From the above description, by setting the charge-discharge component and the time adjustment component, the charge-discharge function is realized by the charge-discharge component, and the charge-discharge time is adjusted by the time adjustment component, so that the first charge-discharge unit can have the same charge-discharge time as the second charge-discharge unit, avoiding the problem that the first charge-discharge unit and the second charge-discharge unit cannot be effectively tested due to different charge-discharge time after multiple charge-discharge.

[0035] Further, the charge-discharge component comprises a first resistor and a first capacitor; one end of the first resistor is connected with one end of the first capacitor and the inverting input terminal of the first comparison unit respectively; the other end of the first resistor is connected with the output terminal of the first comparison unit; and the other end of the first capacitor is grounded.

[0036] From the above description, by setting the first resistor and the first capacitor to form the charge-discharge component, the first capacitor is discharged through the first resistor during discharging, and the output terminal of the first comparison unit outputs a high level during charging, and the first capacitor is charged through the first resistor.

[0037] Further, the time adjustment component comprises a second resistor, a third resistor and a fourth resistor; one end of the second resistor is connected with a power supply; the other end of the second resistor is connected with one end of the third resistor, one end of the fourth resistor and the non-inverting input terminal of the first comparison unit respectively; the other end of the third resistor is connected with the output terminal of the first comparison unit; and the other end of the fourth resistor is grounded.

[0038] From the above description, by setting the second resistor, the third resistor and the fourth resistor at the non-inverting input terminal and the output terminal of the first comparison unit respectively, the duration of the high level output by the first comparison unit can be adjusted, thereby achieving the effect of adjusting the charge-discharge time.

[0039] Further, the second charge-discharge unit comprises a charge-discharge component and a time adjustment component.

[0040] From the above description, by setting the charge-discharge component and the time adjustment component, the charge-discharge function can be realized by the charge-discharge component, and the charge-discharge time can be adjusted by the time adjustment component.

[0041] Furthermore, the delay unit includes a fifth resistor and a second capacitor; one end of the fifth resistor is connected to the output terminal of the first comparison unit; the other end of the fifth resistor is connected to one end of the second capacitor and the input terminal of the inverter; the other end of the second capacitor is grounded.

[0042] As can be seen from the above description, the delay unit composed of the fifth resistor and the second capacitor can effectively perform charging and discharging.

[0043] Furthermore, it also includes a charging control unit; the power input terminal of the charging control unit is used to connect to a power source; the charging control unit includes a first state and a second state; the first state connects the inverting input terminal of the first comparator and the inverting input terminal of the second comparator to the power source; the second state disconnects the inverting input terminals of the first comparator and the second comparator from the power source.

[0044] As described above, by adding a charging control unit, the start-up and shutdown control of the first comparison unit and the second comparison unit can be achieved by adjusting the state of the charging control unit.

[0045] Furthermore, the charging control unit includes a switch, a first transistor, and a second transistor; one end of the switch is grounded, and the other end is connected to the base of the first transistor and the base of the second transistor, respectively; the emitters of the first transistor and the second transistor are respectively used to connect to a power supply; the collector of the first transistor is connected to the inverting input terminal of the first comparator unit; the collector of the second transistor is connected to the inverting input terminal of the second comparator unit.

[0046] As described above, the control unit is composed of a switch, a first transistor, and a second transistor. The switching between the first and second states is achieved based on the closed or open state of the switch. When the switch is closed, the first and second transistors are turned on, making the inverting input terminals of the first and second comparator units both high voltage, thus outputting a low level, which disconnects the USB power switch enable signal and the USB data switch enable signal. When the switch is open, the circuit works normally.

[0047] Furthermore, it also includes a diode; the positive terminal of the diode is connected to the inverting input terminal of the second comparison unit, and the negative terminal of the diode is connected to the output terminal of the second comparison unit.

[0048] As described above, by placing a diode between the inverting input terminal and the output terminal of the second comparator, the inverting voltage of the second comparator is clamped at a preset low level when the inverter outputs a low level, thereby enabling the second comparator to stably output a high level.

[0049] Further, a third capacitor is further included; one end of the third capacitor is connected with the output end of the inverter; the other end of the third capacitor is connected with the inverting input end of the second comparison unit.

[0050] From the above description, by setting the third capacitor at the output end of the inverter, when the inverter outputs low level, according to the principle that the voltage across the capacitor cannot be suddenly changed, the inverting input end of the second comparison unit instantaneously inputs negative voltage, so that the second comparison unit outputs high level.

[0051] The USB plug-in test circuit provided by the utility model can be applied to the scene of USB plug-in test, and the following is described through a specific embodiment:

[0052] Embodiment one

[0053] Please refer to Figure 1A USB plug test circuit, comprising: a first comparison unit U1A, a first charge-discharge unit 1, a second comparison unit U1B, a second charge-discharge unit 2, a delay unit 3, and an inverter U2A; wherein the first comparison unit U1A and the second comparison unit U1B can be implemented by an LM258AD operational amplifier or other similar operational amplifier devices. The output end of the first charge-discharge unit 1 is connected to the inverting input end of the first comparison unit U1A, and the input end of the first charge-discharge unit 1 is connected to the output end of the first comparison unit U1A; the non-inverting input end of the first comparison unit U1A is connected to a first reference voltage (connected to ground through a fourth resistor as the first reference voltage); the output end of the second charge-discharge unit 2 is connected to the inverting input end of the second comparison unit U1B, and the input end of the second charge-discharge unit 2 is connected to the output end of the second comparison unit U1B; the non-inverting input end of the second comparison unit U1B is connected to a second reference voltage (connected to ground through a resistor R6 as the second reference voltage); the charge-discharge time of the first charge-discharge unit 1 and the second charge-discharge unit 2 is the same; the output end of the first comparison unit U1A is connected to the input end of the delay unit 3 and is used to be connected to a USB power switch enable signal (VBUS_en); the output end of the delay unit 3 is connected to the input end of the inverter U2A; the output end of the inverter U2A is connected to the output end of the second charge-discharge unit 2; and the output end of the second comparison unit U1B is used to be connected to a USB data switch enable signal (DM / DP_en). Specifically, the delay unit 3 comprises a fifth resistor R5 and a second capacitor C2; one end of the fifth resistor R5 is connected to the output end of the first comparison unit U1A; the other end of the fifth resistor R5 is connected to one end of the second capacitor C2 and the input end of the inverter U2A respectively; the other end of the second capacitor C2 is grounded; and the output end of the inverter U2A is further provided with a third capacitor C3; one end of the third capacitor C3 is connected to the output end of the inverter U2A; and the other end of the third capacitor C3 is connected to the inverting input end of the second comparison unit U1B.

[0054] The first charge-discharge unit 1 comprises a charge-discharge component 11 and a time adjustment component 12; the time adjustment component 12 is connected to the non-inverting input end of the first comparison unit U1A, the output end of the first comparison unit U1A, and the input end of the charge-discharge component 11; and the output end of the charge-discharge component 11 is connected to the inverting input end of the first comparison unit U1A.

[0055] The charge-discharge component 11 comprises a first resistor R1 and a first capacitor C1; one end of the first resistor R1 is connected to one end of the first capacitor C1 and the inverting input end of the first comparison unit U1A respectively; the other end of the first resistor R1 is connected to the output end of the first comparison unit U1A; and the other end of the first capacitor C1 is grounded.

[0056] The time adjustment component 12 includes a second resistor R2, a third resistor R3, and a fourth resistor R4. One end of the second resistor R2 is connected to a power supply (5.0V). The other end of the second resistor R2 is connected to one end of the third resistor R3, one end of the fourth resistor R4, and the non-inverting input terminal of the first comparator unit U1A. The other end of the third resistor R3 is connected to the output terminal of the first comparator unit U1A. The other end of the fourth resistor R4 is grounded. That is, the duration of the high-level signal at the output terminal of the first comparator unit U1A is adjusted using the first resistor R1, the first capacitor C1, the second resistor R2, the third resistor R3, and the fourth resistor R4.

[0057] Similarly, the second charging / discharging unit 2 also includes a charging / discharging assembly 11 and a time adjustment assembly 12; such as Figure 1 As shown, resistors R6 and R10 form the time adjustment component 12 of the second charging / discharging unit 2, and resistor R7 and capacitor C4 form the charging / discharging component 11 of the second discharging unit. That is, the high-level duration of the output terminal of the second comparison unit U1B is adjusted by resistors R6, R10, R7, and capacitor C4, so that the high-level duration of the output terminal of the first comparison unit U1A is approximately the same as the high-level duration of the output terminal of the second comparison unit U1B. Simultaneously, a diode D1 is provided between the inverting input terminal and the output terminal of the second comparison unit U1B. The anode of diode D1 is connected to the inverting input terminal of the second comparison unit U1B, and the cathode of diode D1 is connected to the output terminal of the second comparison unit U1B.

[0058] In an optional embodiment, the circuit further includes a charging control unit 4; the power input terminal of the charging control unit 4 is used to connect to a power supply (5.0V); the charging control unit 4 includes a first state and a second state; in the first state, the inverting input terminals of the first comparison unit U1A and the second comparison unit U1B are connected to the power supply; the inverting input terminals of the first comparison unit U1A and the second comparison unit U1B are disconnected from the power supply. The specific circuit structure is as follows:

[0059] The charging control unit 4 includes a switch S1, a first transistor Q1, and a second transistor Q2. One end of the switch S1 is grounded, and the other end is connected to the base of the first transistor Q1 and the base of the second transistor Q2, respectively. The emitters of the first transistor Q1 and the second transistor Q2 are respectively connected to a power supply (5.0V). The collector of the first transistor Q1 is connected to the input terminal of the first charging / discharging unit 1 and the inverting input terminal of the first comparator unit U1A. The collector of the second transistor Q2 is connected to the input terminal of the second charging / discharging unit 2 and the inverting input terminal of the second comparator unit U1B.

[0060] Please refer to Figure 2The USB plug test circuit is used as a switch control circuit for USB plug test, and is connected with the USB end of the device under test and the USB end of the PC coordination machine respectively. The specific working principle is as follows:

[0061] The output end of the first comparison unit U1A is connected with the enable signal (VBUS_en) of the USB power supply VBUS switch, and the high level is effective, that is, the high level makes the USB_VBUS of the device under test connected with the USB_VBUS of the PC coordination machine. The output end of the second comparison unit U1B is connected with the enable signal (DM / DP_en) of the USB data switch DM / DP switch, and the high level is effective, that is, the high level makes the USB data switch enable signal DM / DP of the device under test connected with the USB data switch enable signal DM / DP of the PC coordination machine.

[0062] When the switch S1 is closed, the first triode Q1 and the second triode Q2 are in the conducting state. The 5V power supply acts on the inverting input end of the first comparison unit U1A and the second comparison unit U1B through the first triode Q1 and the second triode Q2 respectively, so that the non-inverting input voltage of the first comparison unit U1A and the second comparison unit U1B is lower than the inverting input voltage, and thus the first comparison unit U1A and the second comparison unit U1B both output low level. At this time, the USB power supply and the data switch enable signal of the device under test are disconnected with the USB of the PC coordination machine.

[0063] When the test starts, the switch S1 is opened, and at this time the first triode Q1 and the second triode Q2 are in the cut-off state. The first capacitor C1 is discharged through the first resistor R1, that is, the inverting input end voltage of the first comparison unit U1A gradually decreases. When the inverting voltage of the first comparison unit U1A is lower than the non-inverting voltage, the first comparison unit U1A outputs high level, and at this time the USB power supply of the device under test is connected with the USB of the coordination machine.

[0064] Subsequently, the second capacitor C2 is charged through the fifth resistor R5, so that the voltage of the second capacitor C2 rises to the high level input threshold of the inverter U2A, and the inverter U2A outputs low level. According to the principle that the voltage across the capacitor cannot change abruptly, the inverting input end of the second comparison unit U1B instantaneously inputs negative voltage, and the anode of the diode D1 is 0V at this time. Through the clamping of the diode D1, the inverting voltage of the second comparison unit U1B is clamped at about-0.7V. At this time, the non-inverting voltage of the second comparison unit U1B is greater than the inverting voltage, and thus the output end of the second comparison unit U1B outputs high level, and the USB data switch enable signal DM / DP of the device under test is connected with the USB data switch enable signal DM / DP of the coordination machine. The USB is inserted into the PC machine, and the power supply VBUS is connected first, and then the data switch enable signal DM / DP is connected.

[0065] After that, the output of the first comparison unit U1A outputs high level to charge the first capacitor C1 through the first resistor R1, when the inverse voltage of the first comparison unit U1A is higher than its positive voltage, the first comparison unit U1A outputs low level, then the USB power supply of the device under test is disconnected with the USB of the matching machine.

[0066] Similarly, the output of the second comparison unit U1B outputs high level to charge the capacitor C4 through the resistor R7, when the inverse voltage of the second comparison unit U1B is higher than its positive voltage, the second comparison unit U1B outputs low level, then the USB data switch enable signal DM / DP of the device under test is disconnected with the USB data switch enable signal DM / DP of the matching machine.

[0067] Since the time of the output of the first comparison unit U1A outputting high level is close to the time of the output of the second comparison unit U1B outputting high level, and the output of the first comparison unit U1A outputting high level is ahead of the output of the second comparison unit U1B outputting high level, the second comparison unit U1B delays the output of the first comparison unit U1A outputting low level, so that the USB of the PC is simulated to be pulled out, the power supply VBUS is disconnected first, and then the data switch enable signal DM / DP is disconnected.

[0068] Subsequently, the first comparison unit U1A and the second comparison unit U1B repeat the above charging and discharging cycle, so that the USB of the PC is simulated to be plugged in and pulled out, and the above process is realized based on the circuit, without software intervention, so that the test efficiency is improved, and the service life of the USB port socket of the PC end of the matching machine is not shortened.

[0069] The above only describes the embodiments of the present application, and does not limit the patent range of the present application, any equivalent transformation or direct or indirect application in the related technical field based on the content of the present application and the drawings is also included in the patent protection range of the present application.

Claims

1. A USB plug pull test circuit, characterized by, include: The system comprises a first comparison unit, a first charge / discharge unit, a second comparison unit, a second charge / discharge unit, a delay unit, and an inverter; The output terminal of the first charging and discharging unit is connected to the inverting input terminal of the first comparator unit, and the input terminal of the first charging and discharging unit is connected to the output terminal of the first comparator unit; the non-inverting input terminal of the first comparator unit is connected to the first reference voltage. The output terminal of the second charging / discharging unit is connected to the inverting input terminal of the second comparator unit, and the input terminal of the second charging / discharging unit is connected to the output terminal of the second comparator unit; the non-inverting input terminal of the second comparator unit is connected to the second reference voltage. The first charging / discharging unit and the second charging / discharging unit have the same charging / discharging duration; The output of the first comparison unit is connected to the input of the delay unit and is used to connect to the USB power switch enable signal. The output of the delay unit is connected to the input of the inverter. The output terminal of the inverter is connected to the output terminal of the second charging and discharging unit; The output of the second comparison unit is used to connect to the USB data switch enable signal.

2. The USB plug test circuit of claim 1, wherein, The first charging and discharging unit includes a charging and discharging component and a time adjustment component; The time adjustment component is connected to the positive input terminal of the first comparison unit, the output terminal of the first comparison unit, and the input terminal of the charge / discharge component, respectively. The output terminal of the charging / discharging component is connected to the inverting input terminal of the first comparison unit.

3. The USB plug test circuit of claim 2, wherein, The charging and discharging assembly includes a first resistor and a first capacitor; One end of the first resistor is connected to one end of the first capacitor and the inverting input terminal of the first comparison unit, respectively; The other end of the first resistor is connected to the output terminal of the first comparison unit; The other end of the first capacitor is grounded.

4. The USB plug test circuit of claim 2, wherein, The time adjustment component includes a second resistor, a third resistor, and a fourth resistor; One end of the second resistor is used to connect to the power supply; The other end of the second resistor is connected to one end of the third resistor, one end of the fourth resistor, and the non-inverting input terminal of the first comparison unit, respectively. The other end of the third resistor is connected to the output terminal of the first comparison unit; The other end of the fourth resistor is used for grounding.

5. The USB plug test circuit of claim 2, 3 or 4, wherein, The second charging and discharging unit includes a charging and discharging component and a time adjustment component.

6. The USB plug test circuit of claim 1, wherein, The delay unit includes a fifth resistor and a second capacitor; One end of the fifth resistor is connected to the output terminal of the first comparison unit; The other end of the fifth resistor is connected to one end of the second capacitor and the input terminal of the inverter, respectively. The other end of the second capacitor is grounded.

7. The USB plug test circuit of claim 1, wherein, It also includes a charging control unit; The power input terminal of the charging control unit is used to connect to a power source; The charging control unit includes a first state and a second state; The first state connects the inverting input of the first comparator and the inverting input of the second comparator to the power supply. The second state disconnects the power supply from the inverting input of the first comparator and the inverting input of the second comparator.

8. The USB plug test circuit of claim 7, wherein, The charging control unit includes a switch, a first transistor, and a second transistor; One end of the switch is grounded, and the other end is connected with the base of the first triode and the base of the second triode respectively; The emitter of the first triode and the emitter of the second triode are respectively used for connecting with a power supply; The collector of the first triode is connected with the inverting input end of the first comparison unit; The collector of the second triode is connected with the inverting input end of the second comparison unit.

9. The USB plug test circuit of claim 1, wherein, Further comprising a diode; The anode of the diode is connected with the inverting input end of the second comparison unit, and the cathode of the diode is connected with the output end of the second comparison unit.

10. The USB plug test circuit of claim 1, wherein, Further comprising a third capacitor; One end of the third capacitor is connected with the output end of the inverter; The other end of the third capacitor is connected with the inverting input end of the second comparison unit.