Protection circuit, control method of protection circuit and electronic equipment
By introducing a bleed circuit and an analog-to-digital converter into the Type-C interface protection circuit, the charge stored in the capacitor is quickly discharged, solving the problems of charging misjudgment and untimely voltage drop when the Type-C interface is not connected to a power adapter, meeting certification test requirements and improving user experience.
Patent Information
- Application Number
- CN202410546748.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-28
- Publication Date
- 2025-11-04
AI Technical Summary
In existing technologies, the Type-C interface may misjudge charging when the cable is not connected to the power adapter, and the capacitor discharge cannot be completed within 300ms as required by the EU IEC62680 certification test, resulting in a delayed drop in power line voltage.
A bleeder circuit and an analog-to-digital converter are introduced into the protection circuit of the Type-C interface. By detecting voltage changes, the conduction and disconnection of the first switch and the bleeder circuit are controlled to quickly discharge the charge stored in the capacitor.
It achieves rapid discharge of charge, meets the EU IEC62680 certification test requirements, improves user experience, and avoids charging abnormalities.
Smart Images

Figure CN120896079A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of circuit, and particularly relates to a protection circuit, a control method of the protection circuit and an electronic device. BACKGROUND
[0002] At present, a universal serial bus (USB) Type-C interface can be arranged on an electronic device such as a mobile phone or a tablet computer. The Type-C interface has two configuration channel (CC) lines, which are used to exchange data information between two devices when the electronic device is connected to an external device through the Type-C interface, so as to determine the respective roles of the two devices.
[0003] When a cable is inserted into the Type-C interface and the cable is not connected to a power adapter, or the cable is inserted into the Type-C interface but the power adapter connected to the cable is not connected to a power source, a flip signal with a peak value of a battery voltage will appear on the CC pin. The signal will show a voltage on the power line (VBUS) through the pull-up resistor of the cable, and the voltage is greater than a preset voltage threshold, for example, 3V, which will cause an insertion interruption to be reported, so that the electronic device displays a charging icon. However, at this time, the cable has not been connected to the power adapter, or the power adapter has not been connected to the power source, that is, a charging misjudgment occurs.
[0004] At present, in order to overcome the above problems, a capacitor is added to the VBUS to reduce the voltage, so that the voltage shown on the VBUS in the above scenario is less than the preset voltage threshold. Due to the energy storage effect of the capacitor, when the cable is pulled out, the capacitor starts to release the stored energy, which will cause the VBUS to still maintain a certain voltage.
[0005] In the European Union IEC62680 certification test, it is stipulated that after the cable is disconnected from the Type-C interface of the electronic device, the VBUS voltage of the electronic device needs to be reduced to below 0.7V within 300ms to avoid the user from feeling the voltage due to a false touch. However, the current capacitor discharge time is greater than 300ms, which does not meet the requirements of the related certification test. SUMMARY
[0006] In order to solve the above problems, the present application provides a protection circuit, a control method of the protection circuit and an electronic device, which can quickly discharge the charge stored in the capacitor of the Type-C interface to meet the requirements of the related test certification, for example, the requirements of the European Union IEC62680 certification test.
[0007] In a first aspect, this application provides a protection circuit applied to an electronic device, the electronic device including a Type-C interface. The protection circuit includes: a power line, a discharge circuit, a first switch, a capacitor, and an analog-to-digital converter. The power line is connected to the power supply pin of the Type-C interface. The first switch is disposed on the power line, the first end of the first switch is connected to the first end of the capacitor and the first end of the discharge circuit, and the second end of the first switch is connected to a power management unit (PMU) and the analog-to-digital converter. The PMU is used to control the first switch to open when the power supply for charging the electronic device is de-energized.
[0008] The second terminal of the capacitor and the second terminal of the bleeder circuit are grounded; the analog-to-digital converter is used to obtain the voltage detection value on the power line; the bleeder circuit is used to conduct when the voltage detection value indicates that the voltage at the second terminal of the first switch is monotonically decreasing, so that the capacitor can discharge the charge to ground through the bleeder circuit.
[0009] The protection circuit provided in this application includes a discharge circuit that conducts when the voltage detection value indicates that the voltage at the second terminal of the first switch is monotonically decreasing. The monotonically decreasing voltage at the second terminal of the first switch indicates that the power supply charging the electronic device is off, and the power line is in a normal off-state. At this time, the discharge circuit is activated, connecting the power line to ground. The capacitor discharges charge to ground through the discharge circuit, enabling faster charge discharge and a quicker voltage drop on the power line. Compared to existing solutions where the capacitor relies on its impedance to ground to discharge charge, the solution provided in this application significantly improves the speed of charge discharge to meet relevant testing and certification requirements.
[0010] In one possible implementation, the analog-to-digital converter is used to acquire a preset number of voltage detection values, the time interval between acquiring two adjacent voltage detection values is the same, and the preset number of voltage detection values are used to indicate whether the voltage at the second terminal of the first switch is monotonically decreasing.
[0011] When multiple voltage detection values decrease monotonically, it indicates that the power line is in a normal power-off state; when multiple voltage detection values do not decrease monotonically, it indicates that the power line is in an abnormal power-off state. The causes of abnormal power-off state include, but are not limited to, surges and electrostatic discharge.
[0012] In one possible implementation, the discharge circuit is also used to disconnect after a first preset duration. This first preset duration is greater than the time required for the capacitor to discharge its charge to ground, and can be set to a shorter duration. This implementation satisfies both the time required for the capacitor to discharge its charge to ground and the ability to promptly disconnect the discharge circuit after the charge discharge is complete, thus preventing charging anomalies after the cable is re-inserted and ensuring a better user experience.
[0013] In one possible implementation, the discharge circuit includes a second switch. The first terminal of the second switch is the first terminal of the discharge circuit, and the second terminal of the second switch is the second terminal of the discharge circuit. This discharge circuit has a simple structure and low operating cost.
[0014] In one possible implementation, the control terminal of the second switch is connected to the first general-purpose input / output (GPIO) interface.
[0015] Secondly, this application also provides a control method for a protection circuit, which is applied to the protection circuit provided in the first aspect above. The method includes:
[0016] When the power supply for charging electronic devices is de-energized, the PMU controls the first switch to open.
[0017] After the first switch is opened, the controller obtains the voltage detection value of the analog-to-digital converter. When the voltage detection value indicates that the voltage at the second terminal of the first switch is monotonically decreasing, the controller controls the discharge circuit to be turned on so that the capacitor discharges the charge to ground through the discharge circuit.
[0018] In one possible implementation, the controller acquires a voltage detection value from the analog-to-digital converter, and when the voltage detection value indicates that the voltage at the second terminal of the first switch is monotonically decreasing, controls the discharge circuit to turn on, including:
[0019] A preset number of voltage detection values are obtained using an analog-to-digital converter, and the time interval between obtaining two adjacent voltage detection values is the same.
[0020] The controller activates the discharge circuit when a preset number of voltage detection values decrease sequentially.
[0021] In one possible implementation, the method also includes:
[0022] The controller controls the discharge circuit to conduct for a first preset time and then disconnects.
[0023] In one possible implementation, the discharge circuit includes: a second switch; a first terminal of the second switch being a first terminal of the discharge circuit, and a second terminal of the second switch being a second terminal of the discharge circuit; a control terminal of the second switch being connected to a first general-purpose input / output (GPIO) interface; controlling the discharge circuit to conduct includes:
[0024] The controller outputs a level signal to the first GPIO interface to control the second switch to turn on.
[0025] Thirdly, this application also provides a control method for a protection circuit, applied to an electronic device. The electronic device includes a Type-C interface, a power management unit (PMU), and a protection circuit. The protection circuit includes: a power line, a discharge circuit, a first switch, a capacitor, and an analog-to-digital converter (ADC). The power line is connected to the power supply pin of the Type-C interface. The first switch is disposed on the power line, with its first terminal grounded through a capacitor, and its second terminal connected to the PMU. The method includes:
[0026] The PMU detects whether the power source for charging electronic devices is powered off;
[0027] When the power supply is off, the PMU controls the first switch to remain on so that the capacitor discharges the charge to ground through the PMU;
[0028] When the voltage on the power line is less than the first voltage threshold, the PMU controls the first switch to open.
[0029] In this implementation, the equivalent load of the internal circuit structure of the PMU is used to discharge the charge, without the need to add additional circuit components, thus reducing hardware costs.
[0030] Fourthly, this application also provides an electronic device, which includes the protection circuit provided in the first aspect and any implementation thereof, and further includes a Type-C interface, a controller, and a power management unit (PMU). The power supply pin of the Type-C interface is connected to the power supply line of the protection circuit. The PMU is used to control the first switch to open when the power supply for charging the electronic device is powered off; the controller is used to acquire the voltage detection value of the analog-to-digital converter after the first switch is opened, and when the voltage detection value indicates that the voltage at the second terminal of the first switch is monotonically decreasing, control the discharge circuit to be turned on so that the capacitor discharges the charge to ground through the discharge circuit. Attached Figure Description
[0031] Figure 1 A schematic diagram of the interface circuit of the electronic device provided in the embodiments of this application;
[0032] Figure 2 This is a simulation diagram provided for an embodiment of this application;
[0033] Figure 3 A schematic diagram of the test waveforms provided in the embodiments of this application;
[0034] Figure 4 A schematic diagram of a protection circuit provided in an embodiment of this application;
[0035] Figure 5 A schematic diagram of another protection circuit provided in an embodiment of this application;
[0036] Figure 6Schematic diagram of the equivalent circuit provided in the embodiments of this application Figure 1 ;
[0037] Figure 7 Schematic diagram of the equivalent circuit provided in the embodiments of this application Figure 2 ;
[0038] Figure 8 A flowchart illustrating a control method for a protection circuit provided in an embodiment of this application;
[0039] Figure 9 A flowchart illustrating another control method for a protection circuit provided in an embodiment of this application;
[0040] Figure 10 A flowchart illustrating another control method for a protection circuit provided in an embodiment of this application;
[0041] Figure 11 Schematic diagram of the equivalent circuit provided in the embodiments of this application Figure 3 ;
[0042] Figure 12 This is a schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0043] To enable those skilled in the art to better understand the solution of this application, the application scenario of the technical solution of this application will be described first below.
[0044] The Type-C interface has two Configuration Channel (CC) lines, used to exchange data between two devices when an electronic device connects to an external device via the Type-C interface, thus determining the respective roles of the two devices. For example, an electronic device can act as a dual-role port (DRP), meaning it can function as a downstream facing port (DFP), providing power and data, or as an upstream facing port (UFP), drawing power from the connected DFP and providing data.
[0045] Taking an electronic device as a UFP (Unified Photonic Unit) and a DFP (Digital Photonic Unit) connected to the electronic device via a Type-C interface as a power adapter as an example, before the electronic device is connected to the power adapter, there is no output on the VBUS power line of the power adapter. After the electronic device is connected to the power adapter, the CC pins of the two devices are connected. At this time, the CC pin on the power adapter will detect the pull-down from the electronic device, indicating that the electronic device and the power adapter are successfully connected. In some existing technologies, the pull-up resistor is set on the cable, for example, on a Type-A to Type-C (ATC) cable. When an ATC cable is inserted into the Type-C interface of the electronic device and the ATC cable is not connected to the power adapter, or when an ATC cable is inserted into the Type-C interface but the power adapter connected to the ATC cable is not connected to a power source, a toggle signal with a peak value equal to the battery voltage will appear on the CC pin. This will be explained in detail below with reference to the attached diagram.
[0046] See also Figure 1 and Figure 2 .in, Figure 1 A schematic diagram of the interface circuit of the electronic device provided in the embodiments of this application; Figure 2 The above is a simulation diagram provided for an embodiment of this application.
[0047] The interface circuit shown includes: pull-down resistor Rd1, pull-down resistor Rd2, capacitor C0, and first switch 20.
[0048] The power cord connects to the power supply pin of the Type-C interface. The power cord VBUS is connected to the power management unit (PMU) 10 via the first switch 20. When the Type-C interface of the electronic device is plugged into the cable, the pull-up resistor on the cable is R. P1 and R P2 Taking the CC2 interface connection of electronic devices and cables as an example, the pull-up resistor R... P1 and R P2 The resistance value can be 56K ohms.
[0049] like Figure 2 As shown, a toggle signal with a peak value equal to the battery voltage will appear on the CC pin at this time. This signal will be reflected as a voltage on the power line (VBUS) after passing through the pull-up resistor of the cable. If this voltage is greater than the preset voltage threshold, such as 3V, it will cause an insertion interruption to be reported, causing the electronic device to display a charging icon. However, at this time, the cable is not actually connected to the power adapter, or the power adapter is not actually connected to the power source, that is, a charging misjudgment has occurred.
[0050] To overcome the above problems, a capacitor C0 has been added to VBUS. The capacitance of capacitor C0 can be 2.2uF. Through the filtering effect of capacitor C0, the voltage can be reduced to meet the requirement of not triggering an interrupt. For example... Figure 2 By adding capacitor C0, the voltage of VBUS can be reduced to approximately 2V.
[0051] Currently, the EU IEC 62680 certification test specifies that the VBUS power-down of a Type-C interface to below 0.7V must be completed within 300ms. When the electronic device is disconnected from the charging power source, the PMU10 can detect the power disconnection and control the first switch 20 to open, but... Figure 1 In the scheme, due to the energy storage function of capacitor C0, after the first switch 20 is opened, capacitor C0 begins to release the stored energy, which will cause VBUS to maintain a certain voltage for a certain period of time.
[0052] When the cable is unplugged, PMU10 controls the first switch 20 to open. At this time, the interface circuit switches to the disabled state, and the impedance to ground is a level of hundreds of kilohms, equivalent to R1. The voltage across capacitor C0 is discharged by resistor R1, and the discharge time t can be calculated by the following formula:
[0053]
[0054] In equation (1), R1 is the equivalent impedance to ground, taking 1 as 100K ohms as an example. The capacitance of capacitor C0 is 2.2uF, Uc is the voltage required for certification testing of 0.7V, and U is the voltage on VBUS before the first switch 20 is opened, taking U as 3.5V as an example. Then, the discharge time t determined according to equation (1) is 352ms, which is greater than the 300ms required for certification testing.
[0055] See Figure 3 The figure is a schematic diagram of the test waveform provided in an embodiment of this application.
[0056] Testing with instruments revealed that the voltage on VBUS was still around 1V after 331ms, which was consistent with the calculated result.
[0057] To address the aforementioned technical problems, this application provides a protection circuit, a control method for the protection circuit, and an electronic device. The protection circuit includes a power line, a discharge circuit, a first switch, a capacitor, and an analog-to-digital converter (ADC). The first switch is located on the power line, with its first terminal connected to the first terminal of the capacitor and the first terminal of the discharge circuit. The second terminal of the first switch is connected to the PMU and the ADC. The second terminals of the capacitor and the discharge circuit are grounded. The ADC acquires a voltage detection value on the power line. The discharge circuit is activated when the voltage detection value indicates a monotonically decreasing voltage at the second terminal of the first switch. This protection circuit adds a discharge circuit, which activates when the first switch is open, allowing the capacitor to discharge charge to ground through the discharge circuit. This enables faster charge discharge, resulting in a quicker voltage drop on the power line. Compared to existing solutions where the capacitor relies on its impedance to ground for charge discharge, this solution significantly improves the charge discharge speed to meet relevant testing and certification requirements and enhances the user experience.
[0058] The terms "first," "second," etc., used in this application description are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated.
[0059] In this application, unless otherwise expressly specified and limited, the term "connection" shall be interpreted broadly. For example, "connection" may be a fixed connection, a detachable connection, or an integral part; it may be a direct connection or an indirect connection through an intermediate medium.
[0060] This application provides a protection circuit, which will be described in detail below with reference to the accompanying drawings.
[0061] See Figure 4 The figure is a schematic diagram of a protection circuit provided in an embodiment of this application.
[0062] The protection circuit includes: power line VBUS, first switch 20, discharge circuit 30, capacitor C0 and analog-to-digital converter (ADC) 40.
[0063] The power cord connects to the power supply pin of the Type-C interface. The first switch 20 is located on the power cord. The first end of the first switch 20 is connected to the first end of the capacitor C0 and the discharge circuit 30, and the second end of the first switch 20 is connected to the power management unit (PMU) 10.
[0064] The PMU10 can be an integrated circuit, typically possessing multiple power management functions, such as voltage regulation, current monitoring, battery management, and charging connection detection. The PMU is responsible for coordinating and managing the power requirements of electronic devices to ensure their stable operation under various working conditions.
[0065] In this embodiment, PMU10 can control the first switch 20 to be turned on or off. This embodiment does not limit the specific type of the first switch 20. In one possible implementation, the first switch 20 is a controllable switching transistor, which can be any of the following: a relay, an insulated gate bipolar transistor (IGBT), a metal-oxide-semiconductor field-effect transistor (MOSFET), a silicon carbide metal-oxide-semiconductor field-effect transistor (SiC MOSFET), etc. Taking a MOSFET as an example, the first terminal of the first switch 20 is the drain of the MOSFET, the second terminal is the source of the MOSFET, and the control terminal of the first switch 20 is the gate of the MOSFET, used to connect the control signal output by PMU10.
[0066] The first switch 20 can serve as a port protection function. When a surge occurs, the PMU10 quickly disconnects the first switch 20 by triggering overvoltage protection to protect the downstream chips.
[0067] The capacitor C0 and the second terminal of the discharge circuit 30 are grounded. At this time, the power line is divided into two parts by the first switch 20. The voltage of one part is represented by VBUS1, and the voltage of the other part is represented by VBUS2. When the first switch 20 is closed, VBUS1 equals VBUS2.
[0068] The analog-to-digital converter 40 is used to obtain the voltage detection value on the power line, specifically to obtain the voltage detection value of VBUS2.
[0069] The voltage detection value is used to characterize the voltage change of the power line connected to the second terminal of the first switch 20. When the electronic device is in the process of normal charging, the first switch 20 is closed, and the voltage detection value is a relatively stable value, indicating that the voltage on VBUS2 is stable at this time.
[0070] When the power adapter of the electronic device is disconnected from the power supply, or when the Type-C interface of the electronic device is disconnected from the cable, the PMU10 controls the first switch 20 to open, and the voltage on VBUS2 begins to gradually decrease. At this time, it is necessary to quickly discharge the charge stored on C0. Therefore, the solution of this application uses the detection of a monotonically decreasing voltage VBUS2 at the second terminal of the first switch 20 as the basis for determining that the power supply is off.
[0071] When VBUS2 decreases monotonically, it indicates that the voltage at the second terminal of the first switch 20 is no longer stable, meaning it is currently in the normal power-down process. The discharge circuit 30 is activated when the voltage detection value indicates that the voltage at the second terminal of the first switch 20 is decreasing monotonically, so that the capacitor discharges the charge to ground through the discharge circuit.
[0072] The protection circuit provided in this application embodiment can disconnect the first switch under the control of the PMU in the event of a surge, thereby protecting the downstream chip. This protection circuit also includes a discharge circuit. After the first switch is disconnected, the discharge circuit conducts when the voltage detection value indicates that the voltage at the second terminal of the first switch is monotonically decreasing. This allows the capacitor to discharge charge to ground through the discharge circuit, enabling faster charge discharge and a quicker voltage drop on the power line. Compared to existing solutions where the capacitor relies on its impedance to ground to discharge charge, the solution provided in this application embodiment significantly improves the charge discharge speed to meet relevant testing and certification requirements.
[0073] The following explanation will focus on the specific circuit implementation.
[0074] See Figure 5 This figure is a schematic diagram of another protection circuit provided in an embodiment of this application.
[0075] Figure 5 The protection circuit shown includes a second switch MOS31, and the first switch is specifically MOS21. MOS21 and MOS31 can be the same type of MOSFET, such as both being NMOS transistors, or they can be different types of MOSFETs, such as MOS21 being a PMOS transistor and MOS31 being an NMOS transistor. The following description uses the example of MOS21 and MOS31 both being NMOS transistors.
[0076] PMU10 is connected to the control port of MOS21, which is also connected to the gate of MOS21.
[0077] The control terminal of MOS31 is connected to the general-purpose input / output (GPIO) interface of controller 50. Controller 50 can output different levels through the GPIO interface to control MOS31 to turn on or off. Taking MOS31 as an NMOS transistor as an example, the gate of MOS31 is connected to the GPIO interface. When the GPIO interface outputs a high level, MOS31 is turned on; when the GPIO interface outputs a low level, MOS31 is turned off.
[0078] See also Figure 6 and Figure 7 .in, Figure 6 Schematic diagram of the equivalent circuit provided in the embodiments of this application Figure 1 ; Figure 7 Schematic diagram of the equivalent circuit provided in the embodiments of this application Figure 2 .
[0079] During charging, MOS21 remains closed and MOS31 remains open. The equivalent circuit diagram at this time is as follows: Figure 6 As shown, the voltage VBUS1 at the first terminal of MOS21 is equal to the voltage VBUS2 at the second terminal of MOS21, which is equal to V. This is equivalent to a voltage source existing between the power supply line and ground, providing a voltage of V.
[0080] The PMU10 can detect whether an electronic device is charging, specifically whether its Type-C port is connected to a cable and charging. When the PMU detects that the Type-C port is disconnected from the cable, or that the Type-C port is disconnected from the power adapter connected via cable, the equivalent circuit diagram is as follows: Figure 7 As shown. At this time, PMU10 controls MOS21 to disconnect, causing VBUS2 to start decreasing.
[0081] The ADC40 acquires the voltage detection value on the power line and sends the detection result to the controller 50. The controller 50 can be a processor of an electronic device, such as a central processing unit (CPU). The voltage detection function of the ADC40 can be enabled by the controller 50 or the PMU10, which is not specifically limited in this embodiment.
[0082] The controller 50 may further include a hardware chip. This hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. In one possible implementation, the controller may be integrated into a system-on-a-chip (SoC) of an electronic device.
[0083] Based on the detection results of ADC40, controller 50 determines whether the voltage at the second terminal of the first switch is monotonically decreasing, as explained below.
[0084] In one possible implementation, the ADC40 is used to acquire a preset number of voltage detection values and send each acquired voltage detection value to the controller 50. The time interval between the ADC40 acquiring two adjacent voltage detection values is the same, which can also be referred to as the sampling period of the ADC40.
[0085] This application does not specifically limit the time interval (i.e., the sampling period of the ADC). In practical applications, in order to improve the responsiveness of the discharge circuit control and enable the controller 50 to output a level signal to the MOS31 as soon as possible, the time interval can be set to a shorter duration. The suggested value of the time interval given in this application is 1ms. It should be understood that this value does not constitute a limitation on the technical solution of this application.
[0086] The embodiments of this application do not specifically limit the preset quantity. In practical applications, in order to improve the responsiveness of the discharge circuit control and enable the controller 50 to output a level signal to the MOS31 as soon as possible, the preset quantity can be set to a small quantity, such as 3 or 4.
[0087] When controller 50 receives multiple voltage detection values, it determines whether these values are monotonically decreasing. Taking three voltage detection values as an example, if the three values are 3V, 2.5V, and 0.3V, the multiple voltage detection values are determined to be monotonically decreasing. If the values are 3V, 1.8V, and 2.4V, the multiple voltage detection values are determined to be non-monotonically decreasing. A monotonically decreasing multiple voltage detection values indicate that the power line is in a normal power-off state; conversely, a non-monotonic multiple voltage detection values indicate that the power line is in an abnormal power-off state. Causes of abnormal power-off states include, but are not limited to, surges and electrostatic discharge (ESD).
[0088] In another possible implementation, after the voltage detection function of ADC40 is enabled, it continuously acquires voltage detection values at time intervals and sends the voltage detection values to controller50. Controller50 determines whether the voltage at the second terminal of the first switch is monotonically decreasing based on the received first preset number of voltage detection values.
[0089] When the controller 50 determines that the power line is abnormally powered down, it keeps the MOS 31 in a non-conducting state.
[0090] When controller 50 determines that the power line is normally powered down, it enables the GPIO port and outputs a high level to MOS31 through the GPIO port to control MOS31 to conduct. Once MOS31 is turned on, as... Figure 7 As shown, the power line and ground are directly connected at this time, which can quickly discharge the charge of C0 to ground.
[0091] Taking a mobile phone as an example, after the controller 50 turns on MOS31, it takes approximately 1.5ms for the charge stored in capacitor C0 to be completely discharged to ground. In other words, approximately 1.5ms after MOS31 turns on, the residual voltage on the power line can be reduced to meet the requirements of the relevant certification test. Considering the cumulative effects of MOS31's turn-on time (approximately 1.5ms), the time to acquire multiple voltage detection values (approximately 3ms), and the processing delay of the electronic device (usually short, on the order of milliseconds), compared to the time taken by the capacitor to discharge charge relying on its impedance to ground in existing solutions, the discharge time of this application's solution is significantly shortened, less than the 300ms required for certification testing.
[0092] Furthermore, the controller 50 is also used to control MOS31 to open after a preset time of closure, that is, to disconnect the discharge circuit after a preset time of conduction. This is because the solution of this application takes into account the following application scenarios: after a user unplugs the cable from the Type-C interface of the electronic device and then plugs the cable back into the Type-C interface to resume charging the electronic device, the user may have changed the cable; or, after a user disconnects the power adapter from the power supply and then reconnects the power adapter to the power supply to resume charging the electronic device, the user may have changed the power supply connected to the power adapter. In the above scenarios, if the controller 50 of the electronic device keeps MOS31 open, the power line of the first terminal of the first switch will remain connected to ground, causing the power line voltage to be constantly pulled low, preventing normal charging. Therefore, the controller 50 will control MOS31 to open after a preset time of conduction of the discharge circuit, that is, after a preset time of closure of MOS31.
[0093] This application does not specify a particular preset duration. In practical applications, the preset duration needs to be greater than the time it takes for capacitor C0 to discharge its charge to ground. Taking a mobile phone as an example, the time it takes for capacitor C0 to discharge its charge to ground is 1.5ms. The suggested value for the preset duration given in this application is 2ms-3ms. This satisfies the time required for capacitor C0 to discharge its charge to ground, while also being relatively short. Users generally cannot complete the re-insertion of the cable within the preset duration, thus avoiding charging abnormalities after the cable is re-inserted and ensuring a good user experience.
[0094] It is understood that the discharge circuit in the above embodiments is only illustrated by example, including a single switch. Furthermore, the discharge circuit can be implemented in other ways. For example, the discharge circuit may also include a diode, with its anode connected to the first terminal of the first switch and its cathode connected to the drain of the MOS31; or, the anode of the diode connected to the source of the MOS transistor and its cathode grounded. By adding this diode, reverse current can be blocked, improving discharge efficiency. This reverse current may be caused by surges, electrostatic discharge, or interference signals from ground.
[0095] In summary, the solution provided in this application, by adding a discharge circuit to the protection circuit, allows the capacitor to discharge charge to ground through the discharge circuit, achieving faster charge discharge and a rapid drop in power line voltage when charging stops. Furthermore, it can promptly disconnect the discharge circuit after charge discharge is complete to prevent charging abnormalities caused by the discharge circuit remaining active after the cable is reinserted, thus ensuring a better user experience.
[0096] Based on the protection circuit provided in the above embodiments, this application also provides a control method for the protection circuit, which will be described in detail below with reference to the accompanying drawings.
[0097] See Figure 8 The figure is a flowchart of a control method for a protection circuit provided in an embodiment of this application.
[0098] This method can be applied to the protection circuit provided in the above embodiments, and includes the following steps:
[0099] S11: When the power supply for charging electronic devices is turned off, the PMU controls the first switch to open.
[0100] In this embodiment, the PMU can control the first switch to be turned on or off.
[0101] The first switch can serve as a port protection function. When a surge occurs, the PMU quickly disconnects the first switch by triggering overvoltage protection to protect the downstream chips.
[0102] When the first switch is open, the power line is divided into two parts by the first switch. The voltage of one part is represented by VBUS1, and the voltage of the other part is represented by VBUS2. The analog-to-digital converter is used to obtain the voltage detection value on the power line, specifically to obtain the voltage detection value of VBUS2.
[0103] S12: The controller acquires the voltage detection value of the analog-to-digital converter.
[0104] The voltage detection value is used to characterize the voltage change of the power line connected to the second terminal of the first switch.
[0105] When the electronic device is in the process of normal charging, the first switch is closed. At this time, the voltage detection value is a relatively stable value, indicating that the voltage on VBUS2 is stable.
[0106] When the power adapter of the electronic device is disconnected from the power supply, or when the Type-C interface of the electronic device is disconnected from the cable, the PMU controls the first switch to open, and the voltage on VBUS2 begins to gradually decrease. At this time, it is necessary to quickly discharge the charge stored on C0. Therefore, the solution of this application uses the detection of a monotonically decreasing voltage VBUS2 at the second terminal of the first switch as the basis for determining when the power is turned off.
[0107] S13: When the voltage detection value indicates that the voltage at the second terminal of the first switch is monotonically decreasing, the controller controls the discharge circuit to turn on.
[0108] When VBUS2 decreases monotonically, it indicates that the voltage at the second terminal of the first switch is no longer stable, meaning that the circuit is currently in the normal power-down process. At this time, the controller activates the discharge circuit to allow the capacitor to discharge its charge to ground through the discharge circuit.
[0109] Using the method provided in this application embodiment, after the first switch is turned off, when the voltage at the second terminal of the first switch is detected to decrease monotonically, the discharge circuit is controlled to turn on, thereby allowing the capacitor to discharge the charge to ground through the discharge circuit. This enables faster discharge of the charge, allowing the voltage on the power line to drop more quickly, in order to meet the requirements of relevant test certification.
[0110] The following section will explain the specific implementation method.
[0111] See Figure 9 The figure is a flowchart of another control method for a protection circuit provided in an embodiment of this application.
[0112] This method can be applied to Figure 5 The protection circuit shown above explains its implementation method and working principle, which will not be repeated here.
[0113] The method includes the following steps:
[0114] S21: The PMU detects that the power supply for charging the electronic device has been powered down.
[0115] The PMU can detect voltage changes on the power line to determine whether the Type-C interface is connected to the cable. For example, before the electronic device is connected to the cable, the voltage on the power line is the first voltage. After the electronic device is connected to the cable, the pull-up resistor of the cable is connected to the circuit, causing the voltage on the power line to jump to the second voltage. Therefore, the PMU can determine whether the power supply for charging the electronic device is off by detecting the voltage value on the power line.
[0116] S22: The PMU controls the first switch to open.
[0117] After the PMU detects that the power supply for charging the electronic device has been de-energized, it controls the first switch to open. At this time, the first switch separates the power line into two parts, such as... Figure 5 As shown, one part of the voltage is represented by VBUS1, and the other part is represented by VBUS2.
[0118] S23: The analog-to-digital converter acquires a preset number of voltage detection values and sends the detection results to the controller.
[0119] The analog-to-digital converter is used to obtain the voltage detection value on the power line, specifically to obtain the voltage detection value of VBUS2.
[0120] S24: The controller determines whether a preset number of voltage detection values decrease sequentially.
[0121] If yes, it indicates that the power cord is normally powered off, and S25 is executed; otherwise, it indicates that the power cord is not normally powered off, and S26 is executed.
[0122] The voltage detection value is used to characterize the voltage change of the power line connected to the second terminal of the first switch. When the first switch is opened, the voltage on VBUS2 begins to gradually decrease. At this time, it is necessary to quickly discharge the charge stored on C0. Therefore, the solution of this application uses the detection of a monotonically decreasing voltage VBUS2 at the second terminal of the first switch as the basis for determining that the power supply is turned off.
[0123] S25: The controller controls the discharge circuit to turn on.
[0124] by Figure 5 For example, when the discharge circuit includes MOS31, taking MOS31 as an NMOS transistor, the controller enables the GPIO port and outputs a high level to the gate of MOS31 through the GPIO port to control MOS31 to conduct. At this time, the power line and ground are directly connected, which can quickly discharge the charge of C0 to ground.
[0125] S26: The controller controls the discharge circuit to be turned on for a first preset time and then disconnects.
[0126] This application embodiment does not specifically limit the first preset duration. The first preset duration is greater than the time required for capacitor C0 to discharge its charge to ground, and is set to a relatively short duration, such as 2ms-3ms. This satisfies the time required for capacitor C0 to discharge its charge to ground, while also being relatively short, making it difficult for users to re-insert the cable within the preset duration. This avoids charging abnormalities after cable re-insertion, ensuring a better user experience.
[0127] S27: The controller controls the discharge circuit to remain in the open state.
[0128] At this time, the power line is in an abnormal power-off state. The causes of this abnormal power-off state include, but are not limited to, surges and electrostatic discharge. These causes may cause the voltage on the power line to rise or fluctuate within a certain period of time, failing to meet the monotonically decreasing condition. Therefore, the discharge circuit remains open.
[0129] In summary, the method provided in this application, by controlling the conduction of the discharge circuit when the power supply is turned off, allows the capacitor to discharge charge to ground through the discharge circuit, achieving faster charge discharge and a rapid drop in power line voltage when charging stops. Furthermore, it can promptly disconnect the discharge circuit after charge discharge is complete to prevent charging abnormalities caused by the discharge circuit reactivating upon cable re-insertion, thus ensuring a better user experience.
[0130] See Figure 10 The figure is a flowchart of another protection circuit control method provided in the embodiment of this application.
[0131] Figure 11 The method shown includes the following steps:
[0132] S31: The PMU detects whether the power supply for charging electronic devices is off.
[0133] S32: When the PMU detects a power failure, it controls the first switch to remain on.
[0134] S33: When the PMU detects that the voltage of the power line is less than the first voltage threshold, it controls the first switch to open.
[0135] See Figure 11 This figure is a schematic diagram of the equivalent circuit provided in an embodiment of this application. Figure 3 .
[0136] The method provided in this application embodiment can utilize the internal circuit structure of the PMU to discharge the charge on capacitor C0. The internal circuit structure of the PMU can be equivalent to a load, which is grounded through the PMU's ground pin. In this implementation, when the PMU detects that the power supply for charging the electronic device has been turned off, it keeps the first switch on. At this time, the charge on C0 is discharged to ground through the first switch 20 and the load.
[0137] This application does not specifically limit the first voltage threshold. In practical applications, the first voltage threshold can be set to a small voltage value, such as 0V, 0.1V, etc. In this case, when the voltage of the power line is less than the first voltage threshold, it indicates that the charge on capacitor C0 has been basically discharged. Alternatively, the first voltage threshold can be set to the voltage value required by the relevant certification test, such as 0.7V.
[0138] The solution provided in this application embodiment, compared to the existing solution where the capacitor relies on its impedance to ground to complete charge discharge, has a significantly shorter charge discharge time. This is because the resistance of the equivalent load Load in the PMU's internal circuit structure is relatively small, typically around a few ohms, which is significantly smaller than the impedance to ground of the power line (an impedance in the hundreds of kilohms). According to the calculation formula (1) above, this can be determined that the charge discharge time is significantly shortened, which fully meets the relevant certification test requirement of "reducing the power line voltage to 0.7V within 300ms". Furthermore, the protection circuit of this implementation only includes the first switch and capacitor C0, without the need to add additional circuit components, thus reducing hardware costs.
[0139] Based on the protection circuits provided in the above embodiments, this application also provides an electronic device, which will be described in detail below with reference to the accompanying drawings.
[0140] See Figure 12 This figure is a schematic diagram of an electronic device provided in an embodiment of this application.
[0141] The electronic device provided in this application is equipped with a USB Type-C interface. The electronic device can be a mobile phone, a laptop, a wearable electronic device, a tablet computer, an augmented reality (AR) device, a virtual reality (VR) device, etc. The following description uses a mobile phone as an example.
[0142] Electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Type-C interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include different types of sensors such as pressure sensors, gyroscope sensors, accelerometer sensors, and fingerprint sensors.
[0143] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0144] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). Different processing units may be independent devices or integrated into one or more processors. The controller can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. For example, the controller can perform the function of controller 50 in the above embodiments; that is, controller 50 can control the discharge circuit to conduct when the voltage detection value of the analog-to-digital converter indicates that the voltage at the second terminal of the first switch is monotonically decreasing, so that the capacitor discharges charge to ground through the discharge circuit.
[0145] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0146] The wireless communication function of electronic device 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc., which will not be described in detail here.
[0147] The Type-C interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used for data transfer between the electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices. The power supply pins of the Type-C interface 130 are connected to the power supply line of the protection circuit 1401.
[0148] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from a wired charger via a Type-C interface 130. The wired charger includes a cable and a power adapter; the Type-C interface 130 connects to the power adapter via the cable, and the power adapter is plugged into a power source. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141. The charging management module 140 may include a PMU 10 and a protection circuit 1401. For details on the specific implementation and working principle of the PMU 10 and the protection circuit 1401, please refer to the relevant descriptions in the above embodiments; these will not be repeated in this application.
[0149] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0150] In summary, the electronic device provided in this application embodiment adds a discharge circuit to the protection circuit. The discharge circuit conducts when the voltage detection value indicates that the voltage at the second terminal of the first switch is monotonically decreasing, thereby allowing the capacitor to discharge the charge to ground through the discharge circuit. This enables faster charge discharge, allowing the voltage on the power line to drop more quickly to meet the relevant test and certification requirements.
[0151] This application also provides a computer-readable storage medium including instructions that instruct an electronic device to perform the control method of the protection circuit described above.
[0152] This application also provides a computer program product containing instructions. The computer program product may be software or program products containing instructions, capable of running on an electronic device or stored on any usable medium. When the computer program product runs on at least one electronic device, it causes the at least one electronic device to perform the control method for the protection circuit described above. This application also provides a computer program product containing instructions. When the computer program product runs on at least one electronic device, it causes the at least one electronic device to perform the control method for the protection circuit described above.
[0153] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items.
[0154] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A protection circuit, characterized in that, Applied to electronic devices, the electronic devices include a Type-C interface, and the protection circuit includes: a power line, a discharge circuit, a first switch, a capacitor, and an analog-to-digital converter; The power cable is connected to the power supply pin of the Type-C interface; The first switch is disposed on the power line. The first end of the first switch is connected to the first end of the capacitor and the first end of the discharge circuit. The second end of the first switch is connected to the power management unit (PMU) and the analog-to-digital converter. The PMU is used to control the first switch to open when the power supply for charging the electronic device is turned off. The second terminal of the capacitor and the second terminal of the discharge circuit are grounded; The analog-to-digital converter is used to obtain the voltage detection value on the power line; The discharge circuit is configured to turn on when the voltage detection value indicates that the voltage at the second terminal of the first switch is monotonically decreasing, so that the capacitor discharges charge to ground through the discharge circuit.
2. The protection circuit according to claim 1, characterized in that, The analog-to-digital converter is used to acquire a preset number of voltage detection values, and the time interval between acquiring two adjacent voltage detection values is the same. The preset number of voltage detection values are used to indicate whether the voltage at the second terminal of the first switch is monotonically decreasing.
3. The protection circuit according to claim 1, characterized in that, The discharge circuit is also used to disconnect after a first preset conduction time.
4. The protection circuit according to claim 1, characterized in that, The discharge circuit includes: a second switch; The first terminal of the second switch is the first terminal of the discharge circuit, and the second terminal of the second switch is the second terminal of the discharge circuit.
5. The protection circuit according to claim 4, characterized in that, The control terminal of the second switch is connected to the first general-purpose input / output (GPIO) interface.
6. A control method for a protection circuit, characterized in that, The method is applied to an electronic device, which includes a Type-C interface, a power management unit (PMU), a controller, and a protection circuit. The protection circuit includes a power line, a discharge circuit, a first switch, a capacitor, and an analog-to-digital converter (ADC). The power line is connected to the power supply pin of the Type-C interface. The first switch is disposed on the power line, with its first terminal connected to the first terminal of the capacitor and the first terminal of the discharge circuit, and its second terminal connected to the PMU and the ADC. The second terminal of the capacitor and the second terminal of the discharge circuit are grounded. The ADC is used to acquire a voltage detection value on the power line. When the power supply for charging the electronic device is powered off, the PMU controls the first switch to open; After the first switch is turned off, the controller acquires the voltage detection value of the analog-to-digital converter. When the voltage detection value indicates that the voltage at the second terminal of the first switch is monotonically decreasing, the controller controls the discharge circuit to be turned on so that the capacitor discharges the charge to ground through the discharge circuit.
7. The method according to claim 6, characterized in that, The controller acquires the voltage detection value of the analog-to-digital converter. When the voltage detection value indicates that the voltage at the second terminal of the first switch is monotonically decreasing, it controls the discharge circuit to conduct, including: The analog-to-digital converter is used to obtain a preset number of voltage detection values, and the time interval between obtaining two adjacent voltage detection values is the same. The controller controls the discharge circuit to turn on when the preset number of voltage detection values decrease sequentially.
8. The method according to claim 6, characterized in that, The method further includes: The controller controls the discharge circuit to be turned on for a first preset time and then turned off.
9. The method according to claim 6, characterized in that, The bleeder circuit includes: a second switch; a first terminal of the second switch is the first terminal of the bleeder circuit, and a second terminal of the second switch is the second terminal of the bleeder circuit; the control terminal of the second switch is connected to the first general-purpose input / output (GPIO) interface; controlling the bleeder circuit to conduct includes: The controller outputs a level signal to the first GPIO interface to control the second switch to turn on.
10. A control method for a protection circuit, characterized in that, The method is applied to an electronic device, which includes a Type-C interface, a power management unit (PMU), and a protection circuit. The protection circuit includes a power line, a discharge circuit, a first switch, a capacitor, and an analog-to-digital converter (ADC). The power line is connected to the power supply pin of the Type-C interface. The first switch is disposed on the power line, with its first terminal grounded through the capacitor and its second terminal connected to the PMU. The PMU detects whether the power supply for charging the electronic device is off; When the power supply is turned off, the PMU controls the first switch to remain on so that the capacitor discharges its charge to ground through the PMU; When the voltage of the power line is less than a first voltage threshold, the PMU controls the first switch to open.
11. An electronic device, characterized in that, The electronic device includes the protection circuit according to any one of claims 1-6, and further includes a controller and a power management unit (PMU); The PMU is used to control the first switch to open when the power supply for charging the electronic device is turned off; The controller is configured to acquire the voltage detection value of the analog-to-digital converter after the first switch is turned off, and when the voltage detection value indicates that the voltage at the second terminal of the first switch is monotonically decreasing, control the discharge circuit to be turned on so that the capacitor discharges the charge to ground through the discharge circuit.