USB interface parameter detection circuit and detector

By designing a USB interface parameter detection circuit, the problem of circuit maintenance equipment detection in the prior art is solved, real-time electrical parameter acquisition during standby or failure of the equipment is realized, and maintenance efficiency and accuracy are improved.

CN222838138UActive Publication Date: 2025-05-06CHONGQING TECH & BUSINESS INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202421595211.X
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2025-05-06
Estimated Expiration
2034-07-08

AI Technical Summary

Technical Problem

In the prior art, the detection method of circuit maintenance equipment is limited by the working state of the equipment, and it is impossible to detect and locate problems in time during the equipment shutdown or failure, and the operation is cumbersome.

Method used

A USB interface parameter detection circuit is designed, including a main control sub-circuit, a current sampling sub-circuit, a voltage sampling sub-circuit, an indicator sub-circuit and a parameter display sub-circuit. The device to be detected is connected through the USB interface to realize real-time and continuous electrical parameter acquisition.

Benefits of technology

It can still collect current and voltage data in real time when the equipment is standby or faulty, improve the efficiency and accuracy of equipment maintenance, and provide strong technical support for preventive maintenance of equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN222838138U_ABST
    Figure CN222838138U_ABST
Patent Text Reader

Abstract

The utility model discloses a USB interface parameter detection circuit and detector, comprising a main control sub-circuit, and a current sampling sub-circuit, a voltage sampling sub-circuit, an indication sub-circuit and a parameter display sub-circuit which are electrically connected with the main control sub-circuit, and a USB connection sub-circuit which is electrically connected with the current sampling sub-circuit and the voltage sampling sub-circuit. The USB connection sub-circuit is connected with a USB interface of the to-be-detected equipment; the sampling current output end of the current sampling sub-circuit is electrically connected with the current detection end of the main control sub-circuit, and the sampling voltage output end of the voltage sampling sub-circuit is electrically connected with the voltage detection end of the main control sub-circuit. Compared with the prior art, when in use, only the interface of the USB connection sub-circuit needs to be connected with the USB interface of the external equipment to be detected, so that the USB interface testing device is plug-and-play, small in structure and convenient to carry.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model relates to the technical field of equipment electrical parameter detection, in particular to a USB interface parameter detection circuit and a detector. Background Art

[0002] With the widespread application of electronic equipment and the continuous advancement of technology, circuit inspection and maintenance, as an important link to ensure the normal operation of equipment, are increasingly valued for their efficiency and accuracy. Traditional circuit inspection methods often rely on manual inspection or the use of portable inspection equipment. These devices usually need to be directly connected to the circuit to be tested during the inspection process, and most of them can only obtain limited parameter information, such as voltage and current, when the equipment is running. This detection method is not only cumbersome to operate, but also limited by the working status of the equipment. It is difficult to detect and locate problems in time when the equipment is shut down or in the early stage of failure, thus affecting the efficiency and effectiveness of the inspection.

[0003] In recent years, data transmission and communication technology based on USB interface has been widely used in electronic devices, providing new ideas for circuit maintenance. However, most of the existing USB-based maintenance products still follow the traditional detection mode, that is, they need to be directly connected to the circuit to be tested when in use, and the parameter information is displayed through a specific software interface. Although this method has improved the convenience of maintenance to a certain extent, it still has limitations such as the inability to continuously monitor and dependence on the operating status of the equipment. Utility Model Content

[0004] In view of this, the purpose of the present invention is to provide a USB interface parameter detection circuit and detector, so as to provide a circuit architecture to solve the problems in the prior art that parameter detection is limited by the operating state of the device to be tested and the operation of the detection device is cumbersome.

[0005] To achieve the above-mentioned purpose, a technical solution of the utility model provides a USB interface parameter detection circuit, comprising a main control subcircuit and a current sampling subcircuit, a voltage sampling subcircuit, an indication subcircuit and a parameter display subcircuit electrically connected to the main control subcircuit, and a USB connection subcircuit electrically connected to the current sampling subcircuit and the voltage sampling subcircuit, wherein the USB connection subcircuit is connected to the USB interface of a device to be detected; a sampling current input end of the current sampling subcircuit is electrically connected to a USB current output end of the USB connection subcircuit, a sampling current output end of the current sampling subcircuit is electrically connected to a current detection end of the main control subcircuit, a sampling voltage input end of the voltage sampling subcircuit is electrically connected to a USB voltage output end of the USB connection subcircuit, and a sampling voltage output end of the voltage sampling subcircuit is electrically connected to a voltage detection end of the main control subcircuit; a detection parameter output end of the main control subcircuit is electrically connected to a detection parameter input end of the parameter display subcircuit, and an indication signal output end of the main control subcircuit is electrically connected to an indication signal input end of the indication subcircuit.

[0006] Furthermore, it also includes a voltage stabilizing subcircuit for supplying power to the main control subcircuit, the current sampling subcircuit, the voltage sampling subcircuit, the indication subcircuit and the parameter display subcircuit, and the voltage stabilizing subcircuit is electrically connected to the USB connection subcircuit to access an external power source;

[0007] The voltage stabilizing subcircuit includes a voltage stabilizing chip U7, a capacitor C4, a capacitor C9, a capacitor C12 and a capacitor C14; the VIN pin of the voltage stabilizing chip U7 is electrically connected to the USB connection subcircuit and connected to an external power supply, the VIN pin of the voltage stabilizing chip U7 is also grounded via capacitors C4 and C9 respectively, the TAB pin of the voltage stabilizing chip U7 forms a power supply end and is electrically connected to the main control subcircuit, the current sampling subcircuit, the voltage sampling subcircuit, the indication subcircuit and the parameter display subcircuit, the TAB pin of the voltage stabilizing chip U7 is also grounded via capacitors C12 and C14 respectively, and the GND pin of the voltage stabilizing chip U7 is grounded.

[0008] Furthermore, the main control subcircuit includes a main control chip U1 and a crystal oscillator unit, a serial interface unit, a program interface unit and a reset unit electrically connected to the main control chip U1;

[0009] The VDD pin and VDDA pin of the main control chip U1 are both electrically connected to the power supply end, and the VSS pin and VSSA pin of the main control chip U1 are both grounded; the clock signal input end of the main control chip U1 is electrically connected to the clock signal output end of the crystal oscillator unit, the serial input end of the main control chip U1 is electrically connected to the serial output end of the serial interface unit, the program input end of the main control chip U1 is electrically connected to the program output end of the program interface unit, and the reset signal input end of the main control chip U1 is electrically connected to the reset signal output end of the reset unit.

[0010] Further, the crystal oscillator unit includes a crystal oscillator X1, a crystal oscillator X2, a capacitor C1, a capacitor C2, a capacitor C3 and a capacitor C11, a pin 1 of the crystal oscillator X1 is electrically connected to a PD14-OSC_IN pin of the main control chip U1 and is grounded via a capacitor C11, a pin 3 of the crystal oscillator X1 is electrically connected to a PD15-OSC_OUT pin of the main control chip U1 and is grounded via a capacitor C1, and a pin 2 of the crystal oscillator X1 is grounded; one end of the crystal oscillator X2 is electrically connected to a PC14-OSC32_IN pin of the main control chip U1 and is grounded via a capacitor C2, and the other end of the crystal oscillator X2 is electrically connected to a PC15-OSC32_OUT pin of the main control chip U1 and is grounded via a capacitor C3;

[0011] The serial interface unit has an interface P1, wherein pins 1 and 2 of the interface P1 are electrically connected to pins PA10 and PA9 of the main control chip U1, respectively, and pin 3 is grounded;

[0012] The program interface unit has an interface P2, wherein pin 1 of the interface P2 is connected to the power supply terminal, pins 2 and 3 are electrically connected to pins PA13 and PA14 of the main control chip U1 respectively, and pin 4 is grounded;

[0013] The reset unit includes an interface D1, a resistor R1 and a capacitor C13, wherein pin 1 of the interface D1 is connected to the power supply end via the resistor R1 and pin 1 is also electrically connected to the NRST pin of the main control chip U1, pin 2 of the interface D1 is grounded, and the capacitor C13 is connected between pins 1 and 2 of the interface D1.

[0014] Further, the USB interface subcircuit includes a first interface unit and / or a second interface unit, the first interface unit and / or the second interface unit are connected to the USB interface of the device to be detected and connected to an external power supply, and the first interface unit and / or the second interface unit are connected to both the current sampling subcircuit and the voltage sampling subcircuit;

[0015] The first interface unit includes a power interface CN2, a power interface U8, an external connection terminal XH1 and a USB connection terminal CN6, wherein the negative electrodes of the power interface CN2 and the power interface U8, the 4th pin of the external connection terminal XH1 and the VCC pin of the USB connection terminal CN6 are grounded, the positive electrodes of the power interface CN2 and the power interface U8 are connected to the 1st pin of the external connection terminal XH1 and connected to an external power supply, and the 1st pin of the external connection terminal XH1 is also electrically connected to the GND pin of the USB connection terminal CN6, and the 2nd pin and the 3rd pin of the external connection terminal XH1 are also electrically connected to the D+ pin and the D- pin of the USB connection terminal CN6 respectively;

[0016] The second interface unit includes a power interface CN3, a power interface U9, an external connection terminal XH2 and a USB connection terminal USB2. The negative poles of the power interface CN3 and the power interface U9, pin 1 of the external connection terminal XH2 and the VCC pin of the USB connection terminal USB2 are grounded. The positive poles of the power interface CN3 and the power interface U9 are connected to pin 4 of the external connection terminal XH2 and connected to an external power supply. Pin 4 of the external connection terminal XH2 is also electrically connected to the GND pin of the USB connection terminal USB2. Pin 2 and pin 3 of the external connection terminal XH2 are also electrically connected to the D- pin and D+ pin of the USB connection terminal USB2, respectively.

[0017] Further, the current sampling subcircuit includes a USB connection terminal USB1, a USB connection terminal CN1, a sampling chip U2, a resistor R4, a resistor R6, a capacitor C15 and a capacitor C16;

[0018] The VCC pin of the USB connection terminal USB1 is connected to the VCC pin of the USB connection terminal CN1 to form the sampling current input terminal and connect to the external power supply. The D- pin and D+ pin of the USB connection terminal USB1 are respectively connected to the D- pin and D+ pin of the USB connection terminal CN1. The GND pin of the USB connection terminal USB1 is electrically connected to the GND pin of the USB connection terminal CN1 via the resistor R4. The capacitor C16 is connected in parallel with the resistor R4. One end of the resistor R6 is connected to the GND pin of the USB connection terminal CN1. and the resistor R4, and the other end is grounded; the IN+ pin of the sampling chip U2 is connected between the GND pin of the USB connection terminal USB1 and the resistor R4, the IN- pin of the sampling chip U2 is connected between the GND pin of the USB connection terminal CN1 and the resistor R4, the OUT pin of the sampling chip U2 forms the sampling current output end and is electrically connected to the PA2 pin of the main control chip U1, the V+ pin of the sampling chip U2 is connected to the power supply end and the V+ pin of the sampling chip is also grounded through the capacitor C15, and the REF pin and GND pin of the sampling chip U2 are grounded.

[0019] Furthermore, the voltage sampling subcircuit includes a resistor R3 and a resistor R5, one end of the resistor R3 forms the sampling voltage input end connected to the external power supply, the other end is connected to one end of the resistor R5 and forms the sampling voltage output end connected to the PA1 pin of the main control chip U1, and the other end of the resistor R5 is grounded.

[0020] Furthermore, the indication subcircuit includes a power indicator LED1, a controllable indicator LED2 and a resistor RN1;

[0021] The anode of the power indicator light LED1 is connected to the power supply end, and the cathode is grounded through a resistor of the resistor array RN1. The controllable indicator light LED2 is a three-channel indicator light. The controllable indicator light LED2 has three controllable LEDs. The anodes of the three controllable LEDs are connected to the power supply end, and the cathodes are respectively connected to a resistor of the resistor array RN1. The resistors in the resistor array RN1 corresponding to the controllable LEDs form the indication signal input end which is electrically connected to the PA7 pin, the PB10 pin and the PB11 pin of the main control chip U1.

[0022] Furthermore, the parameter display subcircuit includes a display module U6, a VCC pin of the display module U6 is connected to a power supply end, an SCK pin and an SDA pin of the display module U6 form the detection parameter input end and are respectively connected to a PA4 pin and a PA5 pin of the main control chip U1, and a GND pin of the display module U6 is grounded.

[0023] To achieve the above-mentioned purpose, another technical solution of the utility model provides a USB interface parameter detector, including a shell and the USB interface parameter detection circuit as described above built into the shell, the shell is provided with a plug interface, an LED mounting hole and a display window, the USB connection subcircuit is connected to the USB interface of the device to be detected via the plug interface, the indication subcircuit is installed in the LED mounting hole, and the parameter display subcircuit is embedded in the display window.

[0024] The utility model sets a USB interface subcircuit to be connected with the USB interface of the device to be detected. On the one hand, the entire detection circuit can be powered by the device to be detected, and there is no need to set up an additional power supply to simplify the circuit structure. On the other hand, the electrical parameters of the device to be detected can be directly connected to the detection circuit to facilitate the sampling of the parameters and ensure real-time data collection. The current collection subcircuit and the voltage collection subcircuit are directly connected to the power supply, and the fluctuation of the current and voltage data can be continuously collected even if the device to be detected is on standby, so that real-time and continuous detection can be achieved, which not only greatly improves the efficiency and accuracy of equipment maintenance, but also provides strong technical support for the preventive maintenance of the equipment, helps to reduce the failure rate of the equipment and prolong the service life of the equipment. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 This is a structural block diagram of a parameter detection circuit of a USB interface of the present utility model.

[0026] Figure 2 This is the circuit schematic diagram of the USB interface subcircuit.

[0027] Figure 3 This is the circuit schematic diagram of the voltage stabilization subcircuit.

[0028] Figure 4 This is the circuit schematic diagram of the main control sub-circuit.

[0029] Figure 5 Figure 2 is the circuit schematic of the current sampling subcircuit.

[0030] Figure 6 Figure 2 is the circuit schematic diagram of the voltage sampling subcircuit.

[0031] Figure 7 is a circuit schematic diagram of the indicated subcircuit.

[0032] Figure 8 Display the schematic diagram of the subcircuit for the parameters.

[0033] Fig. 9 This is the circuit schematic diagram of the filter subcircuit.

[0034] The figures in the specification are marked as follows: main control subcircuit 10, crystal oscillator unit 11, serial interface unit 12, program interface unit 13, reset unit 14, program loading unit 15, current sampling subcircuit 20, voltage sampling subcircuit 30, indication subcircuit 40, parameter display subcircuit 50, USB connection subcircuit 60, first interface unit 61, second interface unit 62, voltage stabilization subcircuit 70, filtering subcircuit 80. DETAILED DESCRIPTION

[0035] The following is further described in detail through specific implementation methods:

[0036] Example

[0037] Please refer to Figure 1 A USB interface parameter detection circuit of the utility model comprises a main control subcircuit 10, a current sampling subcircuit 20, a voltage sampling subcircuit 30, an indication subcircuit 40 and a parameter display subcircuit 50 electrically connected to the main control subcircuit 10, and a USB connection subcircuit 60 electrically connected to the current sampling subcircuit 20 and the voltage sampling subcircuit 30. The USB connection subcircuit 60 is connected to the USB interface of a device to be detected, and an external power supply can be connected to power the USB interface parameter detection circuit, and the current sampling subcircuit 20 and the voltage sampling subcircuit 30 are used to sample the current and voltage at the USB interface respectively. After the main control subcircuit 10 collects the current data and the power data, the indication subcircuit 40 is controlled to indicate the state of the USB interface, and the parameter display subcircuit 50 is synchronously controlled to display the parameters such as the current and the voltage, so as to realize the detection of the electrical parameters of the device to be detected. In this embodiment, in order to ensure the normal operation of the entire detection circuit, a voltage stabilizing subcircuit 70 is also included to supply power to the main control subcircuit 10, the current sampling subcircuit 20, the voltage sampling subcircuit 30, the indication subcircuit 40 and the parameter display subcircuit 50. The voltage stabilizing subcircuit 70 is electrically connected to the USB connection subcircuit 60 to access an external power supply (i.e., VUSB), and can convert the external power supply into a stable voltage of 3.3V (i.e., the power supply voltage VCC3.3) to supply power to the main control subcircuit 10, the current sampling subcircuit 20, the voltage sampling subcircuit 30, the indication subcircuit 40 and the parameter display subcircuit 50.

[0038] Please refer to Figure 2 , the USB current output terminal of the USB connection subcircuit 60 is electrically connected to the sampling current input terminal of the current sampling subcircuit 20, so as to connect the sampling current to the current sampling subcircuit 20; the USB voltage output terminal of the USB connection subcircuit 60 is electrically connected to the sampling voltage input terminal of the voltage sampling subcircuit 30, so as to connect the sampling voltage to the voltage sampling subcircuit 30. In this embodiment, the USB interface subcircuit includes a first interface unit 61 and / or a second interface unit 62, the first interface unit 61 and / or the second interface unit 62 are connected to the USB interface of the device to be detected and connected to an external power supply, and the first interface unit 61 and the second interface unit 62 are formed with a USB current output terminal and a USB voltage output terminal, so as to be connected to the current sampling subcircuit 20 and the voltage sampling subcircuit 30 respectively; by setting a single or multiple interface units, a single or multiple devices to be detected with different interfaces can be connected, thereby improving the flexibility of use.

[0039] The first interface unit 61 includes a power interface CN2, a power interface U8, an external connection terminal XH1, and a USB connection terminal CN6. Specifically, the negative electrodes of the power interface CN2 and the power interface U8, the 4th pin of the external connection terminal XH1, and the VCC pin of the USB connection terminal CN6 are grounded, and the positive electrodes of the power interface CN2 and the power interface U8 are connected to the 1st pin of the external connection terminal XH1 and then connected to the external power supply, and these pins also form a USB current output terminal and a USB voltage output terminal (the two are co-linear) and are electrically connected to the current sampling subcircuit 20 and the voltage sampling subcircuit 30 respectively, so as to input the current value of the device to be detected into the current sampling subcircuit 20 and the voltage value of the device to be detected into the voltage sampling subcircuit 30. Pin 1 of the external connection terminal XH1 is also electrically connected to the GND pin of the USB connection terminal CN6, and pins 2 and 3 of the external connection terminal XH1 are also electrically connected to the D+ pin and D- pin of the USB connection terminal CN6, respectively. The power interface CN2, the power interface U8, the external connection terminal XH1 and the USB connection terminal CN6 are connected to the USB interface of the device to be detected as external connection interfaces to access and collect the current and voltage of the device to be detected.

[0040] The second interface unit 62 includes a power interface CN3, a power interface U9, an external connection terminal XH2 and a USB connection terminal USB2. Specifically, the negative electrodes of the power interface CN3 and the power interface U9, the 1 pin of the external connection terminal XH2 and the VCC pin of the USB connection terminal USB2 are grounded, and the positive electrodes of the power interface CN3 and the power interface U9 are connected to the 4 pins of the external connection terminal XH2 and then connected to the external power supply, and these pins also form a USB current output terminal and a USB voltage output terminal (the two are co-linear) and are electrically connected to the current sampling circuit and the voltage sampling sub-circuit 30 respectively, so as to input the current value of the device to be detected into the current sampling sub-circuit 20 and the voltage value of the device to be detected into the voltage sampling sub-circuit 30. Pin 4 of the external connection terminal XH2 is also electrically connected to the GND pin of the USB connection terminal USB2, and pin 2 and pin 3 of the external connection terminal XH2 are also electrically connected to the D- pin and D+ pin of the USB connection terminal USB2, respectively. The power interface CN3, the power interface U9, the external connection terminal XH2 and the USB connection terminal USB2 are connected to the USB interface of the device to be detected as external connection interfaces to access and collect the current and voltage of the device to be detected.

[0041] Please refer to Figure 3, the voltage stabilizing subcircuit 70 includes a voltage stabilizing chip U7, a capacitor C4, a capacitor C9, a capacitor C12 and a capacitor C14; the voltage stabilizing subcircuit 70 has a power supply terminal electrically connected to other subcircuits to supply power to other subcircuits. The voltage stabilizing chip U7 is connected to the USB current output terminal and the USB voltage output terminal of the first interface unit 61 and / or the second interface unit 62 to access an external power supply, and can convert the connected external power supply into a 3.3V stable voltage output to supply power to other subcircuits, ensuring that other subcircuits work normally; in this embodiment, the model of the voltage stabilizing chip U7 is preferably AMS1117-3.3.

[0042] Specifically, the VIN pin of the voltage stabilizing chip U7 is electrically connected to the USB connection subcircuit 60 (specifically connected to the positive pole of the power interface CN2, the power interface U8 and / or the positive pole of the power interface CN3, the power supply U9) to access the external power supply. The VIN pin of the voltage stabilizing chip U7 is also grounded via capacitor C4 and capacitor C9 respectively, and capacitor C4 and capacitor C9 play a filtering role to filter out the clutter interference in the external power supply. The TAB pin of the voltage stabilizing chip U7 forms a power supply terminal and is electrically connected to the main control subcircuit 10, the current sampling subcircuit 20, the voltage sampling subcircuit 30, the indication subcircuit 40 and the parameter display subcircuit 50 to supply power to each subcircuit; The TAB pin of the voltage stabilizing chip U7 is also grounded via capacitor C12 and capacitor C14 respectively, and the GND pin of the voltage stabilizing chip U7 is grounded. Capacitor C12 and capacitor C14 are used to filter out clutter and AC components in the power supply, so that the DC voltage is smoother and stable power supply is ensured.

[0043] Please refer to Figure 4 The main control subcircuit 10 includes a main control chip U1 and a crystal oscillator unit 11, a serial interface unit 12, a program interface unit 13 and a reset unit 14 electrically connected to the main control chip U1. The main control chip U1 serves as a control interface of the entire detection circuit, and is used to collect the current and voltage output by the current sampling subcircuit 20 and the voltage sampling subcircuit 30, and visualize the current and voltage after processing through the indication subcircuit 40 and the parameter display subcircuit 50; the crystal oscillator unit 11 is used to provide a control clock when the main control chip U1 is working; the serial interface unit 12 is used to access the serial control signal; the program interface unit 13 is used to access the program download device to download the control program to the main control chip U1; the reset unit 14 is used to reset the main control chip U1 to an initial state when powered on; in this embodiment, the model of the main control chip U1 is preferably N32G430C8L7.

[0044] The VDD pin and VDDA pin of the main control chip U1 are both electrically connected to the power supply end, and the VSS pin and VSSA pin of the main control chip U1 are both grounded to access the power supply voltage to ensure the normal operation of the main control chip U1. The clock signal input end of the main control chip U1 is electrically connected to the clock signal output end of the crystal oscillator unit 11. The PD14-OSC_IN pin, PD15-OSC_OUT pin, PC14-OSC32_IN pin and PC15-OSC32_OUT pin of the main control chip U1 form a clock signal input end that is electrically connected to the clock signal output end of the crystal oscillator unit 11 to access the clock signal. The serial input end of the main control chip U1 is electrically connected to the serial output end of the serial interface unit 12. The PA10 pin and PA9 pin of the main control chip U1 form a serial input end that is electrically connected to the serial output end of the serial interface unit 12 to connect to an external device to realize data transmission. The program input terminal of the main control chip U1 is electrically connected to the program output terminal of the program interface unit 13, and the PA13 pin and the PA14 pin of the main control chip U1 form a program input terminal electrically connected to the program output terminal of the program interface unit 13 to download the control program. The reset signal input terminal of the main control chip U1 is electrically connected to the reset signal output terminal of the reset unit 14, and the NRST pin of the main control chip U1 forms a reset signal input terminal electrically connected to the reset signal output terminal of the reset unit 14 to achieve the reset of the main control chip U1.

[0045] The crystal oscillator unit 11 includes a crystal oscillator X1, a crystal oscillator X2, a capacitor C1, a capacitor C2, a capacitor C3 and a capacitor C11. Specifically, pin 1 of the crystal oscillator X1 is electrically connected to the PD14-OSC_IN pin of the main control chip U1 and grounded via the capacitor C11, pin 3 of the crystal oscillator X1 is electrically connected to the PD15-OSC_OUT pin of the main control chip U1 and grounded via the capacitor C1, and pin 2 of the crystal oscillator X1 is grounded; pins 1 and 3 of the crystal oscillator X1 form a clock signal output terminal electrically connected to the main control chip U1; in this embodiment, the frequency of the crystal oscillator X1 is preferably 8MHz. One end of the crystal oscillator X2 is electrically connected to the PC14-OSC32_IN pin of the main control chip U1 and grounded through the capacitor C2, and the other end of the crystal oscillator X2 is electrically connected to the PC15-OSC32_OUT pin of the main control chip U1 and grounded through the capacitor C3; the two ends of the crystal oscillator X2 form another clock signal output end electrically connected to the main control chip U1; in this embodiment, the frequency of the crystal oscillator X2 is preferably 32.7kHz.

[0046] The serial interface unit 12 has an interface P1, which is used to connect to an external device to achieve communication. Specifically, pins 1 and 2 of the interface P1 form serial output terminals and are electrically connected to pins PA10 and PA9 of the main control chip U1, respectively, and pin 3 is grounded.

[0047] The program interface unit 13 has an interface P2, and the interface P2 is used to connect to an external device to realize the download of the control program. Specifically, the 1 pin of the interface P2 is connected to the power supply end, the 2 pins and the 3 pins form the program output end and are electrically connected to the PA13 pin and the PA14 pin of the main control chip U1 respectively, and the 4 pin is grounded. In addition, the main control subcircuit 10 is also provided with a program loading unit 15, and the program loading unit 15 includes an interface D2 and a resistor R2, the 1 pin of the interface D2 is electrically connected to the PD0-BOOT0 pin of the main control chip U1 and the 1 pin is also grounded through the resistor R2, and the 2 pins of the interface D2 are connected to the power supply end; when the program interface unit 13 is loading the control program, it is necessary to manually short-circuit the wiring port D2 to pull down the level of the PD0-BOOT0 pin of the main control chip U1 (i.e., ground), so that the main control chip U1 is forced to enter the Bootloader mode, so that the program interface unit 13 can be programmed or the firmware can be updated. It should be noted that although the program interface unit 13 in this embodiment can be programmed, program downloaded, etc., the key point of protection is not the program, but the circuit architecture of the entire circuit, and does not involve computer programs.

[0048] The reset unit 14 includes an interface D1, a resistor R1 and a capacitor C13 to achieve the reset of the main control chip U1. Specifically, the 1 pin of the interface D1 is connected to the power supply terminal via the resistor R1, and the 1 pin of the interface D1 forms a reset signal output terminal and is also electrically connected to the NRST pin of the main control chip U1, the 2 pin of the interface D1 is grounded, and the capacitor C13 is connected between the 1 pin and the 2 pin of the interface D1. During the reset, the interface D1 is short-circuited to pull down the NRST pin level of the main control chip U1 to achieve the reset of the main control chip U1.

[0049] Please refer to Figure 5 The sampling current output terminal of the current sampling subcircuit 20 is electrically connected to the current detection terminal of the main control subcircuit 10, so as to input the current data of the device to be detected into the main control subcircuit 10. The current sampling subcircuit 20 includes a USB connection terminal USB1, a USB connection terminal CN1, a sampling chip U2, a resistor R4, a resistor R6, a capacitor C15 and a capacitor C16; in this embodiment, the USB connection terminal USB1 and the USB connection terminal CN1 can be USB2.0; the model of the sampling chip U2 is preferably 1NA199A.

[0050] Specifically, the VCC pin of the USB connection terminal USB1 is connected to the VCC pin of the USB connection terminal CN1 to form a sampling current input terminal and connected to an external power supply, the D- pin and D+ pin of the USB connection terminal USB1 are respectively connected to the D- pin and D+ pin of the USB connection terminal CN1, the GND pin of the USB connection terminal USB1 is electrically connected to the GND pin of the USB connection terminal CN1 via the resistor R4, the capacitor C16 is connected in parallel with the resistor R4, one end of the resistor R6 is connected between the GND pin of the USB connection terminal CN1 and the resistor R4, and the other end is grounded to access the current data of the device to be detected. The IN+ pin of the sampling chip U2 is connected between the GND pin of the USB connection terminal USB1 and the resistor R4, and the IN- pin of the sampling chip U2 is connected between the GND pin of the USB connection terminal CN1 and the resistor R4 to collect the current signal. The OUT pin of the sampling chip U2 forms a sampling current output terminal and is electrically connected to the PA2 pin of the main control chip U1 (i.e., the current detection terminal of the main control sub-circuit 10). The V+ pin of the sampling chip U2 is connected to the power supply terminal and the V+ pin of the sampling chip is also grounded via capacitor C15. The REF pin and GND pin of the sampling chip U2 are grounded to sample the current data and transmit it to the main control chip U1.

[0051] Please refer to Figure 6 The sampling voltage output terminal of the voltage sampling subcircuit 30 is electrically connected to the voltage detection terminal of the main control subcircuit 10. The voltage sampling subcircuit 30 includes a resistor R3 and a resistor R5, which are connected in series and the middle value (or voltage division value) of the two resistors is read through the main control chip U1 to collect voltage data.

[0052] Specifically, one end of the resistor R3 forms a sampling voltage input end connected to an external power supply, and the other end is connected to one end of the resistor R5 to access the voltage data of the device to be detected. One end of the resistor R3 connected to the resistor R5 forms a sampling voltage output end connected to the PA1 pin of the main control chip U1 (i.e., the voltage detection end of the main control sub-circuit 10), and the other end of the resistor R5 is grounded to sample the voltage data and transmit it to the main control chip U1.

[0053] Please refer to Figure 7, the indication signal input end of the indication subcircuit 40 is electrically connected to the indication signal output end of the main control subcircuit 10. The indication subcircuit 40 includes a power indicator LED1, a controllable indicator LED2 and a resistor RN1. In this embodiment, the power indicator LED1 is used to indicate the working condition of the entire detection circuit. If the power indicator LED1 is on, it indicates that the entire detection circuit is working, otherwise it is not working; the controllable indicator LED2 has three controllable LEDs, which are blue LED, green LED and red LED respectively, so as to control the blue LED, green LED and red LED to light or off through the collected parameters to indicate the working status of the device to be detected; in this way, the resistor RN4 selects a resistor with four resistors according to the number of LEDs.

[0054] Specifically, the power indicator LED1 and the controllable light adopt a common anode drive; the anode of the power indicator LED1 is connected to the power supply end, and the cathode of the power indicator LED1 is grounded through a resistor of the resistor array RN1, that is, when the USB connection subcircuit 60 is connected to the device to be detected and connected to the external power supply, the voltage stabilization subcircuit 70 outputs a stable voltage to turn on the power indicator LED1 to indicate the working state of the circuit. The anodes of the three controllable LEDs (i.e., the blue LED, the green LED, and the red LED) are all connected to the power supply end, and the cathodes of the three controllable LEDs are respectively connected to a resistor of the resistor array RN1, and the other end of the resistor in the resistor array RN1 corresponding to the controllable LED forms an indication signal input end and is electrically connected to the PA7 pin, PB10 pin, and PB11 pin of the main control chip U1 (i.e., the indication signal output end of the main control subcircuit 10), so as to output a control signal through the PA7 pin, PB10 pin, and PB11 pin of the main control chip U1 to control the on or off of the blue LED, the green LED, and the red LED.

[0055] Please refer to Figure 8 The detection parameter input terminal of the parameter display subcircuit 50 is electrically connected to the detection parameter output terminal of the main control subcircuit 10. The parameter display subcircuit 50 includes a display module U6, which uses an OLED display module and communicates with the main control chip U1 using the IIC protocol to display current data, voltage data, etc.

[0056] Specifically, the VCC pin of the display module U6 is connected to the power supply end, the SCK pin and SDA pin of the display module U6 form the detection parameter input end and are respectively connected to the PA4 pin and PA5 pin of the main control chip U1 (that is, the detection parameter output end of the main control sub-circuit 10), and the GND pin of the display module U6 is grounded. The display module U6 can receive the current data and voltage data transmitted by the main control chip U1 and display them, so as to intuitively understand the working status of the device to be detected.

[0057] Please refer to Fig. 9In addition, in order to further ensure the voltage stability of other sub-circuits at all levels, the power supply end of the voltage regulator chip is also connected to a filter sub-circuit 80. Specifically, the filter sub-circuit 80 includes multiple capacitors in parallel (specifically, capacitors R5, R6, R7, R8 and R10 are connected in parallel in this embodiment), one end of the multiple capacitors is connected to the power supply end, and the other end is connected to the ground to filter out clutter and AC components in the power supply, smooth the power supply voltage and signal, and reduce noise interference.

[0058] The USB interface parameter detection circuit of the present embodiment is connected to the USB interface of the device to be detected by setting a USB interface subcircuit. On the one hand, the entire detection circuit can be powered by the device to be detected, and there is no need to set up an additional power supply to simplify the circuit structure. On the other hand, the electrical parameters of the device to be detected can be directly connected to the detection circuit to facilitate the sampling of the parameters and ensure real-time data collection. The current collection subcircuit and the voltage collection subcircuit are directly connected to the power supply, and the fluctuation of the current and voltage data can be continuously collected even if the device to be detected is on standby, so that real-time and continuous detection can be achieved, which not only greatly improves the efficiency and accuracy of equipment maintenance, but also provides strong technical support for the preventive maintenance of the equipment, helps to reduce the failure rate of the equipment and extend the service life of the equipment.

[0059] Another embodiment of the utility model also provides a USB interface parameter detector. The USB interface parameter detector of this embodiment includes a housing and a USB interface parameter detection circuit as in the above embodiment built into the housing. The main control subcircuit 10, the current sampling subcircuit 20, the voltage sampling subcircuit 30, the voltage stabilization subcircuit 70 and the filtering subcircuit 80 are all arranged in the housing. The housing is provided with a plug interface, an LED mounting hole and a display window. The USB connection subcircuit 60 is connected to the USB interface of the device to be detected via the plug interface. The indication subcircuit 40 is installed in the LED mounting hole, and the power indicator LED1 and each controllable LED of the indication subcircuit 40 are exposed through the LED mounting hole for easy observation. The parameter display subcircuit 50 is embedded in the display window for easy reading of the detection parameters.

[0060] The USB interface parameter detector of this embodiment integrates the USB interface parameter detection circuit in the shell. When in use, it only needs to connect the interface of the USB connection subcircuit 60 to the USB interface of the external device to be detected. It is plug-and-play, has a compact structure and is easy to carry.

Claims

1. A USB interface parameter detection circuit, characterized in that: It comprises a main control subcircuit, a current sampling subcircuit, a voltage sampling subcircuit, an indication subcircuit and a parameter display subcircuit electrically connected to the main control subcircuit, and a USB connection subcircuit electrically connected to the current sampling subcircuit and the voltage sampling subcircuit, wherein the USB connection subcircuit is connected to a USB interface of a device to be detected; a sampling current input end of the current sampling subcircuit is electrically connected to a USB current output end of the USB connection subcircuit, a sampling current output end of the current sampling subcircuit is electrically connected to a current detection end of the main control subcircuit, a sampling voltage input end of the voltage sampling subcircuit is electrically connected to a USB voltage output end of the USB connection subcircuit, and a sampling voltage output end of the voltage sampling subcircuit is electrically connected to a voltage detection end of the main control subcircuit; a detection parameter output end of the main control subcircuit is electrically connected to a detection parameter input end of the parameter display subcircuit, and an indication signal output end of the main control subcircuit is electrically connected to an indication signal input end of the indication subcircuit.

2. The USB interface parameter detection circuit according to claim 1, characterized in that: It also includes a voltage stabilizing subcircuit for supplying power to the main control subcircuit, the current sampling subcircuit, the voltage sampling subcircuit, the indication subcircuit and the parameter display subcircuit, and the voltage stabilizing subcircuit is electrically connected to the USB connection subcircuit to access an external power source; The voltage stabilizing subcircuit includes a voltage stabilizing chip U7, a capacitor C4, a capacitor C9, a capacitor C12 and a capacitor C14; the VIN pin of the voltage stabilizing chip U7 is electrically connected to the USB connection subcircuit and connected to an external power supply, the VIN pin of the voltage stabilizing chip U7 is also grounded via capacitors C4 and C9 respectively, the TAB pin of the voltage stabilizing chip U7 forms a power supply end and is electrically connected to the main control subcircuit, the current sampling subcircuit, the voltage sampling subcircuit, the indication subcircuit and the parameter display subcircuit, the TAB pin of the voltage stabilizing chip U7 is also grounded via capacitors C12 and C14 respectively, and the GND pin of the voltage stabilizing chip U7 is grounded.

3. The USB interface parameter detection circuit according to claim 2, characterized in that: The main control subcircuit includes a main control chip U1 and a crystal oscillator unit, a serial interface unit, a program interface unit and a reset unit electrically connected to the main control chip U1; The VDD pin and VDDA pin of the main control chip U1 are both electrically connected to the power supply end, and the VSS pin and VSSA pin of the main control chip U1 are both grounded; the clock signal input end of the main control chip U1 is electrically connected to the clock signal output end of the crystal oscillator unit, the serial input end of the main control chip U1 is electrically connected to the serial output end of the serial interface unit, the program input end of the main control chip U1 is electrically connected to the program output end of the program interface unit, and the reset signal input end of the main control chip U1 is electrically connected to the reset signal output end of the reset unit.

4. The USB interface parameter detection circuit according to claim 3, characterized in that The crystal oscillator unit includes a crystal oscillator X1, a crystal oscillator X2, a capacitor C1, a capacitor C2, a capacitor C3 and a capacitor C11, a pin 1 of the crystal oscillator X1 is electrically connected to a pin PD14-OSC_IN of the main control chip U1 and is grounded via a capacitor C11, a pin 3 of the crystal oscillator X1 is electrically connected to a pin PD15-OSC_OUT of the main control chip U1 and is grounded via a capacitor C1, and a pin 2 of the crystal oscillator X1 is grounded; one end of the crystal oscillator X2 is electrically connected to a pin PC14-OSC32_IN of the main control chip U1 and is grounded via a capacitor C2, and the other end of the crystal oscillator X2 is electrically connected to a pin PC15-OSC32_OUT of the main control chip U1 and is grounded via a capacitor C3; The serial interface unit has an interface P1, wherein pins 1 and 2 of the interface P1 are electrically connected to pins PA10 and PA9 of the main control chip U1, respectively, and pin 3 is grounded; The program interface unit has an interface P2, wherein pin 1 of the interface P2 is connected to the power supply terminal, pins 2 and 3 are electrically connected to pins PA13 and PA14 of the main control chip U1 respectively, and pin 4 is grounded; The reset unit includes an interface D1, a resistor R1 and a capacitor C13, wherein pin 1 of the interface D1 is connected to the power supply end via the resistor R1 and pin 1 is also electrically connected to the NRST pin of the main control chip U1, pin 2 of the interface D1 is grounded, and the capacitor C13 is connected between pins 1 and 2 of the interface D1.

5. The USB interface parameter detection circuit according to claim 3, characterized in that: The USB interface subcircuit includes a first interface unit and / or a second interface unit, the first interface unit and / or the second interface unit are connected to the USB interface of the device to be detected and connected to an external power supply, and the first interface unit and / or the second interface unit are connected to both the current sampling subcircuit and the voltage sampling subcircuit; The first interface unit includes a power interface CN2, a power interface U8, an external connection terminal XH1 and a USB connection terminal CN6, wherein the negative electrodes of the power interface CN2 and the power interface U8, the 4th pin of the external connection terminal XH1 and the VCC pin of the USB connection terminal CN6 are grounded, the positive electrodes of the power interface CN2 and the power interface U8 are connected to the 1st pin of the external connection terminal XH1 and connected to an external power supply, and the 1st pin of the external connection terminal XH1 is also electrically connected to the GND pin of the USB connection terminal CN6, and the 2nd pin and the 3rd pin of the external connection terminal XH1 are also electrically connected to the D+ pin and the D- pin of the USB connection terminal CN6 respectively; The second interface unit includes a power interface CN3, a power interface U9, an external connection terminal XH2 and a USB connection terminal USB2. The negative poles of the power interface CN3 and the power interface U9, pin 1 of the external connection terminal XH2 and the VCC pin of the USB connection terminal USB2 are grounded. The positive poles of the power interface CN3 and the power interface U9 are connected to pin 4 of the external connection terminal XH2 and connected to an external power supply. Pin 4 of the external connection terminal XH2 is also electrically connected to the GND pin of the USB connection terminal USB2. Pin 2 and pin 3 of the external connection terminal XH2 are also electrically connected to the D- pin and D+ pin of the USB connection terminal USB2, respectively.

6. The USB interface parameter detection circuit according to claim 4, characterized in that: The current sampling subcircuit includes a USB connection terminal USB1, a USB connection terminal CN1, a sampling chip U2, a resistor R4, a resistor R6, a capacitor C15 and a capacitor C16; The VCC pin of the USB connection terminal USB1 is connected to the VCC pin of the USB connection terminal CN1 to form the sampling current input terminal and connect to the external power supply. The D- pin and D+ pin of the USB connection terminal USB1 are respectively connected to the D- pin and D+ pin of the USB connection terminal CN1. The GND pin of the USB connection terminal USB1 is electrically connected to the GND pin of the USB connection terminal CN1 via the resistor R4. The capacitor C16 is connected in parallel with the resistor R4. One end of the resistor R6 is connected to the GND pin of the USB connection terminal CN1. and the resistor R4, and the other end is grounded; the IN+ pin of the sampling chip U2 is connected between the GND pin of the USB connection terminal USB1 and the resistor R4, the IN- pin of the sampling chip U2 is connected between the GND pin of the USB connection terminal CN1 and the resistor R4, the OUT pin of the sampling chip U2 forms the sampling current output end and is electrically connected to the PA2 pin of the main control chip U1, the V+ pin of the sampling chip U2 is connected to the power supply end and the V+ pin of the sampling chip is also grounded through the capacitor C15, and the REF pin and GND pin of the sampling chip U2 are grounded.

7. The USB interface parameter detection circuit according to claim 4, characterized in that: The voltage sampling subcircuit includes a resistor R3 and a resistor R5, one end of the resistor R3 forms the sampling voltage input end connected to the external power supply, the other end is connected to one end of the resistor R5 and forms the sampling voltage output end connected to the PA1 pin of the main control chip U1, and the other end of the resistor R5 is grounded.

8. The USB interface parameter detection circuit according to claim 3, characterized in that: The indication subcircuit includes a power indicator LED1, a controllable indicator LED2 and a resistor RN1; The anode of the power indicator light LED1 is connected to the power supply end, and the cathode is grounded through a resistor of the resistor array RN1. The controllable indicator light LED2 is a three-channel indicator light. The controllable indicator light LED2 has three controllable LEDs. The anodes of the three controllable LEDs are connected to the power supply end, and the cathodes are respectively connected to a resistor of the resistor array RN1. The resistors in the resistor array RN1 corresponding to the controllable LEDs form the indication signal input end which is electrically connected to the PA7 pin, the PB10 pin and the PB11 pin of the main control chip U1.

9. The USB interface parameter detection circuit according to claim 3, characterized in that: The parameter display subcircuit includes a display module U6, a VCC pin of the display module U6 is connected to a power supply terminal, an SCK pin and an SDA pin of the display module U6 form the detection parameter input terminal and are respectively connected to the PA4 pin and the PA5 pin of the main control chip U1, and a GND pin of the display module U6 is grounded.

10. A USB interface parameter detector, characterized in that: The invention comprises a shell and a USB interface parameter detection circuit as claimed in any one of claims 1 to 9 built into the shell, wherein the shell is provided with a plug interface, an LED mounting hole and a display window, the USB connection subcircuit is connected to the USB interface of the device to be detected via the plug interface, the indication subcircuit is installed in the LED mounting hole, and the parameter display subcircuit is embedded in the display window.