Insertion detection circuit and electronic equipment

By using the voltage dividing principle of resistors and components in the insertion detection circuit, the voltage of the input port is reduced, the problems of port corrosion and safety hazards are solved, the circuit design is simplified, and the cost is avoided.

CN112904122BActive Publication Date: 2024-09-20VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110087129.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-22
Publication Date
2024-09-20
Estimated Expiration
2041-01-22

AI Technical Summary

Technical Problem

In the existing insertion detection scheme, the level of GPIO and dedicated IO is relatively high, which may lead to port corrosion and create safety hazards, and the comparator insertion detection scheme increases circuit complexity and cost.

Method used

Design an insertion detection circuit, including a first resistor, a first element and a second element. By controlling the resistance value and element type, the voltage dividing principle is used to reduce the voltage of the input port and avoid port corrosion.

Benefits of technology

It effectively reduces the voltage of the port and avoids safety hazards without increasing the complexity and cost of circuit design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112904122B
    Figure CN112904122B
Patent Text Reader

Abstract

The present application discloses an insertion detection circuit and an electronic device, belonging to the field of electronic devices. The insertion detection circuit includes: a first resistor, a first element and a second element; the first end of the first resistor is connected to the power terminal, the second end of the first resistor is respectively connected to the first end of the first element and the GPIO of the controller; the second end of the first element is respectively connected to the first end of the second element and the input port; the second end of the second element is grounded; wherein, when the external device is inserted, the input port is grounded, and the voltage of the GPIO of the controller is the voltage of the first element; when the external device is not inserted, the input port is suspended, the suspended voltage is the voltage of the second element, and the voltage of the GPIO of the controller is the sum of the voltage of the first element and the voltage of the second element. By controlling the resistance value of the first resistor, as well as the type and voltage divider value of the first element and the second element, the voltage of the input port can be reduced to avoid potential safety hazards.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of electronic equipment, and specifically relates to an insertion detection circuit and electronic equipment. Background Art

[0002] The current insertion detection solutions are mainly general-purpose input / output (GPIO) insertion detection solutions, dedicated IO insertion detection solutions or comparator insertion detection solutions.

[0003] However, the electrical levels of GPIO and dedicated IO are relatively high. If foreign objects or water enter the ports, the ports may be corroded, posing a safety hazard.

[0004] In the comparator insertion detection scheme, a comparator is added at the front stage to reduce the open circuit voltage of the insertion detection. In this way, when foreign matter or water enters the port, the degree of port corrosion will be significantly reduced. However, due to the addition of the comparator and its peripheral circuits, the circuit design is more complicated and the cost will also increase. Summary of the invention

[0005] The embodiments of the present application provide an insertion detection circuit and an electronic device, which can solve the problem that due to the high port level, when foreign objects or water enter the port, the port may be corroded and cause safety hazards, and the port level can be reduced without increasing the complexity of the circuit design.

[0006] In order to solve the above technical problems, this application is implemented as follows:

[0007] In a first aspect, an insertion detection circuit is provided, comprising: a first resistor, a first element, and a second element;

[0008] A first end of the first resistor is connected to a power terminal, and a second end of the first resistor is connected to a first end of the first element and a GPIO of a controller respectively;

[0009] The second end of the first element is connected to the second element and the input port respectively;

[0010] The second element is grounded;

[0011] Among them, when an external device is inserted, the input port is grounded, and the voltage of the GPIO of the controller is the voltage of the first element; when the external device is not inserted, the input port is suspended, the suspended voltage is the voltage of the second element, and the voltage of the GPIO of the controller is the sum of the voltage of the first element and the voltage of the second element.

[0012] In a second aspect, an electronic device is provided, comprising the insertion detection circuit described in the first aspect.

[0013] In an embodiment of the present application, the insertion detection circuit includes a first resistor, a first element, and a second element. The first end of the first resistor is connected to the power terminal, the second end of the first resistor is respectively connected to the first end of the first element and the GPIO of the controller, the second end of the first element is respectively connected to the second element and the input port, the second element is grounded, when the external device is inserted, the input port is grounded, the voltage of the GPIO of the controller is the voltage of the first element, when the external device is not inserted, the input port is suspended, the suspended voltage is the voltage of the second element, and the voltage of the GPIO of the controller is the sum of the voltage of the first element and the voltage of the second element. By controlling the resistance value of the first resistor, as well as the type and voltage divider value of the first element and the second element, the embodiment of the present application can reduce the voltage of the input port to avoid potential safety hazards. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0015] Figure 1 is a circuit diagram of an insertion detection circuit provided by an embodiment of the present application;

[0016] Figure 2 is a circuit diagram of another insertion detection circuit provided by an embodiment of the present application. DETAILED DESCRIPTION

[0017] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0018] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here. In addition, the "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally represents that the objects associated with each other are in an "or" relationship.

[0019] In the following, in conjunction with the accompanying drawings, an insertion detection circuit and an electronic device provided by an embodiment of the present application are described in detail through specific embodiments and their application scenarios.

[0020] like Figure 1-2 As shown, an embodiment of the present application provides an insertion detection circuit, which may include: a first resistor R1, a first element, and a second element.

[0021] Specifically, the first end of the first resistor R1 is connected to the power terminal, the second end of the first resistor R1 is respectively connected to the first end of the first element and the GPIO (General-purpose input / output) of the controller; the second end of the first element is respectively connected to the second element and the input port USB_IN; the second element is grounded.

[0022] Among them, when the external device is inserted, the input port is grounded, and the voltage of the GPIO of the controller is the voltage of the first element; when the external device is not inserted, the input port is suspended, the suspended voltage is the voltage of the second element, and the voltage of the GPIO of the controller is the sum of the voltage of the first element and the voltage of the second element.

[0023] That is, the voltage of the GPIO of the controller and the voltage of the input port can be determined by the voltage division principle, and the input level of the port can be reduced by voltage division.

[0024] In an embodiment of the present application, the insertion detection circuit includes a first resistor R1, a first element, and a second element. The first end of the first resistor R1 is connected to the power terminal, the second end of the first resistor R1 is respectively connected to the first end of the first element and the GPIO of the controller, the second end of the first element is respectively connected to the second element and the input port, the second element is grounded, when the external device is inserted, the input port is grounded, the voltage of the GPIO of the controller is the voltage of the first element, when the external device is not inserted, the input port is suspended, the suspended voltage is the voltage of the second element, and the voltage of the GPIO of the controller is the sum of the voltage of the first element and the voltage of the second element. By controlling the resistance value of the first resistor R1, as well as the type and voltage divider value of the first element and the second element, the embodiment of the present application can reduce the residual voltage to a large extent, so that the voltage of the input port is reduced, and safety hazards are avoided.

[0025] Due to the different types of controllers, the input high level value VIH and the input low level value VIL of the GPIO of the controller are also different. Therefore, in order to meet the VIH and VIL of the GPIO of the controller, the types of the first component and the second component are also different.

[0026] In a possible implementation manner of the present application, the first element may be a first switching device, and the second element may be a second resistor R2.

[0027] That is, the effect of port voltage reduction that requires a comparator and its peripheral circuits in the prior art can be achieved by ordinary components, effectively reducing the degree of port corrosion and avoiding safety hazards.

[0028] The first switch device may be a diode or a triode. Figure 1 As shown, a diode is used.

[0029] When the first switching device is a transistor, the first switching device is an NPN transistor.

[0030] Specifically, the base of the NPN transistor is connected to the second end of the first resistor R1, and the emitter of the NPN transistor is connected to the first end and the input port of the second resistor R2 respectively.

[0031] That is, using a transistor is equivalent to using a diode in the transistor, and the voltage of the input port can be made different by utilizing the conduction voltage drop of the diode.

[0032] The selection of the diode, and the selection of the first resistor R1 and the second resistor R2 are all related to the input high level value VIH and the input low level value VIL of the GPIO.

[0033] Specifically, the resistance values ​​of the first resistor R1 and the second resistor R2 are determined according to the turn-on voltage of the first switch device, and the inputs VIH and VIL of the GPIO of the controller.

[0034] Among them, the on-state voltage and on-state voltage drop of a device refer to the lowest voltage value when the device is turned on.

[0035] It is worth noting that the values ​​of the first resistor R1 and the second resistor R2 are determined according to the above values, so that the voltage value of the GPIO of the controller in the circuit finally determined is greater than VIH and less than VIL. That is, VIH is the lower limit of the high level of the GPIO of the controller, and VIL is the upper limit of the low level of the GPIO of the controller.

[0036] In a specific embodiment of the present application, Figure 1 As shown, VCC is the voltage of the power supply terminal, R1 and R2 are resistors, and D1 is a diode.

[0037] The circuit includes two states, the first state is when the external device is not plugged in, and the second state is when the external device is plugged in. When the diode is selected differently, the resistance values ​​of the resistors R1 and R2 selected according to the VIH and VIL of the GPIO of the controller are also different.

[0038] For example, the on-state voltage drop of D1 is 0.4V, VCC is 1.8V, VIH of the controller's GPIO is 1.17V, and VIL is 0.63V, so R1 is determined to be 20kΩ and R2 is 50kΩ.

[0039] When the external device is not plugged in, the voltage of USB_IN is 1, and the VIH voltage of the controller's GPIO is 1.4, which meets the above requirements; when the external device is plugged in, the voltage of USB_IN is 0, and the VIL voltage of the controller's GPIO is 0.4, which also meets the above requirements.

[0040] In a possible implementation manner of the present application, the first element is a third resistor R3, and the second element is a second switch device.

[0041] The second switch device may be a diode or a triode. Figure 2 As shown, a diode is used.

[0042] When the second switch device is a transistor, the second switch device is an NPN transistor.

[0043] Specifically, the base of the NPN transistor is connected to the second end of the third resistor R3 and the input port respectively, and the emitter of the NPN transistor is grounded.

[0044] That is, using a transistor is equivalent to using a diode in the transistor, and the voltage of the input port can be made different by utilizing the conduction voltage drop of the diode.

[0045] In a possible implementation manner of the present application, the resistance values ​​of the first resistor R1 and the third resistor R3 are determined according to the turn-on voltage of the second switch device, and VIH and VIL of the GPIO of the controller.

[0046] It is worth noting that the values ​​of the first resistor R1 and the third resistor R3 are determined according to the above values, so that the voltage value of the GPIO of the controller in the circuit is finally determined to be greater than VIH and less than VIL. That is, VIH is the lower limit of the high level of the GPIO of the controller, and VIL is the upper limit of the low level of the GPIO of the controller.

[0047] In a specific embodiment of the present application, Figure 2 As shown, VCC is the voltage of the power supply terminal, R1 and R3 are resistors, and D2 is a diode.

[0048] The circuit includes two states, the first state is when the external device is not plugged in, and the second state is when the external device is plugged in. When the diode is selected differently, the resistance values ​​of the resistors R1 and R3 selected according to the VIH and VIL of the GPIO of the controller are also different.

[0049] For example, the on-state voltage drop of D1 is 0.6V, VCC is 5V, VIH of the controller's GPIO is 1.5V, and VIL is 1.2V, so R1 is determined to be 100kΩ and R2 is 30kΩ.

[0050] When the external device is not plugged in, the voltage of USB_IN is 0.6, and the VIH voltage of the controller's GPIO is 1.6153846, which meets the above requirements; when the external device is plugged in, the voltage of USB_IN is 0, and the VIL voltage of the controller's GPIO is 1.1538462, which also meets the above requirements.

[0051] In the embodiment of the present application, the above structure is adopted to further reduce the voltage value of the input port, thereby further reducing the degree of corrosion of the port.

[0052] An embodiment of the present application further provides an electronic device, comprising the insertion detection circuit provided by any of the above embodiments.

[0053] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0054] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0055] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. An insertion detection circuit, characterized in that: include: a first resistor, a first element, and a second element; A first end of the first resistor is connected to a power terminal, and a second end of the first resistor is connected to a first end of the first element and a GPIO of a controller respectively; The second end of the first element is connected to the first end of the second element and the input port respectively; The second end of the second element is grounded; Wherein, when an external device is inserted, the input port is grounded, and the voltage of the GPIO of the controller is the voltage of the first element; when the external device is not inserted, the input port is suspended, the suspended voltage is the voltage of the second element, and the voltage of the GPIO of the controller is the sum of the voltage of the first element and the voltage of the second element; The first element is a third resistor, and the second element is a second switch device; The second switch device is an NPN transistor or a diode; When the second switch device is an NPN transistor, the base of the NPN transistor is connected to the second end of the third resistor and the input port respectively, and the emitter of the NPN transistor is grounded; When the second switch device is a diode, an anode of the diode is connected to the second end of the third resistor and the input port respectively, and a cathode of the diode is grounded.

2. The circuit according to claim 1, characterized in that The resistance values ​​of the first resistor and the third resistor are determined according to the turn-on voltage of the second switch device, and the input high level value and the input low level value of the GPIO of the controller.

3. An electronic device, characterized in that: The invention comprises the insertion detection circuit as claimed in any one of claims 1 to 2.