ID function detection circuit of USB
By using the ID detection module between the Type-A interface module and the USB interface module in the ID function detection circuit of the USB storage product, and combining the resistor and LED to detect the function of the ID pin, Micro-USB/Mini -The problem of inconvenient detection of USB storage products in mass production and testing has been achieved, enabling lower-cost and more efficient USB interface detection.
Patent Information
- Application Number
- CN202322782759.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-17
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2033-10-17
AI Technical Summary
During the mass production and testing process, when Micro-USB/Mini-USB storage products are connected to test equipment through the Type-A interface, the USB interface cannot work properly, affecting functional testing. In addition, traditional testing methods are costly and restrict production.
A USB ID function detection circuit is designed. The ID detection module is set up between the Type-A interface module and the USB interface module. Resistors and LEDs are used to detect the function of the ID pin. It adapts to traditional hubs and reduces detection. cost, and improve detection scalability through an external voltage detection circuit.
It improves the convenience and comprehensiveness of USB interface testing, reduces testing costs, adapts to traditional hubs, and enhances the operability and scalability of industrial production.
Smart Images

Figure CN221668276U
Abstract
Description
Technical Field
[0001] The utility model relates to the technical field of USB circuit detection, in particular to a USB ID function detection circuit. Background Art
[0002] Micro-USB / Mini-USB are miniaturized USB interfaces that are widely used in mid- and low-end mobile phones, tablet computers, learning machines, printers and other devices. Micro-USB / Mini-USB are mainly used in storage products, and the master-slave switching function of the ID pin is required to achieve OTG (on the go) data transmission. However, during the mass production, testing and inspection of storage products, the Type-A interface is usually used to connect the test equipment, which causes the USB interface to fail to work properly and affects the functional testing of the USB interface device. The cost of testing the USB interface device through multi-line integration is too high, which restricts the mass production of USB storage products. Utility Model Content
[0003] In order to overcome the inconvenience of the ID pin function detection of USB storage products in the prior art, the utility model provides a USB ID function detection circuit.
[0004] The technical solution adopted by the utility model to solve its technical problems is:
[0005] A USB ID function detection circuit, comprising:
[0006] Type-A interface module, USB interface module and ID detection module, the ID pin of the USB interface module is connected to the VBUS pin of the Type-A interface module through the ID detection module, the VUSB pin of the USB interface module is connected to the VBUS pin through a resistor R1, the DM pin of the USB interface module is connected to the D- pin of the Type-A interface module through a resistor R2, and the DP pin of the USB interface module is connected to the D+ pin of the Type-A interface module through a resistor R3.
[0007] In a preferred example, the present application can be further configured as follows:
[0008] The resistor R1 , the resistor R2 , and the resistor R3 are resistors of equal value.
[0009] By adopting the above technical solution, since the Type-A interface module does not have a detection interface corresponding to the ID pin, it is impossible to detect whether the ID pin of the USB interface module is working normally. Therefore, an ID detection module is set between the Type-A interface module and the USB interface module, and the function detection of the ID pin is realized through the resistance voltage division, pull-up and pull-down characteristics in the ID detection module. Compared with the traditional Micro-USB / Mini=USB interface test, the Type-A circuit with ID function detection is easier to adapt to the traditional hub, improves the operability of industrial production, and reduces the detection cost of the USB interface module.
[0010] In a preferred example, the present application can be further configured as follows: the ID detection module specifically includes:
[0011] Resistor R4, resistor R5, LED1 and LED2, the ID pin is respectively connected to one end of the resistor R5 and the positive electrode of the LED2, the other side of the resistor R5 is connected to one side of the resistor R4 and the positive electrode of LED1, the other side of the resistor R4 is connected to the VBUS pin, and the cathode of the LED1 and the cathode of the LED2 are grounded.
[0012] By adopting the above technical solution, the ID pin is detected by connecting resistors R4 and R5 in series, and it is intuitively observed whether the ID pin is working normally through the related displays of LED1 and LED2, thereby improving the convenience of ID pin detection.
[0013] In a preferred example, the present application can be further configured as follows: the ID detection module further includes:
[0014] When the resistance of the ID pin to ground is greater than or equal to 101.2 kilo-ohms, the resistor R4 and the resistor R5 are connected in series to form a pull-up resistor, and the LED1 and the LED2 are lit.
[0015] By adopting the above technical solution, when the resistance of the ID pin to ground is greater than or equal to 101.2 kilo-ohms, it means that the resistance of the ID pin to ground is too large, and the USB cannot switch from Host mode to Device mode to charge the slave device. At this time, resistor R4 and resistor R5 are connected in series to form a pull-up resistor, and the resistance of the ID pin to ground becomes a pull-down resistor. The resistance value of the pull-down resistor is greater than or equal to 101.2 kilo-ohms. At this time, the circuit voltage is greater than the forward rated voltage of LED1 and LED2, and LED1 and LED2 light up, which is used to judge whether the ID pin is working normally by the on and off conditions of LED1 and LED2.
[0016] In a preferred example, the present application can be further configured as follows: the ID detection module further includes:
[0017] When the positive pole of LED1 and / or LED2 is used as a voltage sampling pin, the positive pole of LED1 and / or LED2 is respectively connected to the access pin of an external voltage detection circuit, and the transmission pin of the external voltage detection circuit is connected to the software tool device end.
[0018] In a preferred example, the present application can be further configured as follows: the external voltage detection circuit specifically includes:
[0019] The external voltage detection circuit is configured as a detection chip or a detection single-chip microcomputer.
[0020] By adopting the above technical solution, while meeting the requirements of ID function detection and fault judgment, the positive poles of LED1 and LED2 are connected to the voltage detection circuit as voltage sampling pins and interconnected with the external device end, thereby improving the scalability of the ID detection circuit.
[0021] In a preferred example, the present application can be further configured as follows: the ID detection module further includes:
[0022] When the ID pin is in an open circuit to the ground or in a poor contact state, the resistor R4 and the resistor R5 are connected in series to form a current limiting resistor, and the LED1 and the LED2 are lit.
[0023] By adopting the above technical solution, when the ID pin is in an open circuit to the ground or in poor contact, resistors R4 and R5 are connected in series to form a current limiting resistor, and the full-point voltage of LED1 and LED2 is the same as the voltage of the external power supply VBUS, then LED1 and LED2 light up, which is used to detect conditions such as the ID pin being open circuit to the ground or in poor contact, and whether the ID pin is in normal operation is indicated by the on and off of LED1 and LED2.
[0024] In a preferred example, the present application can be further configured as follows:
[0025] One end of the ID pin is connected to the resistor One end of the resistor is connected The other end of the ID pin is grounded, the other end of the ID pin is connected to one end of a resistor R140, the other side of the resistor R140 is respectively connected to the VUSB_ON pin of the USB interface module and one end of a resistor R138, and the other end of the resistor R138 is connected to the VUSB pin.
[0026] By adopting the above technical solution, through the resistor The ground resistance of the ID pin is controlled, and connected to an external device through resistors R138 and R140 to determine whether the external device is a data line or a storage device.
[0027] In a preferred example, the present application can be further configured as follows: the ID detection module further includes:
[0028] When the resistance When the resistance is 0 ohms, the resistor R4 and the resistor R5 are connected in series to form a current limiting resistor, the ground resistance of the ID pin is short-circuited, the LED 1 is on, and the LED 2 is off.
[0029] By adopting the above technical solution, when the resistor When it is at 0 ohms, that is, the ID pin is grounded, resistors R4 and R5 form a current limiting resistor, and LED2 has internal resistance so that the current only passes through LED1, then LED1 is on but LED2 is off. The on and off conditions of LED1 and LED2 are combined to determine whether the ID pin is in normal working condition.
[0030] The beneficial effects of the utility model are:
[0031] Compared with the traditional Micro-USB or Mini-USB interface test, the Type-A detection circuit with ID function detection is more suitable for the traditional hub, which can improve the operability of industrial production, reduce the USB ID test cost, and can be interconnected with the test equipment end through an external voltage detection circuit to improve the scalability of the ID detection circuit. This embodiment improves the comprehensiveness of USB function detection by comprehensively detecting the function of each pin of the USB storage product. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The utility model is further described below in conjunction with the accompanying drawings and embodiments.
[0033] Figure 1 This is a circuit diagram of a USB ID function detection circuit of the utility model;
[0034] Figure 2 This is a schematic diagram of the ID pin of a USB ID function detection circuit of the utility model; Description of the drawings:
[0036] Type-A interface module J1, USB interface module J2. DETAILED DESCRIPTION
[0037] The following will clearly and completely describe the concept, specific structure and technical effects of the utility model in combination with the embodiments and drawings, so as to fully understand the purpose, characteristics and effects of the utility model. Obviously, the described embodiments are only part of the embodiments of the utility model, not all of them. Based on the embodiments of the utility model, other embodiments obtained by technicians in this field without creative work are all within the scope of protection of the utility model. In addition, all the connection / connection relationships involved in the patent do not refer to the direct connection of components, but refer to the formation of a better connection structure by adding or reducing connection accessories according to the specific implementation situation. The various technical features in the creation of the utility model can be combined interchangeably without conflicting with each other.
[0038] Reference Figure 1 , Figure 2 , a USB ID function detection circuit includes:
[0039] Type-A interface module J1, USB interface module J2 and ID detection module, the ID pin of the USB interface module J2 is connected to the VBUS pin of the Type-A interface module J1 through the ID detection module, the VUSB pin of the USB interface module J2 is connected to the VBUS pin through a resistor R1, the DM pin of the USB interface module J2 is connected to the D- pin of the Type-A interface module J1 through the resistor R2, and the DP pin of the USB interface module J2 is connected to the D+ pin of the Type-A interface module J1 through a resistor R3.
[0040] In this embodiment, the resistor R1 , the resistor R2 , and the resistor R3 are resistors of equal value.
[0041] Specifically, each functional pin of the USB interface module J2 is fully detected through the Type-A interface module J1 and the ID detection module, thereby improving the comprehensiveness of the functional detection of the USB interface module J2.
[0042] In this embodiment, the ID detection module specifically includes:
[0043] Resistor R4, resistor R5, LED1 and LED2, the ID pin is respectively connected to one end of the resistor R5 and the positive electrode of the LED2, the other side of the resistor R5 is connected to one side of the resistor R4 and the positive electrode of LED1, the other side of the resistor R4 is connected to the VBUS pin, and the cathode of the LED1 and the cathode of the LED2 are grounded.
[0044] Specifically, by connecting resistors R4 and R5 in series, the voltage of the ID pin is divided, pulled up or pulled down to realize the function detection of the ID pin, and the working status of the ID pin is intuitively displayed in combination with the display of LED1 and LED2, thereby improving the detection convenience of the USB interface and enabling batch detection. Among them, the resistance value of resistor R4 is 2 kilo-ohms, the resistance value of resistor R5 is 2.37 kilo-ohms, and the voltage value of VBUS is 5 volts.
[0045] In this embodiment, LED1 and LED2 are LED lamp beads of different colors, wherein LED1 is a red lamp bead and LED2 is a green lamp bead.
[0046] In this embodiment, the ID detection module further includes:
[0047] When the ground resistance of the ID pin is greater than or equal to 101.2 kilo-ohms, the resistor R4 and the resistor R5 are connected in series to form a pull-up resistor, and the LED1 and the LED2 are lit. The resistance of the pull-up resistor is the sum of the resistance values of the resistors R4 and R5, which is 4.37 kilo-ohms. When the resistance value of the resistor R138 is 12 kilo-ohms and the resistance value of the resistor R140 is 6.8 kilo-ohms, and the voltage value of VBUS_ON is greater than or equal to 4.5 volts, the ground resistance calculated by Ohm's law is equal to 101.2 kilo-ohms, and the voltage value of the VBUS pin is 5 volts ± 10%, that is, there is a 10% voltage fluctuation. When the sampling voltage of VBUS_ON is greater than or equal to 4.5 volts, the USB Host mode cannot be switched to the Device mode, so the ground resistance must be less than 101.2 kilo-ohms.
[0048] It should be noted that the Host mode is mainly used to charge the master device. Specifically, when the ID pin is floating, that is, in NC mode, the VBUS_ON on the master device detects that the VBUS voltage is a high level of 5 volts, then it switches to Host mode; when the ID pin is grounded, the VBUS_ON on the master device detects a high level of 1.8 volts, then it switches to Device mode and actively powers the slave device.
[0049] In this embodiment, the ID detection module further includes:
[0050] When the positive pole of LED1 and / or LED2 is used as a voltage sampling pin, the positive pole of LED1 and / or LED2 is respectively connected to the access pin of an external voltage detection circuit, and the transmission pin of the external voltage detection circuit is connected to the software tool device end.
[0051] By using the positive poles of LED1 and LED2 as voltage sampling pins, the function of the external voltage detection circuit is expanded and interconnected with the device end to provide a sampling interface for dedicated monitoring software tools to improve scalability.
[0052] In this embodiment, the external voltage detection circuit specifically includes:
[0053] The external voltage detection circuit is configured as a detection chip or a detection single-chip microcomputer.
[0054] In this embodiment, the ID detection module further includes:
[0055] When the ID pin is in an open circuit to the ground or in a poor contact state, the resistor R4 and the resistor R5 are connected in series to form a current limiting resistor, and the LED1 and the LED2 are lit.
[0056] Specifically, when the ID pin is open to the ground or has poor contact, the circuit of the ID pin is blocked, current flows through LED1 and LED2, and the line voltage of LED1 and LED2 is 5 volts, causing LED1 and LED2 to light up at the same time.
[0057] In this embodiment, the ID function detection circuit further includes:
[0058] One end of the ID pin is connected to the resistor One end of the resistor is connected The other end of the ID pin is grounded, the other end of the ID pin is connected to one end of the resistor R140, the other side of the resistor R140 is respectively connected to the VUSB_ON pin of the USB interface module J2 and one end of the resistor R138, and the other end of the resistor R138 is connected to the VUSB pin.
[0059] Specifically, through the resistor The grounding function determines whether the grounding resistance of the ID pin is too large. When it is greater than or equal to 101.2 kilo-ohms, in this embodiment, the resistance The resistance value is 101.2 kilo-ohms. The resistor R4 is used as a pull-up resistor, and the resistor R5 and the resistor As the resistance is lowered, the positive voltage of LED1 is greater than or equal to 2.6 volts. It is calculated that if the current positive voltage is higher than the minimum forward conduction voltage of LED1, LED1 will light up.
[0060] For LED2, resistors R4 and R5 are pull-up resistors. The positive voltage of LED2 is greater than or equal to 1.6V. It is calculated that the current positive voltage of LED2 is higher than the minimum forward conduction voltage of LED2, and LED12 lights up.
[0061] When the ground resistance of the ID circuit is too large, the internal resistance of LED1 and LED2 is too small relative to the ground resistance, and the current flows to LED1 and LED2, causing LED1 and LED2 to light up at the same time.
[0062] In this embodiment, the ID detection module further includes:
[0063] When the resistance When the resistance is 0 ohms, the resistor R4 and the resistor R5 are connected in series to form a current limiting resistor, the ground resistance of the ID pin is short-circuited, the LED 1 is on, and the LED 2 is off.
[0064] Specifically, when the resistor When it is at 0 ohms, it is in a standard circuit state, that is, the resistance of the ID tube to ground is 0, there is internal resistance in LED2, and the current flows to the ID tube and LED1, making LED1 light up.
[0065] The specific working principle of this embodiment is as follows:
[0066] When the ID pin is open to ground or the ID pin has poor contact, the current passes through LED1 and LED2, and LED1 and LED2 light up at the same time; when the resistance of the ID pin to ground is greater than or equal to 101.2 kilo-ohms, the current passes through LED1 and LED2 with smaller resistance values, and LED1 and LED2 light up at the same time; when the ID pin is in normal working condition, the resistance of the ID pin to ground is 0, and there is internal resistance in LED2, the current passes directly through the ID route, LED1 lights up but LED2 does not light up, so that it is judged whether there is an abnormality in the ID pin by the on and off conditions of LED1 and LED2, thereby improving the detection convenience of the ID pin.
[0067] The above is a specific description of the preferred implementation of the utility model, but the invention of the utility model is not limited to the described embodiments. Technical personnel familiar with the field can also make various equivalent deformations or substitutions without violating the spirit of the utility model. These equivalent deformations or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A USB ID function detection circuit, characterized in that: include: A Type-A interface module (J1), a USB interface module (J2) and an ID detection module, wherein the ID pin of the USB interface module (J2) is connected to the VBUS pin of the Type-A interface module (J1) through the ID detection module, the VUSB pin of the USB interface module (J2) is connected to the VBUS pin through a resistor R1, the DM pin of the USB interface module (J2) is connected to the D- pin of the Type-A interface module (J1) through a resistor R2, and the DP pin of the USB interface module (J2) is connected to the D+ pin of the Type-A interface module (J1) through a resistor R3.
2. A USB ID function detection circuit according to claim 1, characterized in that: The ID detection module specifically includes: Resistor R4, resistor R5, LED1 and LED2, the ID pin is respectively connected to one end of the resistor R5 and the positive electrode of the LED2, the other side of the resistor R5 is connected to one side of the resistor R4 and the positive electrode of LED1, the other side of the resistor R4 is connected to the VBUS pin, and the cathode of the LED1 and the cathode of the LED2 are grounded.
3. A USB ID function detection circuit according to claim 2, characterized in that: The ID detection module also includes: When the resistance of the ID pin to ground is greater than or equal to 101.2 kilo-ohms, the resistor R4 and the resistor R5 are connected in series to form a pull-up resistor, and the LED1 and the LED2 are lit.
4. A USB ID function detection circuit according to claim 3, characterized in that: The ID detection module also includes: When the positive pole of LED1 and / or LED2 is used as a voltage sampling pin, the positive pole of LED1 and / or LED2 is respectively connected to the access pin of an external voltage detection circuit, and the transmission pin of the external voltage detection circuit is connected to the software tool device end.
5. A USB ID function detection circuit according to claim 4, characterized in that: The external voltage detection circuit specifically includes: The external voltage detection circuit is configured as a detection chip or a detection single-chip microcomputer.
6. A USB ID function detection circuit according to claim 2, characterized in that: The ID detection module also includes: When the ID pin is in an open circuit to the ground or in a poor contact state, the resistor R4 and the resistor R5 are connected in series to form a current limiting resistor, and the LED1 and the LED2 are lit.
7. A USB ID function detection circuit according to claim 2, characterized in that: Also includes: One end of the ID pin is connected to the resistor R id One end of the resistor R id The other end of the ID pin is grounded, the other end of the ID pin is connected to one end of a resistor R140, the other side of the resistor R140 is respectively connected to the VUSB_ON pin of the USB interface module (J2) and one end of a resistor R138, and the other end of the resistor R138 is connected to the VUSB pin.
8. A USB ID function detection circuit according to claim 7, characterized in that: The ID detection module also includes: When the resistor R id When the resistance is 0 ohms, the resistor R4 and the resistor R5 are connected in series to form a current limiting resistor, the ground resistance of the ID pin is short-circuited, the LED 1 is on, and the LED 2 is off.
9. The USB ID function detection circuit according to claim 1, characterized in that: Also includes: The resistor R1 , the resistor R2 , and the resistor R3 are resistors of equal value.
