CN115882537A - Electric quantity detection circuit, terminal, electric quantity determination method and readable storage medium - Google Patents

Electric quantity detection circuit, terminal, electric quantity determination method and readable storage medium Download PDF

Info

Publication number
CN115882537A
CN115882537A CN202111137375.9A CN202111137375A CN115882537A CN 115882537 A CN115882537 A CN 115882537A CN 202111137375 A CN202111137375 A CN 202111137375A CN 115882537 A CN115882537 A CN 115882537A
Authority
CN
China
Prior art keywords
terminal
battery
processor
fuel gauge
detection circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111137375.9A
Other languages
Chinese (zh)
Inventor
陈贤军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202111137375.9A priority Critical patent/CN115882537A/en
Priority to PCT/CN2022/118586 priority patent/WO2023045809A1/en
Publication of CN115882537A publication Critical patent/CN115882537A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R11/00Electromechanical arrangements for measuring time integral of electric power or current, e.g. of consumption
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R11/00Electromechanical arrangements for measuring time integral of electric power or current, e.g. of consumption
    • G01R11/30Dynamo-electric motor meters
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/36Arrangements for testing, measuring or monitoring the electrical condition of accumulators or electric batteries, e.g. capacity or state of charge [SoC]
    • G01R31/382Arrangements for monitoring battery or accumulator variables, e.g. SoC
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/28Supervision thereof, e.g. detecting power-supply failure by out of limits supervision
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Power Engineering (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Secondary Cells (AREA)

Abstract

The application relates to an electric quantity detection circuit, a terminal, an electric quantity determination method and a readable storage medium. The electric quantity detection circuit is applied to a terminal, the terminal comprises a first processor and a second processor, the first processor is used for operating a first system, the second processor is used for operating a second system, and the operation power consumption of the first processor is larger than that of the second processor; the electric quantity detection circuit includes: the first electricity meter is used for determining first battery electricity quantity of the terminal according to the battery output current of the terminal and first battery temperature of the terminal when the second system is in a dormant state; and the second electricity meter is used for determining a second battery electricity quantity of the terminal according to the battery output current of the terminal and a second battery temperature of the terminal when the first system is in the dormant state. The electric quantity detection circuit can still accurately display the electric quantity of the terminal when a first system of the terminal enters a dormant state.

Description

Electric quantity detection circuit, terminal, electric quantity determination method and readable storage medium
Technical Field
The present application relates to the field of mobile terminal technologies, and in particular, to a power detection circuit, a terminal, a power determination method, and a readable storage medium.
Background
With the development of mobile communication technology, many terminals at present start to adopt a large and small nuclear dual-system architecture in order to improve the cruising ability of the terminals, the functions of the large nuclear system are usually rich, and an electricity meter can be normally used to display the electricity percentage; however, the function supported by the small core system is relatively simple, and only the power can be estimated and the grid number of the power can be displayed in the small core mode, so that when the large core system of the terminal enters a sleep state, it is difficult for the small core system to accurately display the power of the terminal.
Disclosure of Invention
The embodiment of the application provides an electric quantity detection circuit, a terminal, an electric quantity determination method and a readable storage medium, which can accurately display the electric quantity of the terminal by a small core system when a large core system of the terminal enters a dormant state.
In a first aspect, a power detection circuit is provided, where the power detection circuit is applied to a terminal, the terminal includes a first processor and a second processor, the first processor is configured to operate a first system, the second processor is configured to operate a second system, and an operation power consumption of the first processor is greater than an operation power consumption of the second processor; the electric quantity detection circuit includes:
the first electricity meter is used for determining a first battery electricity quantity of the terminal according to the battery output current of the terminal and a first battery temperature of the terminal when the second system is in a dormant state;
and the second electricity meter is used for determining a second battery electricity quantity of the terminal according to the battery output current of the terminal and a second battery temperature of the terminal when the first system is in a dormant state.
In a second aspect, a power detection circuit is provided, where the power detection circuit is applied to a terminal, the terminal includes a first processor and a second processor, the first processor is used to operate a first system, the second processor is used to operate a second system, and an operation power consumption of the first processor is greater than an operation power consumption of the second processor; the electric quantity detection circuit includes: a control switch and an electricity meter;
the control switch is used for conducting a passage between the fuel gauge and the first processor when the second system is in a dormant state, so that the fuel gauge determines a first battery capacity of the terminal according to the battery output current of the terminal and a first battery temperature of the terminal;
the control switch is further configured to conduct a path between the fuel gauge and the second processor when the first system is in a sleep state, so that the fuel gauge determines a second battery capacity of the terminal according to the battery output current of the terminal and a second battery temperature of the terminal.
In a third aspect, a terminal is provided, where the terminal includes:
a first processor for operating a first system;
a second processor for operating a second system; the running power consumption of the first processor is larger than that of the second processor; and
the electrical quantity detection circuit according to any one of the first and second aspects.
In a fourth aspect, a method for determining power is provided, where the method is applied to a terminal, and the terminal includes: a first processor for operating a first system and a second processor for operating a second system, the operating power consumption of the first processor being greater than the operating power consumption of the second processor, the method comprising:
the first system determines a first battery capacity of the terminal through a first fuel gauge when the second system is in a dormant state;
and the second system determines a second battery capacity of the terminal through a second fuel gauge when the first system is in a dormant state.
In a fifth aspect, a power determination method is provided, and is applied to a terminal, where the terminal includes: a first processor to run a first system and a second processor to run a second system, the first processor to run power consumption greater than the second processor to run power consumption, the method comprising:
when the second system is in a dormant state, the first system conducts a channel between a fuel gauge and the first processor, and determines a first battery capacity of the terminal through the fuel gauge;
and when the first system is in a dormant state, the second system conducts a passage between the fuel gauge and the second processor, and determines a second battery capacity of the terminal through the fuel gauge.
A sixth aspect provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method according to the fourth and fifth aspects.
The electric quantity detection circuit is applied to the terminal, the terminal comprises a first processor and a second processor, the first processor is used for operating a first system, the second processor is used for operating a second system, and the operation power consumption of the first processor is larger than that of the second processor; when the second system is in a dormant state, the first electric quantity meter of the electric quantity detection circuit can determine the first electric quantity of the battery of the terminal according to the battery output current of the terminal and the first battery temperature of the terminal, and when the first system is in the dormant state, the second electric quantity meter of the electric quantity detection circuit can detect the second electric quantity of the battery of the terminal according to the battery output current of the terminal and the second battery temperature of the terminal, namely the electric quantity detection circuit is applied.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a block diagram illustrating an internal structure of a conventional terminal according to an embodiment;
fig. 2 is an internal structure diagram of a terminal to which an electric quantity detection circuit according to an embodiment of the present application is applied;
FIG. 2a is a schematic diagram of a simplified battery fuel gauge provided in accordance with an embodiment of the present application;
fig. 3 is an internal structure diagram of a terminal to which the power detection circuit is applied according to an embodiment of the present disclosure;
fig. 4 is an internal structure diagram of a terminal to which the power detection circuit is applied according to an embodiment of the present disclosure;
fig. 5 is an internal structure diagram of a terminal to which the power detection circuit is applied according to an embodiment of the present disclosure;
fig. 6 is an internal structural diagram of a terminal to which a power detection circuit according to another embodiment of the present application is applied;
fig. 7 is an internal structural diagram of a terminal to which a power detection circuit according to another embodiment of the present application is applied;
FIG. 8 is a flow chart illustrating a method for determining power in one embodiment;
fig. 9 is a flowchart illustrating a method for determining power according to an embodiment.
Description of reference numerals:
10: a first electricity meter; 20: a second electricity meter; 30: a second thermistor;
40: detecting a resistance; 50: a control switch; 60: an electricity meter;
70: and detecting the resistance.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first client may be referred to as a second client, and similarly, a second client may be referred to as a first client, without departing from the scope of the present application. Both the first client and the second client are clients, but they are not the same client.
At present, many terminals start to adopt a large-core and small-core dual-system architecture mode in order to improve their cruising ability, for example, the large-core mode generally operates in an Android system, the processor in the large-core mode generally operates in a strong-performance processor of the Android system, such as a CPU, the small-core mode generally operates in a FreeRTOS system, an MCU, and other systems, and the processor in the small-core mode generally operates in a low-power-consumption processor of the FreeRTOS system, the MCU, and other systems. Generally, as shown in fig. 1, a power management chip PMIC is mounted on a processor of a large nuclear system, and the PMIC has a current meter FG, which detects an output current of a battery at a terminal through an external current detection resistor (usually 10m Ω), and integrates the detected current value with time to obtain a battery power amount at the terminal. In the small core mode, the processor of the large core and the PMIC are in a dormant state, the battery output current of the terminal is converted by the DC-DC conversion circuit to supply power to the processor of the small core, and at the moment, the FG of the large core system cannot calculate the electric quantity consumed by the small core system, so that the electric quantity of the terminal is difficult to accurately display; in addition, when the terminal is switched back to the big core mode again, the power of the terminal before the FG display or the PMIC dormancy greatly differs from the actual power of the terminal.
Based on this, in view of the above situation, an embodiment of the present application provides an electric quantity detection circuit, so that when a large core system of a terminal enters a sleep state, a small core system can still accurately display the electric quantity of the terminal.
In a first aspect, as shown in fig. 2, in an embodiment, the present application provides a power detection circuit 01, where the power detection circuit 01 is applied to a terminal, the terminal includes a first processor and a second processor, the first processor is configured to operate a first system, the second processor is configured to operate a second system, an operation power consumption of the first processor is greater than an operation power consumption of the second processor, and the power detection circuit 01 includes: a first electricity meter 10 for determining a first battery electricity quantity of the terminal according to a battery output current of the terminal and a first battery temperature of the terminal when the second system is in a sleep state; and a second electricity meter 20 for determining a second battery electricity quantity of the terminal according to the battery output current of the terminal and a second battery temperature of the terminal when the first system is in a sleep state.
The first electricity meter 10 and the second electricity meter 20 can continuously integrate the total output current of the battery at the terminal, and the net charge obtained by integration is used as the remaining capacity of the battery to obtain the battery capacity. Exemplarily, taking the simplified block diagram of the battery fuel gauge in fig. 2a as an example, in fig. 2a, rsns is a current detection resistor of m Ω class, R1 is a load resistor, the voltage drop generated across Rsns by the current I when R1 is discharged by Rsns through the switch is V s (t) = I (t) × Rsns, whereby the output current of the battery is obtained
Figure BDA0003282568120000051
And then continuously integrating the output current of the battery to obtain the electric quantity of the battery as follows:
Figure BDA0003282568120000052
in this embodiment, a terminal applied by the electric quantity detection circuit 01 is a terminal including a large and small kernel dual-system architecture, wherein a first system of the terminal may be a high-performance system such as Android; the second system of the terminal can be a FreeRTOS, an MCU, a singlechip and other low-power-consumption systems; the operation power consumption of the first processor of the terminal is greater than the operation power consumption of the second processor, that is, the processing capability of the first system of the terminal is higher than the processing capability of the second system in the dual-system architecture, for example, the processing capability of the first system of the terminal is higher than the processing capability of the second system, the operation capability of the first system is higher than the operation capability of the second system, or the processing speed of the first system is higher than the processing speed of the second system. Optionally, the terminal may be a mobile phone, a watch, a bracelet, a tablet computer, or the like, which is not limited in the embodiment of the present application.
It is understood that in some scenarios, when the processing capability of the terminal is strong, the first system of the terminal is in an active state and the second system of the terminal is in a dormant state. Optionally, the second system of the terminal is in the dormant state, where the second system gives the control right of the terminal to the first system after receiving the control right switching instruction sent by the first system, and the second system enters the dormant state. Optionally, in this embodiment, the first fuel gauge 10 may be mounted on the first processor of the terminal, or may be integrated on a processing chip of the first processor, which is not limited in this embodiment. Optionally, in this embodiment, the first fuel gauge 10 is connected to the first processor and the battery of the terminal, respectively, and when the second system of the terminal enters the sleep state, the first fuel gauge 10 acquires the battery output current of the terminal and the first battery temperature of the terminal, and determines the first battery power of the terminal according to the battery output current of the terminal and the first battery temperature of the terminal. Optionally, a detection resistor may be disposed in the electric quantity detection circuit 01, and the first electricity meter 10 may obtain the output current of the battery according to a resistance value of the detection resistor in the electric quantity detection circuit 01 and a voltage difference between two ends of the detection resistor, or a current detector may be mounted at an output end of the battery of the terminal, and the first electricity meter 10 may obtain the output current of the battery of the terminal through the current detector. Alternatively, a temperature sensor may be disposed in the battery of the terminal, and the first fuel gauge 10 may obtain the first battery temperature of the terminal from the temperature sensor, or a thermistor may be disposed on the battery of the terminal, and the first battery temperature of the terminal is obtained through the thermistor.
Further, the first electricity meter 10 may determine internal resistance consumption of the terminal battery according to a first battery temperature of the terminal, so as to obtain a current value corresponding to the internal resistance consumption of the terminal battery according to the internal resistance consumption of the terminal battery, integrate the current value to obtain a first consumed electricity quantity of the terminal battery, integrate a battery output current of the terminal to obtain a second consumed electricity quantity of the terminal battery, and determine a sum of the first consumed electricity quantity and the second consumed electricity quantity as a total consumed electricity quantity of the terminal battery, so as to determine the first battery electricity quantity of the terminal; or, the first electricity meter 10 may determine the internal resistance consumption of the terminal battery according to the first battery temperature of the terminal, so as to obtain a current value corresponding to the internal resistance consumption of the terminal battery according to the internal resistance consumption of the terminal battery, add the battery output current of the terminal and the current value corresponding to the internal resistance consumption of the battery, and integrate the added current values to obtain the total consumed electric quantity of the terminal battery, thereby determining the first battery electric quantity of the terminal. Optionally, the first electricity meter 10 may determine a difference between a battery electricity amount corresponding to the second system of the terminal entering the sleep state and the obtained total consumed electricity amount of the terminal battery as the first battery electricity amount of the terminal, for example, if the battery electricity amount corresponding to the second system of the terminal entering the sleep state is 80%, the obtained total consumed electricity amount of the terminal battery is 20%, and then the first electricity meter 10 determines the first battery electricity amount of the terminal to be 60%.
In other scenarios, for example, when the terminal is in the long endurance mode, the first system of the terminal will be in a sleep state, and the first electricity meter 10 will also be powered off and stop operating, at which time the second electricity meter 20 of the electricity quantity detection circuit 01 determines the second battery electricity quantity of the terminal according to the battery output current of the terminal and the second battery temperature of the terminal. Alternatively, in this embodiment, the second electricity meter 20 may be connected to the second processor of the terminal and the battery of the terminal, and the second electricity meter 20 may obtain the output current of the battery according to the resistance value of the detection resistor and the voltage value across the detection resistor in the electricity quantity detection circuit 01, or the second electricity meter 20 may obtain the output current of the battery of the terminal through the current detector installed at the output end of the battery of the terminal. Alternatively, the second electricity meter 20 may obtain the second battery temperature of the terminal from a temperature sensor provided in the battery of the terminal, or may obtain the second battery temperature of the terminal from a thermistor provided on the battery of the terminal. Further, the second electricity meter 20 may determine internal resistance consumption of the terminal battery according to the second battery temperature of the terminal, so as to obtain a current value corresponding to the internal resistance consumption of the terminal battery according to the internal resistance consumption of the terminal battery, integrate the current value to obtain a third electricity consumption of the terminal battery, integrate the output current of the terminal battery to obtain a fourth electricity consumption of the terminal battery, and determine a sum of the third electricity consumption and the fourth electricity consumption as a total electricity consumption of the terminal battery when the first system is in a sleep state, so as to determine the second electricity consumption of the terminal battery; or, the second electricity meter 10 may determine the internal resistance consumption of the terminal battery according to the second battery temperature of the terminal, so as to obtain a current value corresponding to the internal resistance consumption of the terminal battery according to the internal resistance consumption of the terminal battery, add the battery output current of the terminal and the current value corresponding to the internal resistance consumption of the battery, and integrate the added current values to obtain the total electricity consumption of the terminal battery, thereby determining the second battery electricity quantity of the terminal. Optionally, the second electricity meter 20 may determine a difference between a battery electricity amount corresponding to the first system of the terminal entering the sleep state and the obtained total consumed electricity amount of the terminal battery as the second battery electricity amount of the terminal, for example, if the battery electricity amount corresponding to the first system of the terminal entering the sleep state is 60%, the obtained total consumed electricity amount of the terminal battery is 15%, and the second electricity meter determines the second battery electricity amount of the terminal is 45%. It is understood that when the first system of the terminal is in the sleep state, the second system of the terminal is in the working state, and the supply current of the terminal is a small current obtained by converting the output current of the battery of the terminal through a current converter (e.g., a DC-DC converter).
In this embodiment, when the second system is in the sleep state, the first fuel gauge of the fuel gauge circuit can determine the first battery fuel capacity of the terminal according to the battery output current of the terminal and the first battery temperature of the terminal, and when the first system is in the sleep state, the second fuel gauge of the fuel gauge circuit can detect the second battery fuel capacity of the terminal according to the battery output current of the terminal and the second battery temperature of the terminal, that is, by using the fuel gauge circuit, when the first system of the terminal enters the sleep state, the second fuel gauge can still detect the second battery fuel capacity of the terminal, so that the terminal can still accurately display the terminal fuel capacity when the first system enters the sleep state.
Generally, the accuracy of the first battery capacity of the terminal determined by the first fuel gauge 10 is only about ± 10% when the second system is in the sleep state, and therefore, the first battery capacity of the terminal may be determined by the first fuel gauge 10 assisted by the second fuel gauge 20 when the second system is in the sleep state. In one embodiment, the second fuel gauge 20 is further configured to determine a third battery power according to the battery output current of the terminal and the first battery temperature of the terminal when the second system is in the sleep state; the third battery level is used to calibrate the first battery level.
In this embodiment, the second electricity meter 20 may obtain the output current of the battery at the terminal based on the resistance value of the detection resistor and the voltage value across the detection resistor in the electricity amount detection circuit 01 when the second system is in the sleep state, or the second electricity meter 20 may obtain the output current of the battery at the terminal by the current detector attached to the output terminal of the battery at the terminal. Alternatively, the second fuel gauge 20 may obtain the first battery temperature of the terminal from a temperature sensor provided in the battery of the terminal, or may obtain the first battery temperature of the terminal from a thermistor provided on the battery of the terminal. Further, the second electricity meter 20 may determine internal resistance consumption of the terminal battery according to the first battery temperature of the terminal, so as to obtain a current value corresponding to the internal resistance consumption of the terminal battery according to the internal resistance consumption of the terminal battery, integrate the current value to obtain a fifth electricity quantity consumed by the terminal battery, integrate the output current of the terminal battery to obtain a sixth electricity quantity consumed by the terminal battery, and determine a sum of the fifth electricity quantity and the sixth electricity quantity as a total consumed electricity quantity of the terminal battery when the second system is in a sleep state, so as to determine a third electricity quantity of the terminal battery; or, the second electricity meter 10 may determine internal resistance consumption of the terminal battery according to the first battery temperature of the terminal, so as to obtain a current value corresponding to the internal resistance consumption of the terminal battery according to the internal resistance consumption of the terminal battery, add the battery output current of the terminal and the current value corresponding to the internal resistance consumption of the battery, and perform integration to obtain total consumed electricity of the terminal battery, thereby determining a third battery electricity quantity of the terminal, and calibrate the first battery electricity quantity obtained by the first electricity meter 10 with the determined third battery electricity quantity.
Optionally, in this embodiment, the first battery level of the terminal may be determined by calibrating the first fuel gauge in the following two ways:
the first method comprises the following steps: the second electricity meter 20 is connected to the first electricity meter 10, the second electricity meter 20 transmits the determined third battery charge amount to the first electricity meter 10, and the first electricity meter 10 calibrates the first battery charge amount according to the third battery charge amount.
In this embodiment, the second electricity meter 20 is connected to the first electricity meter 10, after the second electricity meter 20 determines a third battery capacity of the terminal battery, the second electricity meter 20 transmits the determined third battery capacity to the first electricity meter 10, and the first electricity meter 10 calibrates the first battery capacity according to the third battery capacity, optionally, the first electricity meter 10 may directly determine the third battery capacity as the first battery capacity of the terminal, or may determine an average value of the third battery capacity and the first battery capacity as the first battery capacity of the terminal. For example, when the second system of the terminal is in a sleep state, the first fuel gauge determines that the first battery capacity of the terminal is 70%, and the second fuel gauge determines that the third battery capacity of the terminal is 69.8%, the first fuel gauge 10 may determine that 69.8% determined by the second fuel gauge is the first battery capacity of the terminal; for another example, when the second system of the terminal is in the sleep state, the first electricity meter 10 determines that the first battery capacity of the terminal is 65%, and the second electricity meter 20 determines that the third battery capacity of the terminal is 63%, the first electricity meter 10 may determine an average value of 64% of the two as the first battery capacity of the terminal.
And the second method comprises the following steps: the terminal further comprises a battery management chip, the battery management chip is respectively connected with the first electricity meter 10, the second electricity meter 20 and the first processor, and the battery management chip calibrates the first battery electricity quantity according to the third battery electricity quantity.
In this embodiment, the terminal further includes a battery management chip, optionally, the first electricity meter 10 may be integrated with the battery management chip, or the battery management chip may be connected to the first electricity meter 10, the second electricity meter 20, and the first processor, respectively, in this embodiment, after the second electricity meter 20 determines a third battery capacity according to the battery output current of the terminal and the first battery temperature of the terminal when the second system of the terminal is in the sleep state, the second electricity meter 20 transmits the determined third battery capacity to the battery management chip, and the battery management chip calibrates the first battery capacity according to the third battery capacity transmitted by the second electricity meter 20, and similarly, the battery management chip may directly determine the third battery capacity as the first battery capacity of the terminal, or may determine an average value of the third battery capacity and the first battery capacity as the first battery capacity of the terminal. For example, when the second system of the terminal is in a sleep state, the first fuel gauge determines that the first battery capacity of the terminal is 70%, the second fuel gauge determines that the third battery capacity of the terminal is 69.8%, and the battery management chip may determine that 69.8% determined by the second fuel gauge is the first battery capacity of the terminal; for another example, when the second system of the terminal is in the sleep state, the first electricity meter 10 determines that the first battery capacity of the terminal is 65%, and the second electricity meter 20 determines that the third battery capacity of the terminal is 63%, the battery management chip may determine an average value of 64% of the two as the first battery capacity of the terminal.
In this embodiment, the second electricity meter of the electricity quantity detection circuit can determine the third battery electricity quantity according to the battery output current of the terminal and the first battery temperature of the terminal when the second system of the terminal is in the sleep state, and further calibrate the first battery electricity quantity according to the third battery electricity quantity.
In general, a thermistor is disposed on the battery of the terminal, and the thermistor is capable of measuring the battery temperature of the terminal, and in one embodiment, the first fuel gauge 10 is further configured to obtain the first battery temperature on the first thermistor in the battery of the terminal when the second system is in the sleep state.
The thermistor NTC refers to a thermistor phenomenon and a material having a negative temperature coefficient, in which resistance decreases exponentially with temperature rise, and it can be determined that internal resistance consumption of the battery is 25m Ω when the temperature of the battery is measured to be 25 degrees, for example. In this embodiment, when the second system of the terminal is in the sleep state, the terminal is directly powered by the battery, which will cause the battery of the terminal to generate heat, and the first fuel gauge 10 may obtain the first battery temperature on the first thermistor in the battery of the terminal, so as to determine the first battery power of the terminal according to the first battery temperature of the terminal and the battery output current of the terminal.
Optionally, when the second system is in the sleep state, the first fuel gauge may also collect a thermistor on the motherboard as the battery temperature. However, when the second system is in the sleep state, the temperature of the main board of the terminal may increase, and at this time, if the first fuel gauge obtains the battery temperature of the terminal through the thermistor on the main board of the terminal, the obtained battery temperature value of the terminal may not be accurate enough.
Alternatively, the first electricity meter may acquire the first battery temperature on the first thermistor in the battery of the terminal by two ways:
the method I comprises the following steps: the first fuel gauge 10 is for acquiring a first battery temperature on a first thermistor through an NTC pin of a battery of a terminal when the second system is in a sleep state.
In the present embodiment, as shown in fig. 3, the NTC pin of the battery of the terminal is connected with the first electricity meter, which can collect the first battery temperature of the first thermistor on the battery of the terminal through the NTC pin, so that the first electricity meter 10 can acquire the first battery temperature on the first thermistor through the NTC pin of the battery of the terminal when the second system of the terminal is in a sleep state.
The second method comprises the following steps: the first fuel gauge 10 is configured to acquire a first battery temperature on the first thermistor through an ID pin of a battery of the terminal when the second system is in a sleep state.
In this embodiment, the NTC pin of the battery of the terminal in fig. 3 may be disconnected from the first fuel gauge, and the ID pin of the battery of the terminal may be connected to the first fuel gauge, and the first fuel gauge may collect the first battery temperature of the first thermistor on the battery of the terminal through the ID pin, so that the first fuel gauge 10 may acquire the first battery temperature on the first thermistor through the ID pin of the battery of the terminal when the second system of the terminal is in the sleep state.
In this embodiment, the first fuel gauge of the fuel gauge circuit can acquire the first battery temperature on the first thermistor in the battery of the terminal when the second system of the terminal is in the sleep state, and this process is very simple, thereby ensuring that the first fuel gauge can quickly determine the first battery temperature of the terminal.
When the first system of the terminal is in a dormant state, the current output by the battery of the terminal is converted to supply power to the terminal, and at this time, the temperature of the terminal main board is basically the same as or slightly different from the temperature of the terminal battery, and the second electricity meter can acquire the second battery temperature of the terminal in the following two ways:
the first method is as follows: in an embodiment, as shown in fig. 4, the electric quantity detection circuit 01 further includes: the second thermistor 30 is arranged on the main board of the terminal, the second thermistor 30 is connected with the second electricity meter 20, and the second electricity meter 20 is used for collecting the second battery temperature on the second thermistor when the first system is in a dormant state.
As shown in fig. 4, the first processor of the terminal is connected to the first fuel gauge 10, the first fuel gauge 10 is connected to the DC-DC converter circuit, and the first fuel gauge is connected to the battery through the VBAT pin of the battery and the NTC pin of the battery, wherein the VBAT pin of the battery is the positive terminal of the battery, and the GND pin of the battery in fig. 4 is the negative terminal of the battery. The second processor is connected with the second electricity meter 20, the CLK pin of the second processor is connected with the CLK pin of the second electricity meter 20, the SDA pin of the second processor is connected with the SDA pin of the second electricity meter, and the GPIO pin of the second processor is connected with the GPIO pin of the second electricity meter, it can be understood that the CLK pin is a clock pin, the operating frequency between the second processor and the second electricity meter can be controlled through the CLK pin, the SDA pin is a data line pin for controlling data interaction between the second processor and the second electricity meter, the GPIO pin is an input/output pin, and the second electricity meter can be connected with the VBAT pin of the battery of the terminal through the BAT pin on the second electricity meter.
In this embodiment, when the first system is in a sleep state, the output current of the terminal battery is converted by the DC-DC conversion circuit and then a small current is used to supply power to the terminal, and at this time, the temperature of the terminal motherboard is substantially the same as the temperature of the terminal battery or the difference between the two is not large, on the basis of the above embodiment, the above-mentioned electric quantity detection circuit 01 further includes a second thermistor 30, the second thermistor 30 is disposed on the motherboard of the terminal, the second thermistor 30 is connected to the second electricity meter 20 through an NTC pin on the second electricity meter, when the first system is in the sleep state, the second thermistor 30 can collect the temperature of the motherboard, because when the first system is in the sleep state, the temperature of the motherboard is substantially the same as the temperature of the battery or the difference between the two is not large, the second thermistor 30 can determine the collected temperature of the motherboard as the second battery temperature of the terminal, when the second electricity meter 20 is in the sleep state, the second battery temperature of the second electricity meter 30 can collect the second battery temperature of the second battery on the second thermistor 30, and further determine the electric quantity of the terminal according to the output current of the battery of the terminal battery and the output current of the battery.
In this embodiment, when the first system at the terminal is in the dormant state, the supply current at the terminal is small, the terminal does not have a place that generates heat, the temperature of the terminal mainboard is basically the same as the temperature of the battery or the difference between the two is not large, the temperature value of the mainboard can be accurately collected through the second thermistor arranged on the mainboard at the terminal, and then the temperature value of the mainboard can be directly determined as the second battery temperature at the terminal, the second ammeter can collect the second battery temperature on the second thermistor when the first system is in the dormant state, and therefore the efficiency of determining the second battery temperature at the terminal is improved.
In one embodiment, the second fuel gauge 20 is further configured to obtain the second battery temperature from an NTC pin or an ID pin of a battery of the terminal when the first system is in the sleep state.
In this embodiment, as shown in fig. 5, the ID pin of the battery of the terminal is connected to the second electricity meter 20, and it should be noted that, for the connection relationship between other modules in fig. 5 and the connection relationship between other pins, reference may be made to the description of fig. 4, and this embodiment is not repeated herein. In this embodiment, the thermistor on the battery of the terminal may detect the second battery temperature of the terminal battery, so that the second fuel gauge 20 may acquire the second battery temperature of the terminal through the NTC pin or the ID pin of the battery of the terminal when the first system of the terminal is in the sleep state. It should be noted that the second electricity meter 20 can accurately obtain the second battery temperature of the terminal through the NTC pin or the ID pin of the battery of the terminal.
In this embodiment, when the first system of the terminal is in the sleep state, the second fuel gauge can accurately acquire the second battery temperature of the terminal from the ID pin of the battery of the terminal, so that the accuracy of acquiring the second battery temperature of the terminal by the second fuel gauge is improved.
In a scenario where the first electricity meter 10 determines a first battery capacity of the terminal according to the battery output current of the terminal and a first battery temperature of the terminal, and the second electricity meter 20 determines a second battery capacity of the terminal according to the battery output current of the terminal and a second battery temperature of the terminal, both the first electricity meter 10 and the second electricity meter 20 may collect the battery output current of the terminal through a detection resistor in the capacity detection circuit 01, in an embodiment, please continue to refer to fig. 5, where the capacity detection circuit 01 further includes: a detection resistor 40; the detection resistor 40 is respectively connected with the first electricity meter 10, the second electricity meter 20 and the battery of the terminal, and the first electricity meter 10 and the second electricity meter 20 collect the output current of the battery through the detection resistor 40.
In this embodiment, the electricity quantity detection circuit 10 further includes a detection resistor 40, as shown in fig. 5, the first electricity meter 10 is connected to the detection resistor 40, the second electricity meter 20 is also connected to the detection resistor 40, more specifically, the second electricity meter 20 is connected to the detection resistor 40 through its own SRN pin and SRP pin, in addition, the detection resistor 40 is also connected to the battery of the terminal through the VBAT pin of the battery, and the first electricity meter 10 and the second electricity meter 20 both collect the battery output current of the terminal through the detection resistor 40. Optionally, the principle that the first electricity meter 10 and the second electricity meter 20 collect the battery output current of the terminal through the detection resistor 40 may be referred to the above description of fig. 2a, and this embodiment is not described again here. It is understood that the sense resistor 40 in this embodiment corresponds to Rsns in fig. 2a described above. Optionally, the resistance value of the detection resistor 40 may be 10m Ω, or may also be 20m Ω or other resistance values, and the embodiment is not limited herein. When the resistance value of the detection resistor is increased, the accuracy of the measured output current of the terminal battery is improved, but the loss of the detection resistor in the circuit is increased.
In this embodiment, the electric quantity detection circuit further includes a detection resistor, the detection resistor is respectively connected with the first electricity meter, the second electricity meter and the battery at the terminal, the first electricity meter and the second electricity meter can acquire the battery output current at the terminal through the detection resistor, and the acquisition of the battery output current at the terminal by the first electricity meter and the second electricity meter can be realized through the detection resistor, so that the structure of the electric quantity detection circuit is simplified, the output current of the battery at the terminal can be acquired by the first electricity meter and the second electricity meter, and the integrity of the function of the electric quantity detection circuit is ensured.
In some scenarios, the terminal may switch from the long endurance mode to the high operation mode, that is, the terminal may switch from the second system to the first system to operate, at which time the second system enters a sleep state, and in one embodiment, the second processor is configured to send, when receiving the switching instruction, the second battery capacity detected by the second fuel gauge to the first processor, and the first processor is configured to send the second battery capacity to the first fuel gauge; and the first electricity meter is further used for determining the first battery electricity quantity of the terminal according to the battery output current of the terminal and the first battery temperature of the terminal based on the second battery electricity quantity when the second system is in the dormant state.
And the switching instruction is used for indicating the second processor to quit operating the second system so as to enable the second system to be in a dormant state. In this embodiment, when receiving the switching instruction, the second processor sends the second battery capacity of the terminal detected by the second electricity meter 20 to the first processor, and the first processor sends the second battery capacity to the first electricity meter 10 after receiving the second battery capacity, so that the first electricity meter 10 determines the first battery capacity of the terminal according to the battery output current of the terminal and the first battery temperature of the terminal based on the second battery capacity when the second system is in the sleep state. For example, when the second processor receives the switching instruction, the second battery capacity of the terminal detected by the second electricity meter 20 is 40%, the second processor sends the second battery capacity of 40% detected by the second electricity meter 20 to the first processor, the first processor sends the second battery capacity of 40% to the first electricity meter 10, and the first electricity meter 10 determines the first battery capacity of the terminal according to the battery output current of the terminal and the first battery temperature of the terminal based on the second battery capacity of 40% of the terminal.
In this embodiment, when the second processor receives the switching instruction, the second battery power detected by the second power meter is sent to the first processor, and the first processor sends the second battery power to the first power meter, so that the first power meter can determine the first battery power of the terminal according to the battery output current of the terminal and the first battery temperature of the terminal based on the second battery power when the second system is in the sleep state, which does not cause the problem that the terminal cannot determine how much power is consumed by the second system when the first system is in the sleep state, thereby ensuring the calculation accuracy of the battery power when the terminal is switched to the first system to operate.
In a second aspect, as shown in fig. 6, in an embodiment, the present application provides a power detection circuit 02, where the power detection circuit 02 is applied to a terminal, the terminal includes a first processor and a second processor, the first processor is used for operating a first system, the second processor is used for operating a second system, the operating power consumption of the first processor is greater than that of the second processor, and the power detection circuit 02 includes: a control switch 50 and a fuel gauge 60; a control switch 50 for conducting a path between the fuel gauge 60 and the first processor when the second system is in a sleep state, so that the fuel gauge 60 determines a first battery capacity of the terminal according to a battery output current of the terminal and a first battery temperature of the terminal; and the control switch 50 is further used for conducting a path between the fuel gauge 60 and the second processor when the first system is in the sleep state, so that the fuel gauge 60 determines a second battery capacity of the terminal according to the battery output current of the terminal and a second battery temperature of the terminal.
The working principle of the fuel gauge 60 can be referred to the embodiment corresponding to fig. 2, and the description of the simplified battery fuel gauge illustrated in fig. 2a is omitted here for brevity. In this embodiment, as shown in fig. 6, a PMIC chip is mounted on the first processor of the terminal, the PMIC chip is connected to the DC-DC conversion circuit, the electricity meter 60 is connected to the first processor and the second processor through the control switch, more specifically, a GPIOUT pin of the electricity meter 60 is connected to a GPIO pin of the control switch, a GPIOUT pin of the electricity meter 60 is connected to a GPIO pin of the second processor through the GPIO pin of the control switch, an SDA pin of the electricity meter 60 is connected to an SDA pin of the second processor through the control switch, a CLK pin of the electricity meter 60 is connected to a CLK pin of the first processor through the control switch, the SDA pin of the fuel gauge 60 is connected with the SDA pin of the first processor through a control switch, and the GPIO pin of the first processor is further connected with the fuel gauge 60 through an EN pin of the control switch, wherein the CLK pin is a clock pin, the working frequency among the first processor, the second processor and the fuel gauge can be controlled through the CLK pin, the SDA pin is a data line pin, the first processor can control data interaction between the first processor and the fuel gauge through the SDA pin, the second processor can control data interaction between the second processor and the fuel gauge through the SDA pin, the GPIO pin is an input and output pin, and the first processor, the second processor and the fuel gauge can control input and output of data through the GPIO pin. In addition, the BAT pin of the fuel gauge 60 is connected to the VBAT pin of the battery of the terminal to control the input of the battery current of the terminal, and the fuel gauge 60 is also connected to the battery of the terminal through the NTC pin of the battery of the terminal to acquire the temperature of the battery of the terminal. In the present embodiment, when the second system of the terminal is in the sleep state, the control switch 50 of the power detection circuit 02 turns on the path between the power meter 60 and the first processor of the terminal, so that the power meter 60 determines the first battery power of the terminal according to the battery output current of the terminal and the first battery temperature of the terminal. Optionally, a detection resistor may be disposed in the electric quantity detection circuit 02, and the electricity meter 60 may obtain the output current of the battery according to a resistance value of the detection resistor in the electric quantity detection circuit 02 and a voltage difference between two ends of the detection resistor, or a current detector may be mounted at an output end of the battery of the terminal, and the electricity meter 60 may obtain the output current of the battery of the terminal through the current detector. Alternatively, a temperature sensor may be disposed in the battery of the terminal, and the fuel gauge 60 may obtain the first battery temperature of the terminal from the temperature sensor, or a thermistor may be disposed on the battery of the terminal, and the first battery temperature of the terminal is obtained through the thermistor. Further, the electricity meter 60 may determine internal resistance consumption of the terminal battery according to the first battery temperature of the terminal, so as to obtain a current value corresponding to the internal resistance consumption of the terminal battery according to the internal resistance consumption of the terminal battery, integrate the current value to obtain a first consumed electricity quantity of the terminal battery, integrate the output current of the terminal battery to obtain a second consumed electricity quantity of the terminal battery, and determine the sum of the first consumed electricity quantity and the second consumed electricity quantity as the total consumed electricity quantity of the terminal battery, so as to determine the first battery electricity quantity of the terminal; alternatively, the electricity meter 60 may determine the internal resistance consumption of the terminal battery according to the first battery temperature of the terminal, so as to obtain a current value corresponding to the internal resistance consumption of the terminal battery according to the internal resistance consumption of the terminal battery, add the battery output current of the terminal and the current value corresponding to the internal resistance consumption of the battery, and perform integration to obtain the total consumed electric quantity of the terminal battery, thereby determining the first battery electric quantity of the terminal. Optionally, the electricity meter 60 may determine a difference between a battery electricity amount corresponding to the second system of the terminal entering the sleep state and the obtained total consumed electricity amount of the terminal battery as the first battery electricity amount of the terminal, for example, if the battery electricity amount corresponding to the second system of the terminal entering the sleep state is 70%, the obtained total consumed electricity amount of the terminal battery is 10%, and then the electricity meter 60 determines the first battery electricity amount of the terminal to be 60%.
When the second system of the terminal is in the sleep state, the control switch 50 of the power detection circuit 02 turns on the path between the power meter 60 and the second processor, so that the power meter 60 determines the second battery power of the terminal according to the battery output current of the terminal and the second battery temperature of the terminal. Optionally, a detection resistor may be disposed in the electric quantity detection circuit 02, and the electricity meter 60 may obtain the output current of the battery according to a resistance value of the detection resistor in the electric quantity detection circuit 02 and a voltage difference between two ends of the detection resistor, or a current detector may be mounted at an output end of the battery of the terminal, and the electricity meter 60 may obtain the output current of the battery of the terminal through the current detector. Alternatively, a temperature sensor may be disposed in the battery of the terminal, and the fuel gauge 60 may obtain the second battery temperature of the terminal from the temperature sensor, or a thermistor may be disposed on the battery of the terminal, and the second battery temperature of the terminal is obtained through the thermistor. Further, the electricity meter 60 may determine internal resistance consumption of the terminal battery according to the second battery temperature of the terminal, so as to obtain a current value corresponding to the internal resistance consumption of the terminal battery according to the internal resistance consumption of the terminal battery, integrate the current value to obtain a third consumed electricity quantity of the terminal battery, integrate the output current of the terminal battery to obtain a fourth consumed electricity quantity of the terminal battery, and determine a sum of the third consumed electricity quantity and the fourth consumed electricity quantity as a total consumed electricity quantity of the terminal battery, so as to determine a second battery electricity quantity of the terminal; alternatively, the electricity meter 60 may determine the internal resistance consumption of the terminal battery according to the second battery temperature of the terminal, so as to obtain a current value corresponding to the internal resistance consumption of the terminal battery according to the internal resistance consumption of the terminal battery, add the battery output current of the terminal and the current value corresponding to the internal resistance consumption of the battery, and perform integration to obtain the total consumed electric quantity of the terminal battery, thereby determining the second battery electric quantity of the terminal. Alternatively, the fuel gauge 60 may determine a difference between a battery power corresponding to the first system of the terminal entering the sleep state and the obtained total power consumption of the terminal battery as the second battery power of the terminal, for example, if the battery power corresponding to the first system of the terminal entering the sleep state is 50%, the obtained total power consumption of the terminal battery is 20%, and then the fuel gauge 60 determines the second battery power of the terminal to be 30%.
In this embodiment, the control switch of the power detection circuit can turn on the path between the fuel gauge and the first processor when the second system is in the sleep state, so that the fuel gauge can determine the first battery power of the terminal according to the battery output current of the terminal and the first battery temperature of the terminal, and the control switch can turn on the path between the fuel gauge and the second processor when the first system is in the sleep state, so that the fuel gauge can determine the second battery power of the terminal according to the battery output current of the terminal and the second battery temperature of the terminal, that is, the power detection circuit is applied, and when the first system of the terminal enters the sleep state, the fuel gauge can still detect the second battery power of the terminal, so that the terminal can still accurately display the terminal power when the first system enters the sleep state.
On the basis of the above embodiment, in one embodiment, the fuel gauge 60 is configured to acquire the first battery temperature on the thermistor in the battery of the terminal when the second system is in the sleep state.
In the present embodiment, the battery of the terminal is provided with a thermistor NTC, wherein the thermistor NTC refers to a thermistor phenomenon and a material having a negative temperature coefficient, in which the resistance decreases exponentially with the temperature rise, and the temperature of the battery can be detected by the thermistor on the battery, that is, the electricity meter 60 can acquire the first battery temperature on the thermistor in the battery of the terminal when the second system of the terminal is in a sleep state. Further, the fuel gauge 60 may acquire a second battery temperature of the terminal from a thermistor NTC pin of a battery of the terminal when a second system of the terminal is in a sleep state.
Alternatively, the fuel gauge 60 may obtain the first battery temperature on the thermistor in the battery of the terminal in two ways:
the first method is as follows: the fuel gauge 60 is used to acquire a first battery temperature on the thermistor through the NTC pin of the battery of the terminal when the second system is in a sleep state.
In this embodiment, please continue to refer to fig. 6, the NTC pin of the battery of the terminal is connected to the electricity meter, and the electricity meter can collect the first battery temperature of the thermistor on the battery of the terminal through the NTC pin, so that the electricity meter 60 can obtain the first battery temperature on the thermistor through the NTC pin of the battery of the terminal when the second system of the terminal is in the sleep state.
The second method comprises the following steps: the fuel gauge 60 is used to acquire a first battery temperature on the thermistor through an ID pin of a battery of the terminal when the second system is in a sleep state.
In this embodiment, the NTC pin of the battery of the terminal in fig. 6 may be disconnected from the electricity meter, and the ID pin of the battery of the terminal may be connected to the electricity meter, and the electricity meter may collect the first battery temperature of the thermistor on the battery of the terminal through the NTC pin, so that the electricity meter 60 may acquire the first battery temperature on the thermistor through the ID pin of the battery of the terminal when the second system of the terminal is in the sleep state.
In this embodiment, when the second system of the terminal is in the sleep state, the fuel gauge can quickly determine the battery temperature of the terminal by acquiring the first battery temperature on the thermistor in the battery of the terminal, so that the efficiency of the fuel gauge in determining the battery temperature of the terminal is improved.
In a scenario where the electricity meter determines a first battery level of the terminal according to the battery output current of the terminal and a first battery temperature of the terminal, and determines a second battery level of the terminal according to the battery output current of the terminal and a second battery temperature of the terminal, in an embodiment, as shown in fig. 7, the electricity level detecting circuit 02 further includes: a sense resistor 70; the detection resistor 70 is connected with the fuel gauge 60 and the battery of the terminal, respectively; the electricity meter 60 collects the battery output current through the detection resistor 70.
In fig. 7, please refer to the description of fig. 6 for the connection relationship among the first processor, the second processor, and the fuel gauge, and the connection relationship among the pins of the first processor, the pins of the second processor, and the pins of the fuel gauge, which is not repeated herein. In the present embodiment, the electricity quantity detection circuit 20 further includes a detection resistor 70, the detection resistor 70 is respectively connected to the electricity meter 60 and the battery of the terminal, and more specifically, the detection resistor 70 is connected to the electricity meter through the SRN pin and the SRP pin of the electricity meter 60, and the electricity meter 60 can collect the battery output current of the terminal through the detection resistor 70. It should be noted that, the principle of the electricity meter 60 collecting the battery output current of the terminal through the detection resistor 70 can be referred to the above description of fig. 2a, and this embodiment is not described herein again. It is understood that the sense resistor 70 in this embodiment corresponds to Rsns in fig. 2a described above.
In this embodiment, electric quantity detection circuitry still includes detection resistance, and detection resistance is connected with the battery at fuel gauge and terminal respectively, and the fuel gauge can gather the battery output current at terminal through this detection resistance, just can realize the collection of the battery output current at terminal through this detection resistance, like this when having simplified electric quantity detection circuitry's structure, can ensure that the fuel gauge can accurately gather the output current of terminal battery, has ensured the integrality of electric quantity detection circuitry function.
In one embodiment, a terminal is provided, which may be a wearable device, and the internal structure thereof may be any one of the structures shown in fig. 2 to 5, or may be any one of the structures shown in fig. 6 to 7. The terminal comprises a first processor, a second processor and a third processor, wherein the first processor is used for operating a first system; a second processor for operating a second system; and a charge detection circuit as in the first or second aspect; the running power consumption of the first processor is larger than that of the second processor; for example, the first processor may be a high-performance processor running on the Android system; the second processor may be a low power processor running in a FreeRTOS, MCU, or like system. The memory of the terminal comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program to run on the non-volatile storage medium. The communication interface of the terminal is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the terminal can be a liquid crystal display screen or an electronic ink display screen, and the input device of the terminal can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on a shell of the terminal, an external keyboard, a touch pad or a mouse and the like.
In addition, in an embodiment, as shown in fig. 8, there is provided an electric quantity determining method applied to a terminal, where the terminal includes: a first processor and a second processor, the first processor for operating a first system, the second processor for operating a second system, the operating power consumption of the first processor being greater than the operating power consumption of the second processor, the method comprising:
s801, when a second system is in a dormant state, a first system determines a first battery capacity of a terminal through a first electric quantity meter;
and S802, when the first system is in a dormant state, the second system determines the second battery capacity of the terminal through the second fuel gauge.
It will be appreciated that the above processes are implemented by computer program instructions provided to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing apparatus, such that the instructions executed by the processor of the computer or other programmable data processing apparatus may implement the present embodiment to enable the corelet system to accurately display the terminal power when the corelet system of the terminal enters a sleep state. Of course, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means. Alternatively, these computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the computer program instructions which execute on the computer or other programmable apparatus implement the functions specified above.
Optionally, in an embodiment, the method further includes: when the second system detects the switching instruction, the first system is awakened, and second battery electric quantity determined by the second electric quantity meter is sent to the first system; the first system transmits the second battery power to the first power meter so that the first power meter determines the first battery power of the terminal according to the battery output current of the terminal and the first battery temperature of the terminal based on the second battery power.
It will be appreciated that the above processes are implemented by computer program instructions provided to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing apparatus, such that the instructions executed by the processor of the computer or other programmable data processing apparatus can implement the present embodiment to accurately display the power of the terminal when the big core system of the terminal enters a sleep state. Of course, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means. Alternatively, these computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the computer program instructions which execute on the computer or other programmable apparatus implement the functions specified above.
In addition, in an embodiment, as shown in fig. 9, there is provided an electric quantity determining method applied to a terminal, where the terminal includes: a first processor for operating a first system and a second processor for operating a second system, the first processor having an operating power consumption greater than the operating power consumption of the second processor, the method comprising:
s901, when a second system is in a dormant state, a first system conducts a path between an electricity meter and a first processor, and determines a first battery capacity of a terminal through the electricity meter;
and S902, when the first system is in a dormant state, the second system conducts a channel between the electricity meter and the second processor, and determines the second battery capacity of the terminal through the electricity meter.
It will be appreciated that the above processes are implemented by computer program instructions provided to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing apparatus, such that the instructions executed by the processor of the computer or other programmable data processing apparatus may implement the present embodiment to enable the corelet system to accurately display the terminal power when the corelet system of the terminal enters a sleep state. Of course, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means. Alternatively, these computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the computer program instructions which execute on the computer or other programmable apparatus implement the functions specified above.
Embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements any of the steps of the power determination method provided in the foregoing embodiments.
Any reference to memory, storage, database or other medium used herein may include non-volatile and/or volatile memory. The nonvolatile Memory may include a ROM (Read-Only Memory), a PROM (Programmable Read-Only Memory), an EPROM (Erasable Programmable Read-Only Memory), an EEPROM (Electrically Erasable Programmable Read-Only Memory), or a flash Memory. Volatile Memory can include RAM (Random Access Memory), which acts as external cache Memory. By way of illustration and not limitation, RAM is available in many forms, such as SRAM (Static Random Access Memory), DRAM (Dynamic Random Access Memory), SDRAM (Synchronous Dynamic Random Access Memory), double Data Rate DDR SDRAM (Double Data Rate Synchronous Random Access Memory), ESDRAM (Enhanced Synchronous Dynamic Random Access Memory), SLDRAM (Synchronous Link Dynamic Random Access Memory), RDRAM (Random Dynamic Random Access Memory), and DRmb DRAM (Dynamic Random Access Memory).
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (22)

1. The electric quantity detection circuit is applied to a terminal, the terminal comprises a first processor and a second processor, the first processor is used for operating a first system, the second processor is used for operating a second system, and the operation power consumption of the first processor is larger than that of the second processor; the electric quantity detection circuit includes:
the first electricity meter is used for determining a first battery electricity quantity of the terminal according to the battery output current of the terminal and a first battery temperature of the terminal when the second system is in a dormant state;
and the second electricity meter is used for determining a second battery electricity quantity of the terminal according to the battery output current of the terminal and a second battery temperature of the terminal when the first system is in a dormant state.
2. The power detection circuit of claim 1, wherein the first fuel gauge is connected to the first processor and a battery of the terminal, respectively, and the second fuel gauge is connected to the second processor and the battery, respectively.
3. The power detection circuit of claim 2, wherein the second fuel gauge is further configured to determine a third battery power level based on the battery output current of the terminal and the first battery temperature of the terminal when the second system is in the sleep state; the third battery level is used to calibrate the first battery level.
4. The power detection circuit of claim 3, wherein the second power meter is connected to the first power meter, the second power meter further configured to transmit the third battery power to the first power meter;
the first electricity meter is further used for calibrating the first battery electricity quantity according to the third battery electricity quantity.
5. The power detection circuit of claim 3, wherein the terminal further comprises a battery management chip; the battery management chip is respectively connected with the first fuel gauge, the second fuel gauge and the first processor;
and the battery management chip is used for calibrating the first battery electric quantity according to the third battery electric quantity.
6. The charge detection circuit of claim 5, wherein the first fuel gauge is integrated into the battery management chip.
7. The power detection circuit of any of claims 1-6, wherein the first fuel gauge is powered off when the first system is in a sleep state.
8. The power detection circuit according to any one of claims 1 to 6, wherein the first fuel gauge is further configured to obtain the first battery temperature at a first thermistor in a battery of the terminal when the second system is in a sleep state.
9. The power detection circuit of claim 8, wherein the first fuel gauge is configured to obtain the first battery temperature at the first thermistor through an NTC pin or an ID pin of a battery of the terminal when the second system is in a sleep state.
10. The electrical quantity detection circuit according to any one of claims 1 to 6, further comprising: the second thermistor is arranged on the main board of the terminal and is connected with the second electricity meter;
the second fuel gauge is used for collecting the second battery temperature on the second thermistor when the first system is in a dormant state.
11. The electrical quantity detection circuit according to any one of claims 1 to 6, further comprising: detecting a resistance; the detection resistor is respectively connected with the first electricity meter, the second electricity meter and a battery of the terminal;
the first electricity meter and the second electricity meter acquire the output current of the battery through the detection resistor.
12. The power detection circuit according to any one of claims 1 to 6, wherein the second processor is configured to send the second battery power detected by the second fuel gauge to the first processor when receiving a switching instruction;
the first processor is used for sending the second battery capacity to the first fuel gauge;
the first electricity meter is further configured to determine a first battery electricity quantity of the terminal according to the battery output current of the terminal and the first battery temperature of the terminal based on the second battery electricity quantity when the second system is in the sleep state.
13. The electric quantity detection circuit is applied to a terminal, the terminal comprises a first processor and a second processor, the first processor is used for operating a first system, the second processor is used for operating a second system, and the operation power consumption of the first processor is larger than that of the second processor; the electric quantity detection circuit includes: a control switch and an electricity meter;
the control switch is used for conducting a passage between the fuel gauge and the first processor when the second system is in a dormant state, so that the fuel gauge determines a first battery capacity of the terminal according to the battery output current of the terminal and a first battery temperature of the terminal;
the control switch is further configured to conduct a path between the fuel gauge and the second processor when the first system is in a sleep state, so that the fuel gauge determines a second battery capacity of the terminal according to the battery output current of the terminal and a second battery temperature of the terminal.
14. The power detection circuit of claim 13, wherein the fuel gauge is connected to the first processor and the second processor through the control switch, respectively; the fuel gauge is also connected to a battery of the terminal.
15. The power detection circuit of claim 14, wherein the fuel gauge is configured to obtain the first battery temperature at a thermistor in a battery of the terminal when the second system is in a sleep state.
16. The power detection circuit of claim 15, wherein the fuel gauge is configured to obtain the first battery temperature at the thermistor through an NTC pin or an ID pin of a battery of the terminal when the second system is in a sleep state.
17. The power detection circuit of claim 16, further comprising: detecting a resistance; the detection resistor is respectively connected with the fuel gauge and the battery of the terminal;
the electricity meter collects the output current of the battery through the detection resistor.
18. A terminal, characterized in that the terminal comprises:
a first processor for operating a first system;
a second processor for operating a second system; the running power consumption of the first processor is larger than that of the second processor; and
a charge detection circuit as claimed in any one of claims 1 to 17.
19. An electric quantity determining method is applied to a terminal, and is characterized in that the terminal comprises: a first processor to run a first system and a second processor to run a second system, the first processor to run power consumption greater than the second processor to run power consumption, the method comprising:
the first system determines a first battery capacity of the terminal through a first fuel gauge when the second system is in a dormant state;
and the second system determines a second battery capacity of the terminal through a second fuel gauge when the first system is in a dormant state.
20. The method of determining an amount of power of claim 19, further comprising:
when the second system detects a switching instruction, awakening the first system, and sending the second battery electric quantity determined by the second electric quantity meter to the first system;
and the first system sends the second battery electric quantity to the first electric quantity meter so that the first electric quantity meter can determine the first battery electric quantity of the terminal according to the battery output current of the terminal and the first battery temperature of the terminal on the basis of the second battery electric quantity.
21. An electric quantity determining method is applied to a terminal, and the terminal is characterized by comprising the following steps: a first processor for operating a first system and a second processor for operating a second system, the operating power consumption of the first processor being greater than the operating power consumption of the second processor, the method comprising:
when the second system is in a dormant state, the first system conducts a channel between a fuel gauge and the first processor, and determines a first battery capacity of the terminal through the fuel gauge;
and when the first system is in a dormant state, the second system conducts a passage between the fuel gauge and the second processor, and determines a second battery capacity of the terminal through the fuel gauge.
22. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 19 to 21.
CN202111137375.9A 2021-09-27 2021-09-27 Electric quantity detection circuit, terminal, electric quantity determination method and readable storage medium Pending CN115882537A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111137375.9A CN115882537A (en) 2021-09-27 2021-09-27 Electric quantity detection circuit, terminal, electric quantity determination method and readable storage medium
PCT/CN2022/118586 WO2023045809A1 (en) 2021-09-27 2022-09-14 Electric quantity detection circuit, terminal, electric quantity determination method, and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111137375.9A CN115882537A (en) 2021-09-27 2021-09-27 Electric quantity detection circuit, terminal, electric quantity determination method and readable storage medium

Publications (1)

Publication Number Publication Date
CN115882537A true CN115882537A (en) 2023-03-31

Family

ID=85719723

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111137375.9A Pending CN115882537A (en) 2021-09-27 2021-09-27 Electric quantity detection circuit, terminal, electric quantity determination method and readable storage medium

Country Status (2)

Country Link
CN (1) CN115882537A (en)
WO (1) WO2023045809A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117233684A (en) * 2023-11-14 2023-12-15 荣耀终端有限公司 Calibration circuit, electronic device and method

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101493798B1 (en) * 2007-12-10 2015-03-02 바이엘 헬쓰케어, 엘엘씨 Rapid charging and power management of a battery-powered fluid analyte meter
TWI481889B (en) * 2013-11-22 2015-04-21 Wistron Corp Rechargeable battery temperature detection method, power management device and electronic system
US10942221B2 (en) * 2016-02-04 2021-03-09 Mediatek Inc. Method and apparatus capable of accurately estimating/determining power percentage of battery based on confidence levels determined from resultant information of multiple different fuel gauge operations and/or information of battery history, aging factor, sleep time, or battery temperature
CN107436418B (en) * 2017-06-15 2020-05-19 捷开通讯(深圳)有限公司 Method, terminal and device for calibrating electric quantity attenuation of battery
CN107994278B (en) * 2017-11-13 2024-04-09 深圳市道通智能航空技术股份有限公司 Battery equalization device and method and unmanned aerial vehicle
CN112882561B (en) * 2019-11-29 2023-01-10 Oppo广东移动通信有限公司 Display control method, storage medium, and electronic device
CN112988256B (en) * 2019-12-02 2022-03-25 Oppo广东移动通信有限公司 Application starting method and device, storage medium and electronic equipment
CN112996089B (en) * 2019-12-17 2022-10-21 Oppo广东移动通信有限公司 Data transmission method, device, storage medium and electronic equipment
CN112731188A (en) * 2020-12-25 2021-04-30 西安中星测控有限公司 Battery electric quantity statistical method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117233684A (en) * 2023-11-14 2023-12-15 荣耀终端有限公司 Calibration circuit, electronic device and method
CN117233684B (en) * 2023-11-14 2024-04-12 荣耀终端有限公司 Calibration circuit, electronic device and method

Also Published As

Publication number Publication date
WO2023045809A1 (en) 2023-03-30

Similar Documents

Publication Publication Date Title
CN108475935B (en) Battery charging management method and terminal
US8076904B2 (en) Circuit for detecting remaining battery capacity
Folea et al. A low-power wireless sensor for online ambient monitoring
CN111342159B (en) Charging control method and device, electronic equipment and computer readable storage medium
EP2827161B1 (en) Detection circuit and electronic terminal
US8200292B2 (en) Method and apparatus for dynamic battery management control in a mobile communication device
CN111183561A (en) Charging control method and device, electronic equipment and computer readable storage medium
CN110506215A (en) A kind of method and device of determining battery internal short-circuit
CN112098864B (en) Leakage current detection method and device, electronic equipment and storage medium
CN104914977A (en) Information processing device, semiconductor chip and information processing method
Visconti et al. Solar powered wireless monitoring system of environmental conditions for early flood prediction or optimized irrigation in agriculture
CN108780929A (en) Intelligent monitor system for liquid state electrolyte battery
CN104931892B (en) A kind of battery of mobile terminal capacity calculation methods and system
Girban et al. A glance on WSN lifetime and relevant factors for energy consumption
US9026387B2 (en) Battery voltage measurement
CN103576092A (en) Remote controller and battery capacity detection device and method thereof
CN108885199A (en) Sensor signal processing equipment
CN105607006A (en) Battery capacity determination method, system and terminal thereof
CN115882537A (en) Electric quantity detection circuit, terminal, electric quantity determination method and readable storage medium
Visconti et al. Solar Powered WSN for monitoring environment and soil parameters by specific app for mobile devices usable for early flood prediction or water savings
KR20230052278A (en) Method and Apparatus for Temperature Compensation and Voltage Droop Detection of Low Battery Threshold Voltage in Medical Devices
US9632795B2 (en) Electronic device and method for monitoring battery module of the same
CN112448448B (en) Charging control method, device, earphone, electronic device and readable storage medium
CN113156319A (en) Remaining power determining method, remaining power determining apparatus, vehicle, medium, and program product
JP7139687B2 (en) Monitoring system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination