Equipment insertion detection circuit and equipment
The device insertion detection circuit composed of power supply, voltage divider resistor and switching transistor module solves the problems of electrolytic corrosion and insufficient electrostatic protection of TYPE-C interface, realizes low-cost, high-voltage device insertion detection, and extends the service life of the interface.
Patent Information
- Application Number
- CN202422378751.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2034-09-27
AI Technical Summary
In the prior art, the configuration channel signal of the TYPE-C interface is continuously turned on, causing electrolytic corrosion of the interface pins, which affects the service life. In addition, the electrostatic protection and DC withstand voltage capabilities of the comparator input pins are insufficient, making them easily damaged.
The device insertion detection circuit consists of a power supply, voltage divider resistors, and a switching transistor module. The voltage divider resistors provide a voltage divider voltage or a preset voltage, and the switching transistor module outputs a detection signal based on the voltage status to indicate the device connection status.
It simplifies the circuit structure, reduces costs, improves electrostatic protection and DC voltage resistance, avoids damage when the TYPE-C interface is directly connected, and extends the service life.
Smart Images

Figure CN223461689U_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The utility model relates to integrated circuit technical field, concretely relates to a device insertion detection circuit, device. BACKGROUND
[0002] With the popularity of TYPE-C interface in intelligent products, the continuous opening of configuration channel (CC) signal leads to electrolytic corrosion of interface pins, thereby affecting the service life of the interface.
[0003] The prior art uses a comparator to construct an insertion detection circuit, relies on detecting whether the TYPE-C interface pin is grounded to determine device insertion, and then activates the CC signal to detect the device type. However, this method has the disadvantages of complex circuit, high material cost, and insufficient electrostatic protection and DC voltage resistance of the comparator input pin, which is prone to damage when directly connected to the TYPE-C interface. SUMMARY
[0004] The embodiments of the present application disclose a device insertion detection circuit and a device. The circuit is composed of a resistor, a power supply, and a transistor, which not only makes the structure simple and the cost low, but also makes the circuit have the characteristics of high electrostatic protection, high DC voltage resistance, and not easy to be damaged when directly connected to the TYPE-C interface.
[0005] The first aspect of the embodiments of the present application discloses a device insertion detection circuit and a device, comprising a power supply, a voltage dividing resistor, and a switching transistor module, the voltage dividing resistor is connected with the power supply and the switching transistor module respectively, and the switching transistor module is also connected with the power supply, wherein:
[0006] The voltage dividing resistor is also connected with a detection pin, and is used for dividing the voltage of the power supply and providing a divided voltage to the switching transistor module when the detection pin is not connected with a device to be detected, and providing a first preset voltage to the switching transistor module when the detection pin is connected with the device to be detected.
[0007] The switching transistor module is also connected with an interrupt pin, and is used for being in an open state or a disconnected state according to the divided voltage or the first preset voltage, and outputting a detection signal through the interrupt pin, the detection signal is used for indicating the connection condition of the device to be detected and the detection circuit, and the connection condition includes a connected state or an unconnected state.
[0008] As an optional implementation, in the first aspect of the embodiment, the voltage dividing resistor comprises a first voltage dividing resistor and a second voltage dividing resistor, a first end of the first voltage dividing resistor is connected with the power supply, a second end of the first voltage dividing resistor and a first end of the second voltage dividing resistor are connected, a second end of the second voltage dividing resistor is grounded, and the second end of the first voltage dividing resistor is also connected with the detection pin and the switching transistor module.
[0009] As an optional implementation, in the first aspect of the embodiment, the resistance value of the first voltage dividing resistor is twice the resistance value of the second voltage dividing resistor.
[0010] As an optional implementation, in the first aspect of the embodiment, the switching transistor module further comprises a first switching transistor, a second switching transistor, a first pull-up resistor and a second pull-up resistor, a gate of the first switching transistor is connected with the voltage dividing resistor, a drain of the first switching transistor is connected with a gate of the second switching transistor, a drain of the second switching transistor is connected with the interrupt pin, the drain of the first switching transistor is connected with the power supply through the first pull-up resistor, the drain of the second switching transistor is connected with the power supply through the second pull-up resistor, and a source of the first switching transistor and a source of the second switching transistor are grounded.
[0011] As an optional implementation, in the first aspect of the embodiment, the power supply comprises a first power supply and a second power supply, in the case that the detection pin is not connected with the to-be-detected device, the voltage dividing resistor divides the first power supply voltage of the first power supply, and provides a divided voltage to the gate of the first switching transistor, the divided voltage is greater than the turn-on voltage of the first switching transistor;
[0012] the first switching transistor is configured to be in the on state under the action of the divided voltage, and provide a second preset voltage to the gate of the second switching transistor, the second preset voltage is less than the turn-on voltage of the second switching transistor;
[0013] the second switching transistor is configured to be in the off state under the action of the second preset voltage, and obtain the second power supply voltage of the second power supply through the second pull-up resistor, and output a first sub-detection signal, the first sub-detection signal is a high-level signal;
[0014] the interrupt pin does not trigger an interrupt under the action of the first sub-detection signal, so that an operating system connected with the interrupt pin determines that the to-be-detected device and the detection circuit are in the unconnected state.
[0015] As an optional implementation, in the first aspect of the embodiment, the power supply includes a first power supply and a second power supply, and when the detection pin is connected with the device to be detected, the voltage dividing resistor is in a short circuit state to provide the first preset voltage to the first switch transistor, the first preset voltage being less than an opening voltage of the first switch transistor.
[0016] The first switch transistor is configured to be in the off state under the action of the first preset voltage, and obtain a second power supply voltage of the second power supply through the first pull-up resistor, and provide the second power supply voltage to a gate of the second switch transistor, the second power supply voltage being greater than an opening voltage of the second switch transistor.
[0017] The second switch transistor is configured to be in the on state under the action of the second power supply voltage, and output a second sub-detection signal, the second sub-detection signal being a low-level signal.
[0018] The interrupt pin is triggered to interrupt under the action of the second sub-detection signal, so that an operating system connected with the interrupt pin determines that the device to be detected and the detection circuit are in the connection state.
[0019] As an optional implementation, in the first aspect of the embodiment, the first pull-up resistor and the second pull-up resistor have the same resistance.
[0020] As an optional implementation, in the first aspect of the embodiment, the first power supply voltage and the second power supply voltage have the same voltage.
[0021] As an optional implementation, in the first aspect of the embodiment, the first switch transistor and the second switch transistor are NMOS tubes.
[0022] A second aspect of the embodiment of the present application discloses an electronic device, including any one of the device insertion detection circuits disclosed in the embodiments of the present application.
[0023] Compared with the related art, the embodiments of the present application have at least the following beneficial effects:
[0024] The device insertion detection circuit and the device disclosed by the embodiment of the present application mainly consist of a power supply, a voltage dividing resistor and a switching transistor module. The voltage dividing resistor is connected with the power supply and the switching transistor module respectively, and can provide a voltage dividing voltage or a first preset voltage to the switching transistor module according to the device insertion state. The switching transistor module is connected with the power supply and an interrupt pin, and is in an on state or an off state according to the voltage dividing voltage or the first preset voltage, and outputs a detection signal through the interrupt pin, which is used to indicate the connection state of the device to be detected and the detection circuit. Since the device insertion detection circuit only uses a power supply, a resistor and a transistor, the circuit structure is simple, and the cost of the device insertion detection circuit is reduced due to the low material cost of the transistor. In addition, the electrostatic protection and high DC voltage resistance of the transistor make it not easy to be damaged when directly connected with the TYPE-C interface. BRIEF DESCRIPTION OF DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0026] Figure 1 The schematic circuit structure diagram of the first device insertion detection circuit provided by the embodiment of the present application is shown in the figure.
[0027] Figure 2 The schematic circuit structure diagram of the second device insertion detection circuit provided by the embodiment of the present application is shown in the figure.
[0028] Figure 3 The schematic circuit structure diagram of the third device insertion detection circuit provided by the embodiment of the present application is shown in the figure.
[0029] Figure 4 The schematic circuit structure diagram of the fourth device insertion detection circuit provided by the embodiment of the present application is shown in the figure.
[0030] Figure 5 The schematic circuit structure diagram of the fifth device insertion detection circuit provided by the embodiment of the present application is shown in the figure.
[0031] Figure 6 The schematic circuit structure diagram of the sixth device insertion detection circuit provided by the embodiment of the present application is shown in the figure.
[0032] Figure 7 The schematic circuit structure diagram of the seventh device insertion detection circuit provided by the embodiment of the present application is shown in the figure.
[0033] Figure 8 The structure schematic diagram of the electronic device disclosed by the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0034] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work are within the scope of protection of the present application.
[0035] It should be noted that the terms "first", "second", and "third" in the embodiments of the present application are used to distinguish similar or different objects and do not represent a specific order of the objects. Understandably, the "first", "second", and "third" can be interchanged in a specific order or sequence as allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0036] It should be noted that the terms "include" and "have" and any variations thereof in the embodiments of the present application and the drawings are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device including a series of steps or units is not limited to the listed steps or units, but can optionally include steps or units not listed or can optionally include other steps or units inherent to the process, method, product, or device.
[0037] With the popularity of TYPE-C interface in smart products, the continuous opening of the Configuration Channel (CC) signal causes electrolytic corrosion of the interface pins, significantly shortening the service life of the interface. This is because under long-term work, the continuous transmission of the CC signal makes the metal contact point vulnerable to damage, increasing the frequency of maintenance and replacement, thereby negatively affecting the user experience.
[0038] The prior art usually constructs an insertion detection circuit through a comparator, which detects whether the TYPE-C interface pins (such as A1 / A12 / B1 / B12) are grounded to determine the insertion state of the device. Only after confirming that the device has been inserted, the CC signal will be activated for device type identification. However, this method has the disadvantages of complex circuit design, high material cost, and relatively low electrostatic protection and DC voltage resistance of the comparator input pin, which can be easily damaged when directly connected with the TYPE-C interface, thereby affecting the stability and reliability of the overall system.
[0039] The embodiment of the application discloses an insertion device detection circuit, device, mainly composed of power supply, voltage dividing resistor and switching transistor module. The voltage dividing resistor is connected with the power supply and the switching transistor module, and can provide corresponding voltage dividing voltage or first preset voltage to the switching transistor module according to the insertion state of the device. The switching transistor module is connected with the interrupt pin and the power supply, and determines whether to turn on or turn off according to the input voltage dividing voltage or first preset voltage, and outputs a detection signal through the interrupt pin to indicate the connection condition of the device to be detected and the detection circuit. This design not only reduces the complexity of the circuit, but also reduces the cost of the circuit because the transistor has relatively low manufacturing cost, and because the transistor has strong electrostatic protection and DC voltage resistance, it is not easy to be damaged when directly connected with the TYPE-C interface, thereby prolonging the service life, which will be described in detail below:
[0040] The device insertion detection circuit disclosed by the embodiment of the application can be applied to various fields, such as in the consumer electronics field, the device insertion detection circuit can be applied to, but not limited to, smart phones, tablet computers and notebook computers and the like; in the industrial automation field, the device insertion detection circuit can be applied to, but not limited to, sensors, actuators and programmable logic controllers and the like; in the automotive electronics field, the insertion detection circuit can be applied to, but not limited to, infotainment systems and charging interfaces and the like; in the smart home field, the device insertion detection circuit can be applied to, but not limited to, smart sockets, lamps, household appliances, monitoring cameras and alarm systems and the like. In the medical device field, the insertion detection circuit can be applied to, but not limited to, portable medical instruments and diagnostic devices and the like.
[0041] Please refer to Figure 1 , Figure 1 The first device insertion detection circuit disclosed by the embodiment of the application is a schematic circuit structure diagram, which comprises a power supply 11, a voltage dividing resistor 12, a switching transistor module 13, a detection pin 14 and an interrupt pin 15.
[0042] The voltage dividing resistor 12 is connected with the power supply 11 and the switching transistor module 13 respectively, and the switching transistor module 13 is also connected with the power supply 11, wherein:
[0043] The voltage dividing resistor 12 is also connected with the detection pin 14, for dividing the voltage of the power supply 11 and providing the voltage dividing voltage after the voltage dividing processing to the switching transistor module 13 in the case that the detection pin 14 is not connected with the device to be detected; and providing the first preset voltage to the switching transistor module in the case that the detection pin 14 is connected with the device to be detected;
[0044] The switch transistor module 13 is also connected with an interrupt pin 15, which is in an open state or a closed state according to the divided voltage or the first preset voltage, and outputs a detection signal through the interrupt pin 15, the detection signal being used to indicate a connection condition of the to-be-detected device and the detection circuit, the connection condition including a connected state or an unconnected state.
[0045] The power supply 11 is connected with the divided voltage resistor 12 and the switch transistor, and provides a stable voltage and a power supply for both.
[0046] For the power supply 11, the power supply is a device that converts electrical energy from one form to another for use by electrical appliances and electronic devices. The main function of the power supply is to provide stable and reliable voltage and current to ensure the normal operation of the device. The types of power supplies are various, and can be selected according to their characteristics according to the actual scene needs, such as alternating current power supply, direct current power supply, adjustable power supply, switching power supply, and linear power supply, etc., which are not limited specifically herein. Among them, the alternating current power supply is characterized by providing alternating current, and the current and voltage change periodically with time, which can be applied to, but not limited to, household, industrial power grid, transformer, etc.; the direct current power supply is characterized by providing stable direct current, and the current and voltage remain unchanged, which can be applied to, but not limited to, electronic devices, chargers, embedded systems, etc.; the adjustable power supply is characterized by adjustable output voltage and current, which can be applied to, but not limited to, laboratory testing, development and debugging devices, etc.; the switching power supply is characterized by using a switching element to quickly switch the power supply, which has high efficiency and small size, and can be applied to, but not limited to, computer power adapter, television, etc.; the linear power supply is characterized by controlling the output voltage through a linear regulating element, which has stable output and can be applied to, but not limited to, audio equipment, high-precision instruments, etc.
[0047] The divided voltage resistor 12 is connected with the power supply 11, and outputs a divided voltage and a first preset voltage to the transistor module 13 by dividing the voltage of the power supply, so that the transistor module 13 judges to be in an open state or a closed state according to the divided voltage and the first preset voltage.
[0048] The main function of the divided voltage resistor is to realize voltage distribution and regulation to provide a specific voltage output, which is widely applicable and can be applied to, but not limited to, signal regulation, circuit protection, measurement circuit, and power management, etc. Among them, signal regulation is to adjust the signal voltage to a suitable level in a sensor or an audio device; in circuit protection, it is mainly used to reduce the voltage to protect sensitive components from damage caused by excessive voltage, and in measurement circuit, it divides the high voltage signal to a measurable range; in power management, it can provide the required voltage for different circuits.
[0049] The voltage dividing resistor can be composed of two or more resistors in series, and the resistance value of each resistor determines the distribution of voltage between them. The number and resistance value of the resistors can be selected according to specific needs to achieve the required voltage distribution. The basic components of the voltage dividing resistor include but are not limited to input resistance, voltage dividing resistance, and output terminal. The input resistance is connected to the power supply and receives the input voltage; the voltage dividing resistance is a series of other resistors that determine the proportion of the output voltage; the output terminal usually takes the voltage from the middle point as the output signal.
[0050] The switch transistor module 13 is mainly composed of a switch transistor, which is in an open state or a closed state according to the voltage dividing voltage or the first preset voltage, and outputs a detection signal through the interrupt pin 15. The detection signal is used to indicate the connection status of the device to be detected and the detection circuit, including the connected state or the unconnected state.
[0051] For switch transistors, a switch transistor is a semiconductor device that can be used for amplification or switching electronic signals, with the characteristics of miniaturization, high efficiency, fast response, reliability, scalability, low cost, controllability, and strong environmental adaptability. Among them, miniaturization means that the size of the transistor can be very small, which makes them very suitable for use in integrated circuits, thus realizing high-density electronic device design; high efficiency means that the transistor consumes relatively low power when switching, which helps to improve the energy efficiency of electronic devices; fast response means that modern transistors can be turned on and off very quickly, which allows them to handle high-frequency signals; reliability means that transistors can work stably under various environmental conditions; low cost means that the cost of a single transistor is very low with the advancement of manufacturing technology; controllability means that the conductivity of the transistor can be adjusted by controlling the voltage of its gate, which provides great flexibility for the design of electronic circuits; strong environmental adaptability means that transistors can work in different temperature and humidity conditions, suitable for various environments. Therefore, the device detection circuit provided by the present application uses a switch transistor module composed of transistors as an important part, which not only has low cost and low energy consumption, but also has high integration of the circuit, good performance, and can work in various environments, with good stability and fast response, which greatly improves the user experience. In addition, the transistor also has strong electrostatic protection and DC voltage resistance, which makes it not easy to be damaged when directly connected with the TYPE-C interface, thereby prolonging the service life.
[0052] The transistor has a wide range of applications, such as signal amplification, switch control, signal modulation, voltage control, temperature control, sensor application, etc., which are not specifically limited herein. Among them, signal amplification refers to the fact that the transistor can amplify a weak input signal into a larger output signal, which is achieved by controlling the gate current of the transistor. The amplified signal can drive other electronic devices, such as a loudspeaker, a motor, etc., which are not specifically limited herein; switch control refers to the fact that the transistor can be used as an electronic switch to control the on-off of the current. For example, in a digital circuit, the switching characteristics of the transistor are used to represent binary 0 and 1, thereby realizing logic operations and storing data; signal modulation refers to the fact that the transistor can be used to modulate signals. For example, in wireless communication, the transistor can control the frequency, phase or amplitude of radio waves to transmit information; voltage control refers to the fact that the transistor can be used to control the size of the voltage. For example, in a power management circuit, the transistor can be used to adjust the output voltage to meet the voltage requirements of different devices; current control refers to the fact that the transistor can be used to control the size of the current. For example, in a battery management system, the transistor can be used to control the charging and discharging current of the battery to protect the battery and prolong its service life; temperature control refers to the fact that the transistor can also be used for temperature control. For example, in a thermostat, the transistor can turn on or off the heating element according to the temperature change to maintain a constant temperature; protection circuit refers to the fact that the transistor can be used for overload protection. When the current or voltage in the circuit exceeds the safety threshold, the transistor can automatically shut down to prevent damage to other circuit elements; sensor application refers to the fact that the transistor can also be used in combination with sensors. For example, in a photosensitive transistor, the intensity of light can control the conductivity of the transistor to detect the intensity of light.
[0053] The switch transistor is mainly composed of a gate, a source and a drain. In the early stage of design, the transistor obtains an opening voltage according to the selection of the material used and the design of the architecture. The passage of the current through the transistor is opened or closed by comparing the voltage on the gate with the opening voltage. When the gate voltage is higher than the opening voltage, the transistor is turned on, and a conductive passage is formed between the source and the drain, allowing the current to pass through. When the gate voltage is lower than the opening voltage, the transistor is turned off, and the passage between the source and the drain is cut off, and the current stops flowing.
[0054] In a case where the detection pin 14 is not connected with the to-be-detected device, the voltage dividing resistor 12 provides a voltage dividing voltage after voltage dividing to the switch transistor module 13; and in a case where the detection pin 14 is connected with the to-be-detected device, the voltage dividing resistor 12 provides a first preset voltage to the switch transistor module 13.
[0055] The detection pin is an important circuit component. The circuit can monitor the state of the device or circuit in real time through the detection pin. The detection pin is mainly responsible for receiving signals from external devices and determining whether the device is inserted through the voltage value of the insertion interface pin of the external device.
[0056] In some embodiments, the detection pin 14 is a TYPE-C interface pin (such as A1 / A12 / B1 / B12) insertion position. The device insertion detection circuit determines the insertion state of the device by detecting whether the voltage of the TYPE-C interface pin (such as A1 / A12 / B1 / B12) is grounded. Only after confirming that the device has been inserted, the CC signal will be activated for device type identification.
[0057] The interrupt pin 15 is connected with the switch transistor module 13. The interrupt pin outputs a detection signal according to the state of the switch transistor module. The detection signal is used to indicate the connection between the device to be detected and the detection circuit.
[0058] For the interrupt pin 15, the interrupt pin is an important hardware interface to trigger an interrupt when a specific event occurs. These events can be changes in external signals, such as key inputs, sensor data changes, or internal events such as timer overflow, etc. The core of the interrupt working principle is the generation of an interrupt signal. When a certain event occurs, the interrupt pin detects the level change and generates an interrupt request. This request causes the Central Processing Unit (CPU) to temporarily interrupt the current execution flow and jump to a predefined interrupt service program. This program is responsible for handling specific events.
[0059] The interrupt processing flow includes several steps: first, the CPU periodically checks the interrupt state while executing the main program; when the interrupt signal is detected, the CPU saves the current program state and then jumps to the interrupt request. After the interrupt request is executed, the CPU restores the previous state and continues to execute the interrupted program. The interrupt pin has many different application scenarios, including but not limited to controlling robot motion, data acquisition, real-time monitoring, peripheral interface, etc. For example, in embedded systems, sensor changes need to be responded quickly. Through interrupts, sensor inputs can be processed immediately, rather than through periodic polling, which can improve system efficiency and reduce resource waste.
[0060] In some embodiments, the voltage dividing resistor is composed of two resistors in series. Please refer to Figure 2 , Figure 2 The second device insertion detection circuit provided by the embodiment of the present application includes a power supply 21, a first voltage dividing resistor 221, a second voltage dividing resistor 222, a switch transistor module 23, a detection pin 24, and an interrupt pin 25.
[0061] The first end of the first voltage dividing resistor 221 is connected with the power supply 21, the second end of the first voltage dividing resistor 221 and the first end of the second voltage dividing resistor 222 are connected, the second end of the second voltage dividing resistor 222 is grounded, and the second end of the first voltage dividing resistor 221 is also connected with the detection pin 24 and the switch transistor module 23.
[0062] Exemplarily, in the case that the detection pin 24 is not connected with the device to be detected, since the first voltage dividing resistor 221 and the second voltage dividing resistor 222 are connected in series, the first end of the first voltage dividing resistor is connected with the power supply 21, the second end of the first voltage dividing resistor 221 and the first end of the second voltage dividing resistor 222 are connected, the second end of the second voltage dividing resistor 222 is grounded, and the second end of the first voltage dividing resistor 221 is also connected with the detection pin 24 and the switch transistor module 23, thus the voltage obtained by the switch transistor module is the voltage obtained by the second voltage dividing resistor, and in the case that the detection pin 24 is connected with the device to be detected, the detection pin 24 shorts the second voltage dividing resistor 222 to obtain the first preset voltage, and the value of the first preset voltage is 0, thus the value obtained by the switch transistor is the first preset voltage with a value of 0. In addition, the switch transistor module 23 is also connected with the interrupt pin 25, for being in the on state or the off state according to the voltage or the first preset voltage, and outputting a detection signal through the interrupt pin 25, the detection signal is used for indicating the connection state of the device to be detected with the detection circuit, and the connection state includes the connected state or the unconnected state.
[0063] In some embodiments, the resistance value of the first voltage dividing resistor is twice the resistance value of the second voltage dividing resistor.
[0064] Exemplarily, please further refer to Figure 2, when the detection pin 24 is not connected with the device to be detected, the first voltage dividing resistor 221 and the second voltage dividing resistor 222 of the voltage dividing resistor are connected in series, the first end of the first voltage dividing resistor is connected with the power supply 21, the second end of the first voltage dividing resistor 221 and the first end of the second voltage dividing resistor 222 are connected, the second end of the second voltage dividing resistor 222 is grounded, the second end of the first voltage dividing resistor 221 is also connected with the detection pin 24 and the switch transistor module 23, and the resistance value of the first voltage dividing resistor is twice the resistance value of the second voltage dividing resistor, so that the voltage obtained by the switch transistor module is one third of the voltage obtained by the second voltage dividing resistor, and the size of the voltage is one third of the size of the power supply voltage. When the detection pin 24 is connected with the device to be detected, the detection pin 24 shorts the second voltage dividing resistor 222 to obtain a first preset voltage, and the value of the first preset voltage is 0, so that the value obtained by the switch transistor is the first preset voltage of 0. In addition, the switch transistor module 23 is also connected with the interrupt pin 25, which is in an open state or a disconnected state according to the voltage or the first preset voltage, and outputs a detection signal through the interrupt pin 25, the detection signal is used to indicate the connection state of the device to be detected and the detection circuit, and the connection state includes a connected state or an unconnected state.
[0065] In some embodiments, the switch transistor module includes a first switch transistor, a second switch transistor and a pull-up resistor, please refer to Figure 3 , Figure 3 A third device insertion detection circuit provided by the embodiment of the application is shown in the schematic circuit structure diagram, which includes a power supply 31, a voltage dividing resistor 32, a first switch transistor 331, a second switch transistor 332, a first pull-up resistor 333, a second pull-up resistor 334, a detection pin 34 and an interrupt pin 35.
[0066] The gate of the first switch transistor 331 is connected with the voltage dividing resistor 32, the drain of the first switch transistor 331 is connected with the gate of the second switch transistor 332, the drain of the second switch transistor 332 is connected with the interrupt pin 35, the drain of the first switch transistor 331 is connected with the power supply 31 through the pull-up resistor 333, the drain of the second switch transistor 332 is connected with the power supply 31 through the pull-up resistor 334, and the source of the first switch transistor 331 and the source of the second switch transistor 332 are grounded.
[0067] Exemplarily, please refer to Figure 4 , Figure 4The fourth device insertion detection circuit provided by the embodiment of the present application includes a power supply 41, a first voltage dividing resistor 421, a second voltage dividing resistor 422, a first switch transistor 431, a second switch transistor 432, a first pull-up resistor 433, a second pull-up resistor 434, a detection pin 44, and an interrupt pin 45.
[0068] The voltage dividing resistor is composed of two resistors in series. The first end of the first voltage dividing resistor 421 is connected to the power supply 41, the second end of the first voltage dividing resistor 421 and the first end of the second voltage dividing resistor 422 are connected, the second end of the second voltage dividing resistor 422 is grounded, the second end of the first voltage dividing resistor 421 is also connected to the detection pin 44 and the gate of the first switch transistor 431, the drain of the first switch transistor 431 is connected to the gate of the second switch transistor 432, the drain of the second switch transistor 432 is connected to the interrupt pin 45, the drain of the first switch transistor 431 is connected to the power supply 41 through the pull-up resistor 433, and the drain of the second switch transistor 432 is connected to the power supply 41 through the pull-up resistor 434, and the source of the first switch transistor 431 and the source of the second switch transistor 432 are grounded.
[0069] When the detection pin 44 is not connected to the device to be detected, the voltage obtained by the gate of the first switch transistor 432 is the voltage obtained by the second voltage dividing resistor. When the detection pin 44 is connected to the device to be detected, the detection pin 44 shorts the second voltage dividing resistor 422 to obtain a first preset voltage, and the value of the first preset voltage is 0, so the first switch transistor 432 obtains the first preset voltage with a value of 0.
[0070] For example, refer to Figure 5 , Figure 5 The fifth device insertion detection circuit provided by the embodiment of the present application includes a power supply 51, a first voltage dividing resistor 521, a second voltage dividing resistor 522, a third voltage dividing resistor 523, a first switch transistor 531, a second switch transistor 532, a first pull-up resistor 533, a second pull-up resistor 534, a detection pin 54, and an interrupt pin 55.
[0071] The voltage-dividing resistor in the figure is composed of three resistors connected in series. The first end of the first voltage-dividing resistor 521 is connected to the power supply 51, the second end of the first voltage-dividing resistor 521 is connected to the first end of the second voltage-dividing resistor 522, the second end of the second voltage-dividing resistor 522 is connected to the second end of the third voltage-dividing resistor, and the second end of the third voltage-dividing resistor 523 is grounded. The second end of the first voltage-dividing resistor 521 is also connected to the detection pin 54 and the gate of the first switching transistor 531, the drain of the first switching transistor 531 is connected to the gate of the second switching transistor 532, and the drain of the second switching transistor 532 is connected to the interrupt pin 55. The drain of the first switching transistor 531 is connected to the power supply 51 through the pull-up resistor 533, and the drain of the second switching transistor 532 is connected to the power supply 51 through the pull-up resistor 534. The source of the first switching transistor 531 and the source of the second switching transistor 532 are grounded.
[0072] When detection pin 54 is not connected to a device to be detected, the divided voltage obtained by the gate of first switching transistor 531 is the voltage obtained by dividing the power supply voltage by the second and third voltage-dividing resistors. When detection pin 54 is connected to a device to be detected, detection pin 54 simultaneously short-circuits second and third voltage-dividing resistors 522, 523 to obtain a first preset voltage. The first preset voltage is 0, so first switching transistor 531 obtains the first preset voltage of 0.
[0073] In some embodiments, the power supply includes a first power supply and a second power supply, see Figure 6 , Figure 6 This is a schematic circuit diagram of a sixth device insertion detection circuit provided in an embodiment of the present application. The power supply includes a first power supply 611 and a second power supply 612. When the detection pin 64 is not connected to the device to be detected, the voltage divider resistor 62 divides the first power supply voltage of the first power supply 611 and provides the divided voltage to the gate of the first switching transistor 631. The divided voltage is greater than the turn-on voltage of the first switching transistor.
[0074] The first switch transistor 631 is configured to be in the on state under the action of the divided voltage and provide a second preset voltage to the gate of the second switch transistor 632, where the second preset voltage is less than the turn-on voltage of the second switch transistor 632;
[0075] The second switch transistor 632 is configured to be in the off state under the action of the second preset voltage, obtain the second power supply voltage of the second power supply through the second pull-up resistor 634, and output a first sub-detection signal, where the first sub-detection signal is a high-level signal;
[0076] The interrupt pin 65 does not trigger an interrupt under the action of the first sub-detection signal, so that the operating system connected with the interrupt pin 65 determines that the to-be-detected device and the detection circuit are in the unconnected state.
[0077] Exemplarily, refer to Figure 6 , the voltage obtained by the gate of the first switch transistor 631 is the voltage obtained by the second voltage dividing resistor, which is greater than the opening voltage of the first switch transistor 631. Therefore, under the action of the voltage, the first switch transistor 631 is in the open state, so that the drain and source of the first switch transistor 631 are connected to the ground, and thus the voltage of the drain of the first switch transistor 631 is 0, that is, the second preset voltage is 0, and the second preset voltage of 0 is provided to the gate of the second switch transistor 632, which is less than the opening voltage of the second switch transistor 632. Under the action of the second preset voltage, the second switch transistor 632 is in the open state, at this time, the drain of the second switch transistor obtains the second power supply voltage of the second power supply through the second pull-up resistor 634, and then outputs the first sub-detection signal through the drain of the second switch transistor 632. The first sub-detection signal is a high-level signal equal to the voltage of the drain of the second switch transistor 632. The interrupt pin 65 does not trigger an interrupt under the action of the first sub-detection signal, so that the operating system connected with the interrupt pin 65 determines that the to-be-detected device and the detection circuit are in the unconnected state.
[0078] In some embodiments, the power supply includes a first power supply and a second power supply, please further refer to Figure 4 In the case that the detection pin 64 is connected with the to-be-detected device, the voltage dividing resistor 62 is in a short-circuit state to provide the first preset voltage to the first switch transistor 631, and the first preset voltage is less than the opening voltage of the first switch transistor 631.
[0079] The first switch transistor 631 is configured to be in the open state under the action of the first preset voltage, and obtain the second power supply voltage of the second power supply 612 through the first pull-up resistor 633, and provide the second power supply voltage to the gate of the second switch transistor 632, wherein the second power supply voltage is greater than the opening voltage of the second switch transistor 632.
[0080] The second switch transistor 632 is configured to be in the open state under the action of the second power supply voltage, and output a second sub-detection signal, wherein the second sub-detection signal is a low-level signal.
[0081] The interrupt pin 65 triggers an interrupt under the action of the second detection signal, so that the operating system connected with the interrupt pin 45 determines that the to-be-detected device is in the connection state with the detection circuit.
[0082] For example, referring to Figure 6 , the voltage dividing resistor is composed of two resistors, the detection pin 64 is connected with the first end of the second voltage dividing resistor 622, and the first section of the second voltage dividing resistor 622 is connected with the gate of the first switch transistor 631. In the case that the detection pin 64 is connected with the to-be-detected device, the detection pin 64 is directly connected with the gate of the first switch transistor, so that the second voltage dividing resistor 622 is short-circuited to obtain a first preset voltage, and the first preset voltage value is 0. Therefore, the first switch transistor 631 obtains the first preset voltage with a value of 0, and the first preset voltage is smaller than the opening voltage of the first switch transistor 631. Under the action of the first preset voltage, the first switch transistor 631 is in the off state, that is, the drain and the source thereof are disconnected, the drain thereof obtains the second power supply voltage of the second power supply 612 through the first pull-up resistor 633, and provides the second power supply voltage to the gate of the second switch transistor 632. The second power supply voltage is greater than the opening voltage of the second switch transistor 632. Under the action of the second power supply voltage, the second switch transistor 632 is in the on state, the source and the drain thereof are connected with the ground in a conductive manner, the drain voltage thereof is 0, and the drain output thereof is equal to the second detection signal of the drain of the second switch transistor 632. The second detection signal is a low-level signal, and the interrupt pin 65 triggers an interrupt under the action of the second detection signal, so that the operating system connected with the interrupt pin 65 determines that the to-be-detected device is in the connection state with the detection circuit.
[0083] In some embodiments, the first pull-up resistor and the second pull-up resistor have the same resistance.
[0084] In some embodiments, the first power supply voltage and the second power supply voltage have the same voltage.
[0085] In some embodiments, the first switch transistor and the second switch transistor are NMOS tubes.
[0086] For example, referring to Figure 7 , Figure 7The seventh device insertion detection circuit schematic circuit structure diagram provided by the embodiment of the application includes a first power supply 711, a second power supply 712, a first voltage dividing resistor 721, a second voltage dividing resistor 722, a first switch transistor 731, a second switch transistor 732, a first pull-up resistor 733, a second pull-up resistor 734, a detection pin 74, and an interrupt pin 75. In the diagram, the power supply voltage of the first power supply 711 and the second power supply 712 is 1.8 V, the first switch transistor and the second switch transistor are both NMOS tubes, the turn-on voltage of which is 0.4 V, the resistance of the first pull-up resistor and the second pull-up resistor is 10 k, the resistance of the first voltage dividing resistor is 200 k, and the resistance of the second voltage dividing resistor is 100 k.
[0087] When the detection pin 74 is not connected with the device to be detected, the gate of the first switch transistor 731 obtains a voltage divided by the second voltage dividing resistor, which is one-third of the power supply voltage, i.e., 0.6 V. The voltage divided by 0.6 V is greater than the turn-on voltage 0.4 V of the first switch transistor, so under the action of the voltage divided, the first switch transistor is in an open state, so that the drain and source of the first switch transistor are connected to the ground, and thus the drain voltage of the first switch transistor is 0, i.e., the second preset voltage is 0, and the second preset voltage of 0 is provided to the gate of the second switch transistor 732, which is less than the turn-on voltage 0.4 V of the second switch transistor 732. Under the action of the second preset voltage, the second switch transistor 732 is in an open state, and the drain of the second switch transistor obtains the second power supply voltage 1.8 V of the second power supply through the pull-up resistor 733. Then the first sub-detection signal is output through the drain of the second switch transistor 732. The first sub-detection signal is equal to the drain voltage of the second switch transistor 732, i.e., 1.8 V, which is a high-level signal. The interrupt pin 75 is not triggered under the action of the first sub-detection signal, so that the operating system connected with the interrupt pin 75 determines that the device to be detected and the detection circuit are in an unconnected state.
[0088] When the detection pin 74 is connected with the device to be detected, the detection pin 74 is directly connected with the gate of the first switch transistor, so that the second voltage dividing resistor 722 is short-circuited to obtain a first preset voltage, and the first preset voltage value is 0, thus the first switch transistor 731 obtains the first preset voltage with a value of 0, and the first preset voltage is smaller than the opening voltage 0.4V of the first switch transistor 731. Under the action of the first preset voltage, the first switch transistor 731 is in an off state, that is, the drain and the source thereof are disconnected, the drain thereof obtains the second power supply voltage 1.8V of the second power supply 412 through the pull-up resistor 733, and provides the second power supply voltage to the gate of the second switch transistor 732, and the second power supply voltage is greater than the opening voltage 0.4V of the second switch transistor 732. Under the action of the second power supply voltage, the second switch transistor 732 is in the opening state, the source and the drain thereof are connected with the ground in conduction, the drain voltage thereof is 0, and the drain output thereof is equal to the second detection signal of the drain of the second switch transistor 732. The second detection signal is a low-level signal, and the interrupt pin 75 triggers an interrupt under the action of the second detection signal, so that the operating system connected with the interrupt pin 75 determines that the device to be detected and the detection circuit are in a connected state.
[0089] Please refer to Figure 8 , Figure 8 is a structural schematic diagram of an electronic device disclosed by the embodiments of the present application. As shown in Figure 8 , the electronic device 80 can include any one of the device insertion detection circuits disclosed by the embodiments of the present application.
[0090] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in any suitable manner in one or more embodiments. Those skilled in the art should also know that the embodiments described in the specification are optional embodiments, and the actions and modules involved are not necessarily required by the present application.
[0091] In various embodiments of the present application, it should be understood that the size of the serial number of the above processes does not mean the inevitable sequence of execution, and the execution sequence of the processes should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0092] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment.
[0093] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware, or in the form of a software functional unit.
[0094] The term "and / or" in this paper is only a description of the association relationship of the associated objects, which means that there may be three relationships, for example, object A and / or object B, which means that there are three cases of object A alone, object A and object B together, and object B alone.
[0095] It should be noted that in this paper, the term "includes", "contains" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, method, article or device. Without more limitations, the element defined by the statement "includes a" does not exclude the presence of another identical element in the process, method, article or device including the element.
[0096] The methods disclosed in the several method embodiments provided by the present application can be combined arbitrarily without conflict to obtain new method embodiments.
[0097] The features disclosed in the several product embodiments provided by the present application can be combined arbitrarily without conflict to obtain new product embodiments.
[0098] The features disclosed in the several method or device embodiments provided by the present application can be combined arbitrarily without conflict to obtain new method embodiments or device embodiments.
[0099] The device insertion detection circuit disclosed in the embodiments of the present application is described in detail above, and the principle and implementation of the present application is described by applying specific examples. The above description of the embodiments is only used to help understand the method and its core idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, the specific implementation and application range will be changed. In summary, the content of the specification should not be understood as a limitation of the present application.
Claims
1. A device insertion detection circuit, characterized by comprising: The detection circuit comprises a power supply, a voltage dividing resistor and a switching transistor module, the voltage dividing resistor is connected with the power supply and the switching transistor module respectively, and the switching transistor module is further connected with the power supply, wherein: The voltage dividing resistor is further connected with a detection pin, and is configured to divide the voltage of the power supply and provide a divided voltage to the switching transistor module when the detection pin is not connected with a device to be detected; and provide a first preset voltage to the switching transistor module when the detection pin is connected with the device to be detected; The switching transistor module is further connected with an interrupt pin, and is configured to be in an on state or an off state according to the divided voltage or the first preset voltage, and output a detection signal through the interrupt pin, the detection signal being used to indicate a connection state of the device to be detected and the detection circuit, the connection state including a connected state or an unconnected state.
2. The device insertion detection circuit according to claim 1, characterized in that, The voltage dividing resistor comprises a first voltage dividing resistor and a second voltage dividing resistor, a first end of the first voltage dividing resistor is connected with the power supply, a second end of the first voltage dividing resistor and a first end of the second voltage dividing resistor are connected, a second end of the second voltage dividing resistor is grounded, and the second end of the first voltage dividing resistor is further connected with the detection pin and the switching transistor module.
3. The device insertion detection circuit of claim 2, wherein, The resistance of the first voltage dividing resistor is twice the resistance of the second voltage dividing resistor.
4. The device insertion detection circuit according to any one of claims 1 to 3, characterized in that, The switching transistor module further comprises a first switching transistor, a second switching transistor, a first pull-up resistor and a second pull-up resistor, a gate of the first switching transistor is connected with the voltage dividing resistor, a drain of the first switching transistor is connected with a gate of the second switching transistor, a drain of the second switching transistor is connected with the interrupt pin, the drain of the first switching transistor is connected with the power supply through the first pull-up resistor, the drain of the second switching transistor is connected with the power supply through the second pull-up resistor, and a source of the first switching transistor and a source of the second switching transistor are grounded.
5. The device insertion detection circuit of claim 4, wherein, The power supply comprises a first power supply and a second power supply, the voltage dividing resistor divides a first power supply voltage of the first power supply and provides a divided voltage to the gate of the first switching transistor when the detection pin is not connected with the device to be detected, and the divided voltage is greater than an on voltage of the first switching transistor; The first switching transistor is configured to be in the on state under the action of the divided voltage, and provide a second preset voltage to the gate of the second switching transistor, the second preset voltage being less than an on voltage of the second switching transistor; The second switching transistor is configured to be in the off state under the action of the second preset voltage, and obtain a second power supply voltage of the second power supply through the second pull-up resistor, and output a first sub-detection signal, the first sub-detection signal being a high-level signal; The interrupt pin does not trigger an interrupt under the action of the first sub-detection signal, so that an operating system connected to the interrupt pin determines that the to-be-detected device and the detection circuit are in the unconnected state.
6. The device insertion detection circuit of claim 4, wherein, The power supply includes a first power supply and a second power supply, and the voltage dividing resistor is in a short-circuit state to provide the first preset voltage to the first switch transistor under the condition that the detection pin is connected to the to-be-detected device, the first preset voltage being less than the turn-on voltage of the first switch transistor. The first switch transistor is configured to be in the off state under the action of the first preset voltage and obtain the second power supply voltage of the second power supply through the first pull-up resistor, and provide the second power supply voltage to the gate of the second switch transistor, the second power supply voltage being greater than the turn-on voltage of the second switch transistor. The second switch transistor is configured to be in the on state under the action of the second power supply voltage and output a second sub-detection signal, the second sub-detection signal being a low-level signal. The interrupt pin triggers an interrupt under the action of the second sub-detection signal, so that the operating system connected to the interrupt pin determines that the to-be-detected device and the detection circuit are in the connected state.
7. The device insertion detection circuitry of any one of claims 5 or 6, wherein, The first pull-up resistor and the second pull-up resistor have the same resistance.
8. The device insertion detection circuitry of any one of claims 5 or 6, wherein, The first power supply voltage and the second power supply voltage have the same voltage.
9. The device insertion detection circuitry of any one of claims 5 or 6, wherein, The first switch transistor and the second switch transistor are NMOS tubes.
10. An electronic device, comprising: The device insertion detection circuit includes any one of the devices in claims 1-9.