Electric quantity detection circuit and method, electronic equipment and storage medium
By combining high-precision and low-precision resistance units in the power detection circuit, and using a multi-wire power meter for power detection, the problem of battery heating and low detection accuracy during fast charging is solved, and power consumption reduction and detection accuracy improvement are achieved.
Patent Information
- Application Number
- CN202311284582.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-28
- Publication Date
- 2025-03-28
AI Technical Summary
During the fast charging process, the high-power charging and discharging of the battery leads to an increase in heat generation, which in turn causes battery safety risks. At the same time, the existing power detection methods have the problem of low detection accuracy.
A power detection circuit is adopted, including a high-precision first resistor unit and a low-precision variable second resistor unit, which is connected to a multi-wire power meter through multiple detection lines, and a high-precision resistor unit is used to calculate the reference current and calibration of the impedance error. The low-precision resistor unit adjusts the resistance value according to different current scenes to take into account power consumption and detection accuracy.
It realizes reducing power consumption during fast charging and discharging, improving battery detection accuracy, ensuring battery safety and meeting users' demand for charging time.
Smart Images

Figure CN119716242A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of vehicle communication technology, and in particular to a power detection circuit, method, electronic device and storage medium. Background Art
[0002] In recent years, the charging time requirements of smart terminal users have become shorter and shorter, from the earliest two to three hours to now expecting to be fully charged within half an hour to an hour. With the upgrading of user experience requirements, there will be more extreme user experience requirements in the future. In order to meet the growing needs of users, the industry has proposed the PD (Power Delivery) charging protocol, which aims to complete the standardization of high-power charging.
[0003] The increasing demand for high-power charging will lead to increased power consumption and correspondingly increased heat generation. The large heat generation will increase the ambient temperature of the entire terminal, indirectly causing the battery temperature to rise. The heat generated by terminal charging and discharging will cause battery safety hazards. Summary of the invention
[0004] The present disclosure provides a power detection circuit, method, electronic device and storage medium.
[0005] In a first aspect, an embodiment of the present disclosure provides a power detection circuit, comprising: a first resistance unit, a second resistance unit, and a power meter; the resistance accuracy of the first resistance unit is greater than a preset first accuracy threshold, the resistance accuracy of the second resistance unit is less than a preset second accuracy threshold, and the first accuracy threshold is greater than or equal to the second accuracy threshold; the second resistance unit is a variable resistor; the power meter is a multi-wire power meter with a number of detection lines greater than or equal to 3;
[0006] The first resistance unit and the second resistance unit are connected in series or in parallel, and are connected to the electricity meter through a plurality of detection lines.
[0007] In a second aspect, an embodiment of the present disclosure provides a method for detecting electric quantity, the method comprising:
[0008] When the power storage device is in a charging or discharging state, obtaining a voltage across the first resistance unit of the power detection circuit;
[0009] determining a charge and discharge current according to a voltage across the first resistance unit and a pre-calibrated resistance value of the first resistance unit;
[0010] Obtaining a calibration resistance value of a second resistance unit of the power detection circuit corresponding to the charge and discharge current; wherein the magnitude of the calibration resistance value is negatively correlated with the magnitude of the charge and discharge current;
[0011] adjusting the resistance value of the second resistance unit to the calibration resistance value;
[0012] The charge and discharge amount of the electric quantity storage device is determined according to the calibration resistance value of the second resistance unit and the resistance value of the first resistance unit.
[0013] In a third aspect, an embodiment of the present disclosure provides a first electronic device, which includes the power detection circuit.
[0014] In a fourth aspect, an embodiment of the present disclosure provides a second electronic device, the second electronic device comprising:
[0015] at least one processor;
[0016] A memory having at least one program stored thereon, wherein when the at least one program is executed by the at least one processor, the at least one processor implements the power detection method;
[0017] At least one input / output I / O interface is connected between the processor and the memory and is configured to implement information interaction between the processor and the memory.
[0018] In a fifth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the power detection method when executed by a processor.
[0019] The disclosed embodiment adopts at least one high-precision resistor unit (such as the first resistor unit) and at least one low-precision resistor unit (such as the second resistor unit), and the low-precision resistor unit is a variable resistor. Through the setting of the high-precision resistor unit, it can be used to calculate the reference current, determine the impedance error, and realize the voltage divider calibration, which provides a technical basis for improving the detection accuracy. Through the setting of the low-precision resistor unit, the resistance value can be adjusted according to the corresponding power consumption requirements and accuracy requirements in different current scenarios (corresponding to different charge and discharge current ranges), so that in each current scenario, a suitable resistance value can be selected according to the charge and discharge current size of the current scenario, and the size of the resistance value is negatively correlated with the size of the charge and discharge current, which plays a role in reducing power consumption and ensuring detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In the accompanying drawings of the embodiments of the present disclosure:
[0021] Figure 1 It is a schematic diagram of the power detection circuit in the relevant scheme;
[0022] Figure 2 A schematic diagram of a first power detection circuit provided in an embodiment of the present disclosure;
[0023] Figure 3 A schematic diagram of a second power detection circuit provided in an embodiment of the present disclosure;
[0024] Figure 4 A schematic diagram of a power detection circuit based on a three-wire power meter provided in an embodiment of the present disclosure;
[0025] Figure 5 A schematic diagram of a power detection circuit based on a four-wire power meter provided in an embodiment of the present disclosure;
[0026] Figure 6 A flow chart of a method for detecting electric quantity provided in an embodiment of the present disclosure;
[0027] Figure 7 A flow chart of a method for obtaining calibration resistance values corresponding to different current scenarios according to the resistance value of a first resistance unit provided in an embodiment of the present disclosure;
[0028] Figure 8 A block diagram of the composition of a first electronic device provided in an embodiment of the present disclosure;
[0029] Fig. 9 A block diagram of the second electronic device provided in the embodiment of the present disclosure;
[0030] Fig.10 A block diagram of the computer-readable storage medium provided for an embodiment of the present disclosure. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the technical solution of the present disclosure, the communication perception data processing method and computer-readable storage medium provided by the embodiments of the present disclosure are described in detail below in conjunction with the accompanying drawings.
[0032] The present disclosure will be described more fully below with reference to the accompanying drawings, but the embodiments shown may be embodied in different forms, and the present disclosure should not be construed as being limited to the embodiments set forth below. On the contrary, the purpose of providing these embodiments is to make the present disclosure thorough and complete, and will enable those skilled in the art to fully understand the scope of the present disclosure.
[0033] The accompanying drawings of the embodiments of the present disclosure are used to provide a further understanding of the embodiments of the present disclosure, and constitute a part of the specification, and are used together with the detailed embodiments to explain the present disclosure, and do not constitute a limitation of the present disclosure. By describing the detailed embodiments with reference to the accompanying drawings, the above and other features and advantages will become more apparent to those skilled in the art.
[0034] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.
[0035] The terms used in the present disclosure are only used to describe specific embodiments and are not intended to limit the present disclosure. The term "and / or" as used in the present disclosure includes any and all combinations of one or more related enumerated items. The singular forms "one" and "the" as used in the present disclosure are also intended to include plural forms, unless the context clearly indicates otherwise. The terms "including", "made of..." as used in the present disclosure specify the presence of the features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof.
[0036] Unless otherwise defined, all terms (including technical and scientific terms) used in this disclosure have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined in this disclosure.
[0037] The terminal needs to calculate the battery capacity when charging and discharging the battery. The chip responsible for this function is the fuel gauge, which needs to sample the voltage and current on the charging and discharging paths. This type of fuel gauge that samples both voltage and current is generally called a coulomb meter. The sampling method is usually to retain a high-precision, high-power detection resistor on the charging and discharging paths. When the charging or discharging current flows through this resistor, the fuel gauge will sample the voltage across the resistor and convert it through the ADC (Analog-to-digital converter) module array inside the chip, output the corresponding digital information, and calculate the current value through software algorithms.
[0038] In the related art, a small-resistance detection resistor is usually used to solve the problem of large heat loss during fast charging; a large-resistance detection resistor is used to solve the problem of low accuracy of the fuel gauge under light load conditions. If you want to take both solutions into account, you can use a variable resistor to achieve the impedance transformation requirements of different scenarios. However, a variable resistor can be understood as an active equivalent resistor, and its accuracy is far inferior to that of a high-precision passive fixed resistor, and it is a low-precision resistance unit. Therefore, using an ordinary fuel gauge for detection will bring unacceptable detection errors.
[0039] The disclosed embodiment provides a power detection solution for a multi-wire power meter based on an impedance calibration function, which solves the detection accuracy problem of variable resistance equivalent resistors or precision low-power resistors in ordinary power meter applications, and realizes a solution that can reduce the heat loss of the charging and discharging path and improve the detection accuracy of the power meter.
[0040] In the current power detection scheme, such as Figure 1 As shown, the resistance detected by the fuel gauge Qa is only the detection resistor a (Ra), which is a fixed value. When the resistance value of Ra is about 5 milliohms, the current detection under low load still has a problem of low accuracy. When the current is applied through the power supply S, when a large current flows, the heat loss generated on Ra will bring a thermal design burden to the charging system, which is calculated as follows: Heat loss Pd1 = I2R = 10A (ampere) * 10A * 5mohm = 0.5W (watt), mohm is the unit of resistance, 10 megohms.
[0041] If you want to improve the accuracy of current detection under low load conditions, you need to increase the detection resistor a (Ra). A resistance of about 20 milliohms can double the detection accuracy under low load conditions. However, when a large current flows, the heat loss generated on Ra will also double, as calculated below: Heat loss Pd2 = I2R = 10A*10A*20mohm = 2.0W. Therefore, while the light load detection problem is improved, the heat loss increases.
[0042] To address this problem, the detection resistor a (Ra) can be set as a variable resistor unit (Rb), such as Figure 2 As shown, through circuit control, the resistance of Rb becomes smaller when the load is heavy (i.e., large current), and becomes larger when the load is light (i.e., small current). However, the realization of the variable resistance unit will inevitably introduce a large impedance error, which is not as accurate as the original detection resistor a (Ra). In this way, the purpose of improving the detection accuracy under light load is not really achieved.
[0043] The embodiment of the present disclosure proposes a power detection circuit, such as Figure 3 As shown, it includes: a first resistor unit Rx, a second resistor unit Ry and a power meter Q; the resistance accuracy of the first resistor unit Rx is greater than a preset first accuracy threshold, the resistance accuracy of the second resistor unit Ry is less than a preset second accuracy threshold, and the first accuracy threshold is greater than or equal to the second accuracy threshold; the second resistor unit is a variable resistor; the power meter is a multi-wire power meter with the number of detection lines greater than or equal to 3;
[0044] The first resistance unit and the second resistance unit are connected in series or in parallel, and are connected between the power supply and the ground terminal; and are connected to the electricity meter through a plurality of detection lines.
[0045] In the disclosed embodiment, the first resistor unit Rx is a high-precision resistor unit (the resistance precision of the first resistor unit Rx is greater than a preset first precision threshold), which is a power resistor with lower resistance and higher precision, such as 1-2mohm and a precision of 0.5%.
[0046] In the disclosed embodiment, the first resistor unit Rx can be used to calculate the reference current, calculate the impedance error and calibrate the voltage divider. For example, the accurate resistance value of the first resistor unit Rx can be calibrated in advance. When the charge and discharge current is loaded on the first resistor unit Rx, since the resistance value of the first resistor unit Rx is of high precision, the charge and discharge current can be calculated by the voltage detected on the first resistor unit Rx. Since the accuracy of the charge and discharge current is also high, it can be used as a reference current. The resistance of the second resistor unit can be calculated based on the reference current and the voltage of the second resistor unit, and the error calculation of the resistance of the recorded second resistor unit can be performed through the calculated resistance. In addition, since the resistance value of the first resistor unit Rx is of high precision, the voltage of the first resistor unit Rx is also accurate, so that the accurate voltage divider of the first resistor unit Rx and the second resistor unit Ry can be calculated.
[0047] In the disclosed embodiment, the second resistance unit Ry is a low-precision resistance unit (ie, the resistance precision of the second resistance unit Ry is less than a preset second precision threshold), which can play a role in determining the impedance size in the entire charge and discharge path.
[0048] In one embodiment, the second resistance unit Ry can be a low-precision large-impedance resistor. In one embodiment, the second resistance unit Ry can also be a low-precision variable equivalent resistor. In one embodiment, the second resistance unit Ry can also be a different combination of the above two resistors, as long as the impedance change under different load conditions can be achieved.
[0049] In the embodiment of the present disclosure, the second resistance unit Ry is a variable resistor, through which the resistance value of the second resistance unit can be adjusted in different application scenarios to take into account both power consumption and detection accuracy.
[0050] In the embodiment of the present disclosure, although the setting of the second resistance unit Ry with variable resistance can achieve a balance between power consumption and detection accuracy, it is not possible to set only the low-precision second resistance unit Ry without setting the high-precision first resistance unit Rx, because setting the second resistance unit Ry alone cannot fully guarantee the power accuracy (or power detection accuracy), as illustrated below with an example.
[0051] For example, in a low current scenario, the second resistance unit Ry is set separately, and the first resistance unit Rx is not set: even if the low-precision resistance unit Ry completes impedance calibration, assuming a calibrated upper limit resistance Ry1 = 20mohm, with an accuracy of 5%, the resistance fluctuation range of Ry is 19-21mohm. When the provided working current is 10mA (milliamperes), based on the voltage being equal to the product of the working current and the resistance, it can be concluded that the voltage fluctuation range is 190-210uv (microvolts). Conversely, dividing the voltage fluctuation by the upper limit resistance Ry1 can obtain a current fluctuation range of 9.5mA-10.5mA. At this time, comparing the current fluctuation of 9.5mA-10.5mA with the provided working current of 10mA, it can be obtained that the working current accuracy is (10-9.5) / 10=0.05=5%, that is, the working current accuracy is 5%. Electric quantity Q1=UIt, U is the voltage value, I is the current value, t is the duration of electricity consumption, then the actual value of UI is between (190uv)*(9.5mA) and (210uv)*(10.5mA), and the calibration value of UI should be 10mA*200uv, then comparing the actual value of UI with the calibration value, it can be seen that the accuracy of UI is 10.25%, that is, the error of UI value is 10.25%, since t is a fixed value, the accuracy of electric quantity mainly comes from UI value, through the above calculation, it can be seen that the accuracy of electric quantity is also 10.25%, then the accuracy of electric quantity detection is seriously reduced. Among them, the accuracy is expressed as a percentage in the above text, and the percentage refers to the percentage of error. The larger the percentage value, the larger the error and the lower the accuracy. On the contrary, the smaller the percentage value, the smaller the error and the higher the accuracy.
[0052] For example, in a high current scenario, the second resistance unit Ry is set alone, and the first resistance unit Rx is not set: even if the low-precision resistance unit Ry completes the impedance calibration, assuming a calibrated lower limit resistance Ry2 = 1.8mohm, an accuracy of 40%, and a resistance fluctuation range of 0.95mohm-2.6mohm, when the provided working current is 10A, based on the voltage being equal to the product of the working current and the resistance, it can be concluded that the voltage fluctuation range is 9.5mv-26mv. Conversely, the voltage fluctuation can be divided by the upper limit resistance Ry1 to obtain a current fluctuation range of 5 .3A-14.4A, at this time, comparing the current fluctuation 5.3A-14.4A with the provided 10A, the current accuracy is (10-5.3) / 10=0.47=47%, then the current accuracy is 47%, that is, the error is 47%, and the current accuracy is lower than 40%; comparing the voltage fluctuation 9.5mv-26mv with the calibration voltage 18mv (10A*1.8mohm), the voltage accuracy is (18-9.5) / 18=0.472=47.2%, then the voltage accuracy is 47.2%, that is, the error is 47.2%, and the voltage accuracy is lower than 40%. The actual value of UI is between (9.5mv)*(5.3A) and (26mv)*(14.4A), while the calibrated value of UI should be 10A*18mv. By comparing the actual value of UI with the calibrated value, it can be seen that the accuracy of UI is 108%, that is, the error of UI value is 108%. The power Q1=UIt, U is the voltage value, I is the current value, and t is the power usage time. Since t is a constant, the accuracy of the power Q1 mainly comes from the UI value. Through the above calculation, it can be seen that the accuracy of the power is also 108%, that is, the error is 108%, and the power detection accuracy is seriously reduced.
[0053] In the disclosed embodiment, it can be seen from the above two embodiments that even if the resistance value of the second resistance unit is calibrated in advance, since the first resistance unit Rx with accurate accuracy is not set, the calculated power accuracy does not meet the accuracy requirements, especially in the current scenario with large current.
[0054] In the disclosed embodiment, after adding the high-precision first resistance unit Rx, the power detection accuracy will not be significantly reduced. For example, the resistance value of the high-precision resistance unit Rx is 2mohm, the resistance accuracy of Rx is 0.5%, and the resistance fluctuation range is 1.995-2.005mohm. In the high current scenario, when the working current is 10A, the voltage fluctuation range can be calculated as 19.9mv-20.1mv based on the resistance fluctuation range of 1.995-2.005mohm. Conversely, the voltage fluctuation range can be divided by the resistance value of Rx 2mohm to obtain a current fluctuation range of 9.95A-10.05A. At this time, the current accuracy is 0.5%, and the power Q1 = UIt, where U is the voltage value, I is the current value, and t is the power usage time. Accordingly, the actual UI The actual value is between (19.9mv)*(9.95A) and (20.1mv)*(10.05A), and the calibration value of UI should be 10A*20mv. By comparing the actual value of UI with the calibration value, it can be seen that the accuracy of UI is 1%, that is, the error of UI value is 1%. Since t is a constant, the accuracy of the electric quantity Q1 mainly comes from the UI value. Through the above calculation, it can be seen that the accuracy of the electric quantity is also 1%, that is, the error is 1%, and the electric quantity detection accuracy is still very high. At this time, for the low-precision second detection unit, since the current accuracy is 0.5%, even if the resistance accuracy of the second resistance unit is very low, it will not make the final electric quantity detection accuracy far lower than the resistance accuracy of the second resistance unit. For example, the resistance of the second resistance unit Ry is Ry2=1.8mohm, the resistance accuracy of Ry is 40%, and the resistance fluctuation range of Ry is 0.95mohm-2.6mohm. Since the current fluctuation is 9.95A-10.05A, the voltage fluctuation on the second resistance unit Ry is 9.45mv-26.13mv, and the power Q1=UIt, where U is the voltage value, I is the current value, and t is the power consumption time. The actual value of UI is between (9.45mv)*(9.95A) and (26.13mv)*( 10.05A), and the calibration value of UI should be 10A*18mv. By comparing the actual value of UI with the calibration value, it can be seen that the accuracy of UI is 47%, that is, the error of UI value is 47%. Since t is a constant, the accuracy of the electric quantity Q1 mainly comes from the UI value. Through the above calculation, it can be seen that the accuracy of the electric quantity Q1 is also 47%, that is, the error is 47%. Therefore, due to the addition of the high-precision first resistance unit Rx, even if the accuracy of the second resistance unit Ry is only 40%, the detection accuracy of the electric quantity Q1 does not decrease much.
[0055] In the embodiment of the present disclosure, if the accurate calibration resistance value of the second resistor unit Ry in different current scenarios (for example, different current size scenarios, large current scenarios, small current scenarios, etc.) can be predetermined in subsequent schemes, and the resistance value of the second resistor unit Ry is directly fixed at the corresponding calibration resistance value in the corresponding current scenario, then the accuracy of the second resistor unit Ry can also be very high at this time, which can be maintained at about 0.5%, thereby maintaining the detection accuracy of the entire power detection scheme at about 1%, greatly improving the impedance accuracy of the low-precision resistor unit Ry.
[0056] In the embodiments of the present disclosure, it can be seen from the above embodiments that the combination of a high-precision first resistor unit Rx and a low-precision second resistor unit Ry can greatly improve the power detection accuracy and can minimize power consumption by adjusting the resistance value of the second resistor unit Ry.
[0057] In the embodiment of the present disclosure, each of the first resistance unit and the second resistance unit may include at least one resistor. When multiple resistors are included, there is no limitation on the combination of the multiple resistors.
[0058] In the embodiment of the present disclosure, the power meter Q is a multi-wire power meter, for example, it may include but is not limited to a three-wire or four-wire power meter, the power meter Q may include multiple detection lines sense, and the first resistance unit Rx and the second resistance unit Ry are connected to the power meter Q through the multiple detection lines sense.
[0059] In the embodiment of the present disclosure, the power detection circuit includes: a first resistor unit, a second resistor unit and a power meter; the resistance accuracy of the first resistor unit is greater than a preset first accuracy threshold, the resistance accuracy of the second resistor unit is less than a preset second accuracy threshold, and the first accuracy threshold is greater than or equal to the second accuracy threshold; the second resistor unit is a variable resistor; the power meter is a multi-wire power meter with a number of detection lines greater than or equal to 3; the first resistor unit and the second resistor unit are connected in series or in parallel, and are connected to the power meter through multiple detection lines. Figure 4 As shown, the electricity meter Q may be a three-wire electricity meter; the detection lines of the electricity meter may include but are not limited to: a first detection line sense1, a second detection line sense2 and a third detection line sense3; the first resistance unit Rx and the second resistance unit are connected in series;
[0060] Wherein, the first end of the first resistor unit Rx is connected to the power supply;
[0061] The second end of the first resistance unit Rx is connected to the first end of the second resistance unit Ry;
[0062] The second end of the second resistor unit Rx is connected to the ground end;
[0063] A first end of the first resistor unit Rx is connected to an input end of the electric meter Q through a first detection line sense1;
[0064] A first end of the second resistance unit Ry is connected to an input end of the electric quantity meter Q through a second detection line sense2;
[0065] The second end of the second resistor unit Ry is connected to the input end of the electric quantity meter Q through the third detection line sense3.
[0066] In the embodiment of the present disclosure, a pad may be provided between the second end of the first resistance unit Rx and the first end of the second resistance unit Ry; and the resistance of the pad is lower than a preset resistance threshold.
[0067] In the embodiments of the present disclosure, Figure 4 , Figure 5 As shown, pad P is a low impedance pad. The low impedance pad design can reduce the influence of PCB (printed circuit board) pad on the amplification and volatility of the total impedance value.
[0068] In the embodiment of the present disclosure, the power detection circuit includes: a first resistor unit, a second resistor unit and a power meter; the resistance accuracy of the first resistor unit is greater than a preset first accuracy threshold, the resistance accuracy of the second resistor unit is less than a preset second accuracy threshold, and the first accuracy threshold is greater than or equal to the second accuracy threshold; the second resistor unit is a variable resistor; the power meter is a multi-wire power meter with a number of detection lines greater than or equal to 3; the first resistor unit and the second resistor unit are connected in series or in parallel, and are connected to the power meter through multiple detection lines. Figure 5 As shown, the electric meter Q may be a four-wire electric meter; the detection lines of the electric meter Q may include but are not limited to: a fourth detection line sense4, a fifth detection line sense5, a sixth detection line sense6 and a sixth and seventh detection line sense7; the first resistance unit Rx and the second resistance unit Ry are connected in series;
[0069] Wherein, the first end of the first resistor unit Rx is connected to the power supply;
[0070] The second end of the first resistance unit Rx is connected to the first end of the second resistance unit Ry;
[0071] The second end of the second resistor unit Rx is connected to the ground end;
[0072] The second end of the second resistor unit Ry is connected to the ground end;
[0073] A first end of the first resistor unit Rx is connected to an input end of the electric meter Q through a fourth detection line sense4;
[0074] The second end of the first resistor unit Rx is connected to the input end of the electric meter Q through the fifth detection line sense5;
[0075] A first end of the second resistance unit Ry is connected to an input end of the electric meter Q through a sixth detection line sense6;
[0076] The second end of the second resistance unit Ry is connected to the input end of the electricity meter Q through the seventh detection line sense7.
[0077] In the embodiments of the present disclosure, the following text is based on Figure 4 The three-wire electricity meter shown is used as an example to illustrate the embodiment of the present disclosure, but the embodiment of the present disclosure is also applicable to other wire electricity meters. Any electricity meter that realizes electricity detection based on the aforementioned first resistance unit Rx and second resistance unit Ry is applicable to the embodiment of the present disclosure.
[0078] The embodiment of the present disclosure proposes a power detection method, based on the above power detection circuit, which is applied to a power meter of the power detection circuit, such as Figure 6 As shown, the method may include steps S11-S15:
[0079] S11, obtaining the voltage across the first resistance unit Rx of the power detection circuit in the charging and discharging state of the power storage device;
[0080] S12, determining the charge and discharge current according to the voltage across the first resistance unit and the pre-calibrated resistance value of the first resistance unit;
[0081] S13, obtaining a calibration resistance value of the second resistance unit Ry of the electric quantity detection circuit corresponding to the charge and discharge current; wherein the magnitude of the calibration resistance value is negatively correlated with the magnitude of the charge and discharge current;
[0082] S14, adjusting the resistance value of the second resistance unit Ry to a calibration resistance value;
[0083] S15 , determining the charge and discharge capacity of the power storage device according to the calibrated resistance value of the second resistance unit Ry and the resistance value of the first resistance unit Rx.
[0084] In the embodiment of the present disclosure, before implementing the above-mentioned power detection scheme, it is necessary to first obtain the calibrated resistance value of the first resistance unit Rx and the calibrated resistance values of the second resistance unit Ry corresponding to different current scenarios (different current scenarios correspond to different charging and discharging current ranges), so that when the charging and discharging current corresponding to a certain current scenario is detected, the resistance value of the second resistance unit Ry can be adjusted to the corresponding calibrated resistance value, thereby achieving the purpose of reducing power consumption and ensuring detection accuracy.
[0085] In the embodiment of the present disclosure, pre-calibrating the resistance value of the first resistance unit Rx may include:
[0086] Loading a preset current on the first resistance unit Rx;
[0087] collecting the voltage across the first resistance unit Rx;
[0088] The resistance value of the first resistance unit Rx is determined according to the preset current and the collected voltage.
[0089] In the disclosed embodiment, after the high-precision resistor unit (Rx) is completed through PCB production, a fixed current (i.e., the preset current mentioned above) calibration test can be introduced to calibrate the resistance value of the current Rx patch. For example, the voltage across the high-precision resistor unit (Rx) can be detected, and the resistance value of the high-precision resistor unit (Rx) can be calculated based on the voltage and the fixed current. During the calibration process, multiple calibration calculations can be performed to obtain multiple resistance values of Rx. The multiple resistance values of Rx can be averaged and written into a preset configuration table as the determined resistance value of Rx.
[0090] In the embodiment of the present disclosure, when calibrating Rx, the error size of Rx may be determined, for example, 5%, and the bias of the 5%, for example, positive or negative, may be determined.
[0091] In the disclosed embodiments, there are many application scenarios during the use of the terminal product, for example, including but not limited to: standby scenario, screen-off listening scenario, SPK (speaker abbreviation, which is a reserved interface for external speakers, which can directly drive passive small speakers) high-volume multimedia scenario, high-power data surfing scenario, etc., but different application scenarios can be classified according to the current values in different application scenarios. For example, multiple application scenarios can be divided into but not limited to: first current scenario, second current scenario and third current scenario. The first current scenario can be a small current scenario (also called a low power consumption scenario), the second current scenario can be a medium current scenario (also called a medium power consumption scenario), and the third current scenario can be a large current scenario (also called a high power consumption scenario). For different current scenarios, different calibration resistance values can be set for the low-precision resistor unit (Ry) accordingly. When it is detected that the terminal product is in which current scenario, the resistance value of the low-precision resistor unit (Ry) is adjusted to the corresponding calibration resistance value, so as to maximize the detection accuracy in the low current scenario, minimize the power consumption in the high current scenario, and ensure a certain detection accuracy, and achieve a balance between power consumption and detection accuracy in the medium current scenario.
[0092] In the disclosed embodiment, since the accuracy of the low-precision resistor unit (Ry) is low, there is a certain gap between the actual resistance value and the measured resistance value of the low-precision resistor unit (Ry) on each PCB. However, since the high-precision resistor unit (Rx) is a determined high-precision resistor, and the resistance value of Rx is a pre-calibrated resistance value, the actual resistance value of Ry (which can be called a calibrated resistance value) can be calculated based on the resistance value of Rx, and the calculated value can be saved for voltage calculation in different scenarios, so that the power meter can obtain a high-precision current value.
[0093] In the embodiment of the present disclosure, the method for obtaining the calibration resistance value of Ry is described in detail below.
[0094] In the embodiment of the present disclosure, the power storage device includes multiple current scenarios, and different current scenarios correspond to different charge and discharge current ranges and different calibration resistance values of the second resistance unit;
[0095] Before obtaining the calibration resistance value of the second resistance unit of the electric quantity detection circuit corresponding to the charge and discharge current, the method may further include:
[0096] The calibration resistance values corresponding to different current scenarios are obtained according to the resistance value of the first resistance unit.
[0097] After the circuit to be tested is connected to the power detection circuit, the current scenario of the circuit to be tested is first determined. Specifically, the charging and discharging currents are calculated, and the corresponding current scenario is determined according to the magnitude of the charging and discharging currents. Then, the calibration resistance of the second resistance unit corresponding to the current scenario is found. After the calibration resistance is found, the second resistance unit is adjusted to this calibration resistance so that the power detection circuit is suitable for the current scenario.
[0098] Since each current scenario corresponds to a calibration resistor of the second resistor unit, the calibration resistors corresponding to different current scenarios need to be calculated in advance (which can be obtained through experiments based on the resistance value of the first resistor unit) and set as a mapping table, so that when implementing the solution in the independent right, the resistance value of the second resistor unit corresponding to the current current scenario can be directly queried according to the mapping table. This is what the independent right means, to obtain the calibration resistor of the second resistor unit corresponding to each current scenario in advance.
[0099] In the embodiments of the present disclosure, Figure 7 As shown, obtaining calibration resistance values corresponding to different current scenarios according to the resistance value of the first resistance unit may include performing the following steps S21-S26 for each current scenario:
[0100] S21. Obtain a charging and discharging current range corresponding to any current scenario.
[0101] In the embodiments of the present disclosure, the methods for obtaining the calibration resistance values corresponding to different current scenarios are the same. Here, the method for obtaining the calibration resistance value corresponding to any current scenario is taken as an example to illustrate the embodiments of the present disclosure.
[0102] In the disclosed embodiment, each current scenario corresponds to a charge and discharge current range. In order to obtain a calibration resistance value corresponding to a current scenario, it is necessary to calculate the charge and discharge current under the current scenario.
[0103] S22: Obtain a first target charge and discharge current from a first charge and discharge current range.
[0104] In the disclosed embodiment, for any current scenario, a target charge and discharge current may be selected from the charge and discharge current range corresponding to the current scenario for calibration testing.
[0105] In the embodiments of the present disclosure, the target charge and discharge current may include but is not limited to: a charge and discharge current selected arbitrarily from the charge and discharge current range, a selected intermediate charge and discharge current, and a calculated average charge and discharge current value and mean square error value within the charge and discharge current range, etc. The method for obtaining the target charge and discharge current is not limited herein.
[0106] S23, adjusting the resistance adjustment gear of the second resistor unit to a plurality of different gear positions; each gear position corresponds to a resistance value of the second resistor unit.
[0107] In the disclosed embodiment, the gear position may include but is not limited to: an upper resistance limit position, a lower resistance limit position and a middle resistance limit position.
[0108] S24, for each gear position, charge and discharge the electric quantity storage device with the target charge and discharge current, and detect the first voltage across the second resistance unit and the second voltage across the first resistance unit.
[0109] In the embodiment of the present disclosure, after selecting the corresponding target charge and discharge current from the charge and discharge current range corresponding to each current scenario, the charge and discharge operation can be performed on the power storage device according to the target charge and discharge current, and the power detection circuit can be used to detect the power of the power storage device.
[0110] In the embodiment of the present disclosure, after the resistance adjustment gear of the second resistor unit is adjusted to any gear position, the voltage across the first resistor unit and the second resistor unit, that is, the first voltage and the second voltage, can be detected by the power meter.
[0111] In the embodiments of the present disclosure, Figure 4As shown, the voltage V12 across the first resistance unit Rx can be detected through the detection lines Sense1 and Sense2, and the voltage V23 across the second resistance unit Ry can be detected through the detection lines Sense2 and Sense3.
[0112] S25. Determine the resistance value of the second resistance unit corresponding to the corresponding gear position according to the first voltage, the second voltage and the resistance value of the first resistance unit detected for each gear position.
[0113] In the embodiment of the present disclosure, since the resistance value of the first resistor unit is relatively precise and the first voltage is also relatively precise, a more accurate target charge and discharge current can be obtained based on the first voltage and the resistance value of the first resistor unit, and the resistance of the second resistor unit can be obtained based on the calculated target charge and discharge current and the second voltage.
[0114] In the embodiment of the present disclosure, Figure 4 For example, if the resistance value of the first resistance unit Rx is R1 and the resistance value of the second resistance unit Ry is R2, R2 = V23*R1 / V12 can be calculated by V12 / R1 = V23 / R2.
[0115] S26. Select a resistance value whose power consumption meets a preset power consumption requirement and whose electric quantity meets a preset electric quantity accuracy requirement from the resistance values of the second resistance units corresponding to the multiple gear positions as a calibration resistance value corresponding to the current scenario.
[0116] In the disclosed embodiment, based on the resistance value of the second resistor unit corresponding to the gear position determined in step S25, the power consumption value and the measured power value of the first resistor unit and the second resistor unit can be calculated; and based on the resistance value accuracy of the first resistor unit, the fluctuation range of the target charge and discharge current can be calculated, and the fluctuation range of the resistance of the second resistor unit can be calculated according to the fluctuation range of the target charge and discharge current. Accordingly, the power fluctuation range can be calculated to obtain the power accuracy. For example, when R1 and R2 are known, the corresponding power consumption value and power can be calculated according to the formula, and the corresponding power accuracy can also be obtained.
[0117] In the embodiment of the present disclosure, based on considerations of power consumption and accuracy, in order to make the power consumption as low as possible, the power detection accuracy must also be guaranteed. Therefore, for different current scenarios, the corresponding power consumption requirements and power accuracy requirements can be pre-determined according to detailed scenario information, so as to determine the corresponding calibration resistance value of the second resistance unit according to the power consumption requirements and accuracy requirements.
[0118] In the embodiment of the present disclosure, according to the above scheme, several gear positions can be adjusted within a certain current scenario to obtain corresponding multiple groups of power consumption values, power accuracy and the resistance of the second resistance unit, so that the resistance of the second resistance unit corresponding to the gear position whose power consumption value meets the power consumption requirement and the power accuracy meets the power accuracy requirement can be selected from the resistances of the second resistance units corresponding to the multiple gear positions.
[0119] In the embodiment of the present disclosure, for the multiple groups of power consumption values, power accuracy and resistance of the second resistance unit obtained, the power consumption value and power accuracy of each group can be compared with the power consumption requirement and power accuracy requirement corresponding to the current scenario, respectively. If a group meets both the power consumption requirement and the power accuracy requirement, the resistance of the second resistance unit in the group can be selected.
[0120] In the embodiment of the present disclosure, the resistance of the selected second resistance unit may be one or more. In the case where the resistance of the selected second resistance unit is multiple, the resistance of the second resistance unit with the highest corresponding power detection accuracy can be selected as the calibration resistance value corresponding to the current scenario.
[0121] In the disclosed embodiment, in order to facilitate operation and simplify the scheme, the resistance adjustment gear can be adjusted only to the upper limit position and the lower limit position of the gear. When the resistance adjustment gear is adjusted to the upper limit position of the gear, R2 is the upper limit resistance value, and when the resistance adjustment gear is adjusted to the lower limit position of the gear, R2 is the lower limit resistance value. In actual applications, in high current scenarios, the second resistance unit can directly adopt the lower limit resistance value, and in low current scenarios, the second resistance unit can directly adopt the upper limit resistance value.
[0122] In the embodiment of the present disclosure, the calibration resistance values corresponding to different current scenarios can be stored in a preset configuration file or program so that they can be called at any time when the power calculation is performed. In addition, different current scenarios, the charge and discharge current ranges and calibration resistance values corresponding to the current scenarios can be stored as a mapping relationship, including but not limited to, so that the corresponding calibration resistance values can be directly called according to the charge and discharge currents.
[0123] In the embodiment of the present disclosure, obtaining the calibration resistance value of the second resistance unit Ry of the power detection circuit corresponding to the charge and discharge current may include:
[0124] Obtaining a preset mapping relationship; the mapping relationship includes a correspondence between different charge and discharge current ranges and different calibration resistance values; each charge and discharge current range is used to indicate a current scenario; the magnitude of the corresponding calibration resistance values is negatively correlated with the magnitude of the charge and discharge current;
[0125] Determine the charge and discharge current range to which the charge and discharge current belongs;
[0126] A calibration resistance value matching the charge and discharge current is obtained according to the charge and discharge current range to which the charge and discharge current belongs and a mapping relationship.
[0127] In the disclosed embodiment, the correspondence between different current scenarios and the calibration resistance values of the corresponding second resistor units can be obtained in advance and stored as a mapping relationship, wherein, since different current scenarios correspond to different charge and discharge current ranges, the correspondence between different charge and discharge current ranges and the calibration resistance values corresponding to the current scenarios can be directly stored in the mapping relationship.
[0128] In the embodiment of the present disclosure, the above-mentioned mapping relationship may include but is not limited to being stored in the form of a mapping table, or may be stored in other forms, which are not limited here.
[0129] In the embodiment of the present disclosure, for example, the calibration resistance value may include but is not limited to: a first resistance value, a second resistance value, and a third resistance value; the first resistance value is smaller than the second resistance value, and the second resistance value is smaller than the third resistance value;
[0130] The mapping relationship includes but is not limited to: a charge and discharge current range greater than or equal to a preset first current threshold corresponds to a first resistance value; a charge and discharge current range greater than or equal to a preset second current threshold and less than the first current threshold corresponds to a second resistance value; a charge and discharge current range less than the second current threshold corresponds to a third resistance value;
[0131] Obtaining a calibration resistance value matching the charge and discharge current according to the charge and discharge current range and mapping relationship to which the charge and discharge current belongs may include:
[0132] When the charge and discharge current is greater than or equal to a preset first current threshold, obtaining a first resistance value;
[0133] When the charge and discharge current is greater than or equal to a preset second current threshold and less than the first current threshold, obtaining a second resistance value;
[0134] When the charge and discharge current is less than the second current threshold, a third resistance value is obtained.
[0135] In the embodiments of the present disclosure, the first current threshold and the second current threshold are merely examples. A third current threshold, a fourth current threshold, etc. may also be set according to different application scenarios. There is no limitation on the number of current thresholds. The more current thresholds there are, the more detailed the divided current scenarios are. Accordingly, the more calibration resistors need to be set, and the more precise the control of power detection accuracy and power consumption is.
[0136] In the embodiment of the present disclosure, the first current threshold and the second current threshold can be defined according to the needs, and the detailed values of the first current threshold and the second current threshold are not limited here.
[0137] In the embodiment of the present disclosure, the first current threshold may be a larger current value, and the second current threshold may be a smaller current value. The first current threshold and the second current threshold may be used to simply divide the small current scenario, the medium current scenario, and the large current scenario.
[0138] In the embodiment of the present disclosure, when the charge and discharge current is greater than or equal to the preset first current threshold, it can be determined that the terminal product is in a high current scenario. At this time, due to the high power consumption, in order to minimize the power consumption, a calibration resistor with a lower resistance can be configured for the second resistance unit, but in order to take into account the detection accuracy, the resistance of the calibration resistor cannot be too low, for example, the above-mentioned first resistance value is selected; when the charge and discharge current is greater than or equal to the preset second current threshold and less than the first current threshold, it can be determined that the terminal product is in a medium current scenario. At this time, in order to balance power consumption and accuracy, a moderate calibration resistor, such as the second resistance value, can be configured for the second resistance unit; when the charge and discharge current is less than the second current threshold, it can be determined that the terminal product is in a low current scenario. At this time, due to the small current and low power consumption, the main consideration is to ensure the power detection accuracy, but the power consumption of the calibration resistor cannot be too large, so a larger calibration resistor, such as the third resistance value, can be configured for the second resistance unit.
[0139] In the embodiment of the present disclosure, detailed data of the first resistance value, the second resistance value, and the third resistance value can be defined according to different terminal products and different application scenarios, and are not limited here.
[0140] In the embodiment of the present disclosure, the first resistance value may include the lower resistance value of the second resistance unit; the third resistance value may include the upper resistance value of the second resistance unit; and the second resistance value may include the middle resistance value of the second resistance unit.
[0141] In the disclosed embodiment, for ease of implementation, the first resistance value may directly adopt the lower resistance value, the third resistance value may directly adopt the upper resistance value, and the second resistance value may adopt an intermediate resistance value between the lower resistance value and the lower resistance value.
[0142] In the embodiment of the present disclosure, based on the above-mentioned mapping relationship, the calibrated resistance value of the second resistor unit corresponding to different current scenarios is obtained according to the charging and discharging current, so that the resistance value of the second resistor unit can be adjusted to the corresponding calibrated resistance value in different current scenarios to perform power detection, thereby ensuring the power detection accuracy in the current scenario and making the power consumption meet certain power consumption requirements, thereby achieving the purpose of improving the power detection accuracy and minimizing power consumption.
[0143] In the embodiment of the present disclosure, the method may further include:
[0144] Determine different power detection cycles in advance for different current scenarios;
[0145] Among them, the power consumption of the current scenario is negatively correlated with the length of the corresponding power detection cycle.
[0146] In the embodiment of the present disclosure, the greater the power consumption of a certain current scenario, the shorter the power detection cycle can be set, that is, the more frequent the detection times. Conversely, the smaller the power consumption of a certain current scenario, the longer the power detection cycle can be set, that is, the more sparse the detection times.
[0147] In the embodiment of the present disclosure, because the power consumption is large in the application scenario of high current, in order to prevent excessive power consumption, the calibration resistance of the second resistance unit is generally set to be smaller, and some accuracy may be sacrificed at this time. Therefore, in order to compensate for the decrease in accuracy caused by the smaller resistance value of the calibration resistance, the detection accuracy can be improved by increasing the number of detections.
[0148] In the embodiment of the present disclosure, in the application scenario of small current, since the power consumption itself is small, the calibration resistance of the second resistance unit does not need to be set too small, and the impact on the accuracy is small at this time, so a lower power detection frequency can be set.
[0149] In a third aspect, the present disclosure provides a first electronic device 800, such as Figure 8 As shown, the first electronic device 800 includes the power detection circuit 100 .
[0150] In a fourth aspect, the present disclosure provides a second electronic device 900, such as Fig. 9 As shown, the second electronic device 900 includes:
[0151] at least one processor 901;
[0152] A memory 902 storing at least one program, when the at least one program is executed by at least one processor, the at least one processor implements the power detection method;
[0153] At least one I / O interface 903 is connected between the processor 901 and the memory 902 and is configured to implement information interaction between the processor 901 and the memory 902 .
[0154] Among them, the processor 901 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 902 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the I / O interface (read-write interface) 903 is connected between the processor 901 and the memory 902, and can realize information interaction between the processor 901 and the memory 902, including but not limited to a data bus (Bus), etc.
[0155] In some embodiments, the processor 901 , the memory 902 , and the I / O interface 903 are connected to each other via a bus 904 , and further connected to other components of the computing device.
[0156] In some embodiments, the second electronic device 900 may be a fuel gauge.
[0157] In a fifth aspect, the present disclosure provides a computer-readable storage medium 1000, such as Fig.10 As shown, a computer program is stored thereon, and the computer program implements the power detection method when executed by the processor.
[0158] Those skilled in the art will appreciate that all or some of the steps, systems, and functional modules / units in the apparatus disclosed above may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0159] In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation.
[0160] Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit (CPU), a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-temporary medium) and a communication medium (or temporary medium). As known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH) or other disk storage; read-only compact disk (CD-ROM), digital versatile disk (DVD) or other optical disk storage; magnetic cassettes, magnetic tapes, disk storage or other magnetic storage; any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0161] The present disclosure has disclosed example embodiments, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly stated, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.
Claims
1. A power detection circuit, characterized in that: include: a first resistance unit, a second resistance unit, and an electric meter; The resistance accuracy of the first resistor unit is greater than a preset first accuracy threshold, the resistance accuracy of the second resistor unit is less than a preset second accuracy threshold, and the first accuracy threshold is greater than or equal to the second accuracy threshold; the second resistor unit is a variable resistor; the electricity meter is a multi-wire electricity meter with a number of detection lines greater than or equal to 3; The first resistance unit and the second resistance unit are connected in series or in parallel, and are connected to the electricity meter through a plurality of detection lines.
2. The electric quantity detection circuit according to claim 1, characterized in that: The electricity meter is a three-wire electricity meter; the detection lines of the electricity meter include: a first detection line, a second detection line and a third detection line; the first resistance unit and the second resistance unit are connected in series; in, The first end of the first resistance unit is connected to the electricity meter through the first detection line; The first end of the second resistance unit is connected to the electricity meter through the second detection line; The second end of the second resistance unit is connected to the electricity meter through the third detection line.
3. The electric quantity detection circuit according to claim 1, characterized in that: A pad is provided between the second end of the first resistance unit and the first end of the second resistance unit; The resistance of the pad is lower than a preset resistance threshold.
4. The electric quantity detection circuit according to claim 1, characterized in that: The electricity meter is a four-wire electricity meter; the detection lines of the electricity meter include: a fourth detection line, a fifth detection line, a sixth detection line and a sixty-seventh detection line; the first resistance unit and the second resistance unit are connected in series; in, The first end of the first resistor unit is connected to the electricity meter through the fourth detection line; The second end of the first resistance unit is connected to the electricity meter through the fifth detection line; The first end of the second resistance unit is connected to the electricity meter through the sixth detection line; The second end of the second resistance unit is connected to the electricity meter through a seventh detection line.
5. The electric quantity detection circuit according to claim 1, characterized in that: The power detection circuit is applied to various current scenarios.
6. The electric quantity detection circuit according to claim 5, characterized in that: When the resistance value of the second resistor unit is adjusted to different calibration resistance values, the power detection circuit is applied to different current scenarios; The resistance of the second resistor unit is negatively correlated with the current of the current scenario.
7. A method for detecting electric quantity, characterized in that: The method comprises: When the power storage device is in a charging or discharging state, obtaining a voltage across the first resistance unit of the power detection circuit; determining a charge and discharge current according to a voltage across the first resistance unit and a pre-calibrated resistance value of the first resistance unit; Obtaining a calibration resistance value of a second resistance unit of the power detection circuit corresponding to the charge and discharge current; wherein the magnitude of the calibration resistance value is negatively correlated with the magnitude of the charge and discharge current; adjusting the resistance value of the second resistance unit to the calibration resistance value; The charge and discharge amount of the electric quantity storage device is determined according to the calibrated resistance value of the second resistance unit and the resistance value of the first resistance unit.
8. The method for detecting electric quantity according to claim 7, characterized in that: The power storage device includes multiple current scenarios, and different current scenarios correspond to different charge and discharge current ranges and different calibration resistance values of the second resistance unit; Before obtaining the calibration resistance value of the second resistance unit of the electric quantity detection circuit corresponding to the charge and discharge current, the method further includes: The calibration resistance values corresponding to different current scenarios are obtained according to the resistance value of the first resistance unit.
9. The method for detecting electric quantity according to claim 8, characterized in that: The obtaining calibration resistance values corresponding to different current scenarios according to the resistance value of the first resistance unit includes: Obtaining a charge and discharge current range corresponding to the current scenario; obtaining a target charge and discharge current from the charge and discharge current range; Adjusting the resistance adjustment gear of the second resistor unit to a plurality of different gear positions; each of the gear positions corresponds to a resistance value of the second resistor unit; For each of the gear positions, the electric quantity storage device is charged and discharged with the target charge and discharge current, and a first voltage across the second resistance unit and a second voltage across the first resistance unit are detected; Determining the resistance value of the second resistance unit corresponding to the corresponding gear position according to the first voltage, the second voltage and the resistance value of the first resistance unit detected for each gear position; A resistance value whose power consumption meets a preset power consumption requirement and whose electric quantity meets a preset electric quantity accuracy requirement is selected from the resistance values of the second resistance unit corresponding to a plurality of gear positions as a calibration resistance value corresponding to the current scenario.
10. The method for detecting electric quantity according to claim 7, characterized in that: The obtaining of a calibration resistance value of a second resistance unit of the electric quantity detection circuit corresponding to the charge and discharge current includes: Acquire a preset mapping relationship; the mapping relationship includes a corresponding relationship between at least one charging and discharging current range and at least one calibration resistance value; each of the charging and discharging current ranges is used to indicate a current scenario; Determining a charge and discharge current range to which the charge and discharge current belongs; A calibration resistance value matching the charge and discharge current is acquired according to the charge and discharge current range to which the charge and discharge current belongs and the mapping relationship.
11. The method for detecting electric quantity according to claim 10, characterized in that: The calibration resistance includes: a first resistance, a second resistance and a third resistance; the first resistance is smaller than the second resistance, and the second resistance is smaller than the third resistance; The mapping relationship includes: a charge and discharge current range greater than or equal to a preset first current threshold corresponds to the first resistance value; a charge and discharge current range greater than or equal to a preset second current threshold and less than the first current threshold corresponds to the second resistance value; a charge and discharge current range less than the second current threshold corresponds to the third resistance value; The obtaining a calibration resistance value matching the charge and discharge current according to the charge and discharge current range to which the charge and discharge current belongs and the mapping relationship includes: When the charge and discharge current is greater than or equal to a preset first current threshold, obtaining the first resistance value; When the charge and discharge current is greater than or equal to a preset second current threshold and less than the first current threshold, acquiring the second resistance value; When the charge and discharge current is less than the second current threshold, the third resistance value is obtained.
12. The method for detecting electric quantity according to claim 11, characterized in that: The first resistance value includes a lower resistance value of the second resistance unit; the third resistance value includes an upper resistance value of the second resistance unit; and the second resistance value includes an intermediate resistance value of the second resistance unit.
13. The method for detecting electric quantity according to claim 8, characterized in that: The method further comprises: Determine different power detection cycles in advance for different current scenarios; The power consumption of the current scenario is negatively correlated with the length of the corresponding power detection cycle.
14. A first electronic device, characterized in that: The first electronic device comprises: a power detection circuit as described in any one of claims 1-6.
15. A second electronic device, the second electronic device comprising: at least one processor; A memory having at least one program stored thereon, wherein when the at least one program is executed by the at least one processor, the at least one processor implements the power detection method according to any one of claims 7 to 13; At least one input / output I / O interface is connected between the processor and the memory and is configured to implement information interaction between the processor and the memory.
16. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the power detection method according to any one of claims 7 to 13.