CN115882537A - Power detection circuit, terminal, power determination method and readable storage medium - Google Patents

Power detection circuit, terminal, power 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
power
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

本申请涉及一种电量检测电路、终端、电量确定方法和可读存储介质。电量检测电路应用于终端,终端包括第一处理器和第二处理器,第一处理器用于运行第一系统,第二处理器用于运行第二系统,第一处理器的运行功耗大于第二处理器的运行功耗;电量检测电路包括:第一电量计,用于在第二系统处于休眠状态时,根据终端的电池输出电流和终端的第一电池温度确定终端的第一电池电量;第二电量计,用于在第一系统处于休眠状态时,根据终端的电池输出电流和终端的第二电池温度确定终端的第二电池电量。该电量检测电路能够在终端的第一系统进入休眠状态时仍能够准确地显示终端电量。

Figure 202111137375

The present application relates to a power detection circuit, a terminal, a power determination method and a readable storage medium. The power detection circuit is applied to a terminal, and the terminal includes a first processor and a second processor, the first processor is used to run the first system, the second processor is used to run the second system, and the operating power consumption of the first processor is greater than that of the second processor. The operating power consumption of the processor; the power detection circuit includes: a first fuel gauge, used to 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 when the second system is in a dormant state; The second fuel gauge is used to 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 when the first system is in a dormant state. The power detection circuit can still accurately display the power of the terminal when the first system of the terminal enters a dormant state.

Figure 202111137375

Description

电量检测电路、终端、电量确定方法和可读存储介质Power detection circuit, terminal, power determination method and readable storage medium

技术领域technical field

本申请涉及移动终端技术领域,特别是涉及一种电量检测电路、终端、电量确定方法和可读存储介质。The present application relates to the technical field of mobile terminals, in particular to a power detection circuit, a terminal, a power determination method and a readable storage medium.

背景技术Background technique

随着移动通信技术的发展,目前许多的终端为了提高自身的续航能力开始采用大小核双系统架构,大核系统的功能通常比较丰富,可以正常使用电量计,显示电量百分比;但是小核系统通常支持的功能比较简单,在小核模式下只能估算电量且显示电量的格数,因此,当终端的大核系统会进入休眠状态时,小核系统难以准确地显示终端电量。With the development of mobile communication technology, many terminals now adopt a dual-system architecture with large and small cores in order to improve their battery life. The large-core system usually has rich functions, and can use the fuel gauge normally to display the percentage of power; but the small-core system usually The supported functions are relatively simple. In the small-core mode, it can only estimate the battery level and display the battery level. Therefore, when the terminal's large-core system will enter a sleep state, it is difficult for the small-core system to accurately display the terminal's battery level.

发明内容Contents of the invention

本申请实施例提供了一种电量检测电路、终端、电量确定方法和可读存储介质,可以在终端的大核系统进入休眠状态时,小核系统准确地显示终端电量。Embodiments of the present application provide a power detection circuit, a terminal, a power determination method, and a readable storage medium, which can accurately display the power of the terminal when the large-core system of the terminal enters a dormant state.

第一方面,提供了一种电量检测电路,所述电量检测电路应用于终端,所述终端包括第一处理器和第二处理器,所述第一处理器用于运行第一系统,所述第二处理器用于运行第二系统,所述第一处理器的运行功耗大于所述第二处理器的运行功耗;所述电量检测电路包括:In a first aspect, a power detection circuit is provided, 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 run the first system, and the first Two processors are used to run the second system, and the operating power consumption of the first processor is greater than the operating power consumption of the second processor; the power detection circuit includes:

第一电量计,用于在所述第二系统处于休眠状态时,根据所述终端的电池输出电流和所述终端的第一电池温度确定所述终端的第一电池电量;a first fuel gauge, configured to 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 when the second system is in a dormant state;

第二电量计,用于在所述第一系统处于休眠状态时,根据所述终端的电池输出电流和所述终端的第二电池温度确定所述终端的第二电池电量。The second fuel gauge is configured to 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 when the first system is in a dormant state.

第二方面,提供了一种电量检测电路,所述电量检测电路应用于终端,所述终端包括第一处理器和第二处理器,所述第一处理器用于运行第一系统,所述第二处理器用于运行第二系统,所述第一处理器的运行功耗大于所述第二处理器的运行功耗;所述电量检测电路包括:控制开关和电量计;In a second aspect, a power detection circuit is provided, 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 run the first system, and the first Two processors are used to run the second system, and the operating power consumption of the first processor is greater than the operating power consumption of the second processor; the power detection circuit includes: a control switch and a power gauge;

所述控制开关,用于在所述第二系统处于休眠状态时,导通所述电量计与所述第一处理器之间的通路,使得所述电量计根据所述终端的电池输出电流和所述终端的第一电池温度确定所述终端的第一电池电量;The control switch is configured to turn on the path between the fuel gauge and the first processor when the second system is in a dormant state, so that the fuel gauge outputs the current according to the battery output current of the terminal and a first battery temperature of the terminal determines a first battery level of the terminal;

所述控制开关,还用于在所述第一系统处于休眠状态时,导通所述电量计与所述第二处理器之间的通路,使得所述电量计根据所述终端的电池输出电流和所述终端的第二电池温度确定所述终端的第二电池电量。The control switch is further configured to turn on the path between the fuel gauge and the second processor when the first system is in a dormant state, so that the fuel gauge outputs current according to the battery of the terminal and the second battery temperature of the terminal to determine the second battery level of the terminal.

第三方面,提供了一种终端,所述终端包括:In a third aspect, a terminal is provided, and the terminal includes:

第一处理器,用于运行第一系统;a first processor, configured to run a first system;

第二处理器,用于运行第二系统;所述第一处理器的运行功耗大于所述第二处理器的运行功耗;以及A second processor configured to run a second system; the operating power consumption of the first processor is greater than the operating power consumption of the second processor; and

如第一方面和第二方面任一项所述的电量检测电路。The power detection circuit according to any one of the first aspect and the second aspect.

第四方面,提供了一种电量确定方法,应用于终端,所述终端包括:第一处理器和第二处理器,所述第一处理器用于运行第一系统,所述第二处理器用于运行第二系统,所述第一处理器的运行功耗大于所述第二处理器的运行功耗,所述方法包括:In a fourth aspect, there is provided a method for determining power, which is applied to a terminal, and the terminal includes: a first processor and a second processor, the first processor is used to run the first system, and the second processor is used to Running the second system, the operating power consumption of the first processor is 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 determines the first battery power of the terminal through a first fuel gauge;

所述第二系统在所述第一系统处于休眠状态时,通过第二电量计确定所述终端的第二电池电量。The second system determines the second battery power of the terminal through a second power gauge when the first system is in a dormant state.

第五方面,提供了一种电量确定方法,应用于终端,所述终端包括:第一处理器和第二处理器,所述第一处理器用于运行第一系统,所述第二处理器用于运行第二系统,所述第一处理器的运行功耗大于所述第二处理器的运行功耗,所述方法包括:In a fifth aspect, there is provided a method for determining power, which is applied to a terminal, and the terminal includes: a first processor and a second processor, the first processor is used to run the first system, and the second processor is used to Running the second system, the operating power consumption of the first processor is greater than the operating power consumption of the second processor, the method comprising:

所述第一系统在所述第二系统处于休眠状态时,导通电量计与所述第一处理器之间的通路,并通过所述电量计确定所述终端的第一电池电量;The first system turns on the path between the fuel gauge and the first processor when the second system is in the dormant state, and determines the first battery power of the terminal through the fuel gauge;

所述第二系统在所述第一系统处于休眠状态时,导通所述电量计与所述第二处理器之间的通路,并通过所述电量计确定所述终端的第二电池电量。When the first system is in a dormant state, the second system turns on the path between the fuel gauge and the second processor, and determines the second battery power of the terminal through the fuel gauge.

第六方面,提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如第四方面和第五方面所述的方法的步骤。In a sixth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the methods described in the fourth aspect and the fifth aspect are implemented.

上述电量检测电路、终端、电量确定方法和可读存储介质,电量检测电路应用于终端,终端包括第一处理器和第二处理器,第一处理器用于运行第一系统,第二处理器用于运行第二系统,第一处理器的运行功耗大于第二处理器的运行功耗;该电量检测电路的第一电量计在第二系统处于休眠状态时,能够根据终端的电池输出电流和终端的第一电池温度确定终端的第一电池电量,电量检测电路的第二电量计在第一系统处于休眠状态时,能够根据终端的电池输出电流和终端的第二电池温度检测终端的第二电池电量,也就是说应用该电量检测电路,在终端的第一系统进入休眠状态时,第二电量计仍能够检测出终端的第二电池电量,从而使得终端在第一系统进入休眠状态时仍能够准确地显示终端电量。The above electric power detection circuit, terminal, power determination method and readable storage medium, the electric power detection circuit is applied to the terminal, the terminal includes a first processor and a second processor, the first processor is used to run the first system, and the second processor is used to Running the second system, the operating power consumption of the first processor is greater than the operating power consumption of the second processor; the first fuel gauge of the power detection circuit can output current according to the battery output current of the terminal and the terminal when the second system is in a sleep state. The first battery temperature of the terminal determines the first battery power of the terminal, and the second fuel gauge of the power detection circuit can detect the second battery of the terminal according to the battery output current of the terminal and the second battery temperature of the terminal when the first system is in a sleep state Power, that is to say, using the power detection circuit, when the first system of the terminal enters the dormant state, the second power gauge can still detect the second battery power of the terminal, so that the terminal can still be charged when the first system enters the dormant state Accurately display the terminal power.

附图说明Description of drawings

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present application. Those skilled in the art can also obtain other drawings based on these drawings without creative work.

图1为一个实施例中现有的终端内部结构框图;FIG. 1 is a block diagram of an existing terminal internal structure in an embodiment;

图2为本申请一实施例提供的电量检测电路应用的终端的内部结构图;FIG. 2 is an internal structural diagram of a terminal applied to a power detection circuit provided by an embodiment of the present application;

图2a为本申请一实施例提供的简化的电池电电量计框图示意图;Fig. 2a is a schematic diagram of a simplified block diagram of a battery electric fuel gauge provided by an embodiment of the present application;

图3为本申请一实施例提供的电量检测电路应用的终端的内部结构图;FIG. 3 is an internal structural diagram of a terminal applied to a power detection circuit provided by an embodiment of the present application;

图4为本申请一实施例提供的电量检测电路应用的终端的内部结构图;FIG. 4 is an internal structural diagram of a terminal applied to a power detection circuit provided by an embodiment of the present application;

图5为本申请一实施例提供的电量检测电路应用的终端的内部结构图;FIG. 5 is an internal structural diagram of a terminal applied to a power detection circuit provided by an embodiment of the present application;

图6为本申请另一实施例提供的电量检测电路应用的终端的内部结构图;FIG. 6 is an internal structural diagram of a terminal applied to a power detection circuit provided by another embodiment of the present application;

图7为本申请另一实施例提供的电量检测电路应用的终端的内部结构图;FIG. 7 is an internal structural diagram of a terminal applied to a power detection circuit provided by another embodiment of the present application;

图8为一个实施例中电量确定方法的流程示意图;Fig. 8 is a schematic flow chart of a method for determining electric quantity in an embodiment;

图9为一个实施例中电量确定方法的流程示意图。Fig. 9 is a schematic flowchart of a method for determining an electric quantity in an embodiment.

附图标记说明:Explanation of reference signs:

10:第一电量计; 20:第二电量计; 30:第二热敏电阻;10: the first fuel gauge; 20: the second fuel gauge; 30: the second thermistor;

40:检测电阻; 50:控制开关; 60:电量计;40: detection resistor; 50: control switch; 60: fuel gauge;

70:检测电阻。70: Sense resistor.

具体实施方式Detailed ways

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, and are not intended to limit the present application.

可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本申请的范围的情况下,可以将第一客户端称为第二客户端,且类似地,可将第二客户端称为第一客户端。第一客户端和第二客户端两者都是客户端,但其不是同一客户端。It can be understood that the terms "first", "second" and the like used in this application may be used to describe various elements herein, but these elements are not limited by these terms. These terms are only used to distinguish one element from another element. For example, a first client could be termed a second client, and, similarly, a second client could be termed 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.

目前,许多的终端为了提高自身的续航能力开始采用大小核双系统的架构模式,例如,大核模式一般运行于Android系统,大核模式下的处理器一般为运行于Android系统强性能处理器,例如CPU等,小核模式一般运行于FreeRTOS、MCU等系统,小核模式下的处理器一般为运行于FreeRTOS、MCU等系统的低功耗处理器。通常,如图1所示,在大核系统的处理器上挂载有电源管理芯片PMIC,PMIC自带有一个电量计FG,FG通过外部的检流电阻(通常为10mΩ)对终端的电池的输出电流进行检测,再对检测到的电流值在时间上积分得到终端的电池电量。而在小核模式下,大核的处理器和PMIC都处于休眠状态,终端的电池输出电流经过DC-DC转换电路转换后为小核的处理器进行供电,此时大核系统的FG无法对小核系统消耗的电量进行计算,难以准确地显示终端的电量;另外,当终端再次切换回大核模式时FG显示的还是PMIC休眠之前终端的电量,与终端的实际电量相差较大。At present, in order to improve their battery life, many terminals start to adopt the architecture mode of large and small core dual systems. For example, the large core mode generally runs on the Android system, and the processor under the large core mode is generally a powerful processor running on the Android system. For example, CPU, etc., the small-core mode generally runs on FreeRTOS, MCU and other systems, and the processor in the small-core mode is generally a low-power processor running on FreeRTOS, MCU and other systems. Usually, as shown in Figure 1, a power management chip PMIC is mounted on the processor of the large-core system. The PMIC has a fuel gauge FG. The output current is detected, and then the detected current value is integrated in time to obtain the battery power of the terminal. In the small-core mode, both the large-core processor and PMIC are in a dormant state, and the battery output current of the terminal is converted by the DC-DC conversion circuit to supply power for the small-core processor. At this time, the FG of the large-core system cannot It is difficult to accurately display the power of the terminal because the power consumed by the small-core system is calculated. In addition, when the terminal switches back to the large-core mode again, the FG displays the power of the terminal before the PMIC goes to sleep, which is quite different from the actual power of the terminal.

基于此,针对上述情况,本申请实施例提出一种电量检测电路,以使当终端的大核系统进入休眠状态时,小核系统仍能够准确地显示终端电量。Based on this, in view of the above situation, an embodiment of the present application proposes a power detection circuit, so that when the large-core system of the terminal enters a dormant state, the small-core system can still accurately display the power of the terminal.

第一方面,如图2所示,在一实施例中,本申请提供一种电量检测电路01,该电量检测电路01应用于终端,终端包括第一处理器和第二处理器,第一处理器用于运行第一系统,第二处理器用于运行第二系统,第一处理器的运行功耗大于第二处理器的运行功耗,该电量检测电路01包括:第一电量计10,用于在第二系统处于休眠状态时,根据终端的电池输出电流和终端的第一电池温度确定终端的第一电池电量;第二电量计20,用于在第一系统处于休眠状态时,根据终端的电池输出电流和终端的第二电池温度确定终端的第二电池电量。In the first aspect, as shown in FIG. 2 , in an embodiment, the present application provides a power detection circuit 01, which is applied to a terminal, the terminal includes a first processor and a second processor, and the first processor The device is used to run the first system, the second processor is used to run the second system, the operating power consumption of the first processor is greater than the operating power consumption of the second processor, and the power detection circuit 01 includes: a first power gauge 10 for When the second system is in the dormant state, 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; The battery output current and the terminal's second battery temperature determine the terminal's second battery capacity.

其中,第一电量计10、第二电量计20均能够对终端的电池的输出总电流持续进行积分,并将积分得到的净电荷作为电池的剩余容量,得到电池电量。示例性地,以图2a的简化的电池电量计框图为例,图2a中Rsns为mΩ级检流电阻,R1为负载电阻,电池通过开关,Rsns对R1放电时的电流I在Rsns两端产生的压降为Vs(t)=I(t)*Rsns,从而得到电池的输出电流为

Figure BDA0003282568120000051
进而对电池的输出电流持续进行积分,得到电池的电量为:
Figure BDA0003282568120000052
Wherein, both the first fuel gauge 10 and the second fuel gauge 20 can continuously integrate the total output current of the terminal battery, and use the integrated net charge as the remaining capacity of the battery to obtain the battery power. Exemplarily, take the simplified battery fuel gauge block diagram in Figure 2a as an example, in Figure 2a Rsns is the mΩ level current detection resistor, R1 is the load resistor, the battery passes through the switch, and the current I when Rsns discharges R1 is generated at both ends of Rsns The voltage drop is V s (t)=I(t)*Rsns, so the output current of the battery is
Figure BDA0003282568120000051
Then, the output current of the battery is continuously integrated, and the power of the battery is obtained as:
Figure BDA0003282568120000052

在本实施例中,电量检测电路01应用的终端为包括大小核双系统架构的终端,其中,终端的第一系统可以为Android等强性能系统;终端的第二系统可以为FreeRTOS、MCU、单片机等低功耗系统;终端的第一处理器的运行功耗大于第二处理器的运行功耗,即在该双系统架构中终端的第一系统的处理能力高于第二系统的处理能力,例如,终端的第一系统的处理能力高于第二系统的处理能力可以是第一系统的运算能力强于第二系统的运算能力,也可以是第一系统的处理速度高于第二系统的处理速度等。可选的,上述终端可以为手机、手表、手环、平板电脑等,本申请实施例中不加以限制。In this embodiment, the terminal applied by the power detection circuit 01 is a terminal including a dual-system architecture with large and small cores, wherein the first system of the terminal can be a powerful system such as Android; the second system of the terminal can be FreeRTOS, MCU, single-chip microcomputer and other low-power systems; the operating power consumption of the first processor of the terminal is greater than the operating power consumption of the second processor, that is, in the dual-system architecture, the processing capability of the first system of the terminal is higher than that of the second system, For example, the processing capability of the first system of the terminal is higher than that of the second system, which may mean that the computing capability of the first system is stronger than that of the second system, or that the processing speed of the first system is higher than that of the second system. processing speed etc. Optionally, the foregoing terminal may be a mobile phone, a watch, a bracelet, a tablet computer, etc., which are not limited in this embodiment of the present application.

可以理解的是,在一些场景中,当终端的处理能力较强时,此时终端的第一系统处于工作状态,终端的第二系统将处于休眠状态。可选的,终端的第二系统处于休眠状态可以是第二系统接收到第一系统发送的控制权切换指令后,将终端的控制权交给第一系统,第二系统进入休眠状态。可选的,在本实施例中,第一电量计10可以挂载在终端的第一处理器上,也可以集成在第一处理器的处理芯片上,本实施例对此不做限制。可选的,在本实施例中,上述第一电量计10分别与第一处理器和上述终端的电池连接,当终端的第二系统进入休眠状态时,第一电量计10将获取终端的电池输出电流和终端的第一电池温度,根据终端的电池输出电流和终端的第一电池温度确定终端的第一电池电量。可选的,可以在电量检测电路01中设置检测电阻,第一电量计10可以根据电量检测电路01中检测电阻的电阻值和检测电阻两端的电压差值,得到电池的输出电流,或者,也可以在终端的电池的输出端安装电流检测器,第一电量计10可以通过该电流检测器得到终端的电池输出电流。可选的,终端的电池中可以设置有温度传感器,第一电量计10可以从该温度传感器中获取终端的第一电池温度,或者,也可以在终端的电池上设置热敏电阻,通过热敏电阻得到终端的第一电池温度。It can be understood that, in some scenarios, when the processing capability of the terminal is relatively strong, the first system of the terminal is in a working state, and the second system of the terminal is in a dormant state. Optionally, when the second system of the terminal is in the dormant state, the second system may transfer 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 electricity meter 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 a dormant state, the first fuel gauge 10 will obtain the output current and the first battery temperature of the terminal, and 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. Optionally, a detection resistor can be set in the power detection circuit 01, and the first fuel gauge 10 can obtain the output current of the battery according to the resistance value of the detection resistor in the power detection circuit 01 and the voltage difference between the two ends of the detection resistor, or, A current detector may be installed at the output end of the battery of the terminal, and the first fuel gauge 10 may obtain the output current of the battery of the terminal through the current detector. Optionally, a temperature sensor may be set in the battery of the terminal, and the first fuel gauge 10 may acquire the first battery temperature of the terminal from the temperature sensor, or a thermistor may be set on the battery of the terminal, and the temperature sensor may resistor to get the terminal's first battery temperature.

进一步地,第一电量计10可以根据终端的第一电池温度确定终端电池的内阻消耗,从而根据终端电池的内阻消耗,得到终端的电池的内阻消耗对应的电流值,对该电流值进行积分,得到终端的电池的消耗的第一电量,并对终端的电池输出电流进行积分,得到终端的电池的消耗的第二电量,将第一电量和第二电量之和确定为终端电池的总消耗电量,从而确定出终端的第一电池电量;或者,第一电量计10可以根据终端的第一电池温度确定终端电池的内阻消耗,从而根据终端电池的内阻消耗,得到终端的电池的内阻消耗对应的电流值,对终端的电池输出电流和电池的内阻消耗对应的电流值相加再进行积分,得到终端电池的总消耗电量,从而确定出终端的第一电池电量。可选的,第一电量计10可以将终端的第二系统进入休眠状态时对应的电池电量与得到的终端电池的总消耗电量之差,确定为终端的第一电池电量,例如,终端的第二系统进入休眠状态时对应的电池电量为80%,得到的终端电池的总消耗电量为20%,则第一电量计10确定终端的第一电池电量为60%。Further, the first fuel gauge 10 can determine the internal resistance consumption of the terminal battery according to the first battery temperature of the terminal, so as to obtain the current value corresponding to the internal resistance consumption of the terminal battery according to the internal resistance consumption of the terminal battery, and the current value Integrate to obtain the first power consumption of the battery of the terminal, and integrate the output current of the battery of the terminal to obtain the second power consumed by the battery of the terminal, and determine the sum of the first power and the second power as the terminal battery The total power consumption, so as to determine the first battery power of the terminal; or, the first fuel gauge 10 can determine the internal resistance consumption of the terminal battery according to the first battery temperature of the terminal, so as to obtain the terminal battery according to the internal resistance consumption of the terminal battery. The current value corresponding to the internal resistance consumption of the terminal is added and then integrated to obtain the total power consumption of the terminal battery, thereby determining the first battery power of the terminal. Optionally, the first fuel gauge 10 may determine the difference between the corresponding battery power when the second system of the terminal enters the dormant state and the obtained total power consumption of the terminal battery as the first battery power of the terminal, for example, the first battery power of the terminal. When the second system enters the dormant state, the corresponding battery power is 80%, and the obtained total power consumption of the terminal battery is 20%, so the first fuel gauge 10 determines that the first battery power of the terminal is 60%.

在另一些场景中,例如,当终端处于长续航模式时,终端的第一系统将处于休眠状态,第一电量计10也将关机停止工作,此时,电量检测电路01的第二电量计20根据终端的电池输出电流和终端的第二电池温度确定终端的第二电池电量。可选的,在本实施例中,第二电量计20可以与终端的第二处理器以及终端的电池连接,第二电量计20可以根据电量检测电路01中的上述检测电阻的电阻值和检测电阻两端的电压值,得到电池的输出电流,或者,第二电量计20也可以通过上述安装在终端的电池的输出端的电流检测器得到终端的电池输出电流。可选的,第二电量计20可以从上述终端的电池中设置的温度传感器中获取终端的第二电池温度,或者,也可以通过设置在终端的电池上的热敏电阻得到终端的第二电池温度。进一步地,第二电量计20可以根据终端的第二电池温度确定终端电池的内阻消耗,从而根据终端电池的内阻消耗,得到终端的电池的内阻消耗对应的电流值,对该电流值进行积分,得到终端的电池的消耗的第三电量,并对终端的电池输出电流进行积分,得到终端的电池的消耗的第四电量,将第三电量和第四电量之和确定为终端在第一系统处于休眠状态时电池的总消耗电量,从而确定出终端的第二电池电量;或者,第二电量计10可以根据终端的第二电池温度确定终端电池的内阻消耗,从而根据终端电池的内阻消耗,得到终端的电池的内阻消耗对应的电流值,对终端的电池输出电流和电池的内阻消耗对应的电流值相加再进行积分,得到终端电池的总消耗电量,从而确定出终端的第二电池电量。可选的,第二电量计20可以将终端的第一系统进入休眠状态时对应的电池电量与得到的终端电池的总消耗电量之差,确定为终端的第二电池电量,例如,终端的第一系统进入休眠状态时对应的电池电量为60%,得到的终端电池的总消耗电量为15%,则第二电量计确定终端的第二电池电量为45%。可以理解的是,在终端的第一系统处于休眠状态时,终端的第二系统处于工作状态,此时,终端的供电电流为通过电流转换器(例如,DC-DC转换器)将终端的电池的输出电流经过转换后的小电流。In other scenarios, for example, when the terminal is in the long battery life mode, the first system of the terminal will be in a dormant state, and the first fuel gauge 10 will also shut down and stop working. At this time, the second fuel gauge 20 of the power detection circuit 01 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. Optionally, in this embodiment, the second fuel gauge 20 may be connected to the second processor of the terminal and the battery of the terminal, and the second fuel gauge 20 may detect The voltage value at both ends of the resistor can be used to obtain the output current of the battery, or the second fuel gauge 20 can also obtain the battery output current of the terminal through the above-mentioned current detector installed at the output end of the battery of the terminal. Optionally, the second fuel gauge 20 can obtain the temperature of the second battery of the terminal from the temperature sensor set in the battery of the terminal, or can also obtain the temperature of the second battery of the terminal through a thermistor set on the battery of the terminal. temperature. Further, the second fuel gauge 20 can determine the internal resistance consumption of the terminal battery according to the second battery temperature of the terminal, so as to obtain the current value corresponding to the internal resistance consumption of the terminal battery according to the internal resistance consumption of the terminal battery, and the current value Integrate to obtain the third power consumed by the battery of the terminal, and integrate the output current of the battery of the terminal to obtain the fourth power consumed by the battery of the terminal, and determine the sum of the third power and the fourth power as the terminal's first The total power consumption of the battery when the system is in a dormant state, so as to determine the second battery power of the terminal; or, the second fuel gauge 10 can determine the internal resistance consumption of the terminal battery according to the second battery temperature of the terminal, so as to determine the internal resistance consumption of the terminal battery according to the second battery temperature of the terminal Internal resistance consumption, to obtain the current value corresponding to the internal resistance consumption of the terminal battery, add the output current of the terminal battery and the current value corresponding to the internal resistance consumption of the battery, and then integrate to obtain the total power consumption of the terminal battery, thereby determining Secondary battery level of the terminal. Optionally, the second fuel gauge 20 may determine the difference between the corresponding battery power when the first system of the terminal enters the dormant state and the obtained total power consumption of the terminal battery as the second battery power of the terminal, for example, the terminal's first When a system enters the dormant state, the corresponding battery power is 60%, and the obtained total power consumption of the terminal battery is 15%, then the second fuel gauge determines that the second battery power of the terminal is 45%. It can be understood that when the first system of the terminal is in the dormant state, the second system of the terminal is in the working state. The output current is converted to a small current.

本实施例中,电量检测电路的第一电量计在第二系统处于休眠状态时,能够根据终端的电池输出电流和终端的第一电池温度确定终端的第一电池电量,电量检测电路的第二电量计在第一系统处于休眠状态时,能够根据终端的电池输出电流和终端的第二电池温度检测终端的第二电池电量,也就是说应用该电量检测电路,在终端的第一系统进入休眠状态时,第二电量计仍能够检测出终端的第二电池电量,从而使得终端在第一系统进入休眠状态时仍能够准确地显示终端电量。In this embodiment, when the second system is in a dormant state, the first fuel gauge of the power detection circuit 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 second battery power of the power detection circuit When the first system is in the dormant state, the fuel gauge can detect the second battery power of the terminal according to the battery output current of the terminal and the second battery temperature of the terminal. state, the second fuel gauge can still detect the second battery power of the terminal, so that the terminal can still accurately display the power of the terminal when the first system enters the dormant state.

通常,上述第一电量计10在第二系统处于休眠状态时,确定的终端的第一电池电量的精度只有±10%左右,精度较差,因此,在第二系统处于休眠状态时可以通过上述第二电量计20辅助第一电量计10确定终端的第一电池电量。在一个实施例中,上述第二电量计20,还用于在第二系统处于休眠状态时,根据终端的电池输出电流和终端的第一电池温度确定第三电池电量;第三电池电量用于校准第一电池电量。Usually, when the second system is in the dormant state, the accuracy of the first battery level of the terminal determined by the first fuel gauge 10 is only about ±10%, and the accuracy is relatively poor. Therefore, when the second system is in the dormant state, the above-mentioned The second fuel gauge 20 assists the first fuel gauge 10 in determining the first battery power of the terminal. In one embodiment, the above-mentioned second fuel gauge 20 is also used to determine the 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 a dormant state; the third battery power is used for Calibrate first battery level.

在本实施例中,第二电量计20在上述第二系统处于休眠状态时,可以根据电量检测电路01中的上述检测电阻的电阻值和检测电阻两端的电压值,得到终端的电池的输出电流,或者,第二电量计20也可以通过上述安装在终端的电池的输出端的电流检测器得到终端的电池输出电流。可选的,第二电量计20可以从上述终端的电池中设置的温度传感器中获取终端的第一电池温度,或者,也可以通过设置在终端的电池上的热敏电阻得到终端的第一电池温度。进一步地,第二电量计20可以根据终端的第一电池温度确定终端电池的内阻消耗,从而根据终端电池的内阻消耗,得到终端的电池的内阻消耗对应的电流值,对该电流值进行积分,得到终端的电池消耗的第五电量,并对终端的电池输出电流进行积分,得到终端的电池消耗的第六电量,将第五电量和第六电量之和确定为终端在第二系统处于休眠状态时电池的总消耗电量,从而确定出终端的第三电池电量;或者,第二电量计10可以根据终端的第一电池温度确定终端电池的内阻消耗,从而根据终端电池的内阻消耗,得到终端的电池的内阻消耗对应的电流值,对终端的电池输出电流和电池的内阻消耗对应的电流值相加再进行积分,得到终端电池的总消耗电量,从而确定出终端的第三电池电量,并用确定的第三电池电量校准第一电量计10得到的第一电池电量。In this embodiment, when the second system is in a dormant state, the second fuel gauge 20 can obtain the output current of the terminal battery according to the resistance value of the detection resistor in the power detection circuit 01 and the voltage value at both ends of the detection resistor. Alternatively, the second fuel gauge 20 can also obtain the battery output current of the terminal through the above-mentioned current detector installed at the output end of the battery of the terminal. Optionally, the second fuel gauge 20 can obtain the temperature of the first battery of the terminal from the temperature sensor set in the battery of the terminal, or can also obtain the temperature of the first battery of the terminal through a thermistor set on the battery of the terminal. temperature. Further, the second fuel gauge 20 can determine the internal resistance consumption of the terminal battery according to the first battery temperature of the terminal, so as to obtain the current value corresponding to the internal resistance consumption of the terminal battery according to the internal resistance consumption of the terminal battery, and the current value Integrate to obtain the fifth power consumed by the battery of the terminal, and integrate the output current of the battery of the terminal to obtain the sixth power consumed by the battery of the terminal, and determine the sum of the fifth power and the sixth power as the terminal in the second system The total power consumption of the battery when it is in the dormant state, so as to determine the third battery power of the terminal; or, the second fuel gauge 10 can determine the internal resistance consumption of the terminal battery according to the first battery temperature of the terminal, so as to determine the internal resistance consumption of the terminal battery according to the internal resistance of the terminal battery Consumption, to obtain the current value corresponding to the internal resistance consumption of the battery of the terminal, add the output current of the terminal battery and the current value corresponding to the internal resistance consumption of the battery, and then integrate to obtain the total power consumption of the terminal battery, thereby determining the terminal’s the third battery level, and use the determined third battery level to calibrate the first battery level obtained by the first fuel gauge 10 .

可选的,在本实施例中,可以通过如下两种方式校准上述第一电量计确定终端的第一电池电量:Optionally, in this embodiment, the above-mentioned first fuel gauge can be calibrated to determine the first battery power of the terminal in the following two ways:

第一种:第二电量计20与第一电量计10连接,第二电量计20将确定的第三电池电量传输至第一电量计10,第一电量计10根据第三电池电量对第一电池电量进行校准。The first type: the second fuel gauge 20 is connected to the first fuel gauge 10, the second fuel gauge 20 transmits the determined third battery power to the first fuel gauge 10, and the first fuel gauge 10 calculates the first battery power according to the third battery power. The battery power is calibrated.

在本实施例中,上述第二电量计20与第一电量计10连接,上述第二电量计20确定出终端电池的第三电池电量后,第二电量计20将确定的第三电池电量传输至第一电量计10,第一电量计10根据上述第三电池电量对上述第一电池电量进行校准,可选的,第一电量计10可以直接将第三电量确定为终端的第一电池电量,也可以将第三电池电量与上述第一电池电量的平均值确定为终端的第一电池电量。例如,在终端的第二系统处于休眠状态时,第一电量计确定终端的第一电池电量为70%,第二电量计确定终端的第三电池电量为69.8%,则第一电量计10可以将第二电量计确定的69.8%确定为终端的第一电池电量;又例如,在终端的第二系统处于休眠状态时,第一电量计10确定终端的第一电池电量为65%,第二电量计20确定终端的第三电池电量为63%,则第一电量计10可以将两者的平均值64%确定为终端的第一电池电量。In this embodiment, the second fuel gauge 20 is connected to the first fuel gauge 10, and after the second fuel gauge 20 determines the third battery power of the terminal battery, the second fuel gauge 20 transmits the determined third battery power To the first fuel gauge 10, the first fuel gauge 10 calibrates the above-mentioned first battery power according to the above-mentioned third battery power, and optionally, the first fuel gauge 10 can directly determine the third power as the first battery power of the terminal , the average value of the third battery level and the first battery level may also be determined as the first battery level of the terminal. For example, when the second system of the terminal is in a dormant state, the first fuel gauge determines that the first battery power of the terminal is 70%, and the second fuel gauge determines that the third battery power of the terminal is 69.8%, then the first fuel gauge 10 can The 69.8% determined by the second fuel gauge is determined as the first battery power of the terminal; for another example, when the second system of the terminal is in a dormant state, the first fuel gauge 10 determines that the first battery power of the terminal is 65%, and the second The fuel gauge 20 determines that the third battery power of the terminal is 63%, and the first fuel gauge 10 may determine the average value of the two, 64%, as the first battery power of the terminal.

第二种:上述终端还包括电池管理芯片,电池管理芯片分别与第一电量计10、第二电量计20、第一处理器连接,该电池管理芯片根据上述第三电池电量对第一电池电量进行校准。The second type: the above-mentioned terminal also includes a battery management chip, which is respectively connected to the first fuel gauge 10, the second fuel gauge 20, and the first processor. to calibrate.

在本实施例中,上述终端还包括电池管理芯片,可选的,上述第一电量计10可以集成与该电池管理芯片中,或者,电池管理芯片可以分别与第一电量计10、第二电量计20、第一处理器连接,在本实施例中,第二电量计20在终端第二系统处于休眠状态时,根据终端的电池输出电流和终端的第一电池温度确定出第三电池电量后,第二电量计20将确定的第三电池电量传输至上述电池管理芯片,电池管理芯片根据第二电量计20传输的第三电池电量对上述第一电池电量进行校准,同样地,电池管理芯片可以直接将第三电量确定为终端的第一电池电量,也可以将第三电池电量与上述第一电池电量的平均值确定为终端的第一电池电量。例如,在终端的第二系统处于休眠状态时,第一电量计确定终端的第一电池电量为70%,第二电量计确定终端的第三电池电量为69.8%,则电池管理芯片可以将第二电量计确定的69.8%确定为终端的第一电池电量;又例如,在终端的第二系统处于休眠状态时,第一电量计10确定终端的第一电池电量为65%,第二电量计20确定终端的第三电池电量为63%,则电池管理芯片可以将两者的平均值64%确定为终端的第一电池电量。In this embodiment, the above-mentioned terminal further includes a battery management chip. Optionally, the above-mentioned first fuel gauge 10 can be integrated with the battery management chip, or the battery management chip can be connected with the first fuel gauge 10 and the second battery management chip respectively. The meter 20 is connected to the first processor. In this embodiment, when the second system of the terminal is in a dormant state, the second electricity meter 20 determines the third battery power according to the battery output current of the terminal and the first battery temperature of the terminal. , the second fuel gauge 20 transmits the determined third battery power to the battery management chip, and the battery management chip calibrates the first battery power according to the third battery power transmitted by the second fuel gauge 20. Similarly, the battery management chip The third power level may be directly determined as the first battery power of the terminal, or an average value of the third battery power and the first battery power may be determined as the first battery power of the terminal. For example, when the second system of the terminal is in a dormant state, the first fuel gauge determines that the first battery power of the terminal is 70%, and the second fuel gauge determines that the third battery power of the terminal is 69.8%, then the battery management chip may set the first battery power of the terminal to 69.8%. The 69.8% determined by the second fuel gauge is determined as the first battery power of the terminal; for another example, when the second system of the terminal is in a dormant state, the first fuel gauge 10 determines that the first battery power of the terminal is 65%, and the second fuel gauge 20. If the third battery level of the terminal is determined to be 63%, the battery management chip may determine the average value of the two, 64%, as the first battery level of the terminal.

本实施例中,电量检测电路的第二电量计能够在终端的第二系统处于休眠状态时,根据终端的电池输出电流和终端的第一电池温度确定第三电池电量,进而根据第三电池电量校准第一电池电量,由于第二电量计的计量精度高于第一电量计的计量精度,这样通过第二电量计测得的第三电池电量对第一电量计测得的第二电池电量进行校准,能够确保确定的第一电池电量的准确度。In this embodiment, the second fuel gauge of the power detection circuit can determine the third battery power 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 a dormant state, and then according to the third battery power Calibrate the first battery level, because the measurement accuracy of the second fuel gauge is higher than the measurement accuracy of the first fuel gauge, so the third battery level measured by the second fuel gauge is compared to the second battery level measured by the first fuel gauge Calibration can ensure the accuracy of the determined first battery level.

通常,终端的电池上设置的有热敏电阻,该热敏电阻能够测量终端的电池温度,在一个实施例中,上述第一电量计10,还用于在第二系统处于休眠状态时,获取终端的电池中的第一热敏电阻上的第一电池温度。Usually, a thermistor is set on the battery of the terminal, and the thermistor can measure the battery temperature of the terminal. In one embodiment, the above-mentioned first fuel gauge 10 is also used to obtain The first battery temperature on the first thermistor in the battery terminal.

其中,热敏电阻NTC是指随温度上升电阻呈指数关系减小、具有负温度系数的热敏电阻现象和材料,例如,测得电池的温度为25度,则可以确定电池的内阻消耗是25mΩ。在本实施例中,当终端的第二系统处于休眠状态时,终端是由电池直接供电,将会造成终端的电池产生热量,第一电量计10可以获取终端的电池中的第一热敏电阻上的第一电池温度,从而根据终端的第一电池温度和终端的电池输出电流确定终端的第一电池电量。Among them, the thermistor NTC refers to the thermistor phenomenon and material whose resistance decreases exponentially with the temperature rise and has a negative temperature coefficient. For example, if the measured temperature of the battery is 25 degrees, it can be determined that the internal resistance consumption of the battery is 25mΩ. In this embodiment, when the second system of the terminal is in the dormant 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 can obtain the first thermistor in the battery of the terminal The first battery temperature on 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 a dormant state, the first fuel gauge may also collect a thermistor on the main board as the battery temperature. However, when the second system is in a dormant state, the temperature of the main board of the terminal will increase. 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 will not be accurate enough. , in this embodiment, the first fuel gauge can increase the obtained first battery temperature on the first thermistor in the battery of the terminal by acquiring the first battery temperature on the first thermistor in the battery of the terminal the accuracy.

可选的,第一电量计可以通过如下两种方式获取终端的电池中的第一热敏电阻上的第一电池温度:Optionally, the first fuel gauge can acquire the first battery temperature on the first thermistor in the battery of the terminal in the following two ways:

方式一:第一电量计10用于在第二系统处于休眠状态时,通过终端的电池的NTC引脚获取第一热敏电阻上的第一电池温度。Mode 1: the first fuel gauge 10 is used to obtain the first battery temperature on the first thermistor through the NTC pin of the terminal battery when the second system is in a dormant state.

在本实施例中,如图3所示,终端的电池的NTC引脚与第一电量计连接,第一电量计可以通过NTC引脚采集终端的电池上的第一热敏电阻的第一电池温度,从而第一电量计10可以在终端的第二系统处于休眠状态时,通过终端的电池的NTC引脚获取第一热敏电阻上的第一电池温度。In this embodiment, as shown in Figure 3, the NTC pin of the terminal battery is connected to the first fuel gauge, and the first fuel gauge can collect the first battery temperature of the first thermistor on the terminal battery through the NTC pin. temperature, so that the first fuel gauge 10 can obtain 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 dormant state.

方式二:第一电量计10用于在第二系统处于休眠状态时,通过终端的电池的ID引脚获取第一热敏电阻上的第一电池温度。Mode 2: the first fuel gauge 10 is used to obtain the first battery temperature on the first thermistor through the ID pin of the terminal battery when the second system is in a dormant state.

在本实施例中,可以将图3中终端的电池的NTC引脚与第一电量计的连接断开,使终端的电池的ID引脚与第一电量计连接,第一电量计可以通过ID引脚采集终端的电池上的第一热敏电阻的第一电池温度,从而第一电量计10可以在终端的第二系统处于休眠状态时,通过终端的电池的ID引脚获取第一热敏电阻上的第一电池温度。In this embodiment, the NTC pin of the terminal battery in Figure 3 can be disconnected from the first fuel gauge, so that the ID pin of the terminal battery can be connected to the first fuel gauge, and the first fuel gauge can pass the ID The pin collects the first battery temperature of the first thermistor on the battery of the terminal, so that the first fuel gauge 10 can obtain the first thermistor through the ID pin of the battery of the terminal when the second system of the terminal is in a sleep state. resistor on the first battery temperature.

本实施例中,电量检测电路的第一电量计能够在终端的第二系统处于休眠状态时,获取终端的电池中的第一热敏电阻上的第一电池温度,该过程十分地简单,从而确保了第一电量计能够快速地确定出终端的第一电池温度。In this embodiment, the first fuel gauge of the power detection circuit can obtain the first battery temperature on the first thermistor in the battery of the terminal when the second system of the terminal is in a dormant state. This process is very simple, thus It is ensured that the first fuel gauge can quickly determine the first battery temperature of the terminal.

在上述终端的第一系统处于休眠状态时,终端的电池输出的电流经过转换后为终端供电,此时终端主板的温度与终端电池的温度基本相同或者两者相差不大,第二电量计可以通过如下两种方式获取终端的第二电池温度:When the first system of the above-mentioned terminal is in the dormant state, the current output by the battery of the terminal is converted to supply power for the terminal. At this time, the temperature of the main board of the terminal is basically the same as the temperature of the battery of the terminal or the difference between the two is not large. The second fuel gauge can Obtain the second battery temperature of the terminal in the following two ways:

方式一:在一个实施例中,如图4所示,上述电量检测电路01还包括:第二热敏电阻30,第二热敏电阻30设置于终端的主板上,第二热敏电阻30与第二电量计20连接,第二电量计20,用于在第一系统处于休眠状态时,采集第二热敏电阻上的第二电池温度。Mode 1: In one embodiment, as shown in FIG. 4 , the above-mentioned power detection circuit 01 further includes: a second thermistor 30, the second thermistor 30 is arranged on the main board of the terminal, and the second thermistor 30 and the The second fuel gauge 20 is connected, and the second fuel gauge 20 is used to collect the second battery temperature on the second thermistor when the first system is in a dormant state.

其中,如图4所示,终端的第一处理器与第一电量计10连接,第一电量计10与转换电路DC-DC连接,第一电量计通过电池的VBAT引脚、以及电池的NTC引脚与电池连接,其中,电池的VBAT引脚为电池的正极引脚,图4中电池的GND引脚为电池的负极引脚。第二处理器与第二电量计20连接,第二处理器的CLK引脚与第二电量计20的CLK引脚连接,第二处理器的SDA引脚与第二电量计的SDA引脚连接,第二处理器的GPIO引脚与第二电量计的GPIO引脚连接,可以理解的是,CLK引脚为时钟引脚,可以通过CLK引脚控制第二处理器与第二电量计间的工作频率,SDA引脚为数据线引脚,用于控制第二处理器与第二电量计间的数据交互,GPIO引脚为一个输入输出引脚,第二电量计可以通过第二电量计上的BAT引脚与终端的电池的VBAT引脚连接。Wherein, as shown in FIG. 4 , the first processor of the terminal is connected to the first fuel gauge 10, and the first fuel gauge 10 is connected to the conversion circuit DC-DC. The first fuel gauge passes the VBAT pin of the battery and the NTC of the battery The pins are connected to the battery, wherein the VBAT pin of the battery is the positive pin of the battery, and the GND pin of the battery in Figure 4 is the negative pin of the battery. The second processor is connected to the second fuel gauge 20, the CLK pin of the second processor is connected to the CLK pin of the second fuel gauge 20, and the SDA pin of the second processor is connected to the SDA pin of the second fuel gauge , the GPIO pin of the second processor is connected to the GPIO pin of the second fuel gauge. It can be understood that the CLK pin is a clock pin, and the connection between the second processor and the second fuel gauge can be controlled through the CLK pin. Operating frequency, the SDA pin is a data line pin, used to control the data interaction between the second processor and the second fuel gauge, the GPIO pin is an input and output pin, and the second fuel gauge can be connected to the second fuel gauge The BAT pin of the terminal is connected with the VBAT pin of the battery.

在本实施例中,在第一系统处于休眠状态时,终端电池的输出电流经过DC-DC转换电路转换后采用小电流为终端供电,此时终端主板的温度与终端电池的温度基本相同或者两者相差不大,在上述实施例的基础上,上述电量检测电路01还包括第二热敏电阻30,第二热敏电阻30设置于终端的主板上,第二热敏电阻30通过第二电量计上的NTC引脚与第二电量计20连接,第二热敏电阻30在第一系统处于休眠状态时,可以采集主板的温度,由于第一系统处于休眠状态时,主板的温度与电池的温度基本相同或者两者相差不大,第二热敏电阻30可以将采集的主板的温度确定为终端的第二电池温度,第二电量计20在第一系统处于休眠状态时,可以采集第二热敏电阻30上的上述第二电池温度,进而根据终端的电池输出电流和终端的第二电池温度确定终端的第二电池电量。In this embodiment, when the first system is in the dormant state, the output current of the terminal battery is converted by a DC-DC conversion circuit and then a small current is used to supply power to the terminal. On the basis of the above-mentioned embodiment, the above-mentioned power detection circuit 01 also includes a second thermistor 30, the second thermistor 30 is arranged on the main board of the terminal, and the second thermistor 30 passes the second power The NTC pin on the gauge is connected to the second fuel gauge 20, and the second thermistor 30 can collect the temperature of the main board when the first system is in the dormant state. The temperature is basically the same or there is little difference between the two. The second thermistor 30 can determine the collected temperature of the motherboard as the second battery temperature of the terminal. The second fuel gauge 20 can collect the second battery temperature when the first system is in a sleep state. The above-mentioned second battery temperature on the thermistor 30 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.

本实施例中,终端的第一系统处于休眠状态时,终端的供电电流较小,终端也没有发热的地方,终端主板的温度和电池的温度基本相同或者两者相差不大,此时通过设置在终端的主板上的第二热敏电阻能够准确地采集到主板的温度值,进而可以将主板的温度值直接确定为终端的第二电池温度,第二电量计可以在第一系统处于休眠状态时,采集第二热敏电阻上的第二电池温度,从而提高了确定终端的第二电池温度的效率。In this embodiment, when the first system of the terminal is in the dormant state, the power supply current of the terminal is relatively small, and the terminal does not generate heat. The second thermistor on the main board of the terminal can accurately collect the temperature value of the main board, and then the temperature value of the main board can be directly determined as the second battery temperature of the terminal, and the second fuel gauge can be in the dormant state of the first system When , the second battery temperature on the second thermistor is collected, thereby improving the efficiency of determining the second battery temperature of the terminal.

方式二,在一个实施例中,上述第二电量计20,还用于在第一系统处于休眠状态时,从终端的电池的NTC引脚或ID引脚获取上述第二电池温度。Mode 2, in one embodiment, the above-mentioned second fuel gauge 20 is also used to obtain the above-mentioned second battery temperature from the NTC pin or ID pin of the battery of the terminal when the first system is in a dormant state.

在本实施例中,如图5所示,终端的电池的ID引脚与第二电量计20连接,这里需要说明的是,对于图5中其他各模块之间的连接关系以及其他各引脚之间的连接关系可以参见上述对图4的描述,本实施例在此不再赘述。在本实施例中,终端的电池上的热敏电阻可以对终端电池的第二电池温度进行检测,从而第二电量计20可以在终端的第一系统处于休眠状态时,通过终端的电池的NTC引脚或ID引脚获取终端的第二电池温度。需要说明的是,通过终端的电池的NTC引脚或ID引脚,第二电量计20能够准确地得到终端的第二电池温度。In this embodiment, as shown in FIG. 5, the ID pin of the battery of the terminal is connected to the second fuel gauge 20. What needs to be explained here is that for the connection relationship between other modules and other pins in FIG. For the connection relationship between them, reference may be made to the above description of FIG. 4 , which will not be repeated here in this embodiment. In this embodiment, the thermistor on the battery of the terminal can detect the second battery temperature of the battery of the terminal, so that the second fuel gauge 20 can pass the NTC of the battery of the terminal when the first system of the terminal is in a sleep state. pin or ID pin to get the second battery temperature of the terminal. It should be noted that, through the NTC pin or the ID pin of the battery of the terminal, the second fuel gauge 20 can accurately obtain the temperature of the second battery of the terminal.

本实施例中,第二电量计在终端的第一系统处于休眠状态时,从终端的电池的ID引脚能够准确地获取终端的第二电池温度,提高了第二电量计获取终端的第二电池温度的准确度。In this embodiment, when the first system of the terminal is in a dormant state, the second fuel gauge can accurately obtain the second battery temperature of the terminal from the ID pin of the battery of the terminal, which improves the second battery temperature obtained by the second fuel gauge of the terminal. Accuracy of battery temperature.

在上述第一电量计10根据终端的电池输出电流和终端的第一电池温度确定终端的第一电池电量,第二电量计20根据终端的电池输出电流和终端的第二电池温度确定终端的第二电池电量的场景中,第一电量计10和第二电量计20均可以通过电量检测电路01中的检测电阻采集终端的电池输出电流,在一个实施例中,请继续参见图5,上述电量检测电路01还包括:检测电阻40;检测电阻40分别与第一电量计10、第二电量计20、终端的电池连接,第一电量计10和第二电量计20均通过检测电阻40采集电池输出电流。The above-mentioned first fuel gauge 10 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, and the second fuel gauge 20 determines the first battery power of the terminal according to the battery output current of the terminal and the second battery temperature of the terminal. In the scenario of two battery levels, both the first fuel gauge 10 and the second fuel gauge 20 can collect the battery output current of the terminal through the detection resistor in the power detection circuit 01. In one embodiment, please continue to refer to FIG. 5, the above-mentioned power The detection circuit 01 also includes: a detection resistor 40; the detection resistor 40 is respectively connected to the battery of the first fuel gauge 10, the second fuel gauge 20, and the terminal, and both the first fuel gauge 10 and the second fuel gauge 20 collect battery power through the detection resistor 40. Output current.

在本实施例中,上述电量检测电路10还包括检测电阻40,如图5所示,上述第一电量计10与该检测电阻40连接,第二电量计20也与该检测电阻40连接,更具体地,第二电量计20通过自身的SRN引脚和SRP引脚与检测电阻40连接,另外,检测电阻40还通过电池的VBAT引脚与终端的电池连接,上述第一电量计10和第二电量计20均通过该检测电阻40采集终端的电池输出电流。可选的,第一电量计10和第二电量计20通过检测电阻40采集终端的电池输出电流的原理可以参见上述对图2a的描述,本实施例在此不再赘述。可以理解的是,本实施例中的检测电阻40相当于上述图2a中的Rsns。可选的,检测电阻40的电阻值可以为10mΩ,也可以为20mΩ或者其他电阻值等,本实施例在此不做限制。需要说明的是,若增大检测电阻的电阻值,则测得的终端电池输出电流的精度会提高,但会增大检测电阻在电路中的损耗。In this embodiment, the electric quantity detection circuit 10 further includes a detection resistor 40. As shown in FIG. Specifically, the second fuel gauge 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. The above-mentioned first fuel gauge 10 and the second fuel gauge Both fuel gauges 20 collect terminal battery output current through the detection resistor 40 . Optionally, the principle of collecting the terminal battery output current by the first fuel gauge 10 and the second fuel gauge 20 through the detection resistor 40 can refer to the above description of FIG. 2 a , which will not be repeated here in this embodiment. It can be understood that the detection resistor 40 in this embodiment is equivalent to Rsns in FIG. 2a above. Optionally, the resistance value of the detection resistor 40 may be 10 mΩ, or 20 mΩ or other resistance values, which are not limited in this embodiment. It should be noted that if the resistance value of the detection resistor is increased, the accuracy of the measured terminal battery output current will be improved, but the loss of the detection resistor in the circuit will be increased.

本实施例中,电量检测电路还包括检测电阻,检测电阻分别与第一电量计、第二电量计、终端的电池连接,第一电量计和第二电量计均能够通过该检测电阻采集终端的电池输出电流,通过这一个检测电阻就可以实现第一电量计和第二电量计对终端的电池输出电流的采集,这样在简化了电量检测电路的结构的同时,能够确保第一电量计和第二电量计均能够采集到终端电池的输出电流,且确保了电量检测电路功能的完整性。In this embodiment, the power detection circuit further includes a detection resistor, which is respectively connected to the first fuel gauge, the second fuel gauge, and the battery of the terminal. The output current of the battery can be collected by the first fuel gauge and the second fuel gauge to the battery output current of the terminal through this detection resistor, so that while simplifying the structure of the power detection circuit, it can ensure that the first fuel gauge and the second fuel gauge Both fuel gauges can collect the output current of the terminal battery, and ensure the integrity of the power detection circuit function.

在一些场景中,终端会从长续航模式下切换到高运算模式,也就是说,终端会从第二系统切换到第一系统运行,此时第二系统将进入休眠状态,在一个实施例中,第二处理器,用于在接收到切换指令时,将第二电量计检测到的第二电池电量发送至第一处理器,第一处理器,用于将第二电池电量发送至第一电量计;第一电量计,还用于在第二系统处于休眠状态时,基于第二电池电量,根据终端的电池输出电流和终端的第一电池温度确定终端的第一电池电量。In some scenarios, the terminal will switch from the long-endurance mode to the high-computing mode, that is, the terminal will switch from the second system to the first system, and the second system will enter a sleep state. In one embodiment , the second processor is configured to send the second battery level detected by the second fuel gauge to the first processor when receiving the switching instruction, and the first processor is used to send the second battery level to the first Fuel gauge; the first fuel gauge is also used to determine the first battery power of the terminal based on the second battery power when the second system is in a dormant state according to the battery output current of the terminal and the first battery temperature of the terminal.

其中,切换指令用于指示第二处理器退出运行第二系统,使第二系统处于休眠状态。在本实施例中,第二处理器接收到切换指令时,将第二电量计20检测的终端的第二电池电量发送至第一处理器,第一处理器接收到第二电池电量后将该第二电池电量发送至第一电量计10,以使第一电量计10在第二系统处于休眠状态时,基于该第二电池电量,根据终端的电池输出电流和终端的第一电池温度确定终端的第一电池电量。例如,第二处理器接收到切换指令时,第二电量计20检测到的终端的第二电池电量为40%,则第二处理器将第二电量计20检测到的第二电池电量40%发送至第一处理器,第一处理器将第二电池电量40%发送至第一电量计10,第一电量计10将基于终端的第二电池电量40%,根据终端的电池输出电流和终端的第一电池温度确定终端的第一电池电量。Wherein, the switching instruction is used to instruct the second processor to quit running the second system, so that the second system is in a dormant state. In this embodiment, when the second processor receives the switching instruction, it sends the second battery level of the terminal detected by the second fuel gauge 20 to the first processor, and the first processor sends the second battery level to the first processor after receiving the second battery level. The second battery level is sent to the first fuel gauge 10, so that the first fuel gauge 10 determines the terminal according to the terminal's battery output current and the terminal's first battery temperature based on the second battery level when the second system is in a dormant state. of the first battery level. For example, when the second processor receives the switching instruction, the second battery power of the terminal detected by the second fuel gauge 20 is 40%, then the second processor will set the second battery power of 40% detected by the second fuel gauge 20 to 40%. Send to the first processor, the first processor will send the second battery power 40% to the first fuel gauge 10, the first fuel gauge 10 will be based on the second battery power 40% of the terminal, according to the battery output current of the terminal and the terminal The first battery temperature determines the first battery capacity of the terminal.

本实施例中,在第二处理器接收到切换指令时,将第二电量计检测到的第二电池电量发送至第一处理器,第一处理器将该第二电池电量发送至第一电量计,使得第一电量计在第二系统处于休眠状态时,能够基于第二电池电量,根据终端的电池输出电流和终端的第一电池温度确定终端的第一电池电量,这样就不会导致终端在第一系统处于休眠状态时无法确定第二系统消耗了多少电量的问题,从而确保了终端在切换至第一系统运行的情况下,对电池电量的计算准确度。In this embodiment, when the second processor receives the switching instruction, it sends the second battery level detected by the second fuel gauge to the first processor, and the first processor sends the second battery level to the first battery level. meter, so that the first fuel gauge can determine the first battery level of the terminal based on the second battery level, the terminal’s battery output current and the terminal’s first battery temperature when the second system is in a sleep state, so that the terminal will not When the first system is in a dormant state, it is impossible to determine how much power the second system consumes, thereby ensuring the accuracy of battery power calculation when the terminal switches to the first system.

第二方面,如图6所示,在一实施例中,本申请提供一种电量检测电路02,该电量检测电路02应用于终端,终端包括第一处理器和第二处理器,第一处理器用于运行第一系统,第二处理器用于运行第二系统,第一处理器的运行功耗大于第二处理器的运行功耗,该电量检测电路02包括:控制开关50和电量计60;控制开关50,用于在第二系统处于休眠状态时,导通电量计60与第一处理器之间的通路,使得电量计60根据终端的电池输出电流和终端的第一电池温度确定终端的第一电池电量;控制开关50,还用于在第一系统处于休眠状态时,导通电量计60与第二处理器之间的通路,使得电量计60根据终端的电池输出电流和终端的第二电池温度确定终端的第二电池电量。In the second aspect, as shown in Figure 6, in an embodiment, the present application provides a power detection circuit 02, which is applied to a terminal, the terminal includes a first processor and a second processor, and the first processor The processor is used to run the first system, the second processor is used to run the second system, the operating power consumption of the first processor is greater than the operating power consumption of the second processor, and the power detection circuit 02 includes: a control switch 50 and a power gauge 60; The control switch 50 is used to turn on the path between the fuel gauge 60 and the first processor when the second system is in the dormant state, so that the fuel gauge 60 determines the terminal's battery output current according to the terminal's battery output current and the terminal's first battery temperature. The first battery power: the control switch 50 is also used to turn on the path between the fuel gauge 60 and the second processor when the first system is in a dormant state, so that the fuel gauge 60 is based on the battery output current of the terminal and the first battery output current of the terminal. The second battery temperature determines the second battery capacity of the terminal.

其中,电量计60的工作原理可以参见上述图2对应的实施例中,对图2a示例的简化的电池电量计的描述,本实施例在此不再赘述。在本实施例中,如图6所示,终端的第一处理器上挂载有PMIC芯片,PMIC芯片与DC-DC转换电路连接,电量计60通过控制开关分别与第一处理器和第二处理器连接,其中,更具体地,电量计60的GPIOUT引脚与控制开关的GPIO引脚连接,通过控制开关的GPIO引脚电量计60的GPIOUT引脚与第二处理器的GPIO引脚,电量计60的SDA引脚通过控制开关与第二处理器的SDA引脚连接,电量计60的CLK引脚通过控制开关与第二处理器的CLK引脚连接,电量计60的CLK引脚通过控制开关与第一处理器的CLK引脚连接,电量计60的SDA引脚通过控制开关与第一处理器的SDA引脚连接,并且,第一处理器的GPIO引脚还通过控制开关的EN引脚与电量计60连接,其中,CLK引脚为时钟引脚,可以通过CLK引脚控制第一处理器、第二处理器与电量计间的工作频率,SDA引脚为数据线引脚,第一处理器可以通过SDA引脚控制其与电量计间的数据交互,第二处理器可以通过SDA引脚控制其与电量计间的数据交互,上述GPIO引脚为一个输入输出引脚,第一处理器、第二处理器、电量计均可以通过自身的GPIO引脚控制数据的输入和输出。另外,电量计60的BAT引脚与终端的电池的VBAT的引脚连接,控制终端的电池电流的输入,电量计60还通过终端的电池的NTC引脚与终端的电池连接,获取终端的电池的温度。在本实施例中,在终端的第二系统处于休眠状态时,电量检测电路02的控制开关50导通电量计60与终端的第一处理器之间的通路,使得电量计60根据终端的电池输出电流和终端的第一电池温度确定终端的第一电池电量。可选的,可以在电量检测电路02中设置检测电阻,电量计60可以根据电量检测电路02中检测电阻的电阻值和检测电阻两端的电压差值,得到电池的输出电流,或者,也可以在终端的电池的输出端安装电流检测器,电量计60可以通过该电流检测器得到终端的电池输出电流。可选的,终端的电池中可以设置有温度传感器,电量计60可以从该温度传感器中获取终端的第一电池温度,或者,也可以在终端的电池上设置热敏电阻,通过热敏电阻得到终端的第一电池温度。进一步地,电量计60可以根据终端的第一电池温度确定终端电池的内阻消耗,从而根据终端电池的内阻消耗,得到终端的电池的内阻消耗对应的电流值,对该电流值进行积分,得到终端的电池的消耗的第一电量,并对终端的电池输出电流进行积分,得到终端的电池的消耗的第二电量,将第一电量和第二电量之和确定为终端电池的总消耗电量,从而确定出终端的第一电池电量;或者,电量计60可以根据终端的第一电池温度确定终端电池的内阻消耗,从而根据终端电池的内阻消耗,得到终端的电池的内阻消耗对应的电流值,对终端的电池输出电流和电池的内阻消耗对应的电流值相加再进行积分,得到终端电池的总消耗电量,从而确定出终端的第一电池电量。可选的,电量计60可以将终端的第二系统进入休眠状态时对应的电池电量与得到的终端电池的总消耗电量之差,确定为终端的第一电池电量,例如,终端的第二系统进入休眠状态时对应的电池电量为70%,得到的终端电池的总消耗电量为10%,则电量计60确定终端的第一电池电量为60%。For the working principle of the fuel gauge 60 , refer to the description of the simplified battery fuel gauge shown in FIG. 2 a in the embodiment corresponding to FIG. 2 , and details will not be repeated here in this embodiment. In this embodiment, as shown in FIG. 6, a PMIC chip is mounted on the first processor of the terminal, and the PMIC chip is connected to the DC-DC conversion circuit. The processor is connected, wherein, more specifically, the GPIOUT pin of the fuel gauge 60 is connected to the GPIO pin of the control switch, and the GPIOUT pin of the fuel gauge 60 is connected to the GPIO pin of the second processor through the GPIO pin of the control switch, The SDA pin of the fuel gauge 60 is connected with the SDA pin of the second processor through the control switch, the CLK pin of the fuel gauge 60 is connected with the CLK pin of the second processor through the control switch, and the CLK pin of the fuel gauge 60 is connected through the The control switch is connected to the CLK pin of the first processor, the SDA pin of the fuel gauge 60 is connected to the SDA pin of the first processor through the control switch, and the GPIO pin of the first processor is also connected to the EN pin of the control switch. The pins are connected to the fuel gauge 60, wherein the CLK pin is a clock pin, and the operating frequency between the first processor, the second processor and the fuel gauge can be controlled through the CLK pin, and the SDA pin is a data line pin. The first processor can control the data interaction between it and the fuel gauge through the SDA pin, and the second processor can control the data interaction between it and the fuel gauge through the SDA pin. The above-mentioned GPIO pin is an input and output pin. The first processor, the second processor, and the fuel gauge can control data input and output through their own GPIO pins. In addition, the BAT pin of the fuel gauge 60 is connected to the VBAT pin of the terminal battery to control the input of the terminal battery current. The fuel gauge 60 is also connected to the terminal battery through the NTC pin of the terminal battery to obtain the terminal battery temperature. In this embodiment, when the second system of the terminal is in the dormant state, the control switch 50 of the power detection circuit 02 turns on the path between the fuel gauge 60 and the first processor of the terminal, so that the fuel gauge 60 The output current and the first battery temperature of the terminal determine the first battery capacity of the terminal. Optionally, a detection resistor can be set in the power detection circuit 02, and the fuel gauge 60 can obtain the output current of the battery according to the resistance value of the detection resistor in the power detection circuit 02 and the voltage difference between the two ends of the detection resistor, or can also be A current detector is installed at the output end of the battery of the terminal, and the fuel gauge 60 can obtain the output current of the battery of the terminal through the current detector. Optionally, a temperature sensor may be set in the battery of the terminal, and the fuel gauge 60 may acquire the first battery temperature of the terminal from the temperature sensor, or a thermistor may be set on the battery of the terminal, and the temperature may be obtained through the thermistor. Terminal's first battery temperature. Further, the fuel gauge 60 can 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, and integrate the current value , to obtain the first power consumption of the battery of the terminal, and integrate the output current of the battery of the terminal to obtain the second power consumption of the battery of the terminal, and determine the sum of the first power and the second power as the total consumption of the terminal battery power, so as to determine the first battery power of the terminal; or, the fuel gauge 60 can determine the internal resistance consumption of the terminal battery according to the first battery temperature of the terminal, so as to obtain the internal resistance consumption of the terminal battery according to the internal resistance consumption of the terminal battery The corresponding current value is added to the terminal battery output current and the current value corresponding to the internal resistance consumption of the battery, and then integrated to obtain the total power consumption of the terminal battery, thereby determining the first battery power of the terminal. Optionally, the fuel gauge 60 may determine the difference between the corresponding battery power when the second system of the terminal enters the dormant state and the obtained total power consumption of the terminal battery as the first battery power of the terminal, for example, the second system of the terminal When entering the dormant state, the corresponding battery power is 70%, and the obtained total power consumption of the terminal battery is 10%, so the fuel gauge 60 determines that the first battery power of the terminal is 60%.

在终端的第二系统处于休眠状态时,电量检测电路02的控制开关50导通电量计60与第二处理器之间的通路,使得电量计60根据终端的电池输出电流和终端的第二电池温度确定终端的第二电池电量。可选的,可以在电量检测电路02中设置检测电阻,电量计60可以根据电量检测电路02中检测电阻的电阻值和检测电阻两端的电压差值,得到电池的输出电流,或者,也可以在终端的电池的输出端安装电流检测器,电量计60可以通过该电流检测器得到终端的电池输出电流。可选的,终端的电池中可以设置有温度传感器,电量计60可以从该温度传感器中获取终端的第二电池温度,或者,也可以在终端的电池上设置热敏电阻,通过热敏电阻得到终端的第二电池温度。进一步地,电量计60可以根据终端的第二电池温度确定终端电池的内阻消耗,从而根据终端电池的内阻消耗,得到终端的电池的内阻消耗对应的电流值,对该电流值进行积分,得到终端的电池的消耗的第三电量,并对终端的电池输出电流进行积分,得到终端的电池的消耗的第四电量,将第三电量和第四电量之和确定为终端电池的总消耗电量,从而确定出终端的第二电池电量;或者,电量计60可以根据终端的第二电池温度确定终端电池的内阻消耗,从而根据终端电池的内阻消耗,得到终端的电池的内阻消耗对应的电流值,对终端的电池输出电流和电池的内阻消耗对应的电流值相加再进行积分,得到终端电池的总消耗电量,从而确定出终端的第二电池电量。可选的,电量计60可以将终端的第一系统进入休眠状态时对应的电池电量与得到的终端电池的总消耗电量之差,确定为终端的第二电池电量,例如,终端的第一系统进入休眠状态时对应的电池电量为50%,得到的终端电池的总消耗电量为20%,则电量计60确定终端的第二电池电量为30%。When the second system of the terminal is in the dormant state, the control switch 50 of the power detection circuit 02 conducts the path between the fuel gauge 60 and the second processor, so that the fuel gauge 60 outputs the current according to the battery output current of the terminal and the second battery of the terminal. The temperature determines the second battery level of the terminal. Optionally, a detection resistor can be set in the power detection circuit 02, and the fuel gauge 60 can obtain the output current of the battery according to the resistance value of the detection resistor in the power detection circuit 02 and the voltage difference between the two ends of the detection resistor, or can also be A current detector is installed at the output end of the battery of the terminal, and the fuel gauge 60 can obtain the output current of the battery of the terminal through the current detector. Optionally, a temperature sensor may be provided 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 provided on the battery of the terminal, and the temperature of the second battery of the terminal may be obtained through the thermistor. Terminal's second battery temperature. Further, the fuel gauge 60 can determine the internal resistance consumption of the terminal battery according to the second battery temperature of the terminal, so as to obtain the current value corresponding to the internal resistance consumption of the terminal battery according to the internal resistance consumption of the terminal battery, and integrate the current value , to obtain the third power consumption of the battery of the terminal, and integrate the output current of the battery of the terminal to obtain the fourth power consumption of the battery of the terminal, and determine the sum of the third power and the fourth power as the total consumption of the terminal battery power, so as to determine the second battery power of the terminal; or, the fuel gauge 60 can determine the internal resistance consumption of the terminal battery according to the second battery temperature of the terminal, so as to obtain the internal resistance consumption of the terminal battery according to the internal resistance consumption of the terminal battery The corresponding current value is added to the terminal battery output current and the current value corresponding to the internal resistance consumption of the battery, and then integrated to obtain the total power consumption of the terminal battery, thereby determining the second battery power of the terminal. Optionally, the fuel gauge 60 may determine the difference between the corresponding battery power when the first system of the terminal enters the dormant state and the obtained total power consumption of the terminal battery as the second battery power of the terminal, for example, the first system of the terminal When entering the dormant state, the corresponding battery power is 50%, and the obtained total power consumption of the terminal battery is 20%, so the fuel gauge 60 determines that the second battery power of the terminal is 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 dormant state, so that the fuel gauge can The battery temperature determines the first battery capacity 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 a dormant state, so that the fuel gauge can The temperature of the second battery determines the second battery level of the terminal, that is to say, when the first system of the terminal enters the dormant state by using the power detection circuit, the fuel gauge can still detect the second battery level of the terminal, so that the terminal can operate at the first When the system enters the dormant state, it can still accurately display the terminal power.

在上述实施例的基础上,在一个实施例中,电量计60,用于在第二系统处于休眠状态时,获取终端的电池中的热敏电阻上的第一电池温度。On the basis of the above embodiments, 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 a sleep state.

在本实施例中,终端的电池上设置有热敏电阻NTC,其中,热敏电阻NTC是指随温度上升电阻呈指数关系减小、具有负温度系数的热敏电阻现象和材料,通过电池上的热敏电阻能够对电池的温度进行检测,也就是说,在终端的第二系统处于休眠状态时,电量计60可以获取终端的电池中的热敏电阻上的第一电池温度。进一步地,在终端的第二系统处于休眠状态时,电量计60可以从终端的电池的热敏电阻NTC引脚获取终端的第二电池温度。In this embodiment, the battery of the terminal is provided with a thermistor NTC, wherein the thermistor NTC refers to a thermistor phenomenon and material that decreases exponentially with temperature rise and has a negative temperature coefficient. The thermistor can detect the temperature of the battery, that is, when the second system of the terminal is in a dormant state, the fuel gauge 60 can obtain the first battery temperature on the thermistor in the battery of the terminal. Further, when the second system of the terminal is in a dormant state, the fuel gauge 60 may obtain the second battery temperature of the terminal from the thermistor NTC pin of the battery of the terminal.

可选的,电量计60可以通过如下两种方式获取终端的电池中的热敏电阻上的第一电池温度:Optionally, the fuel gauge 60 can acquire the first battery temperature on the thermistor in the battery of the terminal in the following two ways:

方式一:电量计60用于在第二系统处于休眠状态时,通过终端的电池的NTC引脚获取热敏电阻上的第一电池温度。Way 1: The fuel gauge 60 is used to obtain the temperature of the first battery on the thermistor through the NTC pin of the terminal battery when the second system is in a dormant state.

在本实施例中,请继续参见图6,终端的电池的NTC引脚与电量计连接,电量计可以通过NTC引脚采集终端的电池上的热敏电阻的第一电池温度,从而电量计60可以在终端的第二系统处于休眠状态时,通过终端的电池的NTC引脚获取热敏电阻上的第一电池温度。In this embodiment, please continue to refer to FIG. 6 , the NTC pin of the terminal battery is connected to the fuel gauge, and the fuel gauge can collect the first battery temperature of the thermistor on the terminal battery through the NTC pin, so that the fuel gauge 60 When the second system of the terminal is in a dormant state, the temperature of the first battery on the thermistor can be acquired through the NTC pin of the battery of the terminal.

方式二:电量计60用于在第二系统处于休眠状态时,通过终端的电池的ID引脚获取热敏电阻上的第一电池温度。Method 2: The fuel gauge 60 is used to obtain the temperature of the first battery on the thermistor through the ID pin of the battery of the terminal when the second system is in a dormant state.

在本实施例中,可以将图6中终端的电池的NTC引脚与电量计的连接断开,使终端的电池的ID引脚与电量计连接,电量计可以通过NTC引脚采集终端的电池上的热敏电阻的第一电池温度,从而电量计60可以在终端的第二系统处于休眠状态时,通过终端的电池的ID引脚获取热敏电阻上的第一电池温度。In this embodiment, the NTC pin of the terminal battery in Figure 6 can be disconnected from the fuel gauge, so that the ID pin of the terminal battery can be connected to the fuel gauge, and the fuel gauge can collect the terminal battery through the NTC pin. The fuel gauge 60 can obtain 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 a dormant state.

本实施例中,电量计在终端的第二系统处于休眠状态时,通过获取终端的电池中的热敏电阻上的第一电池温度,能够快速地确定出终端的电池温度,从而提高了电量计确定终端的电池温度的效率。In this embodiment, when the second system of the terminal is in a dormant 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, thereby improving the efficiency of the fuel gauge. Determine the efficiency of the terminal's battery temperature.

在上述电量计根据终端的电池输出电流和终端的第一电池温度确定终端的第一电池电量、以及根据终端的电池输出电流和终端的第二电池温度确定终端的第二电池电量的场景中,在一个实施例中,如图7所示,上述电量检测电路02还包括:检测电阻70;检测电阻70分别与电量计60和终端的电池连接;电量计60通过检测电阻70采集上述电池输出电流。In the above scenario where the fuel gauge determines the first battery level of the terminal according to the battery output current of the terminal and the first battery temperature of the terminal, and determines the second battery level of the terminal according to the battery output current of the terminal and the second battery temperature of the terminal, In one embodiment, as shown in FIG. 7 , the power detection circuit 02 further includes: a detection resistor 70; the detection resistor 70 is respectively connected to the fuel gauge 60 and the battery of the terminal; the fuel gauge 60 collects the above-mentioned battery output current through the detection resistor 70 .

其中,图7中第一处理器、第二处理器、电量计间的连接关系以及第一处理器的引脚、第二处理器的引脚、电量计的引脚之间的连接关系请参见上述对图6的描述本实施例在此不再赘述。在本实施例中,上述电量检测电路20还包括检测电阻70,检测电阻70分别与上述电量计60和终端的电池连接,更具体地,检测电阻70通过电量计60的SRN引脚和SRP引脚与电量计连接,上述电量计60可以通过该检测电阻70采集终端的电池输出电流。需要说明的是,电量计60通过检测电阻70采集终端的电池输出电流的原理可以参见上述对图2a的描述,本实施例在此不再赘述。可以理解的是,本实施例中的检测电阻70相当于上述图2a中的Rsns。Among them, the connection relationship between the first processor, the second processor, and the fuel gauge in Figure 7, and the connection relationship between the pins of the first processor, the pins of the second processor, and the pins of the fuel gauge, please refer to The foregoing description of FIG. 6 will not be repeated here in this embodiment. In this embodiment, the power detection circuit 20 further includes a detection resistor 70, which is respectively connected to the fuel gauge 60 and the terminal battery. More specifically, the detection resistor 70 is connected to the SRN pin and the SRP lead The pin is connected to the fuel gauge, and the fuel gauge 60 can collect the battery output current of the terminal through the detection resistor 70 . It should be noted that the principle of the fuel gauge 60 collecting the battery output current of the terminal through the detection resistor 70 can refer to the above description of FIG. 2 a , which will not be repeated here in this embodiment. It can be understood that the detection resistor 70 in this embodiment is equivalent to Rsns in FIG. 2a above.

本实施例中,电量检测电路还包括检测电阻,检测电阻分别与电量计和终端的电池连接,电量计能够通过该检测电阻采集终端的电池输出电流,通过这一个检测电阻就可以实现电量计对终端的电池输出电流的采集,这样在简化了电量检测电路的结构的同时,能够确保电量计能够准确地采集到终端电池的输出电流,确保了电量检测电路功能的完整性。In this embodiment, the power detection circuit also includes a detection resistor, which is respectively connected to the battery of the fuel gauge and the terminal, and the fuel gauge can collect the output current of the battery of the terminal through the detection resistor. The collection of the battery output current of the terminal simplifies the structure of the power detection circuit while ensuring that the fuel gauge can accurately collect the output current of the terminal battery, ensuring the integrity of the power detection circuit function.

在一个实施例中,提供了一种终端,该终端可以是可穿戴设备,其内部结构图可以如图2-图5所示所示的任一种结构,或者,可以如图6-图7所示的任一种结构。该终端包括第一处理器,用于运行第一系统;第二处理器,用于运行第二系统;以及如第一方面或第二方面的电量检测电路;其中,第一处理器的运行功耗大于第二处理器的运行功耗;例如,第一处理器可以为运行于Android系统的强性能处理器;第二处理器可以为运行于FreeRTOS、MCU等系统的低功耗处理器。该终端的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该终端的通信接口用于与外部的终端进行有线或无线方式的通信,无线方式可通过WIFI、运营商网络、NFC(近场通信)或其他技术实现。该终端的显示屏可以是液晶显示屏或者电子墨水显示屏,该终端的输入装置可以是显示屏上覆盖的触摸层,也可以是终端外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。In one embodiment, a terminal is provided, which can be a wearable device, and its internal structure diagram can be any of the structures shown in Figure 2-Figure 5, or can be as shown in Figure 6-Figure 7 any of the structures shown. The terminal includes a first processor, used to run the first system; a second processor, used to run the second system; and a power detection circuit according to the first aspect or the second aspect; wherein, the operating function of the first processor Consumption is greater than the operating power consumption of the second processor; for example, the first processor can be a powerful processor running on the Android system; the second processor can be a low-power processor running on systems such as FreeRTOS and MCU. The memory of the terminal includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The communication interface of the terminal is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, an operator network, NFC (Near Field Communication) or other technologies. The display screen of the terminal may be a liquid crystal display screen or an electronic ink display screen, and the input device of the terminal may be a touch layer covered on the display screen, or a button, a trackball or a touch pad provided on the terminal shell, or It is an external keyboard, touchpad or mouse, etc.

另外,在一个实施例中,如图8所示,提供了一种电量确定方法,应用于终端,终端包括:第一处理器和第二处理器,第一处理器用于运行第一系统,第二处理器用于运行第二系统,第一处理器的运行功耗大于第二处理器的运行功耗,方法包括:In addition, in an embodiment, as shown in FIG. 8 , there is provided a power determination method, which is applied to a terminal. The terminal includes: a first processor and a second processor, the first processor is used to run the first system, and the second processor is used to run the first system. The two processors are used to run the second system, and the operating power consumption of the first processor is greater than the operating power consumption of the second processor. The method includes:

S801,第一系统在第二系统处于休眠状态时,通过第一电量计确定终端的第一电池电量;S801. When the second system is in a dormant state, the first system determines the first battery power of the terminal through the first fuel gauge;

S802,第二系统在第一系统处于休眠状态时,通过第二电量计确定终端的第二电池电量。S802. When the first system is in a dormant state, the second system determines the second battery power of the terminal by using the second power gauge.

可以理解的是,以上过程通过计算机程序指令实现,这些计算机程序指令提供到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器中,使得通过该计算机或其他可编程数据处理设备的处理器执行的指令可实现本实施例实现在终端的大核系统进入休眠状态时,小核系统准确地显示终端电量。当然,这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品。或者,这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行该计算机程序指令实现上述功能。It can be understood that the above process is realized by computer program instructions, and these computer program instructions are provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing devices, so that through this computer or other programmable data The instructions executed by the processor of the processing device can implement this embodiment to realize that when the large-core system of the terminal enters a dormant state, the small-core system can accurately display the power of the terminal. Of course, these computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means. Alternatively, these computer program instructions can also be loaded on a computer or other programmable data processing device, so that a series of operation steps are performed on the computer or other programmable device to produce a computer-implemented process, so that on the computer or other programmable device Executing the computer program instructions realizes the above functions.

可选的,在一个实施例中,上述方法还包括:第二系统在检测到切换指令时,唤醒第一系统,并将第二电量计确定的第二电池电量发送至第一系统;第一系统将第二电池电量发送至第一电量计,以使第一电量计基于第二电池电量,根据终端的电池输出电流和终端的第一电池温度确定终端的第一电池电量。Optionally, in an embodiment, the above method further includes: when the second system detects the switching instruction, waking up the first system, and sending the second battery level determined by the second fuel gauge to the first system; The system sends the second battery level to the first fuel gauge, so that the first fuel gauge determines the terminal's first battery level based on the second battery level, according to the terminal's battery output current and the terminal's first battery temperature.

可以理解的是,以上过程通过计算机程序指令实现,这些计算机程序指令提供到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器中,使得通过该计算机或其他可编程数据处理设备的处理器执行的指令可实现本实施例实现在终端的大核系统进入休眠状态时,小核系统准确地显示终端电量。当然,这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品。或者,这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行该计算机程序指令实现上述功能。It can be understood that the above process is realized by computer program instructions, and these computer program instructions are provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing devices, so that through this computer or other programmable data The instructions executed by the processor of the processing device can implement this embodiment to realize that when the large-core system of the terminal enters a dormant state, the small-core system can accurately display the power of the terminal. Of course, these computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means. Alternatively, these computer program instructions can also be loaded on a computer or other programmable data processing device, so that a series of operation steps are performed on the computer or other programmable device to produce a computer-implemented process, so that on the computer or other programmable device Executing the computer program instructions realizes the above functions.

另外,在一个实施例中,如图9所示,提供了一种电量确定方法,应用于终端,终端包括:第一处理器和第二处理器,第一处理器用于运行第一系统,第二处理器用于运行第二系统,第一处理器的运行功耗大于第二处理器的运行功耗,方法包括:In addition, in an embodiment, as shown in FIG. 9 , there is provided a method for determining power, which is applied to a terminal. The terminal includes: a first processor and a second processor, the first processor is used to run the first system, and the second processor is used to run the first system. The two processors are used to run the second system, and the operating power consumption of the first processor is greater than the operating power consumption of the second processor. The method includes:

S901,第一系统在第二系统处于休眠状态时,导通电量计与第一处理器之间的通路,并通过电量计确定终端的第一电池电量;S901. When the second system is in a dormant state, the first system turns on the path between the fuel gauge and the first processor, and determines the first battery power of the terminal through the fuel gauge;

S902,第二系统在第一系统处于休眠状态时,导通电量计与第二处理器之间的通路,并通过电量计确定终端的第二电池电量。S902. When the first system is in a dormant state, the second system turns on the path between the fuel gauge and the second processor, and determines the second battery power of the terminal through the fuel gauge.

可以理解的是,以上过程通过计算机程序指令实现,这些计算机程序指令提供到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器中,使得通过该计算机或其他可编程数据处理设备的处理器执行的指令可实现本实施例实现在终端的大核系统进入休眠状态时,小核系统准确地显示终端电量。当然,这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品。或者,这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行该计算机程序指令实现上述功能。It can be understood that the above process is realized by computer program instructions, and these computer program instructions are provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing devices, so that through this computer or other programmable data The instructions executed by the processor of the processing device can implement this embodiment to realize that when the large-core system of the terminal enters a dormant state, the small-core system can accurately display the power of the terminal. Of course, these computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means. Alternatively, these computer program instructions can also be loaded on a computer or other programmable data processing device, so that a series of operation steps are performed on the computer or other programmable device to produce a computer-implemented process, so that on the computer or other programmable device Executing the computer program instructions realizes the above functions.

本申请实施例还提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述实施例提供的任一种电量确定方法步骤。The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, any method steps for determining the electric quantity provided in the foregoing embodiments are implemented.

本申请所使用的对存储器、存储、数据库或其它介质的任何引用可包括非易失性和/或易失性存储器。非易失性存储器可包括ROM(Read-Only Memory,只读存储器)、PROM(Programmable Read-only Memory,可编程只读存储器)、EPROM(Erasable ProgrammableRead-Only Memory,可擦除可编程只读存储器)、EEPROM(Electrically ErasableProgrammable Read-only Memory,电可擦除可编程只读存储器)或闪存。易失性存储器可包括RAM(Random Access Memory,随机存取存储器),它用作外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如SRAM(Static Random Access Memory,静态随机存取存储器)、DRAM(Dynamic Random Access Memory,动态随机存取存储器)、SDRAM(Synchronous Dynamic Random Access Memory,同步动态随机存取存储器)、双数据率DDRSDRAM(Double Data Rate Synchronous Dynamic Random Access memory,双数据率同步动态随机存取存储器)、ESDRAM(Enhanced Synchronous Dynamic Random Access memory,增强型同步动态随机存取存储器)、SLDRAM(Sync Link Dynamic Random Access Memory,同步链路动态随机存取存储器)、RDRAM(Rambus Dynamic Random Access Memory,总线式动态随机存储器)、DRDRAM(Direct Rambus Dynamic Random Access Memory,接口动态随机存储器)。Any reference to memory, storage, database, or other medium as used herein may include non-volatile and/or volatile memory. Non-volatile memory can include ROM (Read-Only Memory, read-only memory), PROM (Programmable Read-only Memory, programmable read-only memory), EPROM (Erasable Programmable Read-Only Memory, erasable programmable read-only memory ), EEPROM (Electrically Erasable Programmable Read-only Memory, Electrically Erasable Programmable Read-Only Memory) or flash memory. The volatile memory may include RAM (Random Access Memory), which is used as an external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as SRAM (Static Random Access Memory, Static Random Access Memory), DRAM (Dynamic Random Access Memory, Dynamic Random Access Memory), SDRAM (Synchronous Dynamic Random Access Memory , synchronous dynamic random access memory), double data rate DDRSDRAM (Double Data Rate Synchronous Dynamic Random Access memory, double data rate synchronous dynamic random access memory), ESDRAM (Enhanced Synchronous Dynamic Random Access memory, enhanced synchronous dynamic random access memory), SLDRAM (Sync Link Dynamic Random Access Memory, synchronous link dynamic random access memory), RDRAM (Rambus Dynamic Random Access Memory, bus dynamic random access memory), DRDRAM (Direct Rambus Dynamic Random Access Memory, interface dynamic random access memory ).

以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation modes of the present application, and the description thereof is relatively specific and detailed, but should not be construed as limiting the patent scope of the present application. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the scope of protection of the patent application should be based on the appended claims.

Claims (22)

1.一种电量检测电路,其特征在于,所述电量检测电路应用于终端,所述终端包括第一处理器和第二处理器,所述第一处理器用于运行第一系统,所述第二处理器用于运行第二系统,所述第一处理器的运行功耗大于所述第二处理器的运行功耗;所述电量检测电路包括:1. A power detection circuit, characterized in that the power detection circuit is applied to a terminal, and the terminal includes a first processor and a second processor, the first processor is used to run the first system, and the second Two processors are used to run the second system, and the operating power consumption of the first processor is greater than the operating power consumption of the second processor; the power detection circuit includes: 第一电量计,用于在所述第二系统处于休眠状态时,根据所述终端的电池输出电流和所述终端的第一电池温度确定所述终端的第一电池电量;a first fuel gauge, configured to 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 when the second system is in a dormant state; 第二电量计,用于在所述第一系统处于休眠状态时,根据所述终端的电池输出电流和所述终端的第二电池温度确定所述终端的第二电池电量。The second fuel gauge is configured to 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 when the first system is in a dormant state. 2.根据权利要求1所述的电量检测电路,其特征在于,所述第一电量计分别与所述第一处理器和所述终端的电池连接,所述第二电量计分别与所述第二处理器和所述电池连接。2. The electricity detection circuit according to claim 1, wherein the first electricity meter is connected to the first processor and the battery of the terminal respectively, and the second electricity meter is connected to the second electricity meter respectively. The second processor is connected to the battery. 3.根据权利要求2所述的电量检测电路,其特征在于,所述第二电量计,还用于在所述第二系统处于休眠状态时,根据所述终端的电池输出电流和所述终端的第一电池温度确定第三电池电量;所述第三电池电量用于校准所述第一电池电量。3. The power detection circuit according to claim 2, wherein the second power gauge is also used to, when the second system is in a dormant state, according to the battery output current of the terminal and the terminal The first battery temperature determines a third battery charge; the third battery charge is used to calibrate the first battery charge. 4.根据权利要求3所述的电量检测电路,其特征在于,所述第二电量计与所述第一电量计连接,所述第二电量计还用于将所述第三电池电量传输至所述第一电量计;4. The power detection circuit according to claim 3, wherein the second fuel gauge is connected to the first fuel gauge, and the second fuel gauge is also used to transmit the third battery power to the the first fuel gauge; 所述第一电量计,还用于根据所述第三电池电量对所述第一电池电量进行校准。The first fuel gauge is also used to calibrate the first battery power according to the third battery power. 5.根据权利要求3所述的电量检测电路,其特征在于,所述终端还包括电池管理芯片;所述电池管理芯片分别与所述第一电量计、所述第二电量计、所述第一处理器连接;5. The power detection circuit according to claim 3, wherein the terminal further comprises a battery management chip; the battery management chip is connected to the first fuel gauge, the second fuel gauge, and the second fuel gauge respectively. a processor connection; 所述电池管理芯片用于根据所述第三电池电量对所述第一电池电量进行校准。The battery management chip is used for calibrating the first battery level according to the third battery level. 6.根据权利要求5所述的电量检测电路,其特征在于,所述第一电量计集成于所述电池管理芯片中。6. The power detection circuit according to claim 5, wherein the first fuel gauge is integrated in the battery management chip. 7.根据权利要求1-6任一项所述的电量检测电路,其特征在于,所述第一电量计在所述第一系统处于休眠状态时关机。7. The power detection circuit according to any one of claims 1-6, wherein the first power gauge is turned off when the first system is in a dormant state. 8.根据权利要求1-6任一项所述的电量检测电路,其特征在于,所述第一电量计,还用于在所述第二系统处于休眠状态时,获取所述终端的电池中的第一热敏电阻上的所述第一电池温度。8. The power detection circuit according to any one of claims 1-6, wherein the first fuel gauge is also used to obtain the battery status of the terminal when the second system is in a dormant state. the first battery temperature on the first thermistor. 9.根据权利要求8所述的电量检测电路,其特征在于,所述第一电量计,用于在所述第二系统处于休眠状态时,通过所述终端的电池的NTC引脚或ID引脚获取所述第一热敏电阻上的所述第一电池温度。9. The power detection circuit according to claim 8, wherein the first fuel gauge is used to, when the second system is in a dormant state, use the NTC pin or the ID pin of the battery of the terminal to pin to obtain the first battery temperature on the first thermistor. 10.根据权利要求1-6任一项所述的电量检测电路,其特征在于,所述电量检测电路还包括:第二热敏电阻,所述第二热敏电阻设置于所述终端的主板上,所述第二热敏电阻与所述第二电量计连接;10. The power detection circuit according to any one of claims 1-6, wherein the power detection circuit further comprises: a second thermistor, the second thermistor is arranged on the main board of the terminal above, the second thermistor is connected to the second fuel gauge; 所述第二电量计,用于在所述第一系统处于休眠状态时,采集所述第二热敏电阻上的所述第二电池温度。The second fuel gauge is configured to collect the second battery temperature on the second thermistor when the first system is in a dormant state. 11.根据权利要求1-6任一项所述的电量检测电路,其特征在于,所述电量检测电路还包括:检测电阻;所述检测电阻分别与所述第一电量计、所述第二电量计、所述终端的电池连接;11. The electricity detection circuit according to any one of claims 1-6, characterized in that, the electricity detection circuit further comprises: a detection resistor; the detection resistor is respectively connected to the first electricity meter, the second Fuel gauge, battery connection to said terminal; 所述第一电量计和所述第二电量计均通过所述检测电阻采集所述电池输出电流。Both the first fuel gauge and the second fuel gauge collect the battery output current through the detection resistor. 12.根据权利要求1-6任一项所述的电量检测电路,其特征在于,所述第二处理器,用于在接收到切换指令时,将所述第二电量计检测的所述第二电池电量发送至所述第一处理器;12. The power detection circuit according to any one of claims 1-6, wherein the second processor is configured to, when receiving a switching instruction, switch the second power detected by the second power gauge to Second, battery power is sent to the first processor; 所述第一处理器,用于将所述第二电池电量发送至所述第一电量计;the first processor configured to send the second battery level to the first fuel gauge; 所述第一电量计,还用于在所述第二系统处于休眠状态时,基于所述第二电池电量,根据所述终端的电池输出电流和所述终端的第一电池温度确定所述终端的第一电池电量。The first fuel gauge is further configured to determine 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 a dormant state. of the first battery level. 13.一种电量检测电路,其特征在于,所述电量检测电路应用于终端,所述终端包括第一处理器和第二处理器,所述第一处理器用于运行第一系统,所述第二处理器用于运行第二系统,所述第一处理器的运行功耗大于所述第二处理器的运行功耗;所述电量检测电路包括:控制开关和电量计;13. A power detection circuit, characterized in that the power detection circuit is applied to a terminal, and the terminal includes a first processor and a second processor, the first processor is used to run the first system, and the second Two processors are used to run the second system, and the operating power consumption of the first processor is greater than the operating power consumption of the second processor; the power detection circuit includes: a control switch and a power gauge; 所述控制开关,用于在所述第二系统处于休眠状态时,导通所述电量计与所述第一处理器之间的通路,使得所述电量计根据所述终端的电池输出电流和所述终端的第一电池温度确定所述终端的第一电池电量;The control switch is configured to turn on the path between the fuel gauge and the first processor when the second system is in a dormant state, so that the fuel gauge outputs the current according to the battery output current of the terminal and a first battery temperature of the terminal determines a first battery level of the terminal; 所述控制开关,还用于在所述第一系统处于休眠状态时,导通所述电量计与所述第二处理器之间的通路,使得所述电量计根据所述终端的电池输出电流和所述终端的第二电池温度确定所述终端的第二电池电量。The control switch is further configured to turn on the path between the fuel gauge and the second processor when the first system is in a dormant state, so that the fuel gauge outputs current according to the battery of the terminal and the second battery temperature of the terminal to determine the second battery level of the terminal. 14.根据权利要求13所述的电量检测电路,其特征在于,所述电量计通过所述控制开关分别与所述第一处理器和所述第二处理器连接;所述电量计还与所述终端的电池连接。14. The electricity detection circuit according to claim 13, wherein the electricity meter is connected to the first processor and the second processor respectively through the control switch; the electricity meter is also connected to the battery connection to the terminal described above. 15.根据权利要求14所述的电量检测电路,其特征在于,所述电量计,用于在所述第二系统处于休眠状态时,获取所述终端的电池中的热敏电阻上的所述第一电池温度。15. The power detection circuit according to claim 14, wherein the fuel gauge is used to acquire the temperature of the thermistor in the battery of the terminal when the second system is in a dormant state. first battery temperature. 16.根据权利要求15所述的电量检测电路,其特征在于,所述电量计,用于在所述第二系统处于休眠状态时,通过所述终端的电池的NTC引脚或ID引脚获取所述热敏电阻上的所述第一电池温度。16. The power detection circuit according to claim 15, wherein the power gauge is used to obtain the power through the NTC pin or ID pin of the battery of the terminal when the second system is in a dormant state. The first battery temperature on the thermistor. 17.根据权利要求16所述的电量检测电路,其特征在于,所述电量检测电路还包括:检测电阻;所述检测电阻分别与所述电量计和所述终端的电池连接;17. The electricity detection circuit according to claim 16, characterized in that, the electricity detection circuit further comprises: a detection resistor; the detection resistor is respectively connected to the fuel gauge and the battery of the terminal; 所述电量计通过所述检测电阻采集所述电池输出电流。The fuel gauge collects the battery output current through the detection resistor. 18.一种终端,其特征在于,所述终端包括:18. A terminal, characterized in that the terminal comprises: 第一处理器,用于运行第一系统;a first processor, configured to run a first system; 第二处理器,用于运行第二系统;所述第一处理器的运行功耗大于所述第二处理器的运行功耗;以及A second processor configured to run a second system; the operating power consumption of the first processor is greater than the operating power consumption of the second processor; and 如权利要求1-17任一项所述的电量检测电路。The power detection circuit according to any one of claims 1-17. 19.一种电量确定方法,应用于终端,其特征在于,所述终端包括:第一处理器和第二处理器,所述第一处理器用于运行第一系统,所述第二处理器用于运行第二系统,所述第一处理器的运行功耗大于所述第二处理器的运行功耗,所述方法包括:19. A method for determining power, which is applied to a terminal, wherein the terminal comprises: a first processor and a second processor, the first processor is used to run the first system, and the second processor is used to Running the second system, the operating power consumption of the first processor is 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 determines the first battery power of the terminal through a first fuel gauge; 所述第二系统在所述第一系统处于休眠状态时,通过第二电量计确定所述终端的第二电池电量。The second system determines the second battery power of the terminal through a second power gauge when the first system is in a dormant state. 20.根据权利要求19所述的电量确定方法,其特征在于,所述方法还包括:20. The method for determining electric quantity according to claim 19, characterized in that the method further comprises: 所述第二系统在检测到切换指令时,唤醒所述第一系统,并将所述第二电量计确定的所述第二电池电量发送至所述第一系统;The second system wakes up the first system when detecting a switching instruction, and sends the second battery level determined by the second fuel gauge to the first system; 所述第一系统将所述第二电池电量发送至所述第一电量计,以使所述第一电量计基于所述第二电池电量,根据所述终端的电池输出电流和所述终端的第一电池温度确定所述终端的第一电池电量。The first system sends the second battery level to the first fuel gauge, so that the first fuel gauge is based on the second battery level, according to the terminal's battery output current and the terminal's The first battery temperature determines a first battery capacity of the terminal. 21.一种电量确定方法,应用于终端,其特征在于,所述终端包括:第一处理器和第二处理器,所述第一处理器用于运行第一系统,所述第二处理器用于运行第二系统,所述第一处理器的运行功耗大于所述第二处理器的运行功耗,所述方法包括:21. A method for determining power, which is applied to a terminal, wherein the terminal comprises: a first processor and a second processor, the first processor is used to run the first system, and the second processor is used to Running the second system, the operating power consumption of the first processor is greater than the operating power consumption of the second processor, the method comprising: 所述第一系统在所述第二系统处于休眠状态时,导通电量计与所述第一处理器之间的通路,并通过所述电量计确定所述终端的第一电池电量;The first system turns on the path between the fuel gauge and the first processor when the second system is in the dormant state, and determines the first battery power of the terminal through the fuel gauge; 所述第二系统在所述第一系统处于休眠状态时,导通所述电量计与所述第二处理器之间的通路,并通过所述电量计确定所述终端的第二电池电量。When the first system is in a dormant state, the second system turns on the path between the fuel gauge and the second processor, and determines the second battery power of the terminal through the fuel gauge. 22.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求19至21中任一项所述的方法的步骤。22. A computer-readable storage medium, on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the method according to any one of claims 19 to 21 are implemented.
CN202111137375.9A 2021-09-27 2021-09-27 Power detection circuit, terminal, power 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 Power detection circuit, terminal, power 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 Power detection circuit, terminal, power 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 Power detection circuit, terminal, power determination method and readable storage medium

Country Status (2)

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

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
WO2024212902A1 (en) * 2023-04-12 2024-10-17 Oppo广东移动通信有限公司 Power level display method and apparatus, electronic device, storage medium, and product

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
MX2010006390A (en) * 2007-12-10 2010-06-25 Bayer Healthcare Llc 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 startup method, device, storage medium and electronic device
CN112996089B (en) * 2019-12-17 2022-10-21 Oppo广东移动通信有限公司 Data transmission method, device, storage medium and electronic device
CN112731188A (en) * 2020-12-25 2021-04-30 西安中星测控有限公司 Battery electric quantity statistical method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024212902A1 (en) * 2023-04-12 2024-10-17 Oppo广东移动通信有限公司 Power level display method and apparatus, electronic device, storage medium, and product
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
CN102246117B (en) Self-adaptive thread scheduling Apparatus and method on asymmetric multiprocessor system
WO2023045809A1 (en) Electric quantity detection circuit, terminal, electric quantity determination method, and readable storage medium
US20070188146A1 (en) Circuit for detecting remaining battery capacity
TWI481889B (en) Rechargeable battery temperature detection method, power management device and electronic system
Visconti et al. Solar powered wireless monitoring system of environmental conditions for early flood prediction or optimized irrigation in agriculture
CN105103401B (en) Sensor device and monitoring system
CN112448448A (en) Charging control method and device, earphone, electronic equipment and readable storage medium
US9026387B2 (en) Battery voltage measurement
US20240133956A1 (en) Battery current monitoring method, controller and circuit
TWI622780B (en) Asymmetric battery detection device
CN105700666A (en) Terminal equipment and its power saving method and device
CN111366850A (en) Precise battery energy measurement system
JP6261901B2 (en) Battery management circuit, power management system using the same, electronic equipment
CN115714437A (en) Method and device for displaying charging capacity of battery, electric terminal and storage medium
CN113169385A (en) Battery pack, circuitry to measure battery current, and device to measure battery current
CN107851858A (en) The discharge control method of battery pack and secondary cell
CN116885824A (en) Charging methods, devices, equipment, storage media and program products
US20150268305A1 (en) Electronic device and method for monitoring battery module of the same
CN105380615A (en) Electronic thermometer used in connection to smart phone
US11114705B2 (en) Current measurement and voltage control approach
CN113295291A (en) Temperature detection method and device, electronic equipment and computer readable storage medium
CN207662418U (en) A kind of high-accuracy stable measures the device of vibrating wire sensor
CN207319179U (en) A kind of electronic equipment and laptop
CN217466017U (en) Temperature measuring circuit and temperature measuring device
CN215419622U (en) Bluetooth intelligent battery control circuit

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