Leakage current detection circuit, leakage current detection method and electronic equipment
By adding a leakage current detection circuit in the electronic device, and using the amplification module and the detection module to accurately read the leakage current in the shutdown state, the problem of inability to continuously track leakage current in the prior art is solved, and accurate detection and abnormal monitoring of electronic devices are achieved.
Patent Information
- Application Number
- CN202410122578.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-29
- Publication Date
- 2025-08-05
AI Technical Summary
The prior art cannot continuously track the leakage current of electronic devices in the shutdown state, resulting in the inability to detect whether the shutdown leakage current of electronic devices meets factory requirements.
A leakage current detection circuit is added to the electronic equipment, including N amplification modules and leakage current detection modules. By amplifying the voltage of the sampling resistor, the leakage current value is accurately read, and the electromagnetic compatibility is improved by using the operational amplifier and the isolation module, and the filter module performs signal processing.
It realizes continuous tracking and detection of leakage current in the shutdown state after the electronic equipment leaves the factory, improves detection accuracy and stability, and can detect leakage current abnormalities in a timely manner.
Smart Images

Figure CN120428137A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic technology, and in particular to a leakage current detection circuit, a leakage current detection method, and an electronic device. Background Art
[0002] The leakage current of electronic devices when powered off is an important criterion for testing whether they meet the quality standards. Before electronic devices leave the factory, they can be tested to determine whether the leakage current meets factory requirements.
[0003] However, after an electronic device leaves the factory, it is impossible to continuously track the leakage current of the electronic device when it is turned off. Summary of the Invention
[0004] An embodiment of the present application provides a leakage current detection circuit, a leakage current detection method, and an electronic device. After the electronic device leaves the factory, the leakage current of the electronic device in the shutdown state is detected by the leakage current detection circuit to continuously track the leakage current of the electronic device in the shutdown state.
[0005] In a first aspect, an embodiment of the present application proposes a leakage current detection circuit, which is applied to an electronic device. The electronic device includes a battery and a sampling resistor, and the two ends of the sampling resistor are respectively connected to the negative electrode and the ground end of the battery; the leakage current detection circuit includes N amplifier modules and a leakage current detection module, where N is an integer greater than 1. The N amplifier modules are connected in sequence, the input end of the first amplifier module among the N amplifier modules is respectively connected to the two ends of the sampling resistor, and the output end of the Nth amplifier module among the N amplifier modules is connected to the leakage current detection module. The N amplifier modules are used to amplify the first voltage of the sampling resistor to obtain a second voltage when the electronic device is in the off state; the first voltage is the voltage generated on the sampling resistor by the leakage current of the electronic device in the off state; the leakage current detection module is used to read the voltage value of the second voltage and determine the first current value based on the voltage value of the second voltage; the first current value is the current value of the leakage current of the electronic device in the off state.
[0006] In this way, the first voltage of the sampling resistor is amplified by N amplification modules, so that the leakage current detection module can accurately read the voltage value of the amplified second voltage to accurately sample the current value of the leakage current of the electronic device in the shutdown state, thereby achieving that after the electronic device leaves the factory, the leakage current of the electronic device in the shutdown state can be detected by the leakage current detection circuit to continuously track the leakage current situation of the electronic device in the shutdown state.
[0007] In one possible implementation, each of the N amplification modules includes an operational amplifier; the positive power supply terminal of each operational amplifier is connected to the positive terminal of a battery, and the negative power supply terminal of each operational amplifier is connected to a ground terminal. In this way, the operational amplifier included in each amplification module is powered by the battery, so that the operational amplifier included in each amplification module can operate normally.
[0008] In one possible implementation, each amplification module further includes an input resistor and a feedback resistor; a first end of the input resistor is connected to the inverting input of the operational amplifier, and a second end of the input resistor is connected to ground; a first end of the feedback resistor is connected to the output of the operational amplifier, and a second end of the feedback resistor is connected to the inverting input of the operational amplifier; the non-inverting input of the operational amplifier included in the first amplification module is connected to the negative terminal of the battery; the non-inverting input of the operational amplifier included in the i-th amplification module among the N amplification modules is connected to the output of the operational amplifier included in the i-1-th amplification module among the N amplification modules, where i is an integer greater than 1 and less than or equal to N; and the output of the operational amplifier included in the N-th amplification module is connected to the leakage current detection module. In this way, the operational amplifier, input resistor, and feedback resistor form a non-inverting proportional amplification circuit to amplify the input voltage, making the circuit structure of each amplification module relatively simple.
[0009] In one possible implementation, the ratio of the feedback resistor to the input resistor in each amplifier module is equal; furthermore, the feedback resistor in each amplifier module is greater than the input resistor. Thus, by properly setting the feedback resistor and input resistor in each amplifier module, each amplifier module can amplify the input voltage.
[0010] In one possible implementation, the leakage current detection circuit further includes N+1 isolation modules; the first isolation module among the N+1 isolation modules is connected to the negative electrode of the battery and the input of the first amplification module, respectively; the jth isolation module among the N+1 isolation modules is connected to the output of the j-1th amplification module among the N amplification modules and the input of the jth amplification module among the N amplification modules, respectively; j is an integer greater than 1 and less than or equal to N; the N+1th isolation module among the N+1 isolation modules is connected to the output of the Nth amplification module and the leakage current detection module, respectively; wherein each of the N+1 isolation modules is configured to isolate interference signals. Thus, by providing the isolation modules in the leakage current detection circuit, electromagnetic compatibility issues can be improved, electromagnetic and electrostatic interference can be prevented, and signal transmission stability can be enhanced.
[0011] In one possible implementation, each isolation module includes an isolation resistor; the first end of the isolation resistor included in the first isolation module is connected to the negative terminal of the battery, and the second end of the isolation resistor included in the first isolation module is connected to the input end of the first amplification module; the first end of the isolation resistor included in the jth isolation module is connected to the output end of the j-1th amplification module, and the second end of the isolation resistor included in the jth isolation module is connected to the input end of the jth amplification module; the first end of the isolation resistor included in the (N+1)th isolation module is connected to the output end of the (N)th amplification module, and the second end of the isolation resistor included in the (N+1)th isolation module is connected to the leakage current detection module. In this way, the isolation modules are constructed using isolation resistors, making the circuit structure of the isolation modules relatively simple.
[0012] In one possible implementation, the leakage current detection circuit further includes N filtering modules; the kth filtering module among the N filtering modules is respectively connected to the input terminal of the k+1th amplifying module among the N amplifying modules and the ground terminal; k is an integer greater than or equal to 1 and less than N; the Nth filtering module among the N filtering modules is respectively connected to the leakage current detection module and the ground terminal; wherein each of the N filtering modules is configured to filter the amplified voltage. Thus, by providing a filtering module in the leakage current detection circuit, the amplified voltage can be filtered.
[0013] In one possible implementation, each filter module includes a filter capacitor; the first end of the filter capacitor included in the kth filter module is connected to the input end of the k+1th amplification module, and the second end of the filter capacitor included in the kth filter module is connected to the ground terminal; the first end of the filter capacitor included in the Nth filter module is connected to the leakage current detection module, and the second end of the filter capacitor included in the Nth filter module is connected to the ground terminal. In this way, the filter modules are formed using filter capacitors, making the circuit structure of the filter modules relatively simple.
[0014] In one possible implementation, the leakage current detection module is specifically configured to determine a second current value based on a voltage value of a second voltage, and to determine a first current value based on the second current value and a compensation current value; wherein the compensation current value is the difference between the first test current value and the second test current value; the first test current value is calculated based on the voltage value of the test voltage, the voltage amplification factors of the N amplifying modules, and the resistance value of the sampling resistor, wherein the test voltage is the voltage obtained by amplifying the voltage of the sampling resistor by the N amplifying modules when the electronic device is in a shutdown state; and the second test current value is the current value of the leakage current of the electronic device in the shutdown state, obtained by testing using the testing equipment. Thus, since the second current value includes the current value of the leakage current of the electronic device in the shutdown state and the current value of the current consumed to power the operational amplifiers in the N amplifying modules, when determining the first current value based on the second current value and the compensation current value, the current value of the current consumed to power the operational amplifiers in the N amplifying modules can be removed from the second current value, thereby accurately calculating the current value of the leakage current of the electronic device in the shutdown state.
[0015] In one possible implementation, the leakage current detection module is specifically configured to determine the difference between the second current value and the compensation current value as the first current value. Thus, by taking the difference between the second current value and the compensation current value, the leakage current value of the electronic device in the off state can be accurately calculated.
[0016] In one possible implementation, the leakage current detection module is specifically configured to calculate the second current value by dividing the ratio of the second voltage value to the voltage amplification factors of the N amplifying modules by the resistance value of the sampling resistor. Thus, the second current value can be accurately calculated by dividing the ratio of the second voltage value to the voltage amplification factors of the N amplifying modules by the resistance value of the sampling resistor.
[0017] In one possible implementation, the leakage current detection module is further configured to determine that the leakage current of the electronic device in the off state is abnormal when the first current value is greater than a current threshold; and to determine that the leakage current of the electronic device in the off state is normal when the first current value is less than or equal to the current threshold. Thus, by comparing the detected leakage current value of the electronic device in the off state with the current threshold, it is determined whether the leakage current of the electronic device in the off state is normal.
[0018] In one possible implementation, the leakage current detection module includes an analog-to-digital converter (ADC), a memory, and a processor; the ADC is configured to read the voltage value of the second voltage and store the second voltage value in the memory; the memory is configured to upload the second voltage value to the processor after the electronic device is powered on; and the processor is configured to determine the first current value based on the second voltage value. Thus, after the electronic device is powered off, the voltage value of the second voltage obtained by amplifying the first voltage of the sampling resistor by the N amplification modules is read and stored. After the electronic device is powered on, the current value of the leakage current of the electronic device in the powered-off state is determined based on the second voltage value, thereby enabling the electronic device to detect the leakage current in the powered-off state.
[0019] In one possible implementation, the memory is a register, and both the analog-to-digital converter and the register are located in the power management unit; alternatively, the memory is a non-volatile memory, and the analog-to-digital converter is not integrated into the power management unit. In this way, the analog-to-digital converter already in the power management unit can be used to read the voltage value of the second voltage, eliminating the need for a separate analog-to-digital converter on the mainboard, thereby reducing the area occupied by the leakage current detection circuit on the mainboard. Alternatively, an analog-to-digital converter can be added to the electronic device to read the voltage value of the second voltage.
[0020] In one possible implementation, the N amplification modules include a first amplification module and a second amplification module; the input end of the first amplification module is respectively connected to the two ends of the sampling resistor, the output end of the first amplification module is connected to the input end of the second amplification module, and the output end of the second amplification module is connected to the leakage current detection module; the first amplification module is configured to amplify the first voltage of the sampling resistor to obtain a third voltage when the electronic device is in a shutdown state; and the second amplification module is configured to amplify the third voltage to obtain a second voltage. In this way, the first amplification module and the second amplification module can jointly amplify the first voltage of the sampling resistor to obtain the second voltage. Furthermore, the first amplification module and the second amplification module constitute the N amplification modules, reducing the number of electronic components required to manufacture the N amplification modules, thereby reducing the manufacturing cost of the leakage current detection circuit.
[0021] In a second aspect, an embodiment of the present application provides an electronic device, comprising a battery, a sampling resistor, and the above-mentioned leakage current detection circuit; wherein the two ends of the sampling resistor are respectively connected to the negative electrode of the battery and the ground terminal.
[0022] In a third aspect, an embodiment of the present application proposes a leakage current detection method, which is applied to the above-mentioned leakage current detection circuit. The method includes: when the electronic device is in a shutdown state, N amplification modules amplify the first voltage of the sampling resistor to obtain a second voltage; the first voltage is the voltage generated on the sampling resistor by the leakage current of the electronic device in the shutdown state; the leakage current detection module reads the voltage value of the second voltage; the leakage current detection module determines the first current value based on the voltage value of the second voltage; the first current value is the current value of the leakage current of the electronic device in the shutdown state.
[0023] In one possible implementation, each of the N amplification modules includes an operational amplifier; the positive power supply terminal of each operational amplifier is connected to the positive terminal of the battery, and the negative power supply terminal of each operational amplifier is connected to the ground terminal. The leakage current detection module determines the first current value based on the voltage value of the second voltage, including: the leakage current detection module determines the second current value based on the voltage value of the second voltage; the leakage current detection module determines the first current value based on the second current value and a compensation current value; wherein the compensation current value is the difference between the first test current value and the second test current value; the first test current value is calculated based on the voltage value of the test voltage, the voltage amplification factors of the N amplification modules, and the resistance value of the sampling resistor, the test voltage being the voltage obtained by amplifying the voltage of the sampling resistor by the N amplification modules when the electronic device is in the off state; and the second test current value is the leakage current value of the electronic device in the off state, obtained by testing using the test equipment.
[0024] In a possible implementation, the leakage current detection module determines the first current value according to the second current value and the compensation current value, including: the leakage current detection module determines the difference between the second current value and the compensation current value as the first current value.
[0025] In one possible implementation, the leakage current detection module determines the second current value based on the voltage value of the second voltage, including: the leakage current detection module divides the ratio of the voltage value of the second voltage to the voltage amplification factors of the N amplification modules by the resistance value of the sampling resistor to obtain the second current value.
[0026] In one possible implementation, after the leakage current detection module determines the first current value based on the voltage value of the second voltage, it also includes: when the first current value is greater than the current threshold, the leakage current detection module determines that the leakage current of the electronic device in the shutdown state is abnormal; when the first current value is less than or equal to the current threshold, the leakage current detection module determines that the leakage current of the electronic device in the shutdown state is normal.
[0027] In one possible implementation, the leakage current detection module includes an analog-to-digital converter, a memory, and a processor. The leakage current detection module reads the voltage value of the second voltage, including: the analog-to-digital converter reads the voltage value of the second voltage and saves the voltage value of the second voltage to the memory; after the electronic device is powered on, the memory uploads the voltage value of the second voltage to the processor. Accordingly, the leakage current detection module determines the first current value based on the voltage value of the second voltage, including: the processor determines the first current value based on the voltage value of the second voltage.
[0028] The possible implementation methods of the second and third aspects have effects similar to those of the first aspect and the possible designs of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A schematic diagram of the structure of an electronic device provided for related technology;
[0030] Figure 2 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0031] Figure 3 A schematic diagram of the structure of a leakage current detection circuit provided in an embodiment of the present application;
[0032] Figure 4 A circuit diagram of a first leakage current detection circuit provided in an embodiment of the present application;
[0033] Figure 5 A circuit diagram of a second leakage current detection circuit provided in an embodiment of the present application;
[0034] Figure 6 A circuit diagram of a third leakage current detection circuit provided in an embodiment of the present application;
[0035] Figure 7 A circuit diagram of a fourth leakage current detection circuit provided in an embodiment of the present application;
[0036] Figure 8 A circuit diagram of a fifth leakage current detection circuit provided in an embodiment of the present application;
[0037] Figure 9 A flow chart of a leakage current detection method provided in an embodiment of the present application;
[0038] Figure 10 A flowchart for obtaining a compensation current value provided in an embodiment of the present application. DETAILED DESCRIPTION
[0039] To facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. For example, the first chip and the second chip are merely used to distinguish different chips and do not limit their order. Those skilled in the art will understand that the words "first" and "second" do not limit the quantity or execution order, and the words "first" and "second" do not necessarily mean that they are different.
[0040] It should be noted that in the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0041] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0042] For example, Figure 1 As shown, in the related art, an electronic device may include a battery 10 , a sampling resistor R0 and a mainboard 20 .
[0043] The motherboard 20 is provided with a power management unit (PMU) 30 and load devices 40. The PMU 30 may also be referred to as a power management module or a power management integrated circuit (PMIC). The load devices 40 may include, but are not limited to, a processor, internal memory, a display, a camera, and a wireless communication module.
[0044] The power management unit 30 is connected to the positive electrode of the battery 10 and the load device 40 respectively. The power management unit 30 can receive input from the battery 10 and supply power to the load device 40. The load device 40 can also be connected to the ground terminal GND.
[0045] The two ends of the sampling resistor R0 are connected to the negative electrode of the battery 10 and the ground terminal GND, respectively. That is, the first end of the sampling resistor R0 is connected to the negative electrode of the battery 10, and the second end of the sampling resistor R0 is connected to the ground terminal GND. The sampling resistor R0 can be a current sampling resistor, which is used to detect leakage current of the electronic device when it is turned off. The resistance of the sampling resistor R0 can be 2 mΩ (milliohm).
[0046] The leakage current of an electronic device in the off state is relatively small, approximately 500μA (microamperes). If the resistance of the sampling resistor R0 is 2mΩ, the voltage generated on the sampling resistor R0 by the leakage current of the electronic device in the off state is approximately 1μV (microvolts).
[0047] The power management unit 30 may include an analog-to-digital converter (ADC) and a coulomb counter. The negative electrode of the battery 10 and the first end of the sampling resistor R0 may also be connected to the ADC in the power management unit 30, which may also be connected to the coulomb counter. The ADC may be used to convert the sampled analog voltage into a digital voltage, and the coulomb counter may be used to convert the digital voltage into a current value.
[0048] Because the voltage generated by the leakage current of the electronic device in the off state across the sampling resistor R0 is relatively small, if the analog-to-digital converter and coulomb counter in the power management unit 30 are used to detect the leakage current of the electronic device in the off state after the electronic device leaves the factory, the analog-to-digital converter and coulomb counter in the power management unit 30 may not be able to accurately sample the leakage current of the electronic device in the off state. Therefore, after the electronic device leaves the factory, the relevant technology cannot detect the leakage current of the electronic device in the off state, and therefore cannot continuously track the leakage current of the electronic device in the off state.
[0049] Based on this, an embodiment of the present application provides a leakage current detection circuit, a leakage current detection method, and an electronic device. By adding a leakage current detection circuit to an electronic device, the leakage current detection circuit includes N amplification modules and a leakage current detection module, where N is an integer greater than 1, and the N amplification modules are connected in sequence. The input end of the first amplification module of the N amplification modules is respectively connected to the two ends of the sampling resistor, and the output end of the Nth amplification module of the N amplification modules is connected to the leakage current detection module. When the electronic device is in a shutdown state, the N amplification modules amplify a first voltage of the sampling resistor to obtain a second voltage. The first voltage is the voltage generated on the sampling resistor by the leakage current of the electronic device in the shutdown state. The leakage current detection module reads the voltage value of the second voltage and determines a first current value based on the voltage value of the second voltage. The first current value is the current value of the leakage current of the electronic device in the shutdown state. Therefore, the N amplification modules amplify the first voltage of the sampling resistor, so that the leakage current detection module can accurately read the voltage value of the amplified second voltage to accurately sample the current value of the leakage current of the electronic device in the shutdown state. In this way, after the electronic device leaves the factory, the leakage current of the electronic device in the shutdown state can be detected by the leakage current detection circuit to continuously track the leakage current of the electronic device in the shutdown state.
[0050] The electronic devices provided in the embodiments of the present application may be mobile phones, tablet computers (pads), wearable devices (such as smart watches, smart bracelets, etc.), vehicle-mounted devices, augmented reality (AR) devices, virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), and other electronic devices. The embodiments of the present application do not limit the specific technologies and specific device forms used by the electronic devices.
[0051] The following specific embodiments are used to describe in detail the technical solution of the present application and how the technical solution of the present application solves the above technical problems. The following specific embodiments can be implemented independently or in combination with each other. For the same or similar concepts or processes, some embodiments may not be described in detail.
[0052] For example, Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiment of the present application. Figure 2As shown, the electronic device may include a battery 10, a sampling resistor R0, and a mainboard 20. A power management unit 30 and a load device 40 are provided on the mainboard 20. The power management unit 30 is connected to the positive terminal of the battery 10 and the load device 40, respectively. The power management unit 30 can receive input from the battery 10 and power the load device 40. The load device 40 can also be connected to the ground terminal GND. The two ends of the sampling resistor R0 are connected to the negative terminal of the battery 10 and the ground terminal GND, respectively. That is, the first end of the sampling resistor R0 is connected to the negative terminal of the battery 10, and the second end of the sampling resistor R0 is connected to the ground terminal GND.
[0053] In addition, the electronic device may further include a leakage current detection circuit 50, which is connected to both ends of the sampling resistor R0, that is, the leakage current detection circuit 50 is connected to the negative electrode of the battery 10, the first end of the sampling resistor R0, and the ground terminal GND. The leakage current detection circuit 50 can be used to detect leakage current of the electronic device when it is powered off. In some embodiments, the leakage current detection circuit 50 can be located on the mainboard 20.
[0054] For example, Figure 3 This is a schematic diagram of the structure of the leakage current detection circuit provided in the embodiment of the present application. Figure 3 As shown, the leakage current detection circuit 50 includes N amplifying modules and a leakage current detection module, where N is an integer greater than 1. The N amplifying modules are respectively a first amplifying module, a second amplifying module to an Nth amplifying module.
[0055] The input end of the first amplifying module among the N amplifying modules is connected to the first sampling end IN1 and the second sampling end IN2, respectively. The first sampling end IN1 is actually the first end of the sampling resistor R0, and the second sampling end IN2 is actually the second end of the sampling resistor R0. That is, the input end of the first amplifying module among the N amplifying modules is connected to the two ends of the sampling resistor R0, respectively.
[0056] The N amplifying modules are connected sequentially, i.e., the output of the preceding amplifying module among the N amplifying modules is connected to the input of the succeeding amplifying module among the N amplifying modules. For example, the output of the first amplifying module is connected to the input of the second amplifying module; the output of the (N-1)th amplifying module is connected to the input of the (N)th amplifying module. Furthermore, the output of the (N)th amplifying module among the N amplifying modules is connected to the leakage current detection module.
[0057] The N amplification modules are configured to amplify a first voltage across the sampling resistor R0 when the electronic device is in a shutdown state to obtain a second voltage, where the first voltage is the voltage generated across the sampling resistor R0 by leakage current of the electronic device when the electronic device is in a shutdown state. The leakage current detection module is configured to read the voltage value of the second voltage and determine a first current value based on the second voltage value, where the first current value is the leakage current value of the electronic device when the electronic device is in a shutdown state.
[0058] For example, the resistance of the sampling resistor R0 is 2 mΩ, and the leakage current of the electronic device in the off state is approximately 500 μA. Then, the voltage value of the first voltage generated on the sampling resistor R0 by the leakage current of the electronic device in the off state is approximately 1 μV; N amplification modules can amplify the first voltage of 1 μV, and the voltage value of the obtained second voltage can be 1 V.
[0059] Therefore, by amplifying the first voltage of the sampling resistor R0 through N amplification modules, the leakage current detection module can accurately read the voltage value of the amplified second voltage to accurately sample the current value of the leakage current of the electronic device when it is in the off state. In this way, after the electronic device leaves the factory, the leakage current of the electronic device in the off state can be detected by the leakage current detection circuit to continuously track the leakage current of the electronic device in the off state, thereby facilitating the electronic device manufacturer to collect statistics on electronic devices that have abnormal shutdown leakage current, analyze the reasons why abnormal shutdown leakage current is prone to occur, and improve the failure conditions that are prone to abnormal shutdown leakage current.
[0060] In some embodiments, N may be equal to 2, i.e., the leakage current detection circuit 50 may include two amplification modules; or N may be equal to 3, i.e., the leakage current detection circuit 50 may include three amplification modules. Of course, N may also be equal to an integer such as 4 or 5. In the embodiments of the present application, the number of amplification modules in the leakage current detection circuit 50 may be set according to actual conditions.
[0061] It should be noted that the voltage usually needs to be amplified to above 500mV (millivolts) before the leakage current detection module can detect the leakage current of the electronic device when it is turned off. However, due to the limited voltage amplification factor of each amplification module, if the leakage current detection circuit 50 includes only one amplification module, this amplification module cannot directly amplify the first voltage of 1μV to above 500mV. Therefore, the leakage current detection circuit 50 provided in the embodiment of the present application includes at least two amplification modules connected in sequence.
[0062] The following combination Figures 4 to 8 Five different leakage current detection circuits 50 are shown to illustrate in detail how to detect the leakage current of the electronic device in the shutdown state through the leakage current detection circuit 50.
[0063] The first implementation method, such as Figure 4 As shown, N can be equal to 2. The leakage current detection circuit 50 includes two amplification modules and a leakage current detection module. The two amplification modules are respectively a first amplification module 501 and a second amplification module 502. In addition, the leakage current detection circuit 50 also includes three isolation modules and two filtering modules. The three isolation modules are respectively a first isolation module 503, a second isolation module 504, and a third isolation module 505. The two filtering modules are respectively a first filtering module 506 and a second filtering module 507.
[0064] The first isolation module 503 is connected to the negative electrode of the battery 10 and the input terminal of the first amplifying module 501, respectively. The first input terminal of the first amplifying module 501 is connected to the first end of the sampling resistor R0 and the negative electrode of the battery 10 through the first isolation module 503, and the second input terminal of the first amplifying module 501 is connected to the ground terminal GND, so that the input terminal of the first amplifying module 501 is indirectly connected to the two ends of the sampling resistor R0 through the first isolation module 503.
[0065] The second isolation module 504 is connected to the output of the first amplifying module 501 and the input of the second amplifying module 502. The output of the first amplifying module 501 is connected to the input of the second amplifying module 502 through the second isolation module 504.
[0066] The third isolation module 505 is connected to the output end of the second amplifying module 502 and the leakage current detection module respectively. The output end of the second amplifying module 502 is connected to the leakage current detection module through the third isolation module 505.
[0067] The first filtering module 506 is connected to the input terminal of the second amplifying module 502 and the ground terminal GND respectively, and the second filtering module 507 is connected to the leakage current detection module and the ground terminal GND respectively.
[0068] In actual applications, the first amplifying module 501 is used to amplify the first voltage of the sampling resistor R0 when the electronic device is in the off state to obtain a third voltage; the first voltage is the voltage generated on the sampling resistor R0 by the leakage current of the electronic device when the electronic device is in the off state. The second amplifying module 502 is used to amplify the third voltage to obtain the second voltage.
[0069] For example, the first amplifying module 501 may amplify the first voltage of 1 μV to obtain a third voltage of 1 mV; and the second amplifying module 502 may amplify the third voltage of 1 mV to obtain a second voltage of 1 V.
[0070] The first isolation module 503 , the second isolation module 504 and the third isolation module 505 are all used to isolate interference signals to improve electromagnetic compatibility (EMC) issues, prevent electromagnetic and electrostatic interference, and improve signal transmission stability.
[0071] The first filtering module 506 is used to filter the third voltage obtained after amplification by the first amplifying module 501 ; the second filtering module 507 is used to filter the second voltage obtained after amplification by the second amplifying module 502 .
[0072] like Figure 4 As shown, the first amplification module 501 includes a first amplifier A1, a first resistor R1, and a second resistor R2; the second amplification module 502 includes a second amplifier A2, a third resistor R3, and a fourth resistor R4. The first isolation module 503 includes a fifth resistor R5; the second isolation module 504 includes a sixth resistor R6; and the third isolation module 505 includes a seventh resistor R7. The first filtering module 506 includes a first capacitor C1; and the second filtering module 507 includes a second capacitor C2.
[0073] The first end of the fifth resistor R5 is connected to the negative electrode of the battery 10 and the first end of the sampling resistor R0, and the second end of the fifth resistor R5 is connected to the first input terminal of the first amplifier module 501. Specifically, the second end of the fifth resistor R5 is connected to the non-inverting input terminal of the first amplifier A1. The non-inverting input terminal of the first amplifier A1 can be understood as the first input terminal of the first amplifier module 501, so that the non-inverting input terminal of the first amplifier A1 is connected to the first end of the sampling resistor R0 and the negative electrode of the battery 10 through the fifth resistor R5.
[0074] The first end of the first resistor R1 is connected to the inverting input terminal of the first amplifier A1 , and the second end of the first resistor R1 is connected to the ground terminal GND. The second end of the first resistor R1 can be understood as the second input terminal of the first amplifying module 501 .
[0075] A first end of the second resistor R2 is connected to the output end of the first amplifier A1 , and a second end of the second resistor R2 is connected to the inverting input end of the first amplifier A1 .
[0076] A first end of the sixth resistor R6 is connected to the output end of the first amplifying module 501. Specifically, the first end of the sixth resistor R6 is connected to the output end of the first amplifier A1, which can be understood as the output end of the first amplifying module 501. A second end of the sixth resistor R6 is connected to the first input end of the second amplifying module 502. Specifically, the second end of the sixth resistor R6 is connected to the non-inverting input end of the second amplifier A2, which can be understood as the first input end of the second amplifying module 502, so that the non-inverting input end of the second amplifier A2 is connected to the output end of the first amplifier A1 through the sixth resistor R6.
[0077] The first end of the third resistor R3 is connected to the inverting input terminal of the second amplifier A2 , and the second end of the third resistor R3 is connected to the ground terminal GND. The second end of the third resistor R3 can be understood as the second input terminal of the second amplifying module 502 .
[0078] A first end of the fourth resistor R4 is connected to the output end of the second amplifier A2 , and a second end of the fourth resistor R4 is connected to the inverting input end of the second amplifier A2 .
[0079] The first end of the seventh resistor R7 is connected to the output end of the second amplifying module 502. Specifically, the first end of the seventh resistor R7 is connected to the output end of the second amplifier A2. The output end of the second amplifier A2 can be understood as the output end of the second amplifying module 502. The second end of the seventh resistor R7 is connected to the leakage current detection module. In this way, the output end of the second amplifier A2 is connected to the leakage current detection module through the seventh resistor R7.
[0080] The first end of the first capacitor C1 is connected to the first input terminal of the second amplifying module 502. Specifically, the first end of the first capacitor C1 is connected to the second end of the sixth resistor R6 and the non-inverting input terminal of the second amplifier A2. The second end of the first capacitor C1 is connected to the ground terminal GND.
[0081] A first end of the second capacitor C2 is connected to the leakage current detection module and the second end of the seventh resistor R7 , and a second end of the second capacitor C2 is connected to the ground end GND.
[0082] In the embodiment of the present application, the first amplifier A1, the first resistor R1 and the second resistor R2 in the first amplifier module 501 can form an in-phase proportional amplifier circuit, and the voltage amplification ratio relationship thereof is VF1=(1+R2 / R1)×V i , VF1 is the voltage value of the third voltage obtained after the first amplifying module 501 amplifies the first voltage, V i is the voltage value of the first voltage of the sampling resistor R0, R2 is the resistance value of the second resistor R2, and R1 is the resistance value of the first resistor R1.
[0083] Correspondingly, the second amplifier A2, the third resistor R3 and the fourth resistor R4 in the second amplifying module 502 can also form an in-phase proportional amplifying circuit, and its voltage amplification ratio relationship is VF2 = (1 + R4 / R3) × VF1, where VF2 is the voltage value of the second voltage obtained after the second amplifying module 502 amplifies the third voltage, R4 is the resistance value of the fourth resistor R4, and R3 is the resistance value of the third resistor R3.
[0084] For example, when the first voltage value V i When the resistance value of the third voltage VF1 is 1 μV, the resistance value of the second resistor R2 is 1000 kΩ, and the resistance value of the first resistor R1 is 1 kΩ, the voltage value of the third voltage VF1 = 1.001 mV ≈ 1 mV, that is, the first amplification module 501 can amplify the first voltage of 1 μV by 1000 times. Correspondingly, when the resistance value of the fourth resistor R4 is 1000 kΩ and the resistance value of the third resistor R3 is 1 kΩ, the voltage value of the second voltage VF2 = 1.001 V ≈ 1 V, that is, the second amplification module 502 can amplify the third voltage of 1 mV by 1000 times.
[0085] In some embodiments, the ratio of the resistance of the second resistor R2 to the resistance of the first resistor R1 is equal to the ratio of the resistance of the fourth resistor R4 to the resistance of the third resistor R3; and the resistance of the second resistor R2 is greater than the resistance of the first resistor R1, and the resistance of the fourth resistor R4 is greater than the resistance of the third resistor R3.
[0086] For example, the resistance of the second resistor R2 is 1000KΩ, the resistance of the first resistor R1 is 1KΩ, and the ratio of the resistance of the second resistor R2 to the resistance of the first resistor R1 is 1000; the resistance of the fourth resistor R4 is 1000KΩ, the resistance of the third resistor R3 is 1KΩ, and the ratio of the resistance of the fourth resistor R4 to the resistance of the third resistor R3 is 1000.
[0087] Therefore, one can use Figure 4 The leakage current detection circuit 50 shown in FIG. 5 amplifies the first voltage of the sampling resistor R0 in sequence through a two-stage operational amplifier circuit, first amplifying the first voltage of 1 μV to obtain a third voltage of 1 mV, and then amplifying it again to obtain a second voltage of 1 V. The leakage current detection module reads the voltage value of the second voltage, and determines the current value of the leakage current of the electronic device in the shutdown state based on the voltage value of the second voltage.
[0088] In some embodiments, the first amplifier A1 may be an ultra-low offset voltage operational amplifier OPA387, and the second amplifier A2 may be an operational amplifier OPA333. The OPA387 operational amplifier has the following specific features: ultra-low offset voltage (±2 μV), zero drift (±0.003 μV / °C), low input bias current (150 pA), low noise (8.5 nV√Hz at 1 kHz), no 1 / f noise (177 nVPP (0.1 Hz to 10 Hz)), common-mode input range beyond the supply rails (±100 mV), gain bandwidth (5.7 MHz), quiescent current (570 μA per amplifier), single power supply (1.7 V to 5.5 V), dual power supply (±0.85 V to ±2.75 V), and inputs filtered to prevent electromagnetic interference (EMI) and radio frequency interference (RFI).
[0089] The resistance values of the fifth resistor R5, the sixth resistor R6 and the seventh resistor R7 can be equal, and can all be 1KΩ; the capacitance values of the first capacitor C1 and the second capacitor C2 can be equal, and can all be 100nF (nanofarad).
[0090] It should be noted that the leakage current detection circuit 50 may also include only one isolation module, such as Figure 4 The first isolation module 503 shown in FIG. Figure 4 The second isolation module 504 and the third isolation module 505 are shown.
[0091] like Figure 4 As shown, the leakage current detection module may include a power management unit 30 and a processor 60 , and the power management unit 30 includes a first analog-to-digital converter 301 and a register 302 .
[0092] The first analog-to-digital converter 301 in the power management unit 30 can be connected to the output end of the second amplification module 502 via the third isolation module 505. Specifically, the first analog-to-digital converter 301 is connected to the output end of the second amplifier A2 via the seventh resistor R7. The first analog-to-digital converter 301 in the power management unit 30 is connected to the register 302 in the power management unit 30, and the register 302 in the power management unit 30 is also connected to the processor 60.
[0093] The first analog-to-digital converter 301 is configured to read the voltage value of the second voltage obtained after amplification by the second amplification module 502 and store the voltage value of the second voltage in the register 302. The register 302 is configured to upload the voltage value of the second voltage to the processor 60 after the electronic device is powered on. The processor 60 is configured to determine a first current value based on the voltage value of the second voltage. The first current value is the leakage current value of the electronic device when the device is powered off.
[0094] The processor 60 may include one or more processing units, for example, a system on chip (SOC) processor, an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0095] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0096] Processor 60 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 60 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 60. If processor 60 needs to use the same instruction or data again, it can retrieve it from the memory. This avoids duplicate accesses, reduces processor 60 latency, and thus improves system efficiency.
[0097] In this way, the first analog-to-digital converter 301 already in the power management unit 30 is used to convert the second voltage obtained after amplification by the second amplification module 502 from an analog voltage to a digital voltage, thereby reading the voltage value of the second voltage. Therefore, there is no need to add a separate analog-to-digital converter to the mainboard 20, thereby reducing the area occupied by the leakage current detection circuit 50 on the mainboard 20.
[0098] The second implementation method is Figure 5 As shown, N may be equal to 2, and the leakage current detection circuit 50 includes two amplification modules and a leakage current detection module. The two amplification modules are respectively a first amplification module 501 and a second amplification module 502 .
[0099] The first input end of the first amplifying module 501 is connected to the first end of the sampling resistor R0 and the negative electrode of the battery 10, and the second input end of the first amplifying module 501 is connected to the ground end GND, that is, the input end of the first amplifying module 501 is directly connected to the two ends of the sampling resistor R0.
[0100] The output end of the first amplifying module 501 is directly connected to the first input end of the second amplifying module 502 , the second input end of the second amplifying module 502 is connected to the ground end GND, and the output end of the second amplifying module 502 is directly connected to the leakage current detection module.
[0101] The first amplifying module 501 includes a first amplifier A1 , a first resistor R1 , and a second resistor R2 ; the second amplifying module 502 includes a second amplifier A2 , a third resistor R3 , and a fourth resistor R4 .
[0102] The non-inverting input terminal of the first amplifier A1 is directly connected to the first terminal of the sampling resistor R0 and the negative terminal of the battery 10. The first terminal of the first resistor R1 is connected to the inverting input terminal of the first amplifier A1, and the second terminal of the first resistor R1 is connected to the ground terminal GND. The first terminal of the second resistor R2 is connected to the output terminal of the first amplifier A1, and the second terminal of the second resistor R2 is connected to the inverting input terminal of the first amplifier A1.
[0103] The non-inverting input of the second amplifier A2 is directly connected to the output of the first amplifier A1. The first end of the third resistor R3 is connected to the inverting input of the second amplifier A2, and the second end of the third resistor R3 is connected to the ground terminal GND. The first end of the fourth resistor R4 is connected to the output of the second amplifier A2, and the second end of the fourth resistor R4 is connected to the inverting input of the second amplifier A2. The output of the second amplifier A2 is directly connected to the leakage current detection module.
[0104] like Figure 5 As shown, the leakage current detection module may also include a power management unit 30 and a processor 60. The power management unit 30 includes a first analog-to-digital converter 301 and a register 302. The first analog-to-digital converter 301 in the power management unit 30 may be directly connected to the output end of the second amplification module 502, that is, the first analog-to-digital converter 301 is directly connected to the output end of the second amplifier A2.
[0105] Figure 5 The structure, connection relationship and function of the leakage current detection module shown in the figure can be referred to in detail. Figure 4 The corresponding descriptions will not be repeated here.
[0106] It is worth noting that Figure 5 The leakage current detection circuit 50 shown is Figure 4Compared with the leakage current detection circuit 50 shown in the figure, the first isolation module 503, the second isolation module 504, the third isolation module 505, the first filtering module 506 and the second filtering module 507 are removed, that is, the leakage current detection circuit 50 can only include N amplification modules, but does not include the isolation module and the filtering module.
[0107] Of course, you can also remove Figure 4 The first isolation module 503, the second isolation module 504 and the third isolation module 505 in the leakage current detection circuit 50 shown in FIG, while retaining the first filtering module 506 and the second filtering module 507; alternatively, the first isolation module 503, the second isolation module 504 and the third isolation module 505 can be removed. Figure 4 The first filtering module 506 and the second filtering module 507 in the leakage current detection circuit 50 are shown, while the first isolation module 503 , the second isolation module 504 and the third isolation module 505 are retained.
[0108] The third implementation method, such as Figure 6 As shown, N can be equal to 2. The leakage current detection circuit 50 includes two amplification modules and a leakage current detection module. The two amplification modules are respectively a first amplification module 501 and a second amplification module 502. In addition, the leakage current detection circuit 50 also includes three isolation modules and two filtering modules. The three isolation modules are respectively a first isolation module 503, a second isolation module 504, and a third isolation module 505. The two filtering modules are respectively a first filtering module 506 and a second filtering module 507.
[0109] Figure 6 The structural composition, connection relationship and function of the first amplifying module 501, the second amplifying module 502, the first isolation module 503, the second isolation module 504, the third isolation module 505, the first filtering module 506 and the second filtering module 507 shown in FIG. Figure 4 The corresponding descriptions will not be repeated here.
[0110] like Figure 6 As shown, the leakage current detection module may include a second ADC 70, a nonvolatile memory 80, and a processor 60. The second ADC 70 is not integrated into the power management unit 30, and the second ADC 70 and the nonvolatile memory 80 are located in different devices.
[0111] The second analog-to-digital converter 70 can be connected to the output of the second amplification module 502 via the third isolation module 505. Specifically, the second analog-to-digital converter 70 is connected to the output of the second amplifier A2 via the seventh resistor R7. The second analog-to-digital converter 70 is also connected to the non-volatile memory 80, which is further connected to the processor 60.
[0112] The second analog-to-digital converter 70 is configured to read the voltage value of the second voltage obtained after amplification by the second amplification module 502 and store the voltage value of the second voltage in the non-volatile memory 80. The non-volatile memory 80 is configured to upload the voltage value of the second voltage to the processor 60 after the electronic device is powered on. The processor 60 is configured to determine a first current value based on the voltage value of the second voltage, where the first current value is the leakage current value of the electronic device when the electronic device is powered off.
[0113] In this way, by adding a second analog-to-digital converter 70 in the electronic device, the second voltage obtained after amplification by the second amplification module 502 is converted from an analog voltage to a digital voltage by the added second analog-to-digital converter 70, so as to read the voltage value of the second voltage.
[0114] In some embodiments, the non-volatile memory 80 includes but is not limited to electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), and flash memory.
[0115] Therefore, combined Figures 4 to 6 The leakage current detection circuit 50 shown in the figure may include an analog-to-digital converter, a memory, and a processor 60. The analog-to-digital converter is used to read the voltage value of the second voltage and save the voltage value of the second voltage to the memory; the memory is used to upload the voltage value of the second voltage to the processor 60 after the electronic device is turned on; and the processor 60 is used to determine the first current value based on the voltage value of the second voltage.
[0116] In some embodiments, as Figure 4 and Figure 5 As shown, the memory is a register 302, and both the analog-to-digital converter and the register 302 are located in the power management unit 30. The analog-to-digital converter located in the power management unit 30 can be referred to as a first analog-to-digital converter 301. In other embodiments, such as Figure 6 As shown, the memory is a non-volatile memory 80, the analog-to-digital converter and the non-volatile memory 80 are located in different devices, and the analog-to-digital converter is not integrated in the power management unit 30. The analog-to-digital converter that is not set in the power management unit 30 can be called a second analog-to-digital converter 70.
[0117] The fourth implementation method is Figure 7As shown, N can be equal to 2. The leakage current detection circuit 50 includes two amplification modules and a leakage current detection module. The two amplification modules are respectively a first amplification module 501 and a second amplification module 502. In addition, the leakage current detection circuit 50 also includes three isolation modules and two filtering modules. The three isolation modules are respectively a first isolation module 503, a second isolation module 504, and a third isolation module 505. The two filtering modules are respectively a first filtering module 506 and a second filtering module 507.
[0118] Figure 7 The structural composition, connection relationship and function of the first amplifying module 501, the second amplifying module 502, the first isolation module 503, the second isolation module 504, the third isolation module 505, the first filtering module 506 and the second filtering module 507 shown in FIG. Figure 4 The corresponding descriptions will not be repeated here.
[0119] like Figure 7 As shown, the positive power supply terminal of the first amplifier A1 in the first amplifier module 501 is connected to the positive electrode of the battery 10, and the negative power supply terminal of the first amplifier A1 in the first amplifier module 501 is connected to the ground terminal GND. The positive power supply terminal of the second amplifier A2 in the second amplifier module 502 is connected to the positive electrode of the battery 10, and the negative power supply terminal of the second amplifier A2 in the second amplifier module 502 is connected to the ground terminal GND.
[0120] Since the first amplifier A1 and the second amplifier A2 are powered by the battery 10, in order for the processor 60 to accurately calculate the leakage current value of the electronic device when it is in the off state, the processor 60 needs to add a calibration operation to remove the current value of the current consumed when powering the first amplifier A1 and the second amplifier A2.
[0121] In some embodiments, the leakage current detection module is specifically configured to determine a second current value based on a voltage value of a second voltage, and to determine a first current value based on the second current value and a compensation current value. The compensation current value is the difference between a first test current value and a second test current value. The first test current value is calculated based on the voltage value of the test voltage, the voltage amplification factors of the N amplification modules, and the resistance value of the sampling resistor. The test voltage is the voltage obtained by amplifying the voltage of the sampling resistor by the N amplification modules when the electronic device is in the off state. The second test current value is the leakage current value of the electronic device in the off state, as measured by the test equipment.
[0122] The compensation current value can be pre-tested and stored in the electronic device. The compensation current value testing process is as follows: first, the electronic device is turned off, and the voltage of the sampling resistor R0 is amplified by the N amplifier modules in the leakage current detection circuit 50 to obtain a test voltage; then, the leakage current detection module in the leakage current detection circuit 50 reads the voltage value of the test voltage, and the voltage value of the test voltage, the voltage amplification factors of the N amplifier modules, and the resistance value of the sampling resistor are used to calculate a first test current value; then, before the electronic device leaves the factory, the leakage current value of the electronic device in the power-off state is tested using a test device at a power test (PT) station to obtain a second test current value; since the first test current value actually includes the current value of the leakage current of the electronic device in the power-off state and the current value of the current consumed by powering the operational amplifiers in the N amplifier modules, the difference between the first test current value and the second test current value can be determined as the compensation current value, and the compensation current value is written into the processor 60.
[0123] Specifically, when the leakage current detection module uses the voltage value of the test voltage, the voltage amplification factor of the N amplifier modules and the resistance value of the sampling resistor R0 to calculate the first test current value, the ratio of the voltage value of the test voltage to the voltage amplification factor of the N amplifier modules is divided by the resistance value of the sampling resistor R0 to calculate the first test current value.
[0124] When the second test current value is obtained by using test equipment at the power supply test station, the battery in the electronic device is removed, and a dedicated programmable power supply or other test equipment is used to power the electronic device. The leakage current value of the electronic device in the off state is read through the programmable power supply to obtain the second test current value.
[0125] For example, the test voltage is 1V, and the N amplifier modules include: Figure 7 As shown in the first amplifying module 501 and the second amplifying module 502, the voltage amplification factor of the first amplifying module 501 is 1000 times, and the voltage amplification factor of the second amplifying module 502 is also 1000 times. Then the voltage amplification factor of the N amplifying modules can be 10 6 times, the resistance of the sampling resistor R0 is 2 mΩ, then the calculated first test current value can be 500 μA; the second test current value can be 450 μA, and the compensation current value can be 50 μA.
[0126] In actual application, after the electronic device is shut down, the power management unit 30 can activate the leakage current detection circuit 50 to detect the leakage current of the electronic device when it is shut down. When the electronic device is in the shut-down state, the N amplification modules amplify the first voltage of the sampling resistor R0 to obtain a second voltage. The leakage current detection module reads the voltage value of the second voltage and determines a second current value based on the voltage value of the second voltage. It also determines a first current value based on the second current value and the compensation current value. The first current value is the leakage current value of the electronic device when it is shut down.
[0127] For example, a leakage current detection module includes a power management unit 30 and a processor 60, and the power management unit 30 includes a first analog-to-digital converter 301 and a register 302. The first analog-to-digital converter 301 reads the voltage value of the second voltage obtained after amplification by the N amplification modules and saves the second voltage value to the register 302. After the electronic device is powered on, the register 302 uploads the voltage value of the second voltage to the processor 60. The processor 60 determines the second current value based on the voltage value of the second voltage, and determines the first current value based on the second current value and the compensation current value.
[0128] Taking the example of a leakage current detection module that may include a second analog-to-digital converter 70, a non-volatile memory 80, and a processor 60, and wherein the second analog-to-digital converter 70 is not integrated into the power management unit 30, the second analog-to-digital converter 70 reads the voltage value of the second voltage obtained after amplification by the N amplification modules and saves the voltage value of the second voltage to the non-volatile memory 80. After the electronic device is powered on, the non-volatile memory 80 uploads the voltage value of the second voltage to the processor 60. The processor 60 determines the second current value based on the voltage value of the second voltage, and determines the first current value based on the second current value and the compensation current value.
[0129] The leakage current detection module is specifically configured to calculate the second current value by dividing the ratio of the second voltage value to the voltage amplification factors of the N amplifying modules by the resistance value of the sampling resistor R0. Specifically, the processor 60 in the leakage current detection module calculates the second current value by dividing the ratio of the second voltage value to the voltage amplification factors of the N amplifying modules by the resistance value of the sampling resistor R0.
[0130] Furthermore, the leakage current detection module is specifically configured to determine the difference between the second current value and the compensation current value as the first current value. Specifically, the processor 60 in the leakage current detection module determines the difference between the second current value and the compensation current value as the first current value.
[0131] For example, the voltage value of the second voltage is 1V, and the voltage amplification factor of the N amplifying modules is 10 6times, the resistance of the sampling resistor R0 is 2 mΩ, then the calculated second current value is 500 μA; the compensation current value is 50 μA, then the first current value can be 450 μA.
[0132] The fifth implementation method is as follows: Figure 8 As shown, N can be equal to 3. The leakage current detection circuit 50 includes three amplification modules and a leakage current detection module. The three amplification modules are respectively a first amplification module 501, a second amplification module 502, and a third amplification module 508. In addition, the leakage current detection circuit 50 also includes four isolation modules and three filtering modules. The four isolation modules are respectively a first isolation module 503, a second isolation module 504, a third isolation module 505, and a fourth isolation module 509. The three filtering modules are respectively a first filtering module 506, a second filtering module 507, and a third filtering module 510.
[0133] The first isolation module 503 is connected to the negative electrode of the battery 10 and the input terminal of the first amplifying module 501, respectively. The first input terminal of the first amplifying module 501 is connected to the first end of the sampling resistor R0 and the negative electrode of the battery 10 through the first isolation module 503, and the second input terminal of the first amplifying module 501 is connected to the ground terminal GND, so that the input terminal of the first amplifying module 501 is indirectly connected to the two ends of the sampling resistor R0 through the first isolation module 503.
[0134] The second isolation module 504 is connected to the output of the first amplifying module 501 and the input of the second amplifying module 502. The output of the first amplifying module 501 is connected to the input of the second amplifying module 502 through the second isolation module 504.
[0135] The third isolation module 505 is connected to the output of the second amplifying module 502 and the input of the third amplifying module 508 . The output of the second amplifying module 502 is connected to the input of the third amplifying module 508 via the third isolation module 505 .
[0136] The fourth isolation module 509 is connected to the output end of the third amplification module 508 and the leakage current detection module respectively. The output end of the third amplification module 508 is connected to the leakage current detection module through the fourth isolation module 509.
[0137] The first filter module 506 is connected to the input terminal of the second amplifying module 502 and the ground terminal GND respectively. The second filter module 507 is connected to the input terminal of the third amplifying module 508 and the ground terminal GND respectively. The third filter module 510 is connected to the leakage current detection module and the ground terminal GND respectively.
[0138] In actual application, the first amplification module 501 is used to amplify the first voltage of the sampling resistor R0 to obtain a fourth voltage when the electronic device is in the off state; the second amplification module 502 is used to amplify the fourth voltage to obtain a fifth voltage; and the third amplification module 508 is used to amplify the fifth voltage to obtain a second voltage.
[0139] For example, the first amplifying module 501 can amplify the first voltage of 1μV to obtain a fourth voltage of 0.1mV; the second amplifying module 502 can amplify the fourth voltage of 0.1mV to obtain a fifth voltage of 10mV; the third amplifying module 508 can amplify the fifth voltage of 10mV to obtain a second voltage of 1V.
[0140] The first isolation module 503 , the second isolation module 504 , the third isolation module 505 and the fourth isolation module 509 are all used to isolate interference signals to improve electromagnetic compatibility, prevent electromagnetic and electrostatic interference, and improve the stability of signal transmission.
[0141] The first filtering module 506 is used to filter the fourth voltage obtained after amplification by the first amplifying module 501; the second filtering module 507 is used to filter the fifth voltage obtained after amplification by the second amplifying module 502; the third filtering module 510 is used to filter the second voltage obtained after amplification by the third amplifying module 508.
[0142] like Figure 8 As shown, the first amplification module 501 includes a first amplifier A1, a first resistor R1, and a second resistor R2; the second amplification module 502 includes a second amplifier A2, a third resistor R3, and a fourth resistor R4; the third amplification module 508 includes a third amplifier A3, an eighth resistor R8, and a ninth resistor R9. The first isolation module 503 includes a fifth resistor R5; the second isolation module 504 includes a sixth resistor R6; the third isolation module 505 includes a seventh resistor R7; and the fourth isolation module 509 includes a tenth resistor R10. The first filtering module 506 includes a first capacitor C1; the second filtering module 507 includes a second capacitor C2; and the third filtering module 510 includes a third capacitor C3.
[0143] The first end of the fifth resistor R5 is connected to the negative electrode of the battery 10 and the first end of the sampling resistor R0, and the second end of the fifth resistor R5 is connected to the first input end of the first amplification module 501. Specifically, the second end of the fifth resistor R5 is connected to the non-inverting input end of the first amplifier A1.
[0144] A first end of the first resistor R1 is connected to the inverting input end of the first amplifier A1 , and a second end of the first resistor R1 is connected to the ground end GND.
[0145] A first end of the second resistor R2 is connected to the output end of the first amplifier A1 , and a second end of the second resistor R2 is connected to the inverting input end of the first amplifier A1 .
[0146] A first end of the sixth resistor R6 is connected to the output terminal of the first amplifying module 501. Specifically, the first end of the sixth resistor R6 is connected to the output terminal of the first amplifier A1. A second end of the sixth resistor R6 is connected to the first input terminal of the second amplifying module 502. Specifically, the second end of the sixth resistor R6 is connected to the non-inverting input terminal of the second amplifier A2.
[0147] A first end of the third resistor R3 is connected to the inverting input terminal of the second amplifier A2 , and a second end of the third resistor R3 is connected to the ground terminal GND.
[0148] A first end of the fourth resistor R4 is connected to the output end of the second amplifier A2 , and a second end of the fourth resistor R4 is connected to the inverting input end of the second amplifier A2 .
[0149] A first end of the seventh resistor R7 is connected to the output of the second amplifier module 502. Specifically, the first end of the seventh resistor R7 is connected to the output of the second amplifier A2. A second end of the seventh resistor R7 is connected to the first input of the third amplifier module 508. Specifically, the second end of the seventh resistor R7 is connected to the non-inverting input of the third amplifier A3. The non-inverting input of the third amplifier A3 can be understood as the first input of the third amplifier module 508, so that the non-inverting input of the third amplifier A3 is connected to the output of the second amplifier A2 through the seventh resistor R7.
[0150] The first end of the eighth resistor R8 is connected to the inverting input terminal of the third amplifier A3 , and the second end of the eighth resistor R8 is connected to the ground terminal GND. The second end of the eighth resistor R8 can be understood as the second input terminal of the third amplifying module 508 .
[0151] A first end of the ninth resistor R9 is connected to the output end of the third amplifier A3 , and a second end of the ninth resistor R9 is connected to the inverting input end of the third amplifier A3 .
[0152] A first end of the tenth resistor R10 is connected to the output end of the third amplifying module 508. Specifically, the first end of the tenth resistor R10 is connected to the output end of the third amplifier A3. The output end of the third amplifier A3 can be understood as the output end of the third amplifying module 508. A second end of the tenth resistor R10 is connected to the leakage current detection module. In this way, the output end of the third amplifier A3 is connected to the leakage current detection module through the tenth resistor R10.
[0153] The first end of the first capacitor C1 is connected to the first input terminal of the second amplifying module 502. Specifically, the first end of the first capacitor C1 is connected to the second end of the sixth resistor R6 and the non-inverting input terminal of the second amplifier A2. The second end of the first capacitor C1 is connected to the ground terminal GND.
[0154] The first end of the second capacitor C2 is connected to the first input terminal of the third amplifying module 508. Specifically, the first end of the second capacitor C2 is connected to the second end of the seventh resistor R7 and the non-inverting input terminal of the third amplifier A3. The second end of the second capacitor C2 is connected to the ground terminal GND.
[0155] A first end of the third capacitor C3 is connected to the leakage current detection module and the second end of the tenth resistor R10 , and a second end of the third capacitor C3 is connected to the ground end GND.
[0156] In an embodiment of the present application, the first amplifier A1, the first resistor R1 and the second resistor R2 in the first amplifier module 501 can constitute a common-mode proportional amplifier circuit, the second amplifier A2, the third resistor R3 and the fourth resistor R4 in the second amplifier module 502 can also constitute a common-mode proportional amplifier circuit, and the third amplifier A3, the eighth resistor R8 and the ninth resistor R9 in the third amplifier module 508 can also constitute a common-mode proportional amplifier circuit.
[0157] For example, when the first voltage across the sampling resistor R0 has a voltage value of 1 μV, the second resistor R2 has a resistance value of 100 kΩ, and the first resistor R1 has a resistance value of 1 kΩ, the voltage value of the fourth voltage obtained by the first amplification module 501 after amplifying the first voltage is 101 μV ≈ 0.1 mV, meaning that the first amplification module 501 can amplify the 1 μV first voltage by 100 times. Accordingly, when the fourth resistor R4 has a resistance value of 100 kΩ and the third resistor R3 has a resistance value of 1 kΩ, the voltage value of the fifth voltage obtained by the second amplification module 502 after amplifying the fourth voltage is 10.1 mV ≈ 10 mV, meaning that the second amplification module 502 can amplify the 0.1 mV fourth voltage by 100 times. Accordingly, when the ninth resistor R9 has a resistance value of 100 kΩ and the eighth resistor R8 has a resistance value of 1 kΩ, the voltage value of the second voltage obtained by the third amplification module 508 after amplifying the fifth voltage is 1.01 V ≈ 1 V, meaning that the third amplification module 508 can amplify the 10 mV fifth voltage by 100 times.
[0158] In some embodiments, the ratio of the resistance of the second resistor R2 to the resistance of the first resistor R1 is equal to the ratio of the resistance of the fourth resistor R4 to the resistance of the third resistor R3, and is also equal to the ratio of the resistance of the ninth resistor R9 to the resistance of the eighth resistor R8; and the resistance of the second resistor R2 is greater than the resistance of the first resistor R1, the resistance of the fourth resistor R4 is greater than the resistance of the third resistor R3, and the resistance of the ninth resistor R9 is greater than the resistance of the eighth resistor R8.
[0159] For example, the resistance of the second resistor R2 is 100KΩ, the resistance of the first resistor R1 is 1KΩ, and the ratio of the resistance of the second resistor R2 to the resistance of the first resistor R1 is 100; the resistance of the fourth resistor R4 is 100KΩ, the resistance of the third resistor R3 is 1KΩ, and the ratio of the resistance of the fourth resistor R4 to the resistance of the third resistor R3 is 100; the resistance of the ninth resistor R9 is 100KΩ, the resistance of the eighth resistor R8 is 1KΩ, and the ratio of the resistance of the ninth resistor R9 to the resistance of the eighth resistor R8 is 100.
[0160] Therefore, one can use Figure 8 The leakage current detection circuit 50 shown in FIG. 5 amplifies the first voltage of the sampling resistor R0 in sequence through a three-stage operational amplifier circuit. The first voltage of 1 μV is first amplified to obtain a fourth voltage of 0.1 mV, which is then amplified to obtain a fifth voltage of 10 mV. The fifth voltage is then amplified to obtain a second voltage of 1 V. The leakage current detection module is used to read the voltage value of the second voltage, and the current value of the leakage current of the electronic device in the off state is determined based on the voltage value of the second voltage.
[0161] The resistance values of the fifth resistor R5, the sixth resistor R6, the seventh resistor R7 and the tenth resistor R10 may be equal; the capacitance values of the first capacitor C1, the second capacitor C2 and the third capacitor C3 may be equal.
[0162] like Figure 8 As shown, the leakage current detection module may include a power management unit 30 and a processor 60 , and the power management unit 30 includes a first analog-to-digital converter 301 and a register 302 .
[0163] The first analog-to-digital converter 301 in the power management unit 30 can be connected to the output end of the third amplification module 508 via the fourth isolation module 509. Specifically, the first analog-to-digital converter 301 is connected to the output end of the third amplifier A3 via the tenth resistor R10. The first analog-to-digital converter 301 in the power management unit 30 is connected to the register 302 in the power management unit 30, and the register 302 in the power management unit 30 is also connected to the processor 60.
[0164] The first analog-to-digital converter 301 is configured to read the voltage value of the second voltage obtained after amplification by the third amplification module 508 and store the voltage value of the second voltage in the register 302. The register 302 is configured to upload the voltage value of the second voltage to the processor 60 after the electronic device is powered on. The processor 60 is configured to determine a first current value based on the voltage value of the second voltage. The first current value is the leakage current value of the electronic device when the device is powered off.
[0165] It is understandable that Figure 8The leakage current detection module shown may further include a second analog-to-digital converter 70, a non-volatile memory 80, and a processor 60. The second analog-to-digital converter 70 is not integrated into the power management unit 30, and the second analog-to-digital converter 70 and the non-volatile memory 80 are located in different devices. The specific connection relationship and function of the second analog-to-digital converter 70, the non-volatile memory 80, and the processor 60 can be referred to. Figure 8 The corresponding descriptions will not be repeated here.
[0166] In addition, Figure 8 In the leakage current detection circuit 50 shown, the positive power supply terminal of the first amplifier A1 in the first amplifier module 501 can be connected to the positive electrode of the battery 10, and the negative power supply terminal of the first amplifier A1 in the first amplifier module 501 can be connected to the ground terminal GND. The positive power supply terminal of the second amplifier A2 in the second amplifier module 502 can be connected to the positive electrode of the battery 10, and the negative power supply terminal of the second amplifier A2 in the second amplifier module 502 can be connected to the ground terminal GND. The positive power supply terminal of the third amplifier A3 in the third amplifier module 508 can be connected to the positive electrode of the battery 10, and the negative power supply terminal of the third amplifier A3 in the third amplifier module 508 can be connected to the ground terminal GND.
[0167] In this case, the leakage current detection module is specifically configured to determine the second current value according to the voltage value of the second voltage, and determine the first current value according to the second current value and the compensation current value.
[0168] In summary, combined Figures 4 to 8 As can be seen in the leakage current detection circuit 50 shown, each of the N amplifying modules includes an operational amplifier, an input resistor, and a feedback resistor. The first end of the input resistor is connected to the inverting input of the operational amplifier, and the second end of the input resistor is connected to the ground terminal GND. The first end of the feedback resistor is connected to the output of the operational amplifier, and the second end of the feedback resistor is connected to the inverting input of the operational amplifier. The non-inverting input of the operational amplifier included in the first amplifying module is connected to the negative terminal of the battery 10. The non-inverting input of the operational amplifier included in the i-th amplifying module among the N amplifying modules is connected to the output of the operational amplifier included in the i-1th amplifying module among the N amplifying modules, where i is an integer greater than 1 and less than or equal to N. The output of the operational amplifier included in the N-th amplifying module is connected to the leakage current detection module.
[0169] exist Figures 4 to 8In the leakage current detection circuit 50 shown, the first amplification module 501 is a first amplification module, and the second amplification module 502 is a second amplification module. The first amplifier A1 in the first amplification module 501 is an operational amplifier included in the first amplification module, the first resistor R1 in the first amplification module 501 is an input resistor included in the first amplification module, and the second resistor R2 in the first amplification module 501 is a feedback resistor included in the first amplification module. The second amplifier A2 in the second amplification module 502 is an operational amplifier included in the second amplification module, the third resistor R3 in the second amplification module 502 is an input resistor included in the second amplification module, and the fourth resistor R4 in the second amplification module 502 is a feedback resistor included in the second amplification module.
[0170] And, in Figure 8 In the leakage current detection circuit 50 shown, the third amplifying module 508 is the third amplifying module, the third amplifier A3 in the third amplifying module 508 is the operational amplifier included in the third amplifying module, the eighth resistor R8 in the third amplifying module 508 is the input resistor included in the third amplifying module, and the ninth resistor R9 in the third amplifying module 508 is the feedback resistor included in the third amplifying module.
[0171] The ratio of the resistance value of the feedback resistor in each amplifying module to the resistance value of the input resistor is equal; and the resistance value of the feedback resistor in each amplifying module is greater than the resistance value of the input resistor.
[0172] In summary, combined Figure 4 、 Figures 6 to 8 As can be seen from the leakage current detection circuit 50 shown, the leakage current detection circuit also includes N+1 isolation modules. The first isolation module among the N+1 isolation modules is connected to the negative electrode of the battery 10 and the input of the first amplifier module, respectively. The jth isolation module among the N+1 isolation modules is connected to the output of the j-1th amplifier module among the N amplifier modules and the input of the jth amplifier module among the N amplifier modules, where j is an integer greater than 1 and less than or equal to N. The N+1th isolation module among the N+1 isolation modules is connected to the output of the Nth amplifier module and the leakage current detection module, respectively. Each of the N+1 isolation modules is used to isolate interference signals.
[0173] Each isolation module includes an isolation resistor. The first end of the isolation resistor included in the first isolation module is connected to the negative electrode of the battery 10, and the second end of the isolation resistor included in the first isolation module is connected to the input end of the first amplification module; the first end of the isolation resistor included in the jth isolation module is connected to the output end of the j-1th amplification module, and the second end of the isolation resistor included in the jth isolation module is connected to the input end of the jth amplification module; the first end of the isolation resistor included in the N+1th isolation module is connected to the output end of the Nth amplification module, and the second end of the isolation resistor included in the N+1th isolation module is connected to the leakage current detection module.
[0174] exist Figure 4 、 Figures 6 to 8 In the leakage current detection circuit 50 shown, the first isolation module 503 is the first isolation module, the second isolation module 504 is the second isolation module, and the third isolation module 505 is the third isolation module. The fifth resistor R5 in the first isolation module 503 is the isolation resistor included in the first isolation module; the sixth resistor R6 in the second isolation module 504 is the isolation resistor included in the second isolation module; and the seventh resistor in the third isolation module 505 is the isolation resistor included in the third isolation module.
[0175] And, in Figure 8 In the leakage current detection circuit 50 shown, the fourth isolation module 509 is the fourth isolation module, and the tenth resistor R10 in the fourth isolation module 509 is the isolation resistor included in the fourth isolation module.
[0176] In summary, combined Figure 4 、 Figures 6 to 8 As can be seen from the leakage current detection circuit 50 shown, the leakage current detection circuit also includes N filter modules. The kth filter module among the N filter modules is respectively connected to the input terminal of the k+1th amplifier module among the N amplifier modules and the ground terminal GND, where k is an integer greater than or equal to 1 and less than N. The Nth filter module among the N filter modules is respectively connected to the leakage current detection module and the ground terminal GND. Each of the N filter modules is configured to filter the amplified voltage.
[0177] Each filter module includes a filter capacitor. The first end of the filter capacitor included in the kth filter module is connected to the input end of the k+1th amplification module, and the second end of the filter capacitor included in the kth filter module is connected to the ground terminal GND; the first end of the filter capacitor included in the Nth filter module is connected to the leakage current detection module, and the second end of the filter capacitor included in the Nth filter module is connected to the ground terminal GND.
[0178] exist Figure 4 、 Figures 6 to 8In the leakage current detection circuit 50 shown, the first filter module 506 is the first filter module, and the second filter module 507 is the second filter module. The first capacitor C1 in the first filter module 506 is the filter capacitor included in the first filter module; the second capacitor C2 in the second filter module 507 is the filter capacitor included in the second filter module.
[0179] And, in Figure 8 In the leakage current detection circuit 50 shown, the third filter module 510 is the third filter module, and the third capacitor C3 in the third filter module 510 is the filter capacitor included in the third filter module.
[0180] In some embodiments, each of the N amplification modules includes an operational amplifier; the positive power supply terminal of each operational amplifier is connected to the positive electrode of the battery 10, and the negative power supply terminal of each operational amplifier is connected to the ground terminal GND.
[0181] In some embodiments, the leakage current detection module is also used to determine that the leakage current of the electronic device in the shutdown state is abnormal when the first current value is greater than the current threshold; and to determine that the leakage current of the electronic device in the shutdown state is normal when the first current value is less than or equal to the current threshold.
[0182] When detecting the leakage current of an electronic device in the shutdown state, a current threshold corresponding to the leakage current of the electronic device can be set. By comparing the current value of the leakage current of the electronic device in the shutdown state obtained by detection with the current threshold, it can be determined whether the leakage current of the electronic device in the shutdown state is normal.
[0183] Specifically, the processor 60 in the leakage current detection module is used to determine that the leakage current of the electronic device in the shutdown state is abnormal when the first current value is greater than the current threshold; and to determine that the leakage current of the electronic device in the shutdown state is normal when the first current value is less than or equal to the current threshold.
[0184] For example, Figure 9 Flowchart of the leakage current detection method provided in the embodiment of the present application. Figure 9 As shown, the leakage current detection method is applied to the above Figures 3 to 8 In the leakage current detection circuit shown, the leakage current detection method may specifically include the following steps:
[0185] S901 , when the electronic device is in a shutdown state, N amplifying modules amplify a first voltage of a sampling resistor to obtain a second voltage; the first voltage is a voltage generated on the sampling resistor by leakage current of the electronic device in the shutdown state.
[0186] After the electronic device is shut down, the power management unit 30 may start the leakage current detection circuit 50 , and amplify the first voltage of the sampling resistor R0 through the N amplification modules in the leakage current detection circuit 50 to obtain a second voltage.
[0187] S902: The leakage current detection module reads a voltage value of the second voltage.
[0188] S903: The leakage current detection module determines a first current value according to the voltage value of the second voltage; the first current value is a leakage current value of the electronic device in a shutdown state.
[0189] In some embodiments, each of the N amplification modules includes an operational amplifier; the positive power supply terminal of each operational amplifier is connected to the positive terminal of the battery 10, and the negative power supply terminal of each operational amplifier is connected to the ground terminal GND. Therefore, the first current value can be accurately calculated in the following manner: the leakage current detection module determines the second current value based on the voltage value of the second voltage; and the leakage current detection module determines the first current value based on the second current value and the compensation current value.
[0190] Among them, the compensation current value is the difference between the first test current value and the second test current value; the first test current value is calculated based on the voltage value of the test voltage, the voltage amplification factors of the N amplification modules, and the resistance value of the sampling resistor R0, and the test voltage is the voltage after the voltage of the sampling resistor is amplified by the N amplification modules when the electronic device is in the off state; the second test current value is the current value of the leakage current of the electronic device in the off state obtained by testing using the test equipment.
[0191] For example, Figure 10 The flowchart of obtaining the compensation current value provided by the embodiment of the present application. Figure 10 As shown, the specific process of obtaining the compensation current value may include the following steps:
[0192] S1001: After the electronic device is turned off, the voltage of the sampling resistor is amplified by N amplifying modules in the leakage current detection circuit to obtain a test voltage.
[0193] S1002 , using a leakage current detection module in a leakage current detection circuit to read a voltage value of a test voltage.
[0194] S1003 , the leakage current detection module calculates a first test current value using the voltage value of the test voltage, the voltage amplification factors of the N amplification modules, and the resistance value of the sampling resistor.
[0195] Specifically, the leakage current detection module calculates the first test current value by dividing the ratio of the test voltage value to the voltage amplification factors of the N amplification modules by the resistance value of the sampling resistor R0.
[0196] S1004: At a power supply test station, use a test device to test a leakage current value of the electronic device in a power-off state to obtain a second test current value.
[0197] When the second test current value is obtained by using test equipment at the power supply test station, the battery in the electronic device is removed, and a dedicated programmable power supply or other test equipment is used to power the electronic device. The leakage current value of the electronic device in the off state is read through the programmable power supply to obtain the second test current value.
[0198] S1005: Determine the difference between the first test current value and the second test current value as a compensation current value.
[0199] S1006, writing the compensation current value into the processor.
[0200] In some embodiments, the leakage current detection module determines the difference between the second current value and the compensation current value as the first current value. The leakage current detection module calculates the second current value by dividing the ratio of the second voltage value to the voltage amplification factors of the N amplification modules by the resistance value of the sampling resistor R0.
[0201] In some embodiments, the leakage current detection module includes an analog-to-digital converter, a memory, and a processor 60. S902 described above may specifically include the following steps: the analog-to-digital converter reads the voltage value of the second voltage and saves the voltage value of the second voltage to the memory; after the electronic device is powered on, the memory uploads the voltage value of the second voltage to the processor 60; S903 described above may specifically include the following steps: the processor 60 determines the first current value based on the voltage value of the second voltage.
[0202] In one implementation, the memory is register 302, and both the analog-to-digital converter and register 302 are located in the power management unit 30. In another implementation, the memory is non-volatile memory 80, the analog-to-digital converter and non-volatile memory 80 are located in different devices, and the analog-to-digital converter is not integrated into the power management unit 30.
[0203] In some embodiments, after the above-mentioned step S903, it may also include: when the first current value is greater than the current threshold, the leakage current detection module determines that the leakage current of the electronic device in the shutdown state is abnormal; when the first current value is less than or equal to the current threshold, the leakage current detection module determines that the leakage current of the electronic device in the shutdown state is normal.
[0204] Therefore, by amplifying the first voltage of the sampling resistor R0 through the N amplification modules, the leakage current detection module can accurately read the voltage value of the amplified second voltage to accurately sample the current value of the leakage current of the electronic device when it is in the off state. In this way, after the electronic device leaves the factory, the leakage current of the electronic device in the off state can be detected by the leakage current detection circuit to continuously track the leakage current of the electronic device in the off state.
[0205] The above specific implementation methods further illustrate the purpose, technical solutions and beneficial effects of this application in detail. It should be understood that the above are only specific implementation methods of this application and are not intended to limit the scope of protection of this application. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solutions of this application should be included in the scope of protection of this application.
Claims
1. A leakage current detection circuit, characterized in that: Applicable to electronic equipment, the electronic equipment includes a battery and a sampling resistor, the two ends of the sampling resistor are respectively connected to the negative electrode of the battery and the ground terminal; the leakage current detection circuit includes N amplification modules and a leakage current detection module, where N is an integer greater than 1; The N amplifying modules are connected in sequence, the input end of the first amplifying module among the N amplifying modules is connected to the two ends of the sampling resistor respectively, and the output end of the Nth amplifying module among the N amplifying modules is connected to the leakage current detection module; The N amplifying modules are configured to amplify a first voltage of the sampling resistor to obtain a second voltage when the electronic device is in a shutdown state; the first voltage is a voltage generated on the sampling resistor by a leakage current of the electronic device in a shutdown state; The leakage current detection module is used to read the voltage value of the second voltage and determine a first current value according to the voltage value of the second voltage; the first current value is the current value of the leakage current of the electronic device in the shutdown state.
2. The leakage current detection circuit according to claim 1, wherein: Each of the N amplifying modules includes an operational amplifier; The positive power supply terminal of each operational amplifier is connected to the positive electrode of the battery, and the negative power supply terminal of each operational amplifier is connected to the ground terminal.
3. The leakage current detection circuit according to claim 2, wherein: Each amplification module further includes an input resistor and a feedback resistor; The first end of the input resistor is connected to the inverting input terminal of the operational amplifier, and the second end of the input resistor is connected to the ground terminal; The first end of the feedback resistor is connected to the output end of the operational amplifier, and the second end of the feedback resistor is connected to the inverting input end of the operational amplifier; The non-inverting input terminal of the operational amplifier included in the first amplification module is connected to the negative electrode of the battery; the non-inverting input terminal of the operational amplifier included in the i-th amplification module among the N amplification modules is connected to the output terminal of the operational amplifier included in the i-1-th amplification module among the N amplification modules, where i is an integer greater than 1 and less than or equal to N; the output terminal of the operational amplifier included in the N-th amplification module is connected to the leakage current detection module.
4. The leakage current detection circuit according to claim 3, wherein: The ratio of the resistance value of the feedback resistor to the resistance value of the input resistor in each amplification module is equal; Furthermore, the resistance of the feedback resistor in each amplifying module is greater than the resistance of the input resistor.
5. The leakage current detection circuit according to claim 1, wherein: The leakage current detection circuit also includes N+1 isolation modules; The first isolation module among the N+1 isolation modules is connected to the negative electrode of the battery and the input end of the first amplification module respectively; The j-th isolation module among the N+1 isolation modules is respectively connected to the output end of the j-1-th amplification module among the N amplification modules and the input end of the j-th amplification module among the N amplification modules; The j is an integer greater than 1 and less than or equal to the N; The N+1th isolation module among the N+1 isolation modules is connected to the output end of the Nth amplification module and the leakage current detection module respectively; Wherein, each of the N+1 isolation modules is used to isolate the interference signal.
6. The leakage current detection circuit according to claim 5, characterized in that: Each isolation module includes an isolation resistor; The first end of the isolation resistor included in the first isolation module is connected to the negative electrode of the battery, and the second end of the isolation resistor included in the first isolation module is connected to the input end of the first amplification module; The first end of the isolation resistor included in the j-th isolation module is connected to the output end of the j-1-th amplification module, and the second end of the isolation resistor included in the j-th isolation module is connected to the input end of the j-th amplification module; The first end of the isolation resistor included in the N+1th isolation module is connected to the output end of the Nth amplification module, and the second end of the isolation resistor included in the N+1th isolation module is connected to the leakage current detection module.
7. The leakage current detection circuit according to claim 1, wherein: The leakage current detection circuit also includes N filtering modules; The kth filter module among the N filter modules is connected to the input terminal of the k+1th amplification module among the N amplification modules and the ground terminal respectively; k is an integer greater than or equal to 1 and less than N; The Nth filter module among the N filter modules is connected to the leakage current detection module and the ground terminal respectively; Wherein, each of the N filter modules is used to perform filtering processing on the amplified voltage.
8. The leakage current detection circuit according to claim 7, wherein: Each of the filtering modules includes a filtering capacitor; The first end of the filter capacitor included in the kth filter module is connected to the input end of the k+1th amplification module, and the second end of the filter capacitor included in the kth filter module is connected to the ground end; The first end of the filter capacitor included in the Nth filter module is connected to the leakage current detection module, and the second end of the filter capacitor included in the Nth filter module is connected to the ground end.
9. The leakage current detection circuit according to claim 2, wherein: The leakage current detection module is specifically configured to determine a second current value according to a voltage value of the second voltage, and determine the first current value according to the second current value and a compensation current value; The compensation current value is the difference between the first test current value and the second test current value; the first test current value is calculated based on the voltage value of the test voltage, the voltage amplification factors of the N amplification modules, and the resistance value of the sampling resistor, and the test voltage is the voltage after the voltage of the sampling resistor is amplified by the N amplification modules when the electronic device is in the off state; the second test current value is the current value of the leakage current of the electronic device in the off state obtained by testing using a test device.
10. The leakage current detection circuit according to claim 9, wherein: The leakage current detection module is specifically configured to determine a difference between the second current value and the compensation current value as the first current value.
11. The leakage current detection circuit according to claim 9, wherein: The leakage current detection module is specifically configured to obtain the second current value by dividing the ratio of the second voltage value to the voltage amplification factors of the N amplification modules by the resistance value of the sampling resistor.
12. The leakage current detection circuit according to claim 1, wherein: The leakage current detection module is further used to determine that the leakage current of the electronic device in the shutdown state is abnormal when the first current value is greater than the current threshold; and to determine that the leakage current of the electronic device in the shutdown state is normal when the first current value is less than or equal to the current threshold.
13. The leakage current detection circuit according to claim 1, wherein: The leakage current detection module includes an analog-to-digital converter, a memory and a processor; The analog-to-digital converter is configured to read a voltage value of the second voltage and store the voltage value of the second voltage in the memory; The memory is configured to upload the voltage value of the second voltage to the processor after the electronic device is powered on; The processor is configured to determine the first current value according to the voltage value of the second voltage.
14. The leakage current detection circuit according to claim 13, wherein: The memory is a register, and the analog-to-digital converter and the register are both located in a power management unit; Alternatively, the memory is a non-volatile memory, and the analog-to-digital converter is not integrated in the power management unit.
15. The leakage current detection circuit according to any one of claims 1 to 14, characterized in that: The N amplification modules include a first amplification module and a second amplification module; The input end of the first amplifying module is respectively connected to the two ends of the sampling resistor, the output end of the first amplifying module is connected to the input end of the second amplifying module, and the output end of the second amplifying module is connected to the leakage current detection module; The first amplifying module is configured to amplify the first voltage of the sampling resistor to obtain a third voltage when the electronic device is in a shutdown state; The second amplifying module is configured to amplify the third voltage to obtain the second voltage.
16. An electronic device, characterized in that: comprising a battery, a sampling resistor, and a leakage current detection circuit as claimed in any one of claims 1 to 15; Wherein, two ends of the sampling resistor are connected to the negative electrode of the battery and the ground terminal respectively.
17. A leakage current detection method, characterized in that: Applied to the leakage current detection circuit according to any one of claims 1 to 15, the method comprises: When the electronic device is in a shutdown state, the N amplification modules amplify the first voltage of the sampling resistor to obtain a second voltage; the first voltage is the voltage generated on the sampling resistor by the leakage current of the electronic device in the shutdown state; The leakage current detection module reads the voltage value of the second voltage; The leakage current detection module determines a first current value according to the voltage value of the second voltage; the first current value is the current value of the leakage current of the electronic device in the shutdown state.
18. The method according to claim 17, characterized in that Each of the N amplifying modules includes an operational amplifier; a positive power supply terminal of each operational amplifier is connected to a positive electrode of a battery, and a negative power supply terminal of each operational amplifier is connected to a ground terminal; The leakage current detection module determines the first current value according to the voltage value of the second voltage, including: The leakage current detection module determines a second current value according to the voltage value of the second voltage; The leakage current detection module determines the first current value according to the second current value and the compensation current value; The compensation current value is the difference between the first test current value and the second test current value; the first test current value is calculated based on the voltage value of the test voltage, the voltage amplification factors of the N amplification modules, and the resistance value of the sampling resistor, and the test voltage is the voltage after the voltage of the sampling resistor is amplified by the N amplification modules when the electronic device is in the off state; the second test current value is the current value of the leakage current of the electronic device in the off state obtained by testing using a test device.
19. The method according to claim 18, characterized in that The leakage current detection module determines the first current value according to the second current value and the compensation current value, including: The leakage current detection module determines the difference between the second current value and the compensation current value as the first current value.
20. The method according to claim 18, wherein The leakage current detection module determines the second current value according to the voltage value of the second voltage, including: The leakage current detection module obtains the second current value by dividing the ratio of the voltage value of the second voltage to the voltage amplification factors of the N amplification modules by the resistance value of the sampling resistor.
21. The method according to claim 17, wherein After the leakage current detection module determines the first current value according to the voltage value of the second voltage, the method further includes: When the first current value is greater than a current threshold, the leakage current detection module determines that the leakage current of the electronic device in the shutdown state is abnormal; When the first current value is less than or equal to the current threshold, the leakage current detection module determines that the leakage current of the electronic device in the shutdown state is normal.
22. The method according to claim 17, wherein The leakage current detection module includes an analog-to-digital converter, a memory and a processor; The leakage current detection module reads the voltage value of the second voltage, including: The analog-to-digital converter reads a voltage value of the second voltage and stores the voltage value of the second voltage in the memory; After the electronic device is powered on, the memory uploads the voltage value of the second voltage to the processor; Accordingly, the leakage current detection module determines the first current value according to the voltage value of the second voltage, including: The processor determines the first current value according to the voltage value of the second voltage.
