Interface detection circuit and electronic equipment
Through the combination of capacitance detection circuit and resistance detection circuit, the problem of inaccurate ground impedance detection in interface detection is solved, the accuracy and safety of liquid detection are improved, and the ability to identify liquid types is enhanced.
Patent Information
- Application Number
- CN202421073658.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-16
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2034-05-16
AI Technical Summary
In the prior art, the ground impedance detection during interface detection is inaccurate, resulting in insufficient accuracy of liquid detection and affecting the safety of electronic equipment.
By combining a capacitance detection circuit and a resistance detection circuit, the control circuit comprehensively judges the ground impedance of the interface to improve the accuracy of detection by detecting ground capacitance and ground resistance.
It improves the accuracy of interface liquid detection, reduces the risk of damage to electronic equipment, and enhances the ability to identify liquid types.
Smart Images

Figure CN222354063U_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of interface detection, and in particular to an interface detection circuit and electronic equipment. Background Art
[0002] When electronic devices are in use, the interface will be exposed to the external environment for a long time, which may cause liquid to exist in the interface. In order to prevent the interface from being corroded by liquid, it is necessary to detect the impedance to ground of the functional terminal to determine whether there is liquid in the interface. However, in the process of detecting the impedance to ground of the functional terminal, there is a problem of inaccurate detection of the impedance to ground. Utility Model Content
[0003] In order to overcome the problems existing in the related art, the present disclosure provides an interface detection circuit and an electronic device.
[0004] According to a first aspect of the present disclosure, an interface detection circuit is provided, the interface detection circuit comprising:
[0005] A capacitance detection circuit, wherein a first end of the capacitance detection circuit is used to couple with a functional terminal of the interface, and the capacitance detection circuit is used to detect the capacitance of the functional terminal to ground;
[0006] a resistance detection circuit, the resistance detection circuit being used to couple with the functional terminal, and the resistance detection circuit being used to detect the resistance of the functional terminal to ground;
[0007] A control circuit is coupled to the second end of the capacitance detection circuit and the resistance detection circuit, and is used to detect the impedance of the functional terminal to ground through the capacitance detection circuit and the resistance detection circuit.
[0008] In some embodiments of the present disclosure, the capacitance detection circuit includes:
[0009] a comparison circuit, wherein a first input terminal of the comparison circuit is used to couple with a first DC power supply, a second input terminal of the comparison circuit is used to couple with a second DC power supply, a third input terminal of the comparison circuit is used to couple with the function terminal, an output terminal of the comparison circuit is coupled with the control circuit, and the comparison circuit is used to compare the voltage of the function terminal with the voltage of the first DC power supply and the voltage of the second DC power supply respectively;
[0010] The voltage of the first DC power supply is different from the voltage of the second DC power supply.
[0011] In some embodiments of the present disclosure, the comparison circuit includes:
[0012] a first comparison subcircuit, wherein a first input terminal of the first comparison subcircuit is used to couple with the first DC power supply, a second input terminal of the first comparison subcircuit is used to couple with the functional terminal, and an output terminal of the first comparison subcircuit is coupled with a first terminal of the control circuit;
[0013] A second comparison subcircuit, wherein the first input terminal of the second comparison subcircuit is used to couple with the second DC power supply, the second input terminal of the second comparison subcircuit is used to couple with the functional terminal, and the output terminal of the second comparison subcircuit is coupled with the second terminal of the control circuit.
[0014] In some embodiments of the present disclosure, the first end of the resistance detection circuit is coupled to both the functional terminal and the third end of the control circuit, and the second end of the resistance detection circuit is used to couple to a third DC power supply;
[0015] The voltage of the first DC power supply is smaller than the voltage of the second DC power supply, and the voltage of the second DC power supply is smaller than the voltage of the third DC power supply transmitted to the functional terminal through the resistance detection circuit.
[0016] In some embodiments of the present disclosure, the output end of the comparison circuit includes a first output end and a second output end; the capacitance detection circuit further includes:
[0017] An operation circuit, the operation circuit is coupled between the comparison circuit and the control circuit; the first input terminal of the operation circuit is coupled to the first output terminal of the comparison circuit, the second input terminal of the operation circuit is coupled to the second output terminal of the comparison circuit, the output terminal of the operation circuit is coupled to the fourth terminal of the control circuit, and the operation circuit is used to output different levels when the levels of the first input terminal and the second input terminal of the operation circuit are the same or opposite.
[0018] In some embodiments of the present disclosure, the operation circuit includes:
[0019] an XOR gate circuit, wherein a first input terminal of the XOR gate circuit is coupled to a first output terminal of the comparison circuit, a second input terminal of the XOR gate circuit is coupled to a second output terminal of the comparison circuit, and an output terminal of the XOR gate circuit is coupled to a fourth terminal of the control circuit; or,
[0020] An XNOR gate circuit, wherein the first input terminal of the XNOR gate circuit is coupled to the first output terminal of the comparison circuit, the second input terminal of the XNOR gate circuit is coupled to the second output terminal of the comparison circuit, and the output terminal of the XNOR gate circuit is coupled to the fourth terminal of the control circuit.
[0021] In some embodiments of the present disclosure, the resistance detection circuit includes:
[0022] A voltage detection circuit, wherein a first end of the voltage detection circuit is coupled to the functional terminal and a third end of the control circuit, and a second end of the voltage detection circuit is used to couple to a third DC power supply.
[0023] In some embodiments of the present disclosure, the voltage detection circuit includes:
[0024] A resistor, a first end of the resistor is coupled to the functional terminal and a third end of the control circuit, and a second end of the resistor is used to couple to the third DC power supply.
[0025] In some embodiments of the present disclosure, the resistance detection circuit further includes:
[0026] An analog-to-digital conversion circuit is coupled between the voltage detection circuit and the control circuit; an input end of the analog-to-digital conversion circuit is coupled to the functional terminal and the first end of the voltage detection circuit, and an output end of the analog-to-digital conversion circuit is coupled to the third end of the control circuit.
[0027] In some embodiments of the present disclosure, the interface detection circuit further includes:
[0028] A switch unit is coupled between the third DC power supply and the voltage detection circuit.
[0029] In some embodiments of the present disclosure, when the interface is not connected to an external device, the functional terminal is not powered; and / or, when the interface is connected to an external device, the functional terminal is not powered.
[0030] In some embodiments of the present disclosure, the control circuit is further used to detect whether there is liquid at the interface based on the impedance to ground.
[0031] In some embodiments of the present disclosure, the control circuit is further configured to detect the type of the liquid based on the impedance to ground when the liquid is present at the interface.
[0032] According to a second aspect of the present disclosure, an electronic device is provided, comprising the interface detection circuit as described in any one of the above items.
[0033] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0034] The interface detection circuit includes a capacitance detection circuit, a resistance detection circuit and a control circuit, and the capacitance detection circuit and the resistance detection circuit are coupled to the functional terminal of the interface and the control circuit. By adding the capacitance detection circuit, the control circuit can detect the ground resistance and ground capacitance of the functional terminal, thereby improving the accuracy of impedance detection.
[0035] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings herein are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present utility model, and together with the description, are used to explain the principles of the present utility model.
[0037] Figure 1 It is a structural schematic diagram of an interface detection circuit;
[0038] Figure 2 is a structural schematic diagram of an interface detection circuit provided by an exemplary embodiment of the present disclosure;
[0039] Figure 3 is a structural schematic diagram of an interface detection circuit provided by another exemplary embodiment of the present disclosure;
[0040] Figure 4 is a structural schematic diagram of an interface detection circuit provided by another exemplary embodiment of the present disclosure;
[0041] Figure 5 is a structural schematic diagram of an interface detection circuit provided by another exemplary embodiment of the present disclosure;
[0042] Figure 6 is a structural schematic diagram of an interface detection circuit provided by another exemplary embodiment of the present disclosure;
[0043] Figure 7 is a structural schematic diagram of an interface detection circuit provided by another exemplary embodiment of the present disclosure;
[0044] Figure 8 is a structural schematic diagram of an interface detection circuit provided by another exemplary embodiment of the present disclosure;
[0045] Fig. 9 is a structural schematic diagram of an interface detection circuit provided by another exemplary embodiment of the present disclosure;
[0046] Fig.10 is a structural schematic diagram of an interface detection circuit provided by another exemplary embodiment of the present disclosure;
[0047] Fig.11 is a structural schematic diagram of an interface detection circuit provided by another exemplary embodiment of the present disclosure;
[0048] Fig.12 is a structural schematic diagram of an interface detection circuit provided by another exemplary embodiment of the present disclosure;
[0049] Fig.13 is a structural schematic diagram of an interface detection circuit provided by another exemplary embodiment of the present disclosure;
[0050] Fig.14 is a system block diagram of an electronic device provided by an exemplary embodiment of the present disclosure.
[0051] In the figure:
[0052] 1-signal processing unit; 2-analog-to-digital conversion circuit; 3-interface; 10-capacitance detection circuit; 11-comparison circuit; 12-operation circuit; 20-resistance detection circuit; 21-voltage detection circuit; 22-analog-to-digital conversion circuit; 30-control circuit; 111-first comparison subcircuit; 112-second comparison subcircuit; 121-XOR gate circuit; 122-XOR gate circuit; 400-electronic device; 402-processing component; 404-memory; 406-power supply component; 408-multiplexer Media component; 410-audio component; 412-input and output interface; 414-sensor component; 416-communication component; 420-processor; T-functional terminal; R-resistance; Rx-resistance to ground; Cx-capacitance to ground; Q-switch unit; CMP1-first comparator; CMP2-second comparator; VCC-power supply; VDC1-first DC power supply; VDC2-second DC power supply; VDC3-third DC power supply; GND-ground terminal; GND1-ground terminal. DETAILED DESCRIPTION
[0053] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the utility model. On the contrary, they are only examples of devices and methods consistent with some aspects of the utility model as detailed in the attached claims. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0054] When electronic devices are in use, the interface will be exposed to the external environment for a long time, resulting in the possibility of liquid in the interface. When liquid is present in the interface, the interface may corrode and affect the use of the electronic device. In order to prevent the interface from being corroded by liquid, it is necessary to detect the impedance of the functional terminal to ground to determine whether there is liquid in the interface.
[0055] In the related art, an interface detection circuit is provided, such as Figure 1As shown, the interface detection circuit includes a power supply VCC, a signal processing unit 1, an analog-to-digital conversion circuit 2, a switch unit Q and a resistor R. The first end of the resistor R is coupled to the power supply VCC through the switch unit Q, and the second end of the resistor R is coupled to the input end of the analog-to-digital conversion circuit 2 and the functional terminal T of the interface 3. The output end of the analog-to-digital conversion circuit 2 is coupled to the signal processing unit 1. Among them, the ground terminal GND of the interface 3 is coupled to the ground terminal GND1. When the switch unit Q is turned on, the resistor R and the ground resistance Rx between the functional terminal T and the ground terminal GND form a voltage divider circuit. Since the power supply VCC and the resistor R are known, the signal processing unit 1 can determine the ground resistance Rx according to the voltage of the functional terminal T, thereby determining whether there is liquid in the interface 3. Since the resistance of air is greater than the resistance of liquid, when there is no liquid or less liquid in the interface 3, the signal processing unit 1 detects that the ground resistance Rx of the functional terminal T is large. When there is more liquid in the interface 3, the signal processing unit 1 detects that the ground resistance Rx of the functional terminal T is small. A first threshold is set in the signal processing unit 1. When the resistance Rx of the functional terminal T to the ground is greater than the first threshold, there is no liquid in the interface 3. When the resistance Rx of the functional terminal T to the ground is less than or equal to the first threshold, there is liquid in the interface 3.
[0056] However, since only the ground resistance Rx is used as the ground impedance between the functional terminal T and the ground terminal GND during the liquid detection process, the detection of the ground impedance has the problem of inaccuracy.
[0057] Based on this, the present disclosure provides an interface detection circuit, which detects the capacitance to ground and the resistance to ground through the capacitance detection circuit and the resistance detection circuit, and the control circuit can comprehensively determine the impedance to ground based on the capacitance to ground and the resistance to ground. Compared with only using the resistance to ground as the impedance to ground, the impedance to ground is determined by the capacitance to ground and the resistance to ground, and the accuracy of impedance detection is high. When the high-accuracy impedance to ground is used to determine whether there is liquid in the interface, the accuracy of liquid detection is high, thereby reducing the risk of damage to the electronic equipment.
[0058] An exemplary embodiment of the present disclosure provides an interface detection circuit, such as Figure 2 As shown, the interface detection circuit includes a capacitance detection circuit 10, a resistance detection circuit 20 and a control circuit 30. The first end of the capacitance detection circuit 10 is used to couple with the functional terminal T of the interface 3, and the capacitance detection circuit 10 is used to detect the capacitance Cx of the functional terminal T to ground. The resistance detection circuit 20 is used to couple with the functional terminal T, and the resistance detection circuit 20 is used to detect the resistance Rx of the functional terminal T to ground. The control circuit 30 is coupled to the second end of the capacitance detection circuit 10 and the resistance detection circuit 20, and the control circuit 30 is used to detect the impedance of the functional terminal T to ground through the capacitance detection circuit 10 and the resistance detection circuit 20.
[0059] In this embodiment, the interface detection circuit includes a capacitance detection circuit, a resistance detection circuit and a control circuit, and the capacitance detection circuit and the resistance detection circuit are coupled to the functional terminal of the interface and the control circuit. By adding the capacitance detection circuit, the control circuit can detect the ground resistance and ground capacitance of the functional terminal, thereby improving the accuracy of impedance detection.
[0060] Exemplarily, the ground terminal GND of the interface 3 is coupled to the ground terminal GND1 .
[0061] In one embodiment, if Figure 3 As shown, the capacitance detection circuit 10 includes a comparison circuit 11. The first input terminal of the comparison circuit 11 is used to couple with the first DC power supply VDC1, the second input terminal of the comparison circuit 11 is used to couple with the second DC power supply VDC2, the third input terminal of the comparison circuit 11 is used to couple with the function terminal T, the output terminal of the comparison circuit 11 is coupled with the control circuit 30, and the comparison circuit 30 is used to compare the voltage of the function terminal T with the voltage of the first DC power supply VDC1 and the voltage of the second DC power supply VDC2 respectively. Among them, the voltage of the first DC power supply VDC1 and the voltage of the second DC power supply VDC2 are different.
[0062] In this embodiment, since the ground resistance and ground capacitance of the functional terminal can form a resistor-capacitor circuit, the ground capacitance can be detected by charging and discharging the ground capacitance. In the process of charging the ground capacitance, the voltage of the functional terminal gradually increases until it is greater than the voltage of the first DC power supply and the voltage of the second DC power supply. In the process of discharging the ground capacitance, the voltage of the functional terminal gradually decreases until it is less than the voltage of the first DC power supply and the voltage of the second DC power supply. When the voltage of the functional terminal drops to the voltage of the first DC power supply and the voltage of the second DC power supply respectively or rises to the voltage of the first DC power supply and the voltage of the second DC power supply respectively, the level output by the comparison circuit will change. The control circuit can determine the ground capacitance of the functional terminal according to the moment when the level output of the comparison circuit changes and the voltage of the first DC power supply and the voltage of the second DC power supply, thereby improving the accuracy of impedance detection.
[0063] For example, during the discharge of the ground capacitor Cx, the time constant τ=R x ×C x Among them, R x Indicates the resistance value of the ground resistor Rx, C x The capacitance of the ground capacitor Cx is shown in FIG. The resistance of the ground resistor Rx can be detected by the resistor detection circuit 20. According to the relationship between the time constant τ and the first DC power supply VDC1 and the second DC power supply VDC2, it can be obtained that:
[0064]
[0065] Wherein, V1 is the voltage of the first DC power supply VDC1, V2 is the voltage of the second DC power supply VDC2, t1 is the moment when the voltage of the ground capacitor Cx drops to the voltage of the first DC power supply VDC1, and t2 is the moment when the voltage of the ground capacitor Cx drops to the voltage of the second DC power supply VDC2.
[0066] After the time constant τ is determined, the capacitance of the ground capacitor Cx can be determined according to the time constant τ and the resistance value of the ground resistor Rx.
[0067] Exemplarily, in addition to determining the time constant τ during the discharge process of the ground capacitor Cx, the time constant τ may also be determined during the charging process, which is not limited here.
[0068] In one embodiment, if Figure 4 As shown, the comparison circuit 11 includes a first comparison subcircuit 111 and a second comparison subcircuit 112. The first input terminal of the first comparison subcircuit 111 is used to couple with the first DC power supply VDC1, the second input terminal of the first comparison subcircuit 111 is used to couple with the function terminal T, and the output terminal of the first comparison subcircuit 111 is coupled with the first terminal of the control circuit 30. The first input terminal of the second comparison subcircuit 112 is used to couple with the second DC power supply VDC2, the second input terminal of the second comparison subcircuit 112 is used to couple with the function terminal T, and the output terminal of the second comparison subcircuit 112 is coupled with the second terminal of the control circuit 30.
[0069] In this embodiment, the voltage of the function terminal can be compared with the voltage of the first DC power supply and the voltage of the second DC power supply respectively through the first comparison subcircuit and the second comparison subcircuit, and the comparison result can be output. After the voltage of the function terminal drops to the voltage of the first DC power supply, the level output by the first comparison subcircuit will change. After the voltage of the function terminal drops to the voltage of the second DC power supply, the level output by the second comparison subcircuit will change. Alternatively, after the voltage of the function terminal rises to the voltage of the first DC power supply, the level output by the first comparison subcircuit will change. After the voltage of the function terminal rises to the voltage of the second DC power supply, the level output by the second comparison subcircuit will change. The control circuit can determine the capacitance to ground of the function terminal according to the moment when the level output by the first comparison subcircuit and the second comparison subcircuit changes. The capacitance to ground is determined by the first comparison subcircuit and the second comparison subcircuit, and the capacitance to ground can be reliably detected, thereby improving the reliability of impedance detection.
[0070] Exemplarily, the first comparison subcircuit 111 and the second comparison subcircuit 112 may include a comparator. The first input terminal of the first comparison subcircuit 111 and the first input terminal of the second comparison subcircuit 112 may be a non-inverting input terminal of the comparator, or an inverting input terminal of the comparator. The second input terminal of the first comparison subcircuit 111 and the second input terminal of the second comparison subcircuit 112 may be an inverting input terminal of the comparator, or a non-inverting input terminal of the comparator.
[0071] Exemplarily, depending on the different coupling methods of the first comparison sub-circuit 111 and the second comparison sub-circuit 112, the control circuit 30 can determine the capacitance Cx to ground of the functional terminal T according to the moment when the levels output by the first comparison sub-circuit 111 and the second comparison sub-circuit 112 are switched from a high level to a low level or from a low level to a high level.
[0072] In one embodiment, if Figure 5 As shown, the first end of the resistance detection circuit 20 is coupled to the functional terminal T and the third end of the control circuit 30, and the second end of the resistance detection circuit 20 is used to couple with the third DC power supply VDC3. The voltage of the first DC power supply VDC1 is less than the voltage of the second DC power supply VDC2, and the voltage of the second DC power supply VDC2 is less than the voltage of the third DC power supply VDC3 transmitted to the functional terminal T through the resistance detection circuit 20.
[0073] In this embodiment, during the process of discharging the ground capacitance, the voltage of the functional terminal gradually decreases to 0V. When the voltage of the functional terminal decreases to the voltage of the second DC power supply, the level output by the first comparison subcircuit remains unchanged, and the level output by the second comparison subcircuit changes. When the voltage of the functional terminal decreases to the voltage of the first DC power supply, the level output by the first comparison subcircuit changes, and the level output by the second comparison subcircuit remains unchanged. Alternatively, during the process of charging the ground capacitance, the voltage of the functional terminal gradually increases. When the voltage of the functional terminal increases to the voltage of the first DC power supply, the level output by the second comparison subcircuit remains unchanged, and the level output by the first comparison subcircuit changes. When the voltage of the functional terminal increases to the voltage of the second DC power supply, the level output by the second comparison subcircuit changes, and the level output by the first comparison subcircuit remains unchanged. The control circuit can determine the time of voltage change to determine the ground capacitance according to the moment when the output level of the first comparison subcircuit changes and the moment when the output level of the second comparison subcircuit changes. By setting the voltage of the first DC power supply and the voltage of the second DC power supply, the ground capacitance of the functional terminal can be detected, thereby improving the accuracy of impedance detection.
[0074] Exemplarily, due to the different contents of liquid in the interface 3, the voltage transmitted to the functional terminal T by the third DC power supply VDC3 after passing through the resistance detection circuit 20 is different. The voltage of the first DC power supply VDC1 is less than the voltage of the second DC power supply VDC2, and the value range can be 0V to V3, where V3 represents the voltage of the third DC power supply VDC3. Among them, the larger the values of the voltage of the first DC power supply VDC1 and the voltage of the second DC power supply VDC2, the weaker the universality of the capacitance to ground Cx that can be detected in the presence of liquid, and the higher the accuracy of the detection of the capacitance to ground Cx. The smaller the values of the voltage of the first DC power supply VDC1 and the voltage of the second DC power supply VDC2, the stronger the universality of the capacitance to ground Cx that can be detected in the presence of liquid, and the lower the accuracy of the detection of the capacitance to ground Cx.
[0075] In one embodiment, if Figure 6 As shown, the output end of the comparison circuit 11 includes a first output end and a second output end. The capacitance detection circuit 10 also includes an operation circuit 12, and the operation circuit 12 is coupled between the comparison circuit 11 and the control circuit 30. The first input end of the operation circuit 12 is coupled to the first output end of the comparison circuit 11, the second input end of the operation circuit 12 is coupled to the second output end of the comparison circuit 11, and the output end of the operation circuit 12 is coupled to the fourth end of the control circuit 30. The operation circuit 12 is used to output different levels when the levels of the first input end and the second input end of the operation circuit are the same or opposite.
[0076] In this embodiment, since the voltage of the functional terminal is greater than or less than the voltage of the first DC power supply and the voltage of the second DC power supply, the levels of the first input terminal and the second input terminal of the operation circuit are the same. Since the voltage of the functional terminal is between the voltage of the first DC power supply and the voltage of the second DC power supply, the levels of the first input terminal and the second input terminal of the operation circuit are different. The operation circuit operates the levels of the first input terminal and the second input terminal, outputs one level when the levels are the same, and outputs another level when the levels are different. The control circuit can determine the moment when the voltage of the functional terminal changes to the voltage of the second DC power supply and the moment when it changes to the voltage of the first DC power supply according to the level output by the operation circuit. By adding an operation circuit to the capacitance detection circuit, the control circuit only needs to determine the capacitance to ground according to the level output by the operation circuit, thereby reducing the complexity of impedance detection.
[0077] In one embodiment, if Figure 7 As shown, the operation circuit 12 includes an XOR gate circuit 121. A first input terminal of the XOR gate circuit 121 is coupled to a first output terminal of the comparison circuit 11, a second input terminal of the XOR gate circuit 121 is coupled to a second output terminal of the comparison circuit 11, and an output terminal of the XOR gate circuit 121 is coupled to a fourth terminal of the control circuit 30.
[0078] In this embodiment, when the levels of the first input terminal and the second input terminal of the XOR gate circuit are the same, the XOR gate circuit outputs a low level to the control circuit. When the levels of the first input terminal and the second input terminal of the XOR gate circuit are different, the XOR gate circuit outputs a high level to the control circuit. The control circuit can determine the time when the voltage of the functional terminal drops from the voltage of the second DC power supply to the voltage of the first DC power supply according to the duration of the high level output by the XOR gate circuit to determine the capacitance to ground, thereby improving the accuracy of impedance detection.
[0079] In one embodiment, if Figure 8 As shown, the operation circuit 12 includes an XNOR gate circuit 122. A first input terminal of the XNOR gate circuit 122 is coupled to a first output terminal of the comparison circuit 11, a second input terminal of the XNOR gate circuit 122 is coupled to a second output terminal of the comparison circuit 11, and an output terminal of the XNOR gate circuit 122 is coupled to a fourth terminal of the control circuit 30.
[0080] In this embodiment, when the levels of the first input terminal and the second input terminal of the XOR gate circuit are the same, the XOR gate circuit outputs a high level to the control circuit. When the levels of the first input terminal and the second input terminal of the XOR gate circuit are different, the XOR gate circuit outputs a low level to the control circuit. The control circuit can determine the time when the voltage of the functional terminal drops from the voltage of the second DC power supply to the voltage of the first DC power supply according to the duration of the low level output by the XOR gate circuit to determine the capacitance to ground, thereby improving the accuracy of impedance detection.
[0081] In one embodiment, if Fig. 9 As shown, the resistance detection circuit 20 includes a voltage detection circuit 21. A first terminal of the voltage detection circuit 21 is coupled to both the functional terminal T and the third terminal of the control circuit 30, and a second terminal of the voltage detection circuit 21 is used to couple to the third DC power supply VDC3.
[0082] In this embodiment, since the voltage of the third DC power supply can be transmitted to the functional terminal through the voltage detection circuit, and the voltage of the functional terminal is different due to different resistances to ground, the resistance to ground of the functional terminal can be determined based on the voltage transmitted to the functional terminal by the voltage detection circuit, thereby improving the accuracy of impedance detection.
[0083] In one embodiment, if Fig.10 As shown, the voltage detection circuit 21 includes a resistor R. A first end of the resistor R is coupled to both the functional terminal T and the third end of the control circuit 30 , and a second end of the resistor R is used to couple to the third DC power source VDC3 .
[0084] In this embodiment, since the resistor can form a voltage divider circuit with the ground resistance between the functional terminal and the ground terminal, the voltage of the third DC power supply is divided to detect the ground resistance, thereby reducing the complexity of impedance detection.
[0085] Exemplarily, since the resistance of air is greater than that of liquid, the resistance to ground Rx is different when there is liquid and when there is no liquid at the interface 3. The resistance to ground Rx can be determined according to the voltage of the functional terminal T (ie, the voltage divided by the resistance to ground Rx).
[0086] In one embodiment, if Fig.11 As shown, the resistance detection circuit 20 further includes an analog-to-digital conversion circuit 22. The analog-to-digital conversion circuit 22 is coupled between the voltage detection circuit 21 and the control circuit 30. The input end of the analog-to-digital conversion circuit 22 is coupled to the functional terminal T and the first end of the voltage detection circuit 21, and the output end of the analog-to-digital conversion circuit 22 is coupled to the third end of the control circuit 30.
[0087] In this embodiment, since the analog-to-digital conversion circuit has high conversion accuracy, the voltage of the functional terminal can be converted from an analog signal into a digital signal through the analog-to-digital conversion circuit and output to the control circuit, thereby improving the accuracy of impedance detection.
[0088] In one embodiment, if Fig.12 As shown, the interface detection circuit further includes a switch unit Q. The switch unit Q is coupled between the third DC power source VDC3 and the voltage detection circuit 21 .
[0089] In this embodiment, by adding a switch unit to the interface detection circuit, the capacitance to ground can be charged and discharged by turning on and off to detect impedance, thereby improving the reliability of impedance detection. At the same time, when impedance detection is not required, the third DC power supply can be disconnected from the interface detection circuit, thereby reducing the power consumption of the interface detection circuit.
[0090] Exemplarily, the switch unit Q may be a transistor. In the case where the switch unit Q is an N-type field effect transistor, the drain of the switch unit Q is used to couple with the third DC power source VDC3 , and the source of the switch unit Q is coupled with the voltage detection circuit 21 .
[0091] For example, in addition to performing impedance detection by controlling the switch unit Q to be turned on and off, impedance detection may also be performed by controlling the third DC power source VDC3 to output or not output a voltage.
[0092] In one embodiment, when the interface 3 is not connected to an external device, the functional terminal T is not powered.
[0093] In this embodiment, when the interface is not connected to an external device, the function terminal being charged will affect the control circuit's detection of the function terminal's resistance to ground and capacitance to ground. The function terminal is selected as a terminal that is not charged when the interface is not connected to an external device, thereby avoiding the detection of the function terminal's resistance to ground and capacitance to ground being affected and causing false liquid detection, thereby improving the reliability of impedance detection.
[0094] In one embodiment, when the interface 3 is connected to an external device, the functional terminal T is not powered.
[0095] In this embodiment, when the interface is connected to an external device, the function terminal is charged, which will affect the control circuit's detection of the function terminal's resistance to ground and capacitance to ground. The function terminal is selected as a terminal that is not charged when the interface is connected to an external device, so as to avoid the detection of the function terminal's resistance to ground and capacitance to ground being affected and causing false liquid detection, thereby improving the reliability of impedance detection.
[0096] In one embodiment, when the interface 3 is not connected to an external device or is connected to an external device, the functional terminal T is not powered.
[0097] In this embodiment, when the interface is not connected to an external device or is connected to an external device, the function terminal being charged will affect the control circuit's detection of the function terminal's resistance to ground and capacitance to ground. The function terminal is selected as a terminal that is not charged when the interface is not connected to an external device or is connected to an external device, so as to avoid the detection of the function terminal's resistance to ground and capacitance to ground being affected and causing false liquid detection, thereby improving the reliability of impedance detection.
[0098] Exemplarily, the functional terminal T can be an existing terminal in the interface 3 other than the ground terminal GND, such as the power supply terminal VBUS, the communication terminal D, the sideband use terminal SBU, the configuration channel terminal CC, etc., or it can be an additional terminal that is only used for liquid detection.
[0099] In one embodiment, the control circuit 30 is further configured to detect whether there is liquid in the interface 3 according to the impedance to ground.
[0100] In this embodiment, since the impedance to ground of the functional terminal can reflect whether there is liquid in the interface, the accuracy of liquid detection is improved by determining whether there is liquid in the interface based on the impedance to ground with high accuracy.
[0101] In one embodiment, the control circuit 30 is further configured to detect the type of liquid according to the impedance to ground when liquid exists in the interface 3 .
[0102] In this embodiment, since the impedance to ground includes the resistance to ground and the capacitance to ground, when there is liquid at the interface, the type of the liquid can be determined by combining the resistance to ground and the capacitance to ground, thereby improving the accuracy of liquid detection.
[0103] Exemplarily, a second threshold and a third threshold are set in the control circuit 30. When the resistance to ground Rx of the functional terminal T is greater than the second threshold, and the capacitance to ground Cx of the functional terminal T is less than the third threshold, there is no liquid in the interface 3. When the resistance to ground Rx of the functional terminal T is less than the second threshold, and the capacitance to ground Cx of the functional terminal T is greater than the third threshold, there is liquid in the interface 3. Among them, the control circuit 30 can also set multiple thresholds, for example, a fifth threshold, a sixth threshold, etc., to form different threshold intervals. The control circuit 30 detects in which threshold interval the resistance to ground Rx of the functional terminal T is, and detects in which threshold interval the capacitance to ground Cx of the functional terminal T is, and when it is detected that there is liquid in the interface 3, it can further determine the type of liquid present in the interface 3.
[0104] Exemplarily, the control circuit 30 includes a processor. The processor may be a processor in an electronic device or a separate processor, which is not limited here.
[0105] An exemplary embodiment of the present disclosure also provides an interface detection circuit, such as Fig.13 As shown, the interface detection circuit includes an analog-to-digital conversion circuit 22, a control circuit 30, an XOR gate circuit 121, a resistor R, a switch unit Q, a first comparator CMP1, and a second comparator CMP2. The non-inverting input terminal of the first comparator CMP1 is used to couple with the first DC power supply VDC1, the inverting input terminal of the first comparator CMP1 is coupled with the functional terminal T of the interface 3, the first end of the resistor R, the input terminal of the analog-to-digital conversion circuit 22, and the inverting input terminal of the second comparator CMP2, and the output terminal of the first comparator CMP1 is coupled with the first input terminal of the XOR gate circuit 121. The non-inverting input terminal of the second comparator CMP2 is used to couple with the second DC power supply VDC2, and the output terminal of the second comparator CMP2 is coupled with the second input terminal of the XOR gate circuit 121. The output terminal of the XOR gate circuit 121 is coupled with the fourth terminal of the control circuit 30. The drain of the switch unit Q is used to couple with the third DC power supply VDC3, and the source of the switch unit Q is coupled with the second end of the resistor R. The output terminal of the analog-to-digital conversion circuit 22 is coupled to the third terminal of the control circuit 30. The control circuit 30 determines the impedance to ground of the functional terminal T by detecting the resistance to ground Rx and the capacitance to ground Cx between the functional terminal T and the ground terminal GND, and can determine whether there is liquid in the interface 3 and the type of liquid according to the impedance to ground.
[0106] In an exemplary embodiment, an electronic device is provided, and the electronic device is, for example, a mobile phone, a laptop computer, a tablet computer, a wearable device, etc. The electronic device includes the interface detection circuit as described above.
[0107] refer to Fig.14 As shown, electronic device 400 may include one or more of the following components: a processing component 402 , a memory 404 , a power component 406 , a multimedia component 408 , an audio component 410 , an input / output (I / O) interface 412 , a sensor component 414 , and a communication component 416 .
[0108] The processing component 402 generally controls the overall operation of the electronic device 400, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 402 may include one or more modules to facilitate the interaction between the processing component 402 and other components. For example, the processing component 402 may include a multimedia module to facilitate the interaction between the multimedia component 408 and the processing component 402.
[0109] The memory 404 is configured to store various types of data to support operations on the electronic device 400. Examples of such data include instructions for any application or method operating on the electronic device 400, contact data, phone book data, messages, pictures, videos, etc. The memory 404 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0110] The power supply component 406 provides power to the various components of the electronic device 400. The power supply component 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 400.
[0111] The multimedia component 408 includes a screen that provides an output interface between the electronic device 400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front camera module and / or a rear camera module. When the electronic device 400 is in an operating mode, such as a shooting mode or a video mode, the front camera module and / or the rear camera module may receive external multimedia data. Each front camera module and the rear camera module may be a fixed optical lens system or have a focal length and optical zoom capability.
[0112] The audio component 410 is configured to output and / or input audio signals. For example, the audio component 410 includes a microphone (MIC), and when the electronic device 400 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 404 or sent via the communication component 416. In some embodiments, the audio component 410 also includes a speaker for outputting audio signals.
[0113] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0114] The sensor assembly 414 includes one or more sensors for providing various aspects of status assessment for the electronic device 400. For example, the sensor assembly 414 can detect the open / closed state of the electronic device 400, the relative positioning of components, such as the display and keypad of the electronic device 400, and the sensor assembly 414 can also detect the position change of the electronic device 400 or a component of the electronic device 400, the presence or absence of user contact with the electronic device 400, the orientation or acceleration / deceleration of the electronic device 400, and the temperature change of the electronic device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 414 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0115] The communication component 416 is configured to facilitate wired or wireless communication between the electronic device 400 and other terminals. The electronic device 400 can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0116] In an exemplary embodiment, the electronic device 400 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing terminals (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components.
[0117] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0118] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0119] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the utility model disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The description and examples are to be regarded as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0120] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. An interface detection circuit, characterized in that: The interface detection circuit comprises: A capacitance detection circuit, wherein a first end of the capacitance detection circuit is used to couple with a functional terminal of the interface, and the capacitance detection circuit is used to detect the capacitance of the functional terminal to ground; a resistance detection circuit, the resistance detection circuit being used to couple with the functional terminal, and the resistance detection circuit being used to detect the resistance of the functional terminal to ground; A control circuit is coupled to the second end of the capacitance detection circuit and the resistance detection circuit, and is used to detect the impedance of the functional terminal to ground through the capacitance detection circuit and the resistance detection circuit.
2. The interface detection circuit according to claim 1, characterized in that: The capacitance detection circuit comprises: a comparison circuit, wherein a first input terminal of the comparison circuit is used to couple with a first DC power supply, a second input terminal of the comparison circuit is used to couple with a second DC power supply, a third input terminal of the comparison circuit is used to couple with the function terminal, an output terminal of the comparison circuit is coupled with the control circuit, and the comparison circuit is used to compare the voltage of the function terminal with the voltage of the first DC power supply and the voltage of the second DC power supply respectively; The voltage of the first DC power supply is different from the voltage of the second DC power supply.
3. The interface detection circuit according to claim 2, characterized in that: The comparison circuit comprises: a first comparison subcircuit, wherein a first input terminal of the first comparison subcircuit is used to couple with the first DC power supply, a second input terminal of the first comparison subcircuit is used to couple with the functional terminal, and an output terminal of the first comparison subcircuit is coupled with a first terminal of the control circuit; A second comparison subcircuit, wherein the first input terminal of the second comparison subcircuit is used to couple with the second DC power supply, the second input terminal of the second comparison subcircuit is used to couple with the functional terminal, and the output terminal of the second comparison subcircuit is coupled with the second terminal of the control circuit.
4. The interface detection circuit according to claim 3, characterized in that: The first end of the resistance detection circuit is coupled to the functional terminal and the third end of the control circuit, and the second end of the resistance detection circuit is used to couple to a third DC power supply; The voltage of the first DC power supply is smaller than the voltage of the second DC power supply, and the voltage of the second DC power supply is smaller than the voltage of the third DC power supply transmitted to the functional terminal through the resistance detection circuit.
5. The interface detection circuit according to claim 2, characterized in that: The output end of the comparison circuit includes a first output end and a second output end; the capacitance detection circuit also includes: An operation circuit, the operation circuit is coupled between the comparison circuit and the control circuit; the first input terminal of the operation circuit is coupled to the first output terminal of the comparison circuit, the second input terminal of the operation circuit is coupled to the second output terminal of the comparison circuit, the output terminal of the operation circuit is coupled to the fourth terminal of the control circuit, and the operation circuit is used to output different levels when the levels of the first input terminal and the second input terminal of the operation circuit are the same or opposite.
6. The interface detection circuit according to claim 5, characterized in that: The operation circuit comprises: an XOR gate circuit, wherein a first input terminal of the XOR gate circuit is coupled to a first output terminal of the comparison circuit, a second input terminal of the XOR gate circuit is coupled to a second output terminal of the comparison circuit, and an output terminal of the XOR gate circuit is coupled to a fourth terminal of the control circuit; or, An XNOR gate circuit, wherein the first input terminal of the XNOR gate circuit is coupled to the first output terminal of the comparison circuit, the second input terminal of the XNOR gate circuit is coupled to the second output terminal of the comparison circuit, and the output terminal of the XNOR gate circuit is coupled to the fourth terminal of the control circuit.
7. The interface detection circuit according to any one of claims 1 to 6, characterized in that: The resistance detection circuit comprises: A voltage detection circuit, wherein a first end of the voltage detection circuit is coupled to the functional terminal and a third end of the control circuit, and a second end of the voltage detection circuit is used to couple to a third DC power supply.
8. The interface detection circuit according to claim 7, characterized in that: The voltage detection circuit comprises: A resistor, a first end of the resistor is coupled to the functional terminal and a third end of the control circuit, and a second end of the resistor is used to couple to the third DC power supply.
9. The interface detection circuit according to claim 7, characterized in that: The resistance detection circuit also includes: An analog-to-digital conversion circuit is coupled between the voltage detection circuit and the control circuit; an input end of the analog-to-digital conversion circuit is coupled to the functional terminal and the first end of the voltage detection circuit, and an output end of the analog-to-digital conversion circuit is coupled to the third end of the control circuit.
10. The interface detection circuit according to claim 7, characterized in that: The interface detection circuit also includes: A switch unit is coupled between the third DC power supply and the voltage detection circuit.
11. The interface detection circuit according to any one of claims 1 to 6, characterized in that: When the interface is not connected to an external device, the functional terminal is not powered; and / or when the interface is connected to an external device, the functional terminal is not powered.
12. The interface detection circuit according to any one of claims 1 to 6, characterized in that: The control circuit is also used to detect whether there is liquid in the interface according to the impedance to ground.
13. The interface detection circuit according to claim 12, characterized in that: The control circuit is further configured to detect the type of the liquid according to the impedance to ground when the liquid is present at the interface.
14. An electronic device, characterized in that: The electronic device comprises the interface detection circuit according to any one of claims 1 to 13.