Detection circuit and electronic device
By setting up a combined circuit of a switching module, a voltage divider module, and a detection module in the electronic device, and using the equivalent impedance of the isolation component to detect the electrical parameters of the pin under test, the problem of misjudgment in the prior art is solved, and higher measurement accuracy and longer service life are achieved.
Patent Information
- Application Number
- CN202522414618.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-13
- Publication Date
- 2026-11-06
- Estimated Expiration
- 2035-11-13
AI Technical Summary
The current method of determining whether liquid has entered electronic devices by measuring whether the pins of the port to be tested are charged is prone to misjudgment, resulting in poor measurement accuracy.
A combined circuit consisting of a switching module, a voltage divider module, a first isolation component, and a detection module is used. By detecting the electrical parameters of the voltage divider module using the equivalent impedance of the first isolation component when the switching module is in different switching states, it is possible to determine whether there is an abnormality in the pin to be tested.
It improves the measurement accuracy of the port under test, enabling more accurate determination of whether there is an abnormality in the pin under test, and extends the service life of the port under test.
Smart Images

Figure CN224946164U_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of electronic equipment technology, and more particularly to a detection circuit and electronic equipment. Background Technology
[0002] With the development of science and technology, in order to ensure the safe and reliable operation of the port to be tested in electronic devices, a detection circuit is usually set up in the electronic device and connected to the port to be tested. This circuit is used to detect in a timely manner whether there is liquid or foreign matter in the port to be tested, so that corresponding protective measures can be taken to avoid corrosion and prevent the port to be tested from being corroded.
[0003] However, the existing electronic devices that determine whether liquid has entered the device by measuring whether the pins of the port to be tested are charged are prone to misjudgment, resulting in poor measurement accuracy. Utility Model Content
[0004] To overcome the problems existing in related technologies, this disclosure provides a detection circuit and electronic device that can more accurately determine whether there are abnormalities in each pin to be tested, thereby improving the measurement accuracy of the port to be tested.
[0005] According to a first aspect of the present disclosure, a detection circuit is provided, comprising at least:
[0006] A switch module, wherein a first end of the switch module is connected to multiple pins of a port to be tested; wherein, when the switch module is in different switching states, the connection lines between the second end of the switch module and the different pins to be tested are in a conductive state;
[0007] The voltage divider module is connected to the second terminal of the switch module;
[0008] A first isolation component is connected between the second terminal of the switching module and the voltage divider module, and is configured to isolate the DC signals transmitted to each of the pins to be detected;
[0009] The detection module, connected to the voltage divider module and the first isolation component, is configured to detect the electrical parameters of the voltage divider module based on the equivalent impedance of the first isolation component when the switching module is in different switching states; the electrical parameters of the voltage divider module are configured to determine whether there is an abnormality in each of the pins to be detected.
[0010] In some possible implementations, the detection module includes:
[0011] Signal input terminal and signal output terminal;
[0012] The first operational amplifier unit has a first input terminal connected to the signal input terminal, a second input terminal connected to the output terminal of the first operational amplifier unit, and an output terminal connected to the voltage divider module.
[0013] The second operational amplifier unit has a first input terminal connected to the voltage divider module and the first isolation component, a second input terminal connected to the output terminal of the second operational amplifier unit, and an output terminal connected to the signal output terminal.
[0014] The first operational amplifier unit and the second operational amplifier unit are configured to determine the electrical parameters of the voltage divider module based on the input voltage at the signal input terminal, the output voltage at the signal output terminal, and the equivalent impedance of the first isolation component.
[0015] In some possible implementations, the voltage divider module includes:
[0016] The first impedance element has one end connected to the connection line between the first isolation component and the first input terminal of the second operational amplifier unit, and the other end connected to the output terminal of the first operational amplifier unit.
[0017] When the switching module is in different switching states, the first impedance element is in a conducting state through the connection lines between the first isolation component and different pins to be detected.
[0018] In some possible implementations, the detection circuit further includes:
[0019] The second isolation component has one end connected to the connection line between the first isolation component and the voltage divider module, and the other end connected to the first input terminal of the second operational amplifier unit, configured to limit the voltage signal transmitted to the first input terminal of the second operational amplifier unit.
[0020] In some possible implementations, the detection module further includes:
[0021] A peak detection component is connected to the output terminal of the second operational amplifier unit and the signal output terminal, and is configured to cooperate with the second operational amplifier unit to detect the peak voltage signal after voltage division by the voltage divider module.
[0022] In some possible implementations, the peak detection component includes:
[0023] A unidirectional conducting diode, wherein the positive terminal of the unidirectional conducting diode is connected to the output terminal of the second operational amplifier unit, and the negative terminal of the unidirectional conducting diode is connected to the signal output terminal;
[0024] The second impedance element has one end connected to the connection line between the negative terminal of the unidirectional conductive tube and the signal output terminal, and the other end grounded.
[0025] The voltage regulator has one end connected to the connection line between the negative terminal of the unidirectional conducting tube and the second impedance element, and the other end grounded, configured to stabilize the voltage signal after voltage division by the voltage divider module.
[0026] In some possible implementations, the switching module includes multiple control input terminals, one of which corresponds to one of the pins to be detected;
[0027] When each of the control input terminals is at a different level, the switch module is in a different switching state.
[0028] According to a second aspect of the present disclosure, an electronic device is provided, comprising at least:
[0029] The port to be tested has multiple pins to be tested;
[0030] The detection circuit as described in the first aspect; the switching module of the detection circuit is connected between each of the pins to be detected and the first isolation component of the detection circuit, and the detection module of the detection circuit is connected between the voltage divider module of the detection circuit and the first isolation component;
[0031] The processing module, connected to the detection module, is configured to, when the switching module is in different switching states, calculate the impedance parameters of each of the pins to be tested based on the electrical parameters of the voltage divider module detected by the detection module according to the equivalent impedance of the first isolation component, and determine whether there is an abnormality in the port to be tested based on the impedance parameters of each of the pins to be tested.
[0032] In some possible implementations, the processing module is further configured to calculate the resistance value of each of the pins to be detected based on the electrical parameters of the voltage divider module when the switching module is in different switching states.
[0033] Specifically, if the resistance value of any of the pins to be tested is less than or equal to a preset resistance threshold, it is determined that the port to be tested is abnormal.
[0034] In some possible implementations, the electronic device further includes:
[0035] The control module is connected to the switch module and to the signal input and signal output terminals of the detection module. It is configured to control the switching state of the switch module and the voltage signal input of the signal input terminal, and to receive the voltage signal output of the signal output terminal.
[0036] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0037] This disclosure provides a detection circuit and electronic device. The detection circuit includes: a switching module, the first end of which is connected to each pin to be tested of the port to be tested; wherein, when the switching module is in different switching states, the connection line between the second end of the switching module and the different pins to be tested is in a conductive state; a voltage divider module connected to the second end of the switching module; a first isolation component connected between the second end of the switching module and the voltage divider module, configured to isolate the DC signal transmitted to each pin to be tested; and a detection module connected to the voltage divider module and the first isolation component, configured to detect the electrical parameters of the voltage divider module based on the equivalent impedance of the first isolation component when the switching module is in different switching states; the electrical parameters of the voltage divider module are configured to determine whether there is an abnormality in each pin to be tested.
[0038] In other words, the embodiments of this disclosure can be configured by setting a switch module, a first isolation component, a voltage divider module, and a detection module that are sequentially connected to each pin to be tested of the port to be tested. The detection module can detect the electrical parameters of the voltage divider module based on the equivalent impedance of the first isolation component when the switch module is in different switching states. This allows the electrical parameters of the voltage divider module to be used to determine whether there is an abnormality in each pin to be tested. Thus, even when there is a bias voltage on the pin to be tested, the electrical parameters of the voltage divider module can still be accurately detected by the equivalent impedance of the first isolation component, thereby more accurately determining whether there is an abnormality in each pin to be tested and improving the measurement accuracy of the port to be tested.
[0039] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0040] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0041] Figure 1 This is a schematic diagram of the structure of a detection circuit according to an exemplary embodiment. Figure 1 .
[0042] Figure 2 This is a schematic diagram of the structure of a detection circuit according to an exemplary embodiment. Figure 2 .
[0043] Figure 3 This is a schematic diagram of the structure of an electronic device according to an exemplary embodiment.
[0044] Figure 4This is a schematic diagram illustrating the structure of a conventional electronic device according to an exemplary embodiment.
[0045] Figure 5 This is a structural block diagram of an electronic device according to an exemplary embodiment.
[0046] Figures 1 to 4 The attached figure labels are:
[0047] 10-Detection circuit, 11-Switch module, 111-First terminal of switch module, 112-Second terminal of switch module, 100-Port to be tested, 101-Pin to be tested, 12-Voltage divider module, 13-First isolation component, 14-Detection module, 141-Signal input terminal, 142-Signal output terminal, 143-First operational amplifier unit, 144-Second operational amplifier unit, 121-First impedance element, 15-Second isolation component, 145-Peak detection component, 146-One-way conduction diode, 147-Second impedance element, 148-Voltage regulator element, 1-Electronic device, 20-Processing module, 30-Control module. Detailed Implementation
[0048] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of structures consistent with some aspects of this disclosure as detailed in the appended claims.
[0049] In the description of this disclosure, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this disclosure and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this disclosure.
[0050] In the description of this disclosure, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linkage" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this disclosure based on the specific circumstances.
[0051] The technical solutions provided by the various embodiments of this disclosure are described in detail below with reference to the accompanying drawings.
[0052] Figure 1 This is a schematic diagram of the structure of a detection circuit according to an exemplary embodiment. Figure 1 , Figure 2 This is a schematic diagram of the structure of a detection circuit according to an exemplary embodiment. Figure 2 ,like Figure 1 and Figure 2 As shown, the detection circuit 10 may include at least:
[0053] The switch module 11 has a first end 111 connected to multiple pins 101 to be tested in the port 100 to be tested; wherein, when the switch module 11 is in different switching states, the connection line between the second end 112 of the switch module and the different pins 101 to be tested is in a conductive state.
[0054] Voltage divider module 12 is connected to the second terminal 112 of switch module;
[0055] The first isolation component 13 is connected between the second terminal 112 of the switch module and the voltage divider module 12, and is used to isolate the DC signals transmitted to each of the pins to be tested 101;
[0056] The detection module 14 is connected to the voltage divider module 12 and the first isolation component 13. It is used to detect the electrical parameters of the voltage divider module 12 based on the equivalent impedance of the first isolation component 13 when the switching module 11 is in different switching states. The electrical parameters of the voltage divider module 12 are used to determine whether there is any abnormality in each of the pins 101 to be tested.
[0057] In this embodiment of the disclosure, the detection circuit can be a circuit for detecting the port to be tested of an electronic device, used to determine whether there is an abnormality in the port to be tested; for example, the detection circuit can determine whether liquid has entered the port to be tested or whether there are foreign objects, so as to take timely measures to prevent liquid or foreign objects from corroding the port to be tested and extend the service life of the port to be tested.
[0058] It should be noted that the type of port to be tested in the electronic device can be set according to the actual application scenario, and this disclosure embodiment does not impose any restrictions. For example, the port to be tested may include: DisplayPort (DP), High-Definition Multimedia Interface (HDMI), Lightning interface, Universal Serial Bus (USB); here, USB port may include Type A port, Type B port, and Type C port, etc.
[0059] Here, the port under test has multiple pins, each with a different function. For example, taking a Type-C port as an example, a Type-C port can include: data pins, power pins, ground pins, configuration channel (CC) pins, and sideband use (SBU) pins, etc. Port erosion typically begins with power pins such as the VBUS pin; therefore, the multiple pins under test of the port can be pins located near the VBUS pin in a Type-C port, such as SBU1 or SBU2 pins.
[0060] The data pins include a signal receiving pin (RX pin) and a signal transmitting pin (TX pin), used for bidirectional data transmission with external devices, such as file transfer; the power pin (VBUS pin) is used for power exchange with external devices, enabling forward or reverse charging; the ground pin (GND pin) is used to ground the port under test; the CC pin is used to detect the insertion direction of the male and female connectors of the port under test; and the SBU pin is used to implement auxiliary functions, suitable for transmitting non-USB signals such as audio signals.
[0061] In this embodiment of the disclosure, the switching module may be an electronic component that opens the detection circuit, interrupts the current, or allows the current to flow to other circuits; for example, the switching module may include a switching chip, a field-effect transistor, or a relay.
[0062] Here, the different switching states of the switch module can be understood as follows: the connection line between the second end of the switch module and one of the pins to be tested on the port to be tested is in a conductive state, while the connection line between the second end of the switch module and other pins to be tested on the port to be tested is in a disconnected state.
[0063] In some embodiments, the switching module includes multiple control input terminals, each corresponding to a pin to be detected; when the control input terminals are at different level states, the switching module is in different switching states. Thus, the multiple control input terminals of the switching module can be used to control the switching module to different switching states, allowing the detection circuit to be connected to different pins to be detected, thereby enabling better detection of anomalies at the detected ports.
[0064] Understandably, taking a switch module as an example, when there are two pins to be detected, the switch chip can be a two-to-one switch chip. That is, the switch chip includes two independent first terminals, one second terminal, and two control input terminals. The two first terminals of the switch chip are connected to the two pins to be detected one by one. The switch chip can select one of the two first terminals for output through the control signals input from the two control input terminals, that is, select one pin to be detected to conduct with the second terminal of the switch chip, thereby realizing flexible switching of the connection lines between different pins to be detected and the second terminal of the switch chip.
[0065] For example, the control input terminals of the switch chip may include a first control terminal and a second control terminal. For instance, both the first and second control terminals can be general purpose input / output (GPIO) ports. Different levels of the control signals input through the GPIO ports can cause the switch chip to be in different switching states. In this case, the switch chip can switch the connection between different detected pins and the second terminal of the switch chip to be in a conducting state by adjusting the levels of the control signals input through the first and second control terminals. For example, when the control signal input through the first control terminal is high and the control signal input through the second control terminal is low, the connection between the first detected pin and the second terminal of the switch chip is conducting; when the control signal input through the first control terminal is low and the control signal input through the second control terminal is high, the connection between the second detected pin and the second terminal of the switch chip is conducting, and so on.
[0066] It should be noted that the specific number of control input terminals in the switch module can be set according to the actual application scenario, as long as the number of control input terminals is the same as the number of pins to be detected. This embodiment does not impose any restrictions.
[0067] In this embodiment of the disclosure, the first isolation component may be a component that isolates the DC signal transmitted to the pin to be detected; for example, the first isolation component may be a DC blocking capacitor, a transformer, or an optocoupler.
[0068] Here, a DC blocking capacitor is an electronic component that utilizes the characteristics of capacitance to achieve DC isolation and AC conduction, and can be used to isolate DC signals. When a DC signal passes through a DC blocking capacitor, due to the characteristics of capacitance, the DC blocking capacitor will present a high impedance state to the DC signal, that is, the equivalent impedance of the first isolation component is infinite, thus forming a blocking effect; while the magnitude and direction of the AC signal are constantly changing, causing the capacitor to charge and discharge continuously, that is, the equivalent impedance of the first isolation component is very small and can be approximately ignored, thus allowing the AC signal to pass.
[0069] The voltage divider module described above can be connected to the second terminal of the switch module through the first isolation component for voltage division of the pin to be tested. Here, the voltage divider module can be composed of at least one resistive element, or it can be composed of at least one resistive element and at least one inductor element cascaded together, or it can be composed of at least one resistive element and at least one capacitor element cascaded together, or it can be composed of at least one resistive element, at least one inductor element and at least one capacitor element cascaded together, etc. The embodiments disclosed herein do not impose any limitations on this.
[0070] The aforementioned detection module can be a module that detects the electrical parameters of the voltage divider module based on the characteristics of the first isolation component; for example, the detection module may include, but is not limited to, a signal input terminal, a signal output terminal, a first operational amplifier unit, and a second operational amplifier unit.
[0071] It is understandable that when there is an abnormality such as liquid or foreign matter in the port to be tested, the resistance of the port to be tested will decrease or the capacitance will increase. Based on the voltage divider module's voltage division of the pin to be tested, the detection module can detect the voltage or current and other electrical parameters of the voltage divider module according to the different equivalent impedances of the first isolation component, so as to determine whether the impedance parameters of the pin to be tested have changed, and thus determine whether there is an abnormality such as liquid or foreign matter in each pin to be tested.
[0072] It should be noted that, based on the principle of virtual short in the operational amplifier unit in the detection module, it can be determined that the two input terminals of the first operational amplifier unit generate the same voltage signal, and the two input terminals of the second operational amplifier unit generate the same voltage signal. Then, through the characteristics of the first isolation component and the voltage division of the resistor of the pin to be detected by the voltage divider module, the electrical parameters of the voltage divider module can be calculated.
[0073] In this context, the virtual short of an operational amplifier unit refers to the situation where, under ideal conditions, the potentials of the two input terminals of the operational amplifier unit are equal, as if the two input terminals were shorted together, but in reality, they are not shorted. Hence, it is called a "virtual short".
[0074] In this embodiment of the present disclosure, when the switching module is in different switching states, the electrical parameters of the voltage divider module can be detected by the detection module based on the equivalent impedance of the first isolation component. This allows the electrical parameters of the voltage divider module to be used to determine whether the impedance parameters of the pin to be tested have changed, thereby determining whether there is any abnormality in each pin to be tested.
[0075] In related technologies, to ensure the safe and reliable operation of the port under test in electronic devices, a detection circuit is typically installed in the electronic device and connected to the port under test. This circuit is used to promptly detect the presence of liquid or foreign matter at the port under test, thereby enabling appropriate protective measures to prevent corrosion. However, the current method in electronic devices that determines whether liquid has entered the port by measuring whether the pins of the port under test are energized is prone to misjudgment, resulting in poor measurement accuracy.
[0076] Based on this, an embodiment of the present disclosure provides a detection circuit, which includes: a switching module, the first end of which is connected to each pin to be tested of the port to be tested; wherein, when the switching module is in different switching states, the connection line between the second end of the switching module and the different pins to be tested is in a conductive state; a voltage divider module connected to the second end of the switching module; a first isolation component connected between the second end of the switching module and the voltage divider module, configured to isolate the DC signal transmitted to each pin to be tested; and a detection module connected to the voltage divider module and the first isolation component, configured to detect the electrical parameters of the voltage divider module based on the equivalent impedance of the first isolation component when the switching module is in different switching states; the electrical parameters of the voltage divider module are configured to determine whether there is an abnormality in each pin to be tested.
[0077] In other words, the embodiments of this disclosure can be configured by setting a switch module, a first isolation component, a voltage divider module, and a detection module that are sequentially connected to each pin to be tested of the port to be tested. The detection module can detect the electrical parameters of the voltage divider module based on the equivalent impedance of the first isolation component when the switch module is in different switching states. This allows the electrical parameters of the voltage divider module to be used to determine whether there is an abnormality in each pin to be tested. Thus, even when there is a bias voltage on the pin to be tested, the electrical parameters of the voltage divider module can still be accurately detected by the equivalent impedance of the first isolation component, thereby more accurately determining whether there is an abnormality in each pin to be tested and improving the measurement accuracy of the port to be tested.
[0078] Figure 2 This is a schematic diagram of the structure of a detection circuit according to an exemplary embodiment. Figure 2 ,like Figure 2 As shown, the detection circuit provided in this embodiment of the present disclosure, in Figure 1Based on the detection circuit shown, the detection module is further divided. For example, the detection module may include: a signal input terminal, a signal output terminal, a first operational amplifier unit, and a second operational amplifier unit.
[0079] like Figure 1 and Figure 2 As shown, the detection module 14 includes:
[0080] Signal input terminal 141 and signal output terminal 142;
[0081] The first operational amplifier unit 143 has its first input terminal connected to the signal input terminal 141, its second input terminal connected to the output terminal of the first operational amplifier unit 143, and its output terminal connected to the voltage divider module 12.
[0082] The second operational amplifier unit 144 has its first input terminal connected to the voltage divider module 12 and the first isolation component 13, its second input terminal connected to its output terminal, and its output terminal connected to the signal output terminal 142.
[0083] The first operational amplifier unit 143 and the second operational amplifier unit 144 are configured to determine the electrical parameters of the voltage divider module 12 based on the input voltage of the signal input terminal 141, the output voltage of the signal output terminal 142, and the equivalent impedance of the first isolation component 13.
[0084] In this way, by setting the first input terminal of the first operational amplifier unit to be connected to the signal input terminal of the detection module, the second input terminal of the first operational amplifier unit to be connected to the output terminal of the first operational amplifier unit, and the output terminal of the first operational amplifier unit to be connected to the voltage divider module, and the first input terminal of the second operational amplifier unit to be connected to the voltage divider module and the first isolation component, the second input terminal of the second operational amplifier unit to be connected to the output terminal of the second operational amplifier unit, and the output terminal of the second operational amplifier unit to be connected to the signal output terminal of the detection module, the electrical parameters of the voltage divider module can be determined using the first and second operational amplifier units based on the input voltage of the signal input terminal, the output voltage of the signal output terminal, and the equivalent impedance of the first isolation component. This can prepare for subsequent determination of whether there is any abnormality in each pin to be tested, effectively improving the measurement accuracy of the port to be tested and reducing costs.
[0085] In this embodiment of the present disclosure, both the signal input terminal and the signal output terminal are connected to the control module of the electronic device. The signal input terminal can be used to input a voltage signal to the first operational amplifier unit in the detection module, and the signal output terminal can be used to output a voltage signal amplified by the first operational amplifier unit and the second operational amplifier unit to the control module of the electronic device.
[0086] For example, the signal input terminal of the detection module can receive a pulse-width modulation (PWM) signal; this PWM signal can switch between high and low levels to form a periodic square wave signal. Here, the input voltage at the signal input terminal can be determined based on the peak-to-peak value of the square wave signal, that is, based on the difference between the maximum and minimum values of the square wave signal within one period, i.e., the range between the maximum and minimum voltages.
[0087] Here, both the first and second operational amplifier units can be operational amplifiers. An operational amplifier is a DC-coupled amplifier with high gain and linearity. Its function is to amplify the input signal and, ideally, perform various mathematical operations such as addition, subtraction, integration, and differentiation. Based on the input voltage at the signal input terminal, the output voltage at the signal output terminal, and the equivalent impedance of the first isolation component, the electrical parameters of the voltage divider module are calculated.
[0088] It is understandable that the first input terminal of the first operational amplifier unit and the first input terminal of the second operational amplifier unit can both be the positive terminal of the operational amplifier, i.e., the non-inverting input terminal; the input voltage of the first input terminal of the first operational amplifier unit is the same as the input voltage of the signal input terminal, and has the same phase relationship with the output voltage of the first operational amplifier unit. The second input terminals of the first and second operational amplifier units can both be the negative terminal of the operational amplifier, i.e., the inverting input terminals; since the second input terminal of the first operational amplifier unit is connected to the output terminal of the first operational amplifier unit, the output voltage of the first operational amplifier unit is equal to the voltage of its second input terminal, i.e., the input voltage of the signal input terminal; and since the second input terminal of the second operational amplifier unit is connected to its output terminal, the voltage of its second input terminal is equal to the output voltage of its second operational amplifier unit, i.e., the output voltage of the signal output terminal.
[0089] It should be noted that, in this embodiment, the voltage value corresponding to the voltage divider module can be determined first based on the input voltage at the signal input terminal and the output voltage at the signal output terminal; then, based on the impedance parameters of the voltage divider module itself, such as the resistance value, the current value and other electrical parameters on the connection line where the voltage divider module is located can be calculated.
[0090] In some embodiments, such as Figure 1 and Figure 2 As shown, the voltage divider module 12 includes:
[0091] The first impedance element 121 has one end connected to the connection line between the first isolation component 13 and the first input terminal of the second operational amplifier unit 144, and the other end connected to the output terminal of the first operational amplifier unit 143.
[0092] When the switching module 11 is in different switching states, the first impedance element 121 is in a conducting state through the connection line between the first isolation component 13 and the different test pins 101.
[0093] In this way, by setting a first impedance element with one end connected to the first input terminal of the first isolation component and the second operational amplifier unit and the other end connected to the output terminal of the first operational amplifier unit, the impedance of the pin to be tested can be divided. This can prepare for determining whether there is an abnormality in each pin to be tested based on the electrical parameters of the first impedance element, thereby improving the measurement accuracy of the port to be tested and reducing costs.
[0094] In this embodiment of the present disclosure, the first impedance element can act as a voltage divider for the resistance of the pin to be tested. The detection module can determine the electrical parameters of the first impedance element by using the input voltage of the signal input terminal, the output voltage of the signal output terminal, and the equivalent impedance of the first isolation component when the switching module is in different switching states. In this way, the impedance parameters of each pin to be tested can be determined to determine whether there is any abnormality in each pin to be tested.
[0095] Understandably, by utilizing the principle of virtual short in operational amplifiers, it can be determined that the input voltage at the first input terminal of the first operational amplifier unit is equal to the input voltage at the second input terminal of the first operational amplifier unit, thus determining that the output voltage at the output terminal of the first operational amplifier unit is equal to the input voltage at the signal input terminal. At this point, the voltage value corresponding to the first impedance element can be determined as the difference between the input voltage at the signal input terminal and the output voltage at the signal output terminal. Since the impedance value of the first impedance element is known, the current value corresponding to the first impedance element can be calculated.
[0096] Since the input signal is a square wave signal, i.e., an AC signal, the equivalent impedance of the first isolation component can be ignored. When the switching module is in different switching states, it can be regarded as the first impedance element and different pins to be tested being connected in series. That is, the current value flowing through the first impedance element is equal to the current value of the corresponding pin to be tested. Thus, in the subsequent calculation process of the processing module of the electronic device, since the output voltage of the signal output terminal and the current value of the first impedance element are known, the impedance parameter corresponding to the pin to be tested can be calculated. By judging whether there is an abnormality in each pin to be tested by the magnitude of the impedance parameter corresponding to the pin to be tested.
[0097] It should be noted that the first impedance element can be a resistor or an inductor, as long as the first impedance element can divide the voltage of the pin to be detected. This disclosure does not impose any restrictions on the embodiments.
[0098] In some embodiments, such as Figure 1 and Figure 2 As shown, the detection circuit 10 further includes:
[0099] The second isolation component 15 is connected at one end to the connection line between the first isolation component 13 and the voltage divider module 12, and at the other end to the first input terminal of the second operational amplifier unit 144, and is configured to limit the voltage signal transmitted to the first input terminal of the second operational amplifier unit 144.
[0100] In this way, by setting a second isolation component with one end connected to the connection line between the first isolation component and the voltage divider module and the other end connected to the first input terminal of the second operational amplifier unit, the voltage signal transmitted to the first input terminal of the second operational amplifier unit can be limited, thereby reducing the risk of damage to the detection circuit, improving the safety of the detection circuit, and extending the service life of the detection circuit.
[0101] Here, the second isolation component can be a component in the detection circuit that limits the voltage signal transmitted to the first input terminal of the second operational amplifier unit; for example, the second isolation component can be a resistor or an inductor.
[0102] It is understandable that the voltage signal input at the signal input terminal is divided by the voltage divider module, and the divided voltage signal flows through the second isolation component to the first input terminal of the second operational amplifier unit. At this time, the impedance of the second isolation component can be ignored, that is, the input voltage at the first input terminal of the second operational amplifier unit can be the voltage value after being divided by the voltage divider module.
[0103] It should be noted that the specific type of the second isolation component can be set according to the actual application scenario, as long as the second isolation component can limit the voltage signal transmitted to the first input terminal of the second operational amplifier unit. This disclosure embodiment does not impose any restrictions on this.
[0104] In some embodiments, such as Figure 1 and Figure 2 As shown, the detection module 14 also includes:
[0105] The peak detection component 145 is connected to the output terminal and the signal output terminal 142 of the second operational amplifier unit 144, and is configured to cooperate with the second operational amplifier unit 144 to detect the peak voltage signal after voltage division by the voltage divider module 12.
[0106] In this way, a peak detection component connected between the output terminal and the signal output terminal of the second operational amplifier unit can be set up to cooperate with the second operational amplifier unit to detect the peak voltage signal after voltage division by the voltage divider module. This can prepare for determining the impedance parameters of the pin to be tested based on the peak voltage signal and the electrical parameters of the voltage divider module. This allows for timely detection of abnormalities in the port to be tested, enabling the implementation of protective measures such as corrosion prevention, improving the measurement accuracy of the port to be tested, and extending the service life of the port to be tested in electronic equipment.
[0107] Here, the peak detection component can be a component in the detection module used to cooperate with the second operational amplifier unit to detect the peak voltage signal after voltage division by the voltage divider module; for example, the peak detection component can include, but is not limited to, diodes, voltage-regulating capacitors, and resistors.
[0108] Understandably, the voltage signal after voltage division by the voltage divider module is transmitted to the first input terminal of the second operational amplifier unit. The peak voltage signal after voltage division by the voltage divider module can be acquired at the signal output terminal through the second operational amplifier unit and the peak detection component. In other words, the output voltage at the signal output terminal can be the peak value of the voltage after voltage division by the voltage divider module, that is, the maximum value of the AC voltage after voltage division by the voltage divider module. In this way, the voltage corresponding to the pin to be tested can be determined based on the peak voltage signal in the subsequent process, so as to determine the impedance parameters of the pin to be tested.
[0109] It should be noted that the specific number of capacitors or resistors included in the peak detection component can be set according to the actual application scenario, and this disclosed embodiment does not impose any restrictions.
[0110] In some embodiments, such as Figure 1 and Figure 2 As shown, the peak detection component 145 includes:
[0111] A unidirectional conducting transistor 146 is connected to the output terminal of the second operational amplifier unit 144, and the negative terminal of the unidirectional conducting transistor 146 is connected to the signal output terminal 142.
[0112] The second impedance element 147 has one end connected to the connection line between the negative terminal of the unidirectional conduction tube 146 and the signal output terminal 142, and the other end grounded.
[0113] The voltage regulator 148 has one end connected to the negative terminal of the unidirectional conduction tube 146 and the connection line between the second impedance element 147, and the other end grounded, configured to stabilize the voltage signal after voltage division by the voltage divider module 12.
[0114] In this way, by setting a unidirectional conducting transistor with its positive terminal connected to the output terminal of the second operational amplifier unit and its negative terminal connected to the signal output terminal, a second impedance element with one end connected to the connection line between the negative terminal of the unidirectional conducting transistor and the signal output terminal and the other end grounded, and a voltage regulator element with one end connected to the connection line between the negative terminal of the unidirectional conducting transistor and the second impedance element and the other end grounded, the peak voltage signal after voltage division by the voltage divider module can be detected. This can better prepare for the subsequent determination of the impedance parameters of the pin to be tested based on the peak voltage signal and the electrical parameters of the voltage divider module, thereby effectively improving the measurement accuracy of the port to be tested and extending the service life of the port to be tested in electronic devices.
[0115] Here, the unidirectional conduction transistor can be a diode. The positive terminal of the diode can be connected to the output terminal of the second operational amplifier unit, and the negative terminal of the diode can be connected to the signal output terminal. That is to say, current can be transmitted from the output terminal of the second operational amplifier unit to the signal output terminal, but cannot be transmitted from the signal output terminal to the output terminal of the second operational amplifier unit.
[0116] The aforementioned second impedance element can be impedance matched with the voltage regulator element in the peak detection component to detect the peak voltage signal after voltage division by the voltage divider module. The aforementioned voltage regulator element can be a component in the peak detection component used to stabilize the voltage signal after voltage division by the voltage divider module, thereby enabling better detection of the peak voltage signal after voltage division by the voltage divider module.
[0117] Understandably, after the voltage signal from the voltage divider module is transmitted to the second operational amplifier unit, it is then processed by a unidirectional transistor, a voltage regulator, and a second impedance element. This allows the peak voltage signal from the voltage divider module to be acquired at the signal output terminal. In other words, the output voltage at the signal output terminal can be the peak value of the voltage after the voltage divider module. This allows the voltage corresponding to the pin to be tested to be determined based on the peak voltage signal and the electrical parameters of the voltage divider module in subsequent processes, thereby determining the impedance parameters of the pin to be tested.
[0118] It should be noted that the second impedance element can be a resistor or an inductor, and the voltage regulator element can be a capacitor or an inductor, etc. The embodiments disclosed herein do not impose any restrictions on this.
[0119] Figure 3 This is a schematic diagram illustrating the structure of an electronic device according to an exemplary embodiment, such as... Figure 1 and Figure 3 As shown, this disclosure provides an electronic device 1, which may include:
[0120] The port to be tested 100 has multiple pins to be tested 101;
[0121] As in the above embodiments of this disclosure, the detection circuit 10; the switching module 11 of the detection circuit 10 is connected between each pin to be detected 101 and the first isolation component 13 of the detection circuit 10, and the detection module 14 of the detection circuit 10 is connected between the voltage divider module 12 of the detection circuit 10 and the first isolation component 13.
[0122] The processing module 20 is connected to the detection module 14 and is configured to calculate the impedance parameters of each pin to be tested 101 based on the electrical parameters of the voltage divider module 12 detected by the detection module 14 according to the equivalent impedance of the first isolation component 13 when the switching module 11 is in different switching states, and determine whether there is an abnormality in the port 100 to be tested based on the impedance parameters of each pin to be tested 101.
[0123] In this embodiment, a detection circuit can be set in the electronic device. The switching module of the detection circuit is connected to each pin to be tested of the port to be tested. The processing module of the electronic device can calculate the impedance parameters of each pin to be tested by the detection module in the detection circuit based on the electrical parameters of the voltage divider module detected by the equivalent impedance of the first isolation component. This allows the device to determine whether there is an abnormality in the port to be tested, thereby enabling timely detection of abnormalities in the port to be tested. Consequently, protective measures such as corrosion prevention can be taken to improve the measurement accuracy of the port to be tested and extend the service life of the port to be tested in the electronic device.
[0124] It should be noted that the aforementioned electronic devices may include mobile terminal devices, smart home devices, etc. Mobile terminal devices may include mobile phones, wearable devices, or tablet computers; smart home devices may include speaker devices or televisions. For example, the detection circuit may be installed on the circuit board of a mobile phone and connected to the phone's charging port, or it may be installed on the circuit board of a television and connected to the television's interface; this disclosure does not impose any limitations on this.
[0125] Here, the processing module can be a core functional module of the electronic device, located on the motherboard of the electronic device, and is used to process data transmitted via the data transmission bus; for example, the processing module may include a central processing unit (CPU) or a microprocessor unit (MPU), etc.
[0126] It is understandable that when there is an abnormality such as liquid or foreign object in the port to be tested, the resistance of the port to be tested will decrease. The processing module can connect to the detection module of the detection circuit and calculate the electrical parameters of the voltage divider module detected by the equivalent impedance of the first isolation component under different switching states sent by the detection module to obtain the impedance parameters of each pin to be tested. Based on the impedance parameters of each pin to be tested, it can determine whether there is an abnormality such as liquid or foreign object in the port to be tested.
[0127] For example, such as Figure 2 and Figure 3 As shown, the voltage signal Vref input to the signal input terminal 141 by the electronic device 1 can be a square wave signal of 0 to 1.8 volts (V); at this time, the detection module 14 can detect the voltage signal Vo1 output by the output terminal of the first operational amplifier unit 143, which can be the peak-to-peak value of Vref, i.e., Vrefpp, and Vrefpp can be 1.8V, i.e., Vo1 and the input voltage of the signal input terminal 141 can both be 1.8V.
[0128] Since the voltage values of the square wave signal Vref are all greater than 0, Vref can be regarded as a DC bias signal. Due to the DC blocking effect of the first isolation component C1, the equivalent resistance of Vo1 to ground is infinite. Therefore, the average value of the DC component Vo2 from the second isolation component R2 to the first input terminal of the second operational amplifier unit 144 can be 0.5Vrefpp, which is 0.9V, and the peak-to-peak value of Vo2 can be 0.9V. At this time, Vo2 can be a square wave signal of 0.45 to 1.35V. Since the peak detection component 145 detects Vo3 as the peak value of Vo2, the voltage Vo3 collected by the electronic device 1 at the signal output terminal 142 can be 1.35V.
[0129] Electronic device 1 can calculate the current value corresponding to the first impedance element R1 based on the input voltage of the signal input terminal 141, the output voltage of the signal output terminal 142, and the known resistance value of the first impedance element R1, such as 10 ohms, i.e. (1.8-1.35) / 10=0.045 Amperes (A).
[0130] Since the magnitude of Vo3 and the average value of Vref, namely Vrefav, collected by electronic device 1 can be 0.9V, the voltage value corresponding to the pin to be tested 101 can be calculated according to (Vo3-Vrefav)x2, that is, (1.35-0.9)x2=0.9V. Therefore, the resistance value of the pin to be tested 101 can be 0.9 / 0.045=20 ohms. Based on the comparison between the resistance value of the pin to be tested and the preset resistance threshold, it can be determined whether there is an abnormality in the port to be tested.
[0131] In some embodiments, the processing module is further configured to calculate the resistance value of each pin to be tested based on the electrical parameters of the voltage divider module when the switching module is in different switching states; wherein, when the resistance value of any pin to be tested is less than or equal to a preset resistance threshold, it is determined that there is an anomaly at the port to be tested.
[0132] In this way, the resistance values of each pin to be tested calculated by the processing module can be compared with the preset resistance values. Based on the comparison results, it can be determined whether there is an abnormality in the port to be tested. This allows for a more accurate determination of the abnormality in the port to be tested, further improving the measurement accuracy of the port to be tested and extending the service life of the port to be tested in electronic devices.
[0133] In this embodiment of the present disclosure, the processing module can calculate the resistance value of each pin to be tested based on the electrical parameters of the voltage divider module under different switching states received; that is, after receiving the electrical parameters of a voltage divider module, the processing module can calculate the resistance value of a pin to be tested corresponding to the electrical parameters.
[0134] It is understandable that, taking the detection module as an example, which includes a first operational amplifier unit, a second operational amplifier unit, and a voltage divider module as the first impedance element, the electrical parameters of the voltage divider module may include: the current value corresponding to the first impedance element calculated using the virtual short principle of the first and second operational amplifier units.
[0135] Here, the processing module can calculate the current value corresponding to the first impedance element based on the difference between the input voltage at the signal input terminal and the output voltage at the signal output terminal of the detection module, as well as the known impedance value of the first impedance element. Since the current value corresponding to the pin to be detected is equal to the current value corresponding to the first impedance element, the resistance value corresponding to the pin to be detected can be calculated based on the peak-to-peak value of the voltage after voltage division by the first impedance element. By comparing the resistance value corresponding to the pin to be detected with the preset resistance threshold, it can be determined whether there is an abnormality in the pin to be detected.
[0136] It should be noted that if the resistance value of any one of the pins to be tested in the port to be tested is less than or equal to the preset resistance threshold, then the port to be tested is considered to be abnormal; while if the resistance values of all the pins to be tested in the port to be tested are greater than the preset resistance threshold, then the port to be tested can be considered to be normal.
[0137] For example, the electronic device can preset the resistance threshold of the pin to be tested to 5.1 kΩ. When the processing module calculates the resistance value of the pin to be tested to be 500 Ω, the processing module can determine that the pin to be tested is in an abnormal state, that is, the port to be tested is abnormal; when the processing module calculates the resistance value of the pin to be tested to be 5.5 kΩ, the processing module can determine that the pin to be tested is in a normal state, that is, the port to be tested is not abnormal.
[0138] It should be noted that the aforementioned preset resistance threshold can be a resistance value pre-set in the electronic device, or it can be a resistance value pre-set in the electronic device according to each pin to be tested in the port to be tested. This disclosure does not impose any limitations.
[0139] In some embodiments, such as Figure 1 and Figure 3 As shown, electronic device 1 also includes:
[0140] The control module 30 is connected to the switch module 11 and the signal input terminal 141 and signal output terminal 142 of the detection module 14. It is configured to control the switching state of the switch module 11, the voltage signal input of the signal input terminal 141, and the voltage signal output of the signal output terminal 142.
[0141] In this way, by setting up a control module that connects the switch module and the signal input and signal output terminals of the detection module, the switching state of the switch module and the voltage signal input and output in the detection module can be better controlled, thereby improving the measurement accuracy of the port to be tested and extending the service life of the port to be tested in electronic equipment.
[0142] In this embodiment of the disclosure, the control module may be a power management integrated circuit (PMIC), which is a chip in the display device system that is responsible for the conversion, distribution, detection and other power management of electrical energy. The power management chip can control and monitor the input and output of various voltages and currents in the power system, thereby ensuring the stable and safe operation of the power system.
[0143] Here, the processing module and control module of the electronic device can communicate via the System Power Management Interface (SPMI). The SPMI bus connects the CPU, peripherals, and PMIC of the electronic device, enabling the management and control of the system power supply. The SPMI bus uses serial communication, employing two signal lines for data transmission between the CPU and PMIC: a data line for transmitting commands and data, and a clock line for synchronizing data transmission. Through the SPMI bus, the CPU can send commands and data to the PMIC to adjust the power supply's operating state, including switching the power supply on and off, and adjusting voltage and current. Simultaneously, the PMIC can also send power status information to the CPU for appropriate adjustments and optimizations.
[0144] Understandably, taking the switch module as an example with a switch chip, the control module can connect to the first and second control terminals of the switch chip; both the first and second control terminals can be GPIO ports. The control module can control the input of a high-level signal to the first control terminal and a low-level signal to the second control terminal to make the connection between the first pin to be tested and the output terminal of the switch chip conductive, allowing the electronic device to test the first pin; or, it can control the input of a low-level signal to the first control terminal and a high-level signal to the second control terminal to make the connection between the second pin to be tested and the output terminal of the switch chip conductive, allowing the electronic device to test the second pin.
[0145] It should be noted that the processing module of the electronic device can acquire the voltage signal input to the signal input terminal by the control module, such as the PWM signal, as well as the voltage signal output terminal of the signal output terminal received by the control module under different switching states, to calculate the impedance parameters corresponding to each pin to be tested, so as to determine whether there is an abnormality in the port to be tested, thereby improving the measurement accuracy of the port to be tested and extending the service life of the port to be tested in the electronic device.
[0146] In related technologies, in order to avoid corrosion of the ports to be tested in electronic devices, there are usually two methods to detect whether there is liquid or foreign matter in the ports to be tested.
[0147] The first method is a DC measurement scheme, which measures the liquid condition at the Type-C port. To determine if liquid is present at the Type-C port, a voltage divider is used, and an analog-to-digital converter (ADC) is used to acquire the voltage at the pin to calculate the pin's impedance to ground, Rx, thus determining the presence of liquid. However, when the charger is plugged in, the VBUS voltage can also be connected to the pin under test through the liquid's equivalent impedance. This causes the ADC to acquire a fixed voltage, rather than the result of impedance division, leading to inaccurate measurements.
[0148] The second type is the AC measurement scheme, such as Figure 4As shown, AC1 is an AC source. A square wave of a set frequency is applied to the input of the op-amp. Based on Vout and the AC amplification factor of AC1, the impedance to ground of the pin under test can be calculated. When the amplification factor is 1, it indicates a high-impedance state, and the op-amp circuit is a follower circuit. If the amplification factor is greater than 1, it proves that there is an Rx impedance. Since an AC signal is used, the problem of inaccurate measurement when there is a DC bias voltage at the Type-C port is solved. However, the output signal of this scheme is an AC signal with DC bias, which requires the ADC to have real-time peak-to-peak value acquisition capability to obtain the calculation result. However, in current mobile phone applications, the ADC cannot meet the requirement of high-speed acquisition, and if a high-speed ADC is added, the cost is extremely expensive. In addition, since the pin under test is directly connected to the input and output terminals of the op-amp through a resistor, the overvoltage protection problem of this port also needs to be solved.
[0149] Based on this, the electronic device provided in this disclosure can utilize a detection circuit that sequentially connects a switching module, a first isolation component, a voltage divider module, and a detection module to each pin of the port to be tested. When the switching module is in different switching states, the detection module detects the electrical parameters of the voltage divider module based on the equivalent impedance of the first isolation component. Based on the electrical parameters of the voltage divider module, the impedance parameters of each pin to be tested are calculated. Furthermore, the impedance parameters of each pin to be tested are used to determine whether there is an abnormality in the port to be tested. This allows for accurate detection of the electrical parameters of the voltage divider module even when there is a bias voltage on the pin to be tested, through the equivalent impedance of the first isolation component, thus improving the measurement accuracy for the port to be tested. Simultaneously, it enables timely detection of abnormalities in the port to be tested, allowing for the implementation of protective measures such as corrosion prevention to extend the service life of the port to be tested in the electronic device.
[0150] In addition, the embodiments disclosed herein do not require the addition of additional components to the electronic device, and can reuse the existing test port of the electronic device to achieve the measurement accuracy of the test port. Furthermore, the measurement range of the test port is larger than that of the solutions in the related technologies. Moreover, the voltage acquisition rate requirement of the signal output terminal of the detection module is low, which better reduces production costs.
[0151] Figure 5 This is a structural block diagram of an electronic device according to an exemplary embodiment. For example, the electronic device may be a mobile phone, computer, in-vehicle device, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0152] Reference Figure 5The electronic device may include one or more of the following components: processing component 502, memory 504, power supply component 506, multimedia component 508, audio component 55, input / output (I / O) interface 512, sensor component 514, and communication component 516.
[0153] Processing component 502 typically controls the overall operation of an electronic device, such as operations associated with at least one of display, telephone call, data communication, camera operation, and recording operation. Processing component 502 may include one or more processors 520 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 502 may include one or more modules to facilitate interaction between processing component 502 and other components. For example, processing component 502 may include a multimedia module to facilitate interaction between multimedia component 508 and processing component 502.
[0154] Memory 504 is configured to store various types of data to support operation of the electronic device. Examples of such data include at least one of the following: instructions for any application or method operating on the electronic device, contact data, phonebook data, messages, pictures, and videos. Memory 504 can be implemented by any type of volatile or non-volatile storage device 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 storage, flash memory, magnetic disk, or optical disk.
[0155] Power supply component 506 provides power to various components of an electronic device. Power supply component 506 may include at least one of the following: a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device.
[0156] Multimedia component 508 includes a screen that provides an output interface between the electronic device 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 touchscreen to receive input signals from the user. The Touch Panel includes one or more touch sensors to sense touches, swipes, and gestures on the Touch Panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 508 includes a front-facing camera and / or a rear-facing camera. When the electronic device is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0157] Audio component 55 is configured to output and / or input audio signals. For example, audio component 55 includes a microphone (MIC) configured to receive external audio signals when the electronic device is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 504 or transmitted via communication component 516. In some embodiments, audio component 55 also includes a speaker for outputting audio signals.
[0158] I / O interface 512 provides an interface between processing component 502 and peripheral interface modules, such as keyboards, click wheels, and buttons. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0159] Sensor assembly 514 includes one or more sensors for providing state assessments of various aspects of the electronic device. For example, sensor assembly 514 may detect the on / off state of the electronic device, the relative positioning of components such as the display and keypad of the electronic device, changes in the position of the electronic device or a component within the electronic device, the presence or absence of user contact with the electronic device, the orientation or acceleration / deceleration of the electronic device, and temperature changes of the electronic device. Sensor assembly 514 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 514 may also include an optical sensor, such as a complementary metal-oxide-semiconductor (CMOS) or charge-coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, sensor assembly 514 may also include, but is not limited to, at least one of the following: an accelerometer, a gyroscope, a magnetometer, a pressure sensor, and a temperature sensor.
[0160] Communication component 516 is configured to facilitate wired or wireless communication between electronic devices and other devices. The electronic devices can access wireless networks based on communication standards, such as Wi-Fi, 4G, 5G, or combinations thereof. In one exemplary embodiment, communication component 516 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 516 also includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0161] In an exemplary embodiment, the electronic device may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components.
[0162] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 504 including executable instructions or a computer program that can be executed by a processor 520 of an electronic device. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.
[0163] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the utility models disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
[0164] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A detection circuit, characterized in that, include: A switch module, wherein a first end of the switch module is connected to multiple pins of a port to be tested; wherein, when the switch module is in different switching states, the connection lines between the second end of the switch module and the different pins to be tested are in a conductive state; The voltage divider module is connected to the second terminal of the switch module; A first isolation component is connected between the second terminal of the switching module and the voltage divider module, and is configured to isolate the DC signals transmitted to each of the pins to be detected; The detection module, connected to the voltage divider module and the first isolation component, is configured to detect the electrical parameters of the voltage divider module based on the equivalent impedance of the first isolation component when the switching module is in different switching states; the electrical parameters of the voltage divider module are configured to determine whether there is an abnormality in each of the pins to be detected.
2. The detection circuit according to claim 1, characterized in that, The detection module includes: Signal input terminal and signal output terminal; The first operational amplifier unit has a first input terminal connected to the signal input terminal, a second input terminal connected to the output terminal of the first operational amplifier unit, and an output terminal connected to the voltage divider module. The second operational amplifier unit has a first input terminal connected to the voltage divider module and the first isolation component, a second input terminal connected to the output terminal of the second operational amplifier unit, and an output terminal connected to the signal output terminal. The first operational amplifier unit and the second operational amplifier unit are configured to determine the electrical parameters of the voltage divider module based on the input voltage at the signal input terminal, the output voltage at the signal output terminal, and the equivalent impedance of the first isolation component.
3. The detection circuit according to claim 2, characterized in that, The voltage divider module includes: The first impedance element has one end connected to the connection line between the first isolation component and the first input terminal of the second operational amplifier unit, and the other end connected to the output terminal of the first operational amplifier unit. When the switching module is in different switching states, the first impedance element is in a conducting state through the connection lines between the first isolation component and different pins to be detected.
4. The detection circuit according to claim 2, characterized in that, The detection circuit further includes: The second isolation component has one end connected to the connection line between the first isolation component and the voltage divider module, and the other end connected to the first input terminal of the second operational amplifier unit, configured to limit the voltage signal transmitted to the first input terminal of the second operational amplifier unit.
5. The detection circuit according to claim 2, characterized in that, The detection module also includes: A peak detection component is connected to the output terminal of the second operational amplifier unit and the signal output terminal, and is configured to cooperate with the second operational amplifier unit to detect the peak voltage signal after voltage division by the voltage divider module.
6. The detection circuit according to claim 5, characterized in that, The peak detection component includes: A unidirectional conducting diode, wherein the positive terminal of the unidirectional conducting diode is connected to the output terminal of the second operational amplifier unit, and the negative terminal of the unidirectional conducting diode is connected to the signal output terminal; The second impedance element has one end connected to the connection line between the negative terminal of the unidirectional conductive tube and the signal output terminal, and the other end grounded. A voltage regulator element has one end connected to the connection line between the negative terminal of the unidirectional conducting tube and the second impedance element, and the other end grounded, configured to stabilize the voltage signal after voltage division by the voltage divider module.
7. The detection circuit according to any one of claims 1 to 6, characterized in that, The switching module includes multiple control input terminals, and each control input terminal corresponds to one pin to be detected. When each of the control input terminals is at a different level, the switch module is in a different switching state.
8. An electronic device, characterized in that, include: The port to be tested has multiple pins to be tested; The detection circuit as described in any one of claims 1 to 7; The switching module of the detection circuit is connected between each of the pins to be detected and the first isolation component of the detection circuit, and the detection module of the detection circuit is connected between the voltage divider module of the detection circuit and the first isolation component. The processing module, connected to the detection module, is configured to, when the switching module is in different switching states, calculate the impedance parameters of each of the pins to be tested based on the electrical parameters of the voltage divider module detected by the detection module according to the equivalent impedance of the first isolation component, and determine whether there is an abnormality in the port to be tested based on the impedance parameters of each of the pins to be tested.
9. The electronic device according to claim 8, characterized in that, The processing module is further configured to calculate the resistance value of each of the pins to be detected based on the electrical parameters of the voltage divider module when the switching module is in different switching states. Specifically, if the resistance value of any of the pins to be tested is less than or equal to a preset resistance threshold, it is determined that the port to be tested is abnormal.
10. The electronic device according to claim 8 or 9, characterized in that, The electronic device also includes: The control module is connected to the switch module and to the signal input and signal output terminals of the detection module. It is configured to control the switching state of the switch module and the voltage signal input of the signal input terminal, and to receive the voltage signal output of the signal output terminal.
