CN213276639U - Circuit and equipment for detecting insertion of USB equipment - Google Patents
Circuit and equipment for detecting insertion of USB equipment Download PDFInfo
- Publication number
- CN213276639U CN213276639U CN202022299939.6U CN202022299939U CN213276639U CN 213276639 U CN213276639 U CN 213276639U CN 202022299939 U CN202022299939 U CN 202022299939U CN 213276639 U CN213276639 U CN 213276639U
- Authority
- CN
- China
- Prior art keywords
- resistor
- circuit
- detection circuit
- usb device
- input end
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Power Sources (AREA)
Abstract
The utility model provides a circuit and equipment for detecting USB equipment insertion, which comprises a USB equipment interface socket J1, a MCU, a first input end, a hardware detection circuit, a first output end, a second input end and a diode D2; the first input end is connected with a hardware detection circuit, the hardware detection circuit is connected with a first output end, and the hardware detection circuit is also connected to an interrupt port of the MCU through a second output end; the second input end is connected with the anode of a diode D2, the cathode of the diode D2 is respectively connected with the hardware detection circuit and the VBUS pin of the USB device interface socket J1, and the GND pin of the USB device interface socket J1 is grounded. The utility model controls the level of the MCU interrupt port to judge whether the USB device is inserted or not by controlling the on/off of the triode, and the response speed is faster than that of the software scheme; the circuit is simple, the cost is low, and the circuit is stable and reliable; and whether USB equipment is inserted can be tested and verified through instruments such as an external meter and the like.
Description
Technical Field
The utility model relates to a USB technical field especially relates to a detect USB equipment male circuit and equipment.
Background
In the automobile instrument and the navigation system, the USB function is basically supported. In the existing scheme, whether the USB equipment is inserted is basically identified by software, when the USB equipment such as a USB disk is inserted, the USB disk can be judged to be inserted by successfully handshaking software of a system host and the USB disk, and the method can cause that the detection time is delayed and the USB equipment cannot pass test verification of instruments such as an external meter and the like.
SUMMERY OF THE UTILITY MODEL
The utility model provides a detect USB equipment male circuit and equipment, the technical problem of solution is, does not have the hardware scheme of short-term test USB equipment male among the prior art.
In order to solve the technical problem, the utility model provides a circuit and a device for detecting the insertion of a USB device, which comprises a USB device interface socket J1, a MCU, a first input end, a hardware detection circuit, a first output end, a second input end and a diode D2; the first input end is connected with a hardware detection circuit, the hardware detection circuit is connected with a first output end, and the hardware detection circuit is also connected to an interrupt port of the MCU through a second output end; the second input end is connected with the anode of a diode D2, the cathode of the diode D2 is respectively connected with the hardware detection circuit and the VBUS pin of the USB device interface socket J1, and the GND pin of the USB device interface socket J1 is grounded;
the hardware detection circuit is used for detecting whether the USB equipment is inserted.
Further, the hardware detection circuit includes: a resistor R1, a resistor R2, a resistor R3, a resistor R4, a capacitor C1, a capacitor C2, a triode Q1 and a voltage regulator D1; the first input end is respectively connected with a resistor R1 and an emitter of a triode Q1, the other end of the resistor R1 is connected with a resistor R2, a base of the triode Q1 is connected with a resistor R2, a collector of the triode Q1 is connected with a first output end, the resistor R2 is connected with a positive electrode of a voltage regulator tube D1, a negative electrode of a voltage regulator tube D1 is connected with a negative electrode of a diode D2, the collector of the triode Q1 is also respectively connected with a capacitor C1 and a resistor R3, the capacitor C1 is connected with a capacitor C2, the other end of the capacitor C2 is grounded, the other end of the resistor R3 is connected with a resistor R4 and a second output end, and the resistor R4 is grounded.
Furthermore, the first input end is a 9-16V power supply.
Further, the first input terminal is a 12V power supply.
Further, the second input end is a 5V power supply.
Further, the triode Q1 is a PNP type triode.
Further, the resistor R1 is 10K ohms, the resistor R2 is 4.7K ohms, the resistor R3 is 68K ohms, and the resistor R4 is 100K ohms; the capacitance C1 and the capacitance C2 are 47 nanofarads and 50V rated voltage.
The utility model also provides an equipment, include detect USB equipment male circuit.
The utility model provides a circuit and equipment for detecting USB equipment insertion, which comprises a USB equipment interface socket J1, a MCU, a first input end, a hardware detection circuit, a first output end, a second input end and a diode D2; the first input end is connected with a hardware detection circuit, the hardware detection circuit is connected with a first output end, and the hardware detection circuit is also connected to an interrupt port of the MCU through a second output end; the second input end is connected with the anode of a diode D2, the cathode of the diode D2 is respectively connected with the hardware detection circuit and the VBUS pin of the USB device interface socket J1, and the GND pin of the USB device interface socket J1 is grounded. The utility model provides a hardware scheme for rapidly detecting the insertion of USB equipment, which controls the level of an MCU interrupt port to judge whether the USB equipment is inserted or not by controlling the conduction of a triode or not, and the response speed is faster than that of a software scheme; the circuit is simple, the cost is low, and the circuit is stable and reliable; and whether USB equipment is inserted can be tested and verified through instruments such as an external meter and the like.
Drawings
Fig. 1 is a circuit diagram for detecting insertion of a USB device according to an embodiment of the present invention.
Detailed Description
The following embodiments of the present invention will be described in detail with reference to the accompanying drawings, which are given for illustrative purposes only and are not to be construed as limiting the invention, including the drawings, which are only used for reference and illustration, and do not constitute a limitation to the scope of the invention, since many changes may be made thereto without departing from the spirit and scope of the invention.
As shown in fig. 1, a circuit diagram for detecting insertion of a USB device according to an embodiment of the present invention includes a USB device interface socket J1, an MCU, a first input terminal, a hardware detection circuit, a first output terminal, a second input terminal, and a diode D2; pin 1 of the USB device interface socket J1 is a VBUS pin, pin 2 and pin 3 are a signal differential signal USB _ D-pin and a USB _ D + pin respectively, pin 4 is empty, and pin 5 is a GND pin; the first input end is connected with a hardware detection circuit, the hardware detection circuit is connected with a first output end, and the hardware detection circuit is also connected to an interrupt port of the MCU through a second output end; the second input end is connected with the anode of a diode D2, the cathode of the diode D2 is respectively connected with the hardware detection circuit and the VBUS pin of the USB device interface socket J1, and the pin 5 of the USB device interface socket J1 is grounded; the hardware detection circuit is used for detecting whether the USB equipment is inserted.
Further, the hardware detection circuit includes: a resistor R1, a resistor R2, a resistor R3, a resistor R4, a capacitor C1, a capacitor C2, a triode Q1 and a voltage regulator D1; the first input end is respectively connected with a resistor R1 and an emitter of a triode Q1, the other end of the resistor R1 is connected with a resistor R2, a base of the triode Q1 is connected with a resistor R2, a collector of the triode Q1 is connected with a first output end, the resistor R2 is connected with a positive electrode of a voltage regulator tube D1, a negative electrode of a voltage regulator tube D1 is connected with a negative electrode of a diode D2, the collector of the triode Q1 is also respectively connected with a capacitor C1 and a resistor R3, the capacitor C1 is connected with a capacitor C2, the other end of the capacitor C2 is grounded, the other end of the resistor R3 is connected with a resistor R4 and a second output end, and the resistor R4 is grounded.
Furthermore, the first input end is a 9-16V power supply.
Further, the first input terminal is a 12V power supply.
Further, the second input end is a 5V power supply.
Further, the triode Q1 is a PNP type triode.
Further, the resistor R1 is 10K ohms, the resistor R2 is 4.7K ohms, the resistor R3 is 68K ohms, and the resistor R4 is 100K ohms; the capacitance C1 and the capacitance C2 are 47 nanofarads and 50V rated voltage.
As shown in fig. 1, the first input terminal (normally 9-16V) is a power supply of a 12V system automobile battery after filtering, the second output terminal is connected to an interrupt port of the MCU, and when the second output terminal is in a low state, it indicates that no USB device is inserted, and when the second output terminal is in a high state, it indicates that a USB device is inserted. When the USB device is not inserted, the base electrode of the triode Q1 has no current loop, the current is 0 at the moment, the triode Q1 is not conducted, the voltage of the first output end is 0V, and the voltage of the second output end is 0V, which indicates that no USB device is inserted; when a USB device is plugged in, current passes through the second input end, the base current of the triode Q1 has a loop, the triode Q1 is conducted, voltage is divided by the resistor R3 and the resistor R4 at the second output end, the voltage is high level, and the system judges that the USB device is plugged in.
The utility model provides a circuit and equipment for detecting USB equipment insertion, which comprises a USB equipment interface socket J1, a MCU, a first input end, a hardware detection circuit, a first output end, a second input end and a diode D2; the first input end is connected with a hardware detection circuit, the hardware detection circuit is connected with a first output end, and the hardware detection circuit is also connected to an interrupt port of the MCU through a second output end; the second input end is connected with the anode of a diode D2, the cathode of the diode D2 is respectively connected with the hardware detection circuit and the VBUS pin of the USB device interface socket J1, and the GND pin of the USB device interface socket J1 is grounded. The utility model provides a hardware scheme for rapidly detecting the insertion of USB equipment, which controls the level of an MCU interrupt port to judge whether the USB equipment is inserted or not by controlling the conduction of a triode or not, and the response speed is faster than that of a software scheme; the circuit is simple, the cost is low, and the circuit is stable and reliable; and whether USB equipment is inserted can be tested and verified through instruments such as an external meter and the like.
The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments, and any other changes, modifications, substitutions, combinations, and simplifications which do not depart from the spirit and principle of the present invention should be equivalent replacement modes, and all are included in the scope of the present invention.
Claims (8)
1. A circuit for detecting the insertion of a USB device, which comprises a USB device interface socket J1 and an MCU, and is characterized by comprising: the circuit comprises a first input end, a hardware detection circuit, a first output end, a second input end and a diode D2; the first input end is connected with a hardware detection circuit, the hardware detection circuit is connected with a first output end, and the hardware detection circuit is also connected to an interrupt port of the MCU through a second output end; the second input end is connected with the anode of a diode D2, the cathode of the diode D2 is respectively connected with the hardware detection circuit and the VBUS pin of the USB device interface socket J1, and the GND pin of the USB device interface socket J1 is grounded;
the hardware detection circuit is used for detecting whether the USB equipment is inserted.
2. The circuit for detecting insertion of a USB device according to claim 1, wherein the hardware detection circuit comprises: a resistor R1, a resistor R2, a resistor R3, a resistor R4, a capacitor C1, a capacitor C2, a triode Q1 and a voltage regulator D1; the first input end is respectively connected with a resistor R1 and an emitter of a triode Q1, the other end of the resistor R1 is connected with a resistor R2, a base of the triode Q1 is connected with a resistor R2, a collector of the triode Q1 is connected with a first output end, the resistor R2 is connected with a positive electrode of a voltage regulator tube D1, a negative electrode of a voltage regulator tube D1 is connected with a negative electrode of a diode D2, the collector of the triode Q1 is also respectively connected with a capacitor C1 and a resistor R3, the capacitor C1 is connected with a capacitor C2, the other end of the capacitor C2 is grounded, the other end of the resistor R3 is connected with a resistor R4 and a second output end, and the resistor R4 is grounded.
3. The circuit for detecting insertion of a USB device according to claim 1, wherein: the first input end is a 9-16V power supply.
4. The circuit for detecting insertion of a USB device according to claim 1, wherein: the first input end is a 12V power supply.
5. The circuit for detecting insertion of a USB device according to claim 1, wherein: the second input end is a 5V power supply.
6. The circuit for detecting insertion of a USB device according to claim 2, wherein: the triode Q1 is a PNP type triode.
7. The circuit for detecting insertion of a USB device according to claim 2, wherein: the resistor R1 is 10K ohms, the resistor R2 is 4.7K ohms, the resistor R3 is 68K ohms, and the resistor R4 is 100K ohms; the capacitance C1 and the capacitance C2 are 47 nanofarads and 50V rated voltage.
8. An apparatus, characterized by: comprising a circuit for detecting the insertion of a USB device according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202022299939.6U CN213276639U (en) | 2020-10-15 | 2020-10-15 | Circuit and equipment for detecting insertion of USB equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202022299939.6U CN213276639U (en) | 2020-10-15 | 2020-10-15 | Circuit and equipment for detecting insertion of USB equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN213276639U true CN213276639U (en) | 2021-05-25 |
Family
ID=75951324
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202022299939.6U Active CN213276639U (en) | 2020-10-15 | 2020-10-15 | Circuit and equipment for detecting insertion of USB equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN213276639U (en) |
-
2020
- 2020-10-15 CN CN202022299939.6U patent/CN213276639U/en active Active
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2584471A1 (en) | Method and terminal for selecting internal circuit according to USB interface status | |
CN101963835A (en) | Electronic equipment and method for dynamically allocating USB port power | |
WO2018045687A1 (en) | Plug module recognition circuit and method | |
CN101179199A (en) | Terminal and charging method thereof | |
EP4119965A1 (en) | Charging test apparatus and method | |
CN104466470A (en) | Anti-jitter SD card base, terminal and method for identifying inserting and pulling state of SD card | |
CN106151084A (en) | Fan detection device and fan assembly | |
CN102053229A (en) | Power detection device | |
WO2022262746A1 (en) | Electromagnet current measurement circuit for magnetic-levitation train, and magnetic-levitation train | |
CN112415374A (en) | Measuring circuit and measuring method for measuring response time of optical coupling relay | |
CN213276639U (en) | Circuit and equipment for detecting insertion of USB equipment | |
CN203376076U (en) | A temperature detection circuit for a permanent magnet synchronous motor for an electric car and a controller of the motor | |
CN112214439B (en) | Hot plug self-identification circuit and identification method | |
CN206180986U (en) | Trigger circuit and earphone restore to throne | |
CN204928079U (en) | Current foldback circuit , power factor correction circuit and transducer air conditioning | |
KR100449995B1 (en) | System for detecting the presence of an electrically conductive object, particularly an integrated circuit on a chip card | |
CN215986443U (en) | CC of Type C detects functional circuit | |
CN115166604A (en) | Detection circuitry, circuit board and electronic equipment of Type-C direction of inserting | |
CN211236201U (en) | RS232 interface state detection circuit | |
CN211426729U (en) | Fire detection alarm electric quantity detection circuit and fire detection alarm | |
WO2022205821A1 (en) | Digital output circuit, digital output device, and digital output system | |
CN220421806U (en) | ADC circuit for realizing equipment power-on detection and equipment type detection | |
CN208224454U (en) | A kind of lithium battery low power testing and active circuit | |
CN106919117A (en) | For automobile instrument water temperature fuel sensor sample circuit | |
CN204203396U (en) | Testing circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
GR01 | Patent grant | ||
GR01 | Patent grant |