[go: up one dir, main page]

CN116774092B - Battery detection method, circuit, device, chip and readable storage medium - Google Patents

Battery detection method, circuit, device, chip and readable storage medium Download PDF

Info

Publication number
CN116774092B
CN116774092B CN202311044199.3A CN202311044199A CN116774092B CN 116774092 B CN116774092 B CN 116774092B CN 202311044199 A CN202311044199 A CN 202311044199A CN 116774092 B CN116774092 B CN 116774092B
Authority
CN
China
Prior art keywords
battery
current
batteries
electronic device
resistor
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.)
Active
Application number
CN202311044199.3A
Other languages
Chinese (zh)
Other versions
CN116774092A (en
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.)
Honor Device Co Ltd
Original Assignee
Honor Device Co 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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202311044199.3A priority Critical patent/CN116774092B/en
Publication of CN116774092A publication Critical patent/CN116774092A/en
Application granted granted Critical
Publication of CN116774092B publication Critical patent/CN116774092B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/396Acquisition or processing of data for testing or for monitoring individual cells or groups of cells within a battery
    • 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/385Arrangements for measuring battery or accumulator variables

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Secondary Cells (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The application relates to the technical field of battery detection and discloses a battery detection method, a circuit, equipment, a chip and a readable storage medium. The method is applied to an electronic device, the electronic device comprising a plurality of batteries, the method comprising: the electronic equipment detects a plurality of currents corresponding to the batteries respectively, if the currents are larger than a current threshold value, the batteries are determined to be in charge and discharge circuits of the batteries, namely the batteries can be charged and discharged normally, and the electronic equipment can be started. If the current of any one of the batteries is smaller than the current threshold, the battery is not in the charge-discharge circuit of the battery, and cannot be charged and discharged normally, and the battery is dead, so that the electronic equipment cannot be started. The method can improve the accuracy of the detection result of the battery, avoid the phenomena of blocking, screen display and the like of the electronic equipment caused by starting the electronic equipment under the condition that the electronic equipment contains dead batteries, and improve the use experience of users.

Description

电池检测方法、电路、设备、芯片及可读存储介质Battery detection method, circuit, device, chip and readable storage medium

技术领域Technical Field

本申请涉及电池检测技术领域,特别涉及一种电池检测方法、电路、设备、芯片及可读存储介质。The present application relates to the technical field of battery detection, and in particular to a battery detection method, circuit, device, chip and readable storage medium.

背景技术Background technique

目前,随着手机等电子设备的不断发展,电子设备内部可以包含多个电池,由多个电池并联为电子设备供电,可以提高电子设备的总容量,提升电子设备的使用性能。At present, with the continuous development of electronic devices such as mobile phones, multiple batteries can be contained inside the electronic devices. Multiple batteries are connected in parallel to power the electronic devices, which can increase the total capacity of the electronic devices and improve the performance of the electronic devices.

以电子设备包含两个并联设置的电池为例,在电子设备开机之前,电子设备通常会检测内部的两个电池的电压。若一个电池成为死电池,即无法进行充放电,正常情况下,无法在该死电池两端检测到电压。但是,并联的两个电池之间通常存在均衡电路,该均衡电路可以使得另外一个正常电池的电压通过均衡电路漏到死电池两端,电子设备便可以在死电池两端检测到电压,根据电压将死电池误判断为正常电池,然后开机启动。For example, an electronic device contains two batteries connected in parallel. Before the electronic device is turned on, it usually detects the voltage of the two batteries inside. If one battery becomes a dead battery, that is, it cannot be charged or discharged, under normal circumstances, the voltage cannot be detected at both ends of the dead battery. However, there is usually a balancing circuit between the two parallel batteries. The balancing circuit can allow the voltage of another normal battery to leak to both ends of the dead battery through the balancing circuit. The electronic device can then detect the voltage at both ends of the dead battery, and mistakenly judge the dead battery as a normal battery based on the voltage, and then turn on the device.

电子设备开机启动后,只有正常电池可以放电,单个电池的放电电流较小,导致无法支撑电子设备的能耗需求,便会使得电子设备产生卡顿、花屏等异常现象。After an electronic device is turned on, only normal batteries can discharge. The discharge current of a single battery is small, which makes it unable to support the energy consumption requirements of the electronic device, causing abnormal phenomena such as freezing and screen noise in the electronic device.

发明内容Summary of the invention

为解决上述问题,本申请实施例提供了一种电池检测方法、电路、设备、芯片及可读存储介质。该方法在电子设备包括的多个电池分别对应的多个电流均大于电流阈值的情况下,确定多个电池均可以正常充放电,并对电子设备执行开机启动操作,可以避免因在电子设备包含死电池的情况下,对电子设备开机而导致的电子设备的卡顿、花屏等现象,提升了用户的使用体验。To solve the above problems, the embodiments of the present application provide a battery detection method, circuit, device, chip and readable storage medium. The method determines that multiple batteries can be charged and discharged normally when multiple currents corresponding to multiple batteries included in the electronic device are greater than the current threshold, and performs a power-on startup operation on the electronic device, which can avoid the phenomenon of electronic device freezing and screen distortion caused by starting the electronic device when the electronic device contains a dead battery, thereby improving the user experience.

第一方面,本申请提供了一种电池检测方法,该方法应用于电子设备,且该电子设备包括多个电池,该方法包括:检测到电子设备处于触发启动状态;获取电子设备包括的多个电池分别对应的多个第一电流;对应于多个第一电流均大于电流阈值,确定多个电池均处于各个电池的充放电电路中,并对电子设备执行开机操作。In a first aspect, the present application provides a battery detection method, which is applied to an electronic device, and the electronic device includes multiple batteries. The method includes: detecting that the electronic device is in a triggered start-up state; obtaining multiple first currents corresponding to the multiple batteries included in the electronic device; corresponding to the multiple first currents being greater than a current threshold, determining that the multiple batteries are in the charging and discharging circuits of the respective batteries, and performing a power-on operation on the electronic device.

在本申请中,电子设备处于触发启动状态的条件可以为电子设备的电源键处于开启或按压状态,例如,若电子设备检测到电子设备的电源键处于按压状态,且该操作持续一定时长之后,则可以确定电子设备处于触发启动状态。然后,电子设备获取多个电池分别对应的多个第一电流。其中,电子设备获取多个第一电流的方式可以为,电子设备基于电量计获得多个第一电流。In the present application, the condition that the electronic device is in a triggered start state may be that the power button of the electronic device is in an on or pressed state. For example, if the electronic device detects that the power button of the electronic device is in a pressed state, and the operation continues for a certain period of time, it can be determined that the electronic device is in a triggered start state. Then, the electronic device obtains multiple first currents corresponding to the multiple batteries respectively. The electronic device may obtain the multiple first currents based on a power meter.

若多个第一电流均大于电流阈值,则可以确定多个电池均处于各个电池的充放电电路中,也即多个电池均可以正常充放电,此时电子设备可以正常开机启动。If the multiple first currents are all greater than the current threshold, it can be determined that the multiple batteries are in the charging and discharging circuits of the respective batteries, that is, the multiple batteries can be charged and discharged normally, and the electronic device can be started normally.

该方法通过检测电子设备包含的多个电池的电流确定多个电池是否为可以正常充放电的电池,若是,电子设备才进行开机操作,可以保证电子设备的使用流畅度,避免了因在电子设备包含无法正常充放电的电池(死电池)的情况下,对电子设备开机而导致的电子设备的卡顿、花屏等现象,提升了用户的使用体验。The method determines whether the multiple batteries included in the electronic device are batteries that can be charged and discharged normally by detecting the current of the multiple batteries included in the electronic device. If so, the electronic device is turned on, which can ensure the smoothness of use of the electronic device and avoid the phenomenon of the electronic device being stuck or having a distorted screen caused by turning on the electronic device when the electronic device contains batteries that cannot be charged and discharged normally (dead batteries), thereby improving the user experience.

在上述第一方面的一种可能的实现中,电流阈值基于零电流的偏差值确定,其中,零电流的偏差值根据对零电流进行多次采样得到。In a possible implementation of the first aspect above, the current threshold is determined based on a deviation value of the zero current, wherein the deviation value of the zero current is obtained by sampling the zero current multiple times.

其中,偏差值也可以理解为误差值,且电流阈值可以与零电流的偏差值相同,也可以稍大于零电流的偏差值。例如,若经过电流的多次采样之后得到电流的偏差值为10mA,那么,电流阈值可以为10mA,也可以稍大于10mA,例如为15mA等。The deviation value can also be understood as an error value, and the current threshold value can be the same as the deviation value of zero current, or slightly larger than the deviation value of zero current. For example, if the deviation value of the current is 10mA after multiple current sampling, then the current threshold value can be 10mA, or slightly larger than 10mA, such as 15mA.

在上述第一方面的一种可能的实现中,确定多个电池中任一电池对应的第一电流的方式,包括但不限于如下三种:In a possible implementation of the first aspect, the manner of determining the first current corresponding to any battery among the multiple batteries includes but is not limited to the following three:

方式一:按照固定时间间隔对多个电池中的任一电池对应的电流进行多次采样,得到多个第二电流;将多个第二电流的平均值作为任一电池对应的第一电流。Method 1: sampling the current corresponding to any battery among the multiple batteries for multiple times at fixed time intervals to obtain multiple second currents; and taking the average value of the multiple second currents as the first current corresponding to any battery.

方式二:按照固定时间间隔对多个电池中的任一电池对应的电流进行多次采样,得到多个第二电流;将多个第二电流作为任一电池对应的第一电流。Method 2: sampling the current corresponding to any battery among the multiple batteries for multiple times at fixed time intervals to obtain multiple second currents; and using the multiple second currents as the first current corresponding to any battery.

方式三:按照固定时间间隔对多个电池中的任一电池对应的电流进行多次采样,得到多个第二电流;将多个第二电流中除去最大值和最小值的电流的平均值作为任一电池对应的第一电流。Method three: sampling the current corresponding to any battery among the multiple batteries for multiple times at fixed time intervals to obtain multiple second currents; and taking the average value of the multiple second currents excluding the maximum and minimum currents as the first current corresponding to any battery.

其中,对任一电池对应的电流进行采样的方式可以为,电量计获取与任一电池串联连接的电阻的电压,然后基于电压和电阻的阻值确定电阻的电流以及任一电池的电流。The current corresponding to any battery may be sampled by the fuel gauge obtaining the voltage of a resistor connected in series with any battery, and then determining the current of the resistor and the current of any battery based on the voltage and the resistance value of the resistor.

在上述第一方面的一种可能的实现中,获取电子设备包括的多个电池分别对应的多个第一电流,包括:对于多个电池中的任一电池,获取任一电池对应的电阻的第一电压,其中,任一电池对应的电阻和任一电池串联连接在任一电池的充放电电路中;基于第一电压和任一电池对应的电阻的阻值确定任一电池对应的电阻对应的第二电流;基于第二电流确定任一电池对应的第一电流。In a possible implementation of the first aspect above, obtaining multiple first currents respectively corresponding to multiple batteries included in the electronic device includes: for any battery among the multiple batteries, obtaining a first voltage of a resistor corresponding to any battery, wherein the resistor corresponding to any battery and any battery are connected in series in a charging and discharging circuit of any battery; determining a second current corresponding to the resistor corresponding to any battery based on the first voltage and the resistance value of the resistor corresponding to any battery; and determining the first current corresponding to any battery based on the second current.

可以理解,如后文图2A所示的电路,电子设备获取多个第一电流的方式可以为,基于与电池串联的检流电阻确定电池的电流。以图2A中的电池1和检流电阻1为例,电子设备可以获取检流电阻1的第一电压,然后基于第一电压和检流电阻1的阻值确定检流电阻1的第二电流,因为电池1和检流电阻1串联,电池1和检流电阻1的电流便相同,因此便可以确定电池1对应的第一电流的大小。It can be understood that, as shown in the circuit of FIG. 2A below, the electronic device can obtain multiple first currents by determining the current of the battery based on the current-sensing resistor connected in series with the battery. Taking the battery 1 and the current-sensing resistor 1 in FIG. 2A as an example, the electronic device can obtain the first voltage of the current-sensing resistor 1, and then determine the second current of the current-sensing resistor 1 based on the first voltage and the resistance value of the current-sensing resistor 1. Because the battery 1 and the current-sensing resistor 1 are connected in series, the currents of the battery 1 and the current-sensing resistor 1 are the same, so the magnitude of the first current corresponding to the battery 1 can be determined.

在上述第一方面的一种可能的实现中,方法还包括:对应于多个第一电流中的任一第一电流小于电流阈值,确定任一第一电流对应的电池不处于电池的充放电电路中,不对电子设备执行开机操作。In a possible implementation of the first aspect above, the method further includes: corresponding to any first current among the multiple first currents being less than a current threshold, determining that a battery corresponding to any first current is not in a battery charging and discharging circuit, and not performing a power-on operation on the electronic device.

若多个第一电流中的任一第一电流小于电流阈值,则说明该任一第一电流对应的电池不处于电池的充放电电路中,也即该电池无法进行正常的充放电操作,为死电池,此时电子设备便不能开机,以避免电子设备开机之后,其余可以正常充放电的电池不能够支持电子设备的电量消耗,造成电子设备的卡顿等现象。If any first current among multiple first currents is less than the current threshold, it means that the battery corresponding to any first current is not in the battery charging and discharging circuit, that is, the battery cannot perform normal charging and discharging operations and is a dead battery. At this time, the electronic device cannot be turned on to avoid the situation where the remaining batteries that can be charged and discharged normally cannot support the power consumption of the electronic device after the electronic device is turned on, causing the electronic device to freeze.

在上述第一方面的一种可能的实现中,电子设备包括均衡电路、检测模块、电池模块和电阻模块,检测模块包括第一电量计和第二电量计,电池模块包括第一电池和第二电池,电阻模块包括第一电阻和第二电阻;第一电池的输出端与均衡电路的一端连接,第二电池的输出端与均衡电路的另一端连接;第一电池的输入端连接第一电阻的一端,第一电阻的另一端接地;第二电池的输入端连接第二电阻的一端,第二电阻的另一端接地;第一电量计包括第一端、第二端、第三端和第四端,第一端连接第一电池的输出端,第二端连接第一电阻的一端,第三端和第四端均连接第一电阻的另一端;第二电量计包括第五端、第六端、第七端和第八端,第五端连接第二电池的输出端,第六端连接第二电阻的一端,第七端和第八端均连接第二电阻的另一端。In a possible implementation of the first aspect above, the electronic device includes a balancing circuit, a detection module, a battery module and a resistor module, the detection module includes a first fuel gauge and a second fuel gauge, the battery module includes a first battery and a second battery, and the resistor module includes a first resistor and a second resistor; the output end of the first battery is connected to one end of the balancing circuit, and the output end of the second battery is connected to the other end of the balancing circuit; the input end of the first battery is connected to one end of the first resistor, and the other end of the first resistor is grounded; the input end of the second battery is connected to one end of the second resistor, and the other end of the second resistor is grounded; the first fuel gauge includes a first end, a second end, a third end and a fourth end, the first end is connected to the output end of the first battery, the second end is connected to one end of the first resistor, and the third end and the fourth end are both connected to the other end of the first resistor; the second fuel gauge includes a fifth end, a sixth end, a seventh end and an eighth end, the fifth end is connected to the output end of the second battery, the sixth end is connected to one end of the second resistor, and the seventh end and the eighth end are both connected to the other end of the second resistor.

其中,此种电路结构的示意图可以参见后文提及的图2A。可以理解,第一电池即指代后文中的电池1,第二电池即指代后文中的电池2;第一电阻指代后文中的检流电阻1,第二电阻指代后文中的检流电阻2。The schematic diagram of this circuit structure can be found in FIG2A mentioned later. It can be understood that the first battery refers to battery 1 in the following text, the second battery refers to battery 2 in the following text, the first resistor refers to current-sensing resistor 1 in the following text, and the second resistor refers to current-sensing resistor 2 in the following text.

第二方面,本申请提供了一种电池检测电路,该电路包括检测模块、电池模块、电阻模块和控制模块,电池模块包括多个电池,电阻模块包括多个电阻,各电阻分别与对应的各电池连接;检测模块,用于在电子设备处于触发启动状态下,检测电阻模块中多个电阻分别对应的多个电压;控制模块,用于基于各电阻对应的电压和各电阻的阻值确定与各电阻串联连接的各电池的第一电流;对应于各电池的第一电流均大于电流阈值,确定各电池均处于各电池的充放电电路中,并对电子设备执行开机操作。In the second aspect, the present application provides a battery detection circuit, which includes a detection module, a battery module, a resistor module and a control module, wherein the battery module includes multiple batteries, the resistor module includes multiple resistors, and each resistor is respectively connected to a corresponding battery; the detection module is used to detect multiple voltages corresponding to multiple resistors in the resistor module when the electronic device is in a triggered start-up state; the control module is used to determine a first current of each battery connected in series with each resistor based on the voltage corresponding to each resistor and the resistance value of each resistor; when the first current corresponding to each battery is greater than a current threshold, it is determined that each battery is in a charging and discharging circuit of each battery, and the electronic device is powered on.

可以理解,检测模块可以包含上述第一方面提及的第一电量计和第二电量计,也即电子设备通过第一电量计和第二电量计获取电阻模块中多个电阻分别对应的多个电压。It can be understood that the detection module may include the first electricity meter and the second electricity meter mentioned in the first aspect above, that is, the electronic device obtains multiple voltages corresponding to multiple resistors in the resistance module through the first electricity meter and the second electricity meter.

在上述第二方面的一种可能的实现中,控制模块,还用于对应于各电池的第一电流中的任一电池的第一电流小于电流阈值,确定任一电池不处于任一电池的充放电电路中,不对电子设备执行开机操作。In a possible implementation of the second aspect above, the control module is further used to determine that any battery is not in a charging and discharging circuit of any battery, corresponding to the first current of any battery among the first currents of each battery being less than a current threshold, and not perform a power-on operation on the electronic device.

第三方面,本申请提供了一种电子设备,该电子设备包含上述提及的电池检测电路。In a third aspect, the present application provides an electronic device, which includes the battery detection circuit mentioned above.

第四方面,本申请提供了一种电子设备,该电子设备包括:一个或多个处理器;一个或多个存储器;一个或多个存储器存储有一个或多个程序,当一个或者多个程序被一个或多个处理器执行时,使得电子设备执行第一方面及第一方面任一种可能的电池检测方法。In a fourth aspect, the present application provides an electronic device, comprising: one or more processors; one or more memories; one or more memories storing one or more programs, and when the one or more programs are executed by one or more processors, the electronic device executes the first aspect and any possible battery detection method of the first aspect.

第五方面,本申请提供了一种芯片,该芯片用于执行第一方面及第一方面任一种可能的电池检测方法。In a fifth aspect, the present application provides a chip, which is used to execute the first aspect and any possible battery detection method of the first aspect.

第六方面,本申请还提供了一种计算机可读存储介质,该可读存储介质上存储有指令,指令在计算机上执行时使计算机执行第一方面及第一方面任一种可能的电池检测方法。In a sixth aspect, the present application further provides a computer-readable storage medium, on which instructions are stored, and when the instructions are executed on a computer, the computer executes the first aspect and any possible battery detection method of the first aspect.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1A根据本申请的一些实施例,示出了一种电池内部结构的示意图;FIG1A is a schematic diagram showing an internal structure of a battery according to some embodiments of the present application;

图1B根据本申请的一些实施例,示出了一种电子设备包含的两个电池之间的电路结构示意图;FIG1B shows a schematic diagram of a circuit structure between two batteries included in an electronic device according to some embodiments of the present application;

图2A根据本申请的一些实施例,示出了一种电池检测方法所对应的电路的结构示意图;FIG2A is a schematic diagram showing a circuit structure corresponding to a battery detection method according to some embodiments of the present application;

图2B根据本申请的一些实施例,示出了另一种电池检测方法所对应的电路的结构示意图;FIG2B is a schematic diagram showing a circuit structure corresponding to another battery detection method according to some embodiments of the present application;

图2C根据本申请的一些实施例,示出了一种表示电池1的开路状态的电路结构示意图;FIG2C shows a schematic diagram of a circuit structure showing an open circuit state of a battery 1 according to some embodiments of the present application;

图2D根据本申请的一些实施例,示出了一种检流电阻在电路中所处的不同位置的示意图;FIG2D is a schematic diagram showing different positions of a current sensing resistor in a circuit according to some embodiments of the present application;

图3根据本申请的一些实施例,示出了一种电池检测方法的流程示意图;FIG3 is a schematic diagram showing a flow chart of a battery detection method according to some embodiments of the present application;

图4根据本申请的一些实施例,示出了一种电池检测方法的判断流程图;FIG4 shows a determination flow chart of a battery detection method according to some embodiments of the present application;

图5根据本申请的一些实施例,示出了一种电子设备的结构示意图。FIG5 shows a schematic structural diagram of an electronic device according to some embodiments of the present application.

实施方式Implementation

本申请的说明性实施例包括但不限于电池检测方法、电路、设备、芯片及可读存储介质。Illustrative embodiments of the present application include, but are not limited to, battery detection methods, circuits, devices, chips, and readable storage media.

下面对本申请实施例涉及的专有名词进行解释说明。The following is an explanation of the terms used in the embodiments of the present application.

电池:通常由电池保护板和电芯构成,其中,电池保护板和电芯通过板对板连接器(Board-to-Board Connectors,BTB)连接。Battery: Usually consists of a battery protection board and battery cells, where the battery protection board and battery cells are connected through board-to-board connectors (BTB).

死电池:电量低于某一阈值时导致的无法继续充放电的电池。例如,电子设备中的电池的电量达到一定阈值,电子设备自动关机,若长时间不对电池进行充电,电池的电量继续降低,当降低到某一阈值时,电池中的电池保护板会断开电芯与充放电电路的连接,以免电池过度放电而导致的性能下降。此时,电池便成为死电池。Dead battery: A battery that cannot be charged or discharged when the battery power is below a certain threshold. For example, when the battery power in an electronic device reaches a certain threshold, the electronic device automatically shuts down. If the battery power is not charged for a long time, the battery power continues to decrease. When it decreases to a certain threshold, the battery protection board in the battery will disconnect the battery cell from the charging and discharging circuit to prevent the battery from over-discharging and causing performance degradation. At this point, the battery becomes a dead battery.

电量计:用于监测电池的电量的器件,可以通过测量电池的电压和电流等得到电池的电量。Fuel gauge: A device used to monitor the battery charge. It can obtain the battery charge by measuring the battery voltage and current.

金属氧化物半导体型场效应管(Metal Oxide Semiconductor Field EffectTransistor,MOS管):也可以称为绝缘栅场效应管,在一般电子电路中,MOS管通常被用于放大电路或开关电路。MOS管包括源极S、栅极G和漏极D,且分为两大类:P沟道增强型MOS管(PMOS管)和N沟道增强型MOS管(NMOS管)。在电池的电池保护板所包括的保护电路中,通常利用NMOS管实现对电池的充放电电路的断开操作,也即,通过断开NMOS管使电池变为死电池。Metal Oxide Semiconductor Field Effect Transistor (MOS): Also known as insulated gate field effect transistor, MOS is usually used in amplifier circuits or switch circuits in general electronic circuits. MOS includes source S, gate G and drain D, and is divided into two categories: P-channel enhancement MOS (PMOS) and N-channel enhancement MOS (NMOS). In the protection circuit included in the battery protection board of the battery, NMOS is usually used to disconnect the battery's charge and discharge circuit, that is, the battery is turned into a dead battery by disconnecting the NMOS.

下面对本申请实施例所提供的电池检测方法的背景进行介绍。The following is an introduction to the background of the battery detection method provided in the embodiment of the present application.

目前,电子设备内部可以设置多个电池,相比于单电池,多个电池可以储存的电量更多。在电子设备的使用过程中,多个电池同时放电,放电量比单电池的放电量更大,也可以支撑电子设备内的大功率应用的消耗,使得电子设备的显示和使用等更加流畅。At present, multiple batteries can be installed inside electronic devices. Compared with a single battery, multiple batteries can store more electricity. During the use of electronic devices, multiple batteries discharge at the same time, and the discharge amount is greater than that of a single battery. It can also support the consumption of high-power applications in electronic devices, making the display and use of electronic devices smoother.

以电池的放电过程为例,可以理解,电池在放电过程中,电量(例如,体现于电压)会逐渐降低。以电池的充电上限电压为V1、关机电压为V2为例,电池的电压在放电过程中将逐渐由V1降低至V2,然后电子设备自动关机,避免电池继续大量放电,造成过度放电现象。可以理解,对于包含多个电池的电子设备,只要任一电池的电压达到关机电压,电子设备便会自动关机。Taking the discharge process of a battery as an example, it is understandable that during the discharge process, the amount of electricity (for example, reflected in the voltage) of the battery will gradually decrease. Taking the battery's upper charging limit voltage as V1 and the shutdown voltage as V2 as an example, the battery's voltage will gradually decrease from V1 to V2 during the discharge process, and then the electronic device will automatically shut down to prevent the battery from continuing to discharge in large quantities and causing over-discharge. It is understandable that for electronic devices containing multiple batteries, as long as the voltage of any battery reaches the shutdown voltage, the electronic device will automatically shut down.

电子设备自动关机之后,电子设备还需要少量的电量来维持电子设备的闹钟、时间系统等,因此,关机之后,电子设备的电池的电量依旧会继续减少,也即电池的电压继续降低。当电池的电压降低到一定阈值时,为了避免电池继续放电,对电池的性能产生较大影响,电池便会从充放电电路中彻底断开,无法再进行充放电,此时,电池变为死电池,体现为,即便对电池执行充电操作,电池的电量也不会增加,且电池也无法对外部放电,供系统使用。After the electronic device automatically shuts down, it still needs a small amount of power to maintain the alarm clock, time system, etc. Therefore, after shutting down, the battery power of the electronic device will continue to decrease, that is, the battery voltage continues to decrease. When the battery voltage drops to a certain threshold, in order to prevent the battery from continuing to discharge and having a significant impact on the battery performance, the battery will be completely disconnected from the charge and discharge circuit and can no longer be charged and discharged. At this time, the battery becomes a dead battery, which means that even if the battery is charged, the battery power will not increase, and the battery cannot be discharged to the outside for use by the system.

其中,电池从充放电电路断开的操作由电池内部的电池保护板执行。如图1A所示,电池100通常包括电芯101和电池保护板102,且电池保护板102和电芯101通过板对板连接器(Board-to-Board Connectors,BTB)连接。电池保护板102中通常包括保护电路(Integrated Circuit,IC)、金属氧化物半导体型场效应管(Metal Oxide SemiconductorField Effect Transistor,MOS管)以及电阻等器件。Among them, the operation of disconnecting the battery from the charging and discharging circuit is performed by the battery protection board inside the battery. As shown in Figure 1A, the battery 100 generally includes a battery cell 101 and a battery protection board 102, and the battery protection board 102 and the battery cell 101 are connected through a board-to-board connector (BTB). The battery protection board 102 generally includes a protection circuit (Integrated Circuit, IC), a metal oxide semiconductor field effect transistor (Metal Oxide SemiconductorField Effect Transistor, MOS tube) and resistors and other devices.

电池保护板中的保护电路可以监测电池的充放电状态,例如,在电池放电时,保护电路可以在电芯的电压过低的情况下,断开电池的放电回路,以防止因过度放电而对电池造成损害。再例如,保护电路可以在电池充电时,检测电芯的电压,若电芯的电压达到电池的满电电压,则保护电路会断开电池的充电回路,防止因过度充电而对电池造成损害。The protection circuit in the battery protection board can monitor the charging and discharging status of the battery. For example, when the battery is discharging, the protection circuit can disconnect the battery's discharge circuit if the battery cell voltage is too low to prevent damage to the battery due to over-discharge. For another example, when the battery is charging, the protection circuit can detect the battery cell voltage. If the battery cell voltage reaches the full-charge voltage of the battery, the protection circuit will disconnect the battery's charging circuit to prevent damage to the battery due to over-charging.

在本申请实施例中,电子设备关机之后,若因电子设备长时间未充电,且电池内部的保护IC检测到电芯的电压减小至一定阈值时,保护IC便会将电芯的充放电电路断开,电池便无法继续充放电,变成了无法充放电的死电池。In an embodiment of the present application, after the electronic device is turned off, if the electronic device has not been charged for a long time and the protection IC inside the battery detects that the voltage of the battery cell has decreased to a certain threshold, the protection IC will disconnect the charging and discharging circuit of the battery cell, and the battery will no longer be able to charge and discharge, becoming a dead battery that cannot be charged or discharged.

以电子设备包括两个电池为例,图1B示出了一种电子设备包含的两个电池之间的电路结构示意图。图1B中的电路包含电芯1、保护电路(IC)、电阻R1、电阻R2、MOS1、MOS2和电池2。Taking an electronic device including two batteries as an example, Figure 1B shows a schematic diagram of a circuit structure between two batteries included in an electronic device. The circuit in Figure 1B includes a battery cell 1, a protection circuit (IC), a resistor R1, a resistor R2, a MOS1, a MOS2, and a battery 2.

其中,电芯1、保护IC、电阻R1、MOS1和MOS2共同构成了电池1,且电池2与电池1并联。可以理解,电池2中也包含相应的电芯、保护IC以及MOS管,且电池1和电池2并联放置于电子设备中,本申请仅以电池1为例描述保护电路的工作原理,故图1B中未示出电池2内部包含的器件和对应的电路结构。可以理解,电池2内部的保护电路的工作原理与电池1内部的保护电路的工作原理相似,此处不再赘述。Among them, the battery cell 1, the protection IC, the resistor R1, the MOS1 and the MOS2 together constitute the battery 1, and the battery 2 is connected in parallel with the battery 1. It can be understood that the battery 2 also contains the corresponding battery cell, the protection IC and the MOS tube, and the battery 1 and the battery 2 are placed in parallel in the electronic device. This application only takes the battery 1 as an example to describe the working principle of the protection circuit, so the devices contained in the battery 2 and the corresponding circuit structure are not shown in Figure 1B. It can be understood that the working principle of the protection circuit inside the battery 2 is similar to the working principle of the protection circuit inside the battery 1, and will not be repeated here.

如图1B所示,对于电池1而言,保护IC与电阻1、MOS1和MOS2串联之后,与电芯1并联,且保护IC与MOS1和MOS2的栅极连接,MOS1的三端中除了栅极的另外两端中的一端连接MOS2的一端,另一端连接电芯1的输入端。As shown in FIG1B , for battery 1 , the protection IC is connected in series with resistor 1 , MOS1 and MOS2 and then connected in parallel with cell 1 , and the protection IC is connected to the gates of MOS1 and MOS2 , one of the two ends of MOS1 except the gate is connected to one end of MOS2 , and the other end is connected to the input end of cell 1 .

保护IC检测到电芯1的电压,也即保护IC接收电芯1经过电阻R1分压后的输入电压Vin之后,若电芯1的电压低于一定阈值,保护IC通过给MOS1和MOS2的栅极施加电压,控制MOS1和MOS2关断,以使得电芯1从充放电电路断开,电池1便无法继续充放电。其中,MOS1和MOS2为反向放置的MOS管,例如MOS1的源极与MOS2的源极连接,或者MOS1的漏极与MOS2的漏极连接,此种放置方式可以实现MOS管的完全关断。The protection IC detects the voltage of the battery cell 1, that is, after the protection IC receives the input voltage Vin of the battery cell 1 after voltage division by the resistor R1, if the voltage of the battery cell 1 is lower than a certain threshold, the protection IC applies voltage to the gates of MOS1 and MOS2 to control MOS1 and MOS2 to turn off, so that the battery cell 1 is disconnected from the charge and discharge circuit, and the battery 1 cannot continue to charge and discharge. Among them, MOS1 and MOS2 are MOS tubes placed in reverse, for example, the source of MOS1 is connected to the source of MOS2, or the drain of MOS1 is connected to the drain of MOS2. This placement method can achieve complete shutdown of the MOS tube.

示例性地,MOS1和MOS2通常为NMOS管,NMOS管的工作特性为,栅极G与源极S之间的电压Vgs大于电压阈值时,NMOS管导通;Vgs小于电压阈值时,NMOS管关断。因此,在本申请实施例中,若电芯1的电压低于一定阈值,保护IC可以给MOS1和MOS2的栅极施加电压,且施加的电压需小于电压阈值,以使得MOS1和MOS2均关断。Exemplarily, MOS1 and MOS2 are usually NMOS tubes, and the working characteristics of the NMOS tube are that when the voltage Vgs between the gate G and the source S is greater than the voltage threshold, the NMOS tube is turned on; when Vgs is less than the voltage threshold, the NMOS tube is turned off. Therefore, in the embodiment of the present application, if the voltage of the battery cell 1 is lower than a certain threshold, the protection IC can apply a voltage to the gates of MOS1 and MOS2, and the applied voltage must be less than the voltage threshold so that both MOS1 and MOS2 are turned off.

根据上述内容,由于保护IC断开了MOS1和MOS2,电池1无法继续充放电,那么,电池1就变成了死电池。According to the above content, since the protection IC disconnects MOS1 and MOS2, battery 1 cannot continue to charge and discharge, so battery 1 becomes a dead battery.

下面对一些实施例涉及的电池检测方法进行解释说明。The battery detection methods involved in some embodiments are explained below.

对于上述情况,在一些实施例中,电子设备检测到电子设备处于触发启动状态之后,则会通过检测电池的电压确定电池是否为死电池,进一步确定是否能够正常开机启动。其中,电子设备的触发启动状态可由用户通过按压电子设备的电源键等方式实现。For the above situation, in some embodiments, after the electronic device detects that the electronic device is in a triggered start-up state, it will determine whether the battery is a dead battery by detecting the battery voltage, and further determine whether it can be normally started. The triggered start-up state of the electronic device can be achieved by the user by pressing the power button of the electronic device.

以电子设备包括电池1和电池2两个电池为例,电子设备会分别检测电池1和电池2两端的电压。可以理解,死电池的电压通常为0V,即死电池两端无电压。若电池1为死电池,电池2为正常电池,则正常情况下,电子设备检测到的电池1两端的电压应为0V。但是,电池1和电池2之间通常会放置均衡电路,该均衡电路可以起到均衡两个电池的电压的作用,因此,均衡电路会导致电池2的输出端电压漏到电池1输出端,又因为电池1和电池2的输入端均接地,故此时电子设备检测到的电池1的电压便为电池2的输出端电压与电池1的输入端电压的压差,也即检测到的电池1的电压不为0V,电子设备将电池1误判断为正常电池,然后执行开机操作。Taking the electronic device including two batteries, battery 1 and battery 2, as an example, the electronic device will detect the voltages at both ends of battery 1 and battery 2 respectively. It can be understood that the voltage of a dead battery is usually 0V, that is, there is no voltage at both ends of the dead battery. If battery 1 is a dead battery and battery 2 is a normal battery, then under normal circumstances, the voltage at both ends of battery 1 detected by the electronic device should be 0V. However, a balancing circuit is usually placed between battery 1 and battery 2, and the balancing circuit can balance the voltages of the two batteries. Therefore, the balancing circuit will cause the output voltage of battery 2 to leak to the output end of battery 1. Because the input ends of battery 1 and battery 2 are both grounded, the voltage of battery 1 detected by the electronic device at this time is the voltage difference between the output voltage of battery 2 and the input voltage of battery 1, that is, the detected voltage of battery 1 is not 0V, and the electronic device mistakenly judges battery 1 as a normal battery, and then performs the power-on operation.

电子设备开机之后,只有电池2进行放电,供电子设备内部各应用使用。但单个电池的放电电流较小,可能无法支持电子设备的能耗需求,此时便会导致电子设备产生卡顿、花屏等现象,影响用户体验。After the electronic device is turned on, only battery 2 is discharged for use by various applications inside the electronic device. However, the discharge current of a single battery is small and may not be able to support the energy consumption requirements of the electronic device, which may cause the electronic device to freeze or display abnormalities, affecting the user experience.

为了解决上述问题,本申请实施例提供了一种电池检测方法,该方法中,电子设备在触发启动状态下检测电子设备包含的多个电池中各个电池的电流。若各个电池的电流均大于电流阈值,则可以确定多个电池均处于各个电池的充放电电路中,也即多个电池均为正常电池,电子设备可以开机启动。若多个电池中的任一电池的电流小于电流阈值,则说明该电池未处于充放电电路中,也即该电池为死电池,此时不能执行电子设备的开机启动操作。可以理解,并联的电池之间的均衡电路会影响对于电池的电压的检测,但是不会影响对电池的电流的检测,因此,该方法通过检测电池的电流确定电池是否为死电池,进而确定是否可以执行电子设备的开机操作,提升了电池的检测结果的准确度,避免了因在电子设备包含死电池的情况下,对电子设备开机而导致的电子设备的卡顿、花屏等现象,提升了用户的使用体验。In order to solve the above problems, an embodiment of the present application provides a battery detection method, in which an electronic device detects the current of each battery in a plurality of batteries contained in the electronic device in a trigger start state. If the current of each battery is greater than the current threshold, it can be determined that the plurality of batteries are in the charge and discharge circuit of each battery, that is, the plurality of batteries are normal batteries, and the electronic device can be turned on and started. If the current of any of the plurality of batteries is less than the current threshold, it means that the battery is not in the charge and discharge circuit, that is, the battery is a dead battery, and the power-on and start-up operation of the electronic device cannot be performed at this time. It can be understood that the equalization circuit between the parallel batteries will affect the detection of the battery voltage, but will not affect the detection of the battery current. Therefore, the method determines whether the battery is a dead battery by detecting the battery current, and then determines whether the power-on operation of the electronic device can be performed, thereby improving the accuracy of the battery detection result, avoiding the jamming and screen distortion of the electronic device caused by turning on the electronic device when the electronic device contains a dead battery, and improving the user experience.

下面结合电路结构对均衡电路不影响对电流检测的原因以及基于电流确定电池是否为死电池的方法进行详述。The reason why the equalization circuit does not affect the current detection and the method of determining whether the battery is a dead battery based on the current are described in detail below in combination with the circuit structure.

图2A示出了本申请实施例所提供的电池检测方法所应用于的电路的结构示意图。图2A中所示的电路包括检测模块、电池模块、电阻模块和控制模块。其中,电池模块包括多个电池,电阻模块包括多个电阻,且各电阻分别与对应的各电池串联连接。FIG2A shows a schematic diagram of the structure of the circuit to which the battery detection method provided in the embodiment of the present application is applied. The circuit shown in FIG2A includes a detection module, a battery module, a resistor module and a control module. The battery module includes a plurality of batteries, the resistor module includes a plurality of resistors, and each resistor is connected in series with each corresponding battery.

检测模块,用于在电子设备处于触发启动状态下,检测电阻模块中多个电阻分别对应的多个电压。The detection module is used to detect multiple voltages corresponding to multiple resistors in the resistance module when the electronic device is in a triggered start state.

控制模块,用于基于各电阻对应的电压和各电阻的阻值确定与各电阻串联连接的各电池的第一电流;还用于对应于各电池的第一电流均大于电流阈值,确定各电池均处于各电池的充放电电路中,并对电子设备执行开机操作。The control module is used to determine the first current of each battery connected in series with each resistor based on the voltage corresponding to each resistor and the resistance value of each resistor; it is also used to determine that each battery is in the charging and discharging circuit of each battery in response to the first current of each battery being greater than the current threshold, and to perform a power-on operation on the electronic device.

具体地,本申请实施例所提供的电池检测方法所应用于的电路还可以包括均衡电路、系统和电源管理集成电路(Power Management Integrated Circuit,PMIC)。Specifically, the circuit to which the battery detection method provided in the embodiment of the present application is applied may also include a balancing circuit, a system, and a power management integrated circuit (Power Management Integrated Circuit, PMIC).

以检测模块包括电量计1和电量计2、电池模块包括电池1和电池2、电阻模块包括检流电阻1和检流电阻2为例,图2A中所示的电路结构可以进一步表示为图2B中所示的电路结构。Taking the detection module including fuel meter 1 and fuel meter 2, the battery module including battery 1 and battery 2, and the resistance module including current sensing resistor 1 and current sensing resistor 2 as an example, the circuit structure shown in FIG. 2A can be further expressed as the circuit structure shown in FIG. 2B.

其中,PMIC是一种集成电路芯片,用于管理和控制电源系统的各个方面。它可以监测、调整和保护电池电压、电流和功率,以确保电子设备的正常运行,还可以节省能源和延长电池寿命。图2B中的系统可以指代电子设备的系统,该系统内包含多个耗电模块、应用等,可以理解为,电池1和电池2的放电经过PMIC的管理和控制之后,供系统使用。Among them, PMIC is an integrated circuit chip used to manage and control various aspects of the power system. It can monitor, adjust and protect battery voltage, current and power to ensure the normal operation of electronic equipment, and can also save energy and extend battery life. The system in Figure 2B can refer to the system of an electronic device, which contains multiple power-consuming modules, applications, etc. It can be understood that the discharge of battery 1 and battery 2 is managed and controlled by PMIC and then used by the system.

均衡电路放置在电池1和电池2的输出端之间,起到了均衡电池1和电池2的电压的作用。电池1和电池2并联,且电池1的输入端连接检流电阻1的一端,检流电阻1的另一端接地;电池2的输入端连接检流电阻2的一端,检流电阻2的另一端接地。此外,电量计1分别接在检流电阻1的两端以及电池1的输出端的A点和检流电阻1的另一端的B点,同理,电量计2分别接在检流电阻2的两端以及电池2的输出端的C点和检流电阻2的另一端的D点。The equalizing circuit is placed between the output terminals of battery 1 and battery 2, and plays the role of equalizing the voltages of battery 1 and battery 2. Battery 1 and battery 2 are connected in parallel, and the input terminal of battery 1 is connected to one end of current-sensing resistor 1, and the other end of current-sensing resistor 1 is grounded; the input terminal of battery 2 is connected to one end of current-sensing resistor 2, and the other end of current-sensing resistor 2 is grounded. In addition, the fuel gauge 1 is connected to both ends of current-sensing resistor 1 and point A at the output terminal of battery 1 and point B at the other end of current-sensing resistor 1, respectively. Similarly, the fuel gauge 2 is connected to both ends of current-sensing resistor 2 and point C at the output terminal of battery 2 and point D at the other end of current-sensing resistor 2, respectively.

其中,以电量计1为例,电量计1的工作原理为,电量计1通过接在检流电阻1的两端可以得到检流电阻1的第一电压,通过检测A点和B点电压可以得到电池1和检流电阻1的电压之和第二电压。第二电压与第一电压的差值即为电池1两端的电压。在已知第一电压和检流电阻1的电阻的情况下,便可以得到检流电阻1的电流。因为电池1和检流电阻1串联,因此,电池1的电流和检流电阻1的电流相同。此时,电池1两端的电压和电池1的电流均得知,故可以基于电压和电流进一步计算得到电池1的电量。Among them, taking the fuel meter 1 as an example, the working principle of the fuel meter 1 is that the fuel meter 1 can obtain the first voltage of the current-sensing resistor 1 by being connected to the two ends of the current-sensing resistor 1, and the second voltage of the voltage of the battery 1 and the current-sensing resistor 1 can be obtained by detecting the voltages at points A and B. The difference between the second voltage and the first voltage is the voltage across the battery 1. When the first voltage and the resistance of the current-sensing resistor 1 are known, the current of the current-sensing resistor 1 can be obtained. Because the battery 1 and the current-sensing resistor 1 are connected in series, the current of the battery 1 is the same as the current of the current-sensing resistor 1. At this time, the voltage across the battery 1 and the current of the battery 1 are known, so the power of the battery 1 can be further calculated based on the voltage and current.

可以理解,电量计2和电量计1的工作原理相似,此处不再赘述。It can be understood that the working principle of the fuel meter 2 is similar to that of the fuel meter 1 and will not be described in detail here.

以电池1和电池2均为正常电池为例,电子设备处于触发启动状态之后,均衡电路导通,在均衡电路的作用下,图2B中所示电路导通,电池1和电池2中均会有电流流过。此时,电量计可以依据上述方法检测到电池1的电压和电流以及电池2的电压和电流。For example, if both battery 1 and battery 2 are normal batteries, after the electronic device is in the trigger start state, the balancing circuit is turned on, and under the action of the balancing circuit, the circuit shown in FIG. 2B is turned on, and current flows through both battery 1 and battery 2. At this time, the fuel gauge can detect the voltage and current of battery 1 and the voltage and current of battery 2 according to the above method.

以电池1为死电池,电池2为正常电池为例,电子设备处于触发启动状态之后,均衡电路导通。因为电池1为死电池,所以电池1无法进行充放电操作,电池1两端无电压和电流存在,相当于电池1从图2B所示电路中断开。但是,在均衡电路的作用下,电池2的输出端的电压会经过均衡电路输出至电池1的输出端,导致A点有电压。因此,如果只通过检测电压确认电池1是否为死电池,就会根据检测到的A,B两点的电压误以为电池1为正常电池,然后执行电子设备的开机操作。For example, battery 1 is a dead battery and battery 2 is a normal battery. After the electronic device is in the trigger start state, the balancing circuit is turned on. Because battery 1 is a dead battery, battery 1 cannot be charged or discharged, and there is no voltage or current at both ends of battery 1, which is equivalent to battery 1 being disconnected from the circuit shown in Figure 2B. However, under the action of the balancing circuit, the voltage at the output end of battery 2 will be output to the output end of battery 1 through the balancing circuit, resulting in voltage at point A. Therefore, if only the voltage is detected to confirm whether battery 1 is a dead battery, battery 1 will be mistakenly considered to be a normal battery based on the voltages detected at points A and B, and then the electronic device will be turned on.

但是,在电池1为死电池的情况下,电池1中无电流流过,如图2C所示,也即电池1和检流电阻1之间为开路。此种情况下,电量计1检测到检流电阻1两端的电压为0伏(V),那么,检流电阻1的电流也便为0安(A),此时可以确定电池1中无电流流过,可以判断电池1从电路中断开,即电池1为死电池。However, when battery 1 is a dead battery, no current flows through battery 1, as shown in FIG2C , that is, there is an open circuit between battery 1 and current-sensing resistor 1. In this case, the fuel gauge 1 detects that the voltage across current-sensing resistor 1 is 0 volts (V), so the current of current-sensing resistor 1 is also 0 amperes (A). At this time, it can be determined that no current flows through battery 1, and it can be determined that battery 1 is disconnected from the circuit, that is, battery 1 is a dead battery.

因此,由上述内容可知,在图2B和图2C所示的电路结构中,若只通过检测电池1和电池2两端的电压确定电池是否为死电池,由于均衡电路的作用,此种判断方式会将死电池误判断为正常电池,然后电子设备开机。而若通过检测电池1和电池2的电流确定电池是否为死电池,则均衡电路不会影响判断结果的准确性。因此,本申请实施例提供的通过电池的电流判断电池是否为死电池的方法可以提高检测结果的准确性,进而提高电子设备的使用体验。Therefore, it can be seen from the above content that in the circuit structure shown in Figures 2B and 2C, if only the voltage across battery 1 and battery 2 is detected to determine whether the battery is a dead battery, due to the action of the balancing circuit, this judgment method will mistakenly judge the dead battery as a normal battery, and then the electronic device will turn on. If the current of battery 1 and battery 2 is detected to determine whether the battery is a dead battery, the balancing circuit will not affect the accuracy of the judgment result. Therefore, the method of judging whether a battery is a dead battery by the current of the battery provided in the embodiment of the present application can improve the accuracy of the detection result, thereby improving the user experience of the electronic device.

上述图2B和图2C中,检流电阻1与电池1的输入端相连接,检流电阻2与电池2的输入端相连接。在一些实施例中,如图2D所示,检流电阻也可以分别放置于电池的输出端,也即检流电阻1与电池1的输出端相连接,检流电阻2与电池2的输出端相连接。无论检流电阻的位置如何,只要电池为死电池,与电池串联的检流电阻中便无电流流过,故依旧可以根据检流电阻的电流(即与检流电阻串联的电池的电流)以及本申请实施例提供的电池检测方法确定电池是否为死电池。In the above-mentioned Figures 2B and 2C, the current-sensing resistor 1 is connected to the input end of the battery 1, and the current-sensing resistor 2 is connected to the input end of the battery 2. In some embodiments, as shown in Figure 2D, the current-sensing resistors can also be placed at the output ends of the batteries, that is, the current-sensing resistor 1 is connected to the output end of the battery 1, and the current-sensing resistor 2 is connected to the output end of the battery 2. Regardless of the position of the current-sensing resistor, as long as the battery is a dead battery, no current flows through the current-sensing resistor connected in series with the battery, so it is still possible to determine whether the battery is a dead battery based on the current of the current-sensing resistor (that is, the current of the battery connected in series with the current-sensing resistor) and the battery detection method provided in the embodiment of the present application.

应理解,本申请实施例提供的电池检测方法可以适用于包括多个电池的任意电子设备,电子设备包括但不限于手机、平板电脑、计算机、可穿戴设备、增强现实(AugmentedReality,AR)设备等任意电子设备,本申请实施例不对电子设备的类型和形态加以限定。It should be understood that the battery detection method provided in the embodiments of the present application can be applied to any electronic device including multiple batteries, including but not limited to mobile phones, tablet computers, computers, wearable devices, augmented reality (AR) devices, and any other electronic devices. The embodiments of the present application do not limit the type and form of the electronic device.

下面对本申请实施例中提供的电池检测方法进行详细介绍,该方法可以由电子设备执行,以电子设备包括电池1和电池2为例,如图3所示,该方法可以包括如下步骤:The following is a detailed description of the battery detection method provided in the embodiment of the present application. The method can be performed by an electronic device. Taking the electronic device including battery 1 and battery 2 as an example, as shown in FIG3 , the method can include the following steps:

301:电子设备检测到电子设备处于触发启动状态。301: The electronic device detects that the electronic device is in a trigger start state.

本申请实施例不对电子设备处于触发启动状态的条件加以限定,示例性地,电子设备可以通过检测到电子设备的电源键处于开启或按压状态,确定电子设备当前处于触发启动状态。以电子设备为手机为例,对于此种情况,可以理解为,用户对手机的电源键进行按压操作,且该操作持续一定时长之后,电子设备便处于触发启动状态。然后,电子设备需进行后续步骤302和步骤303,以便确定是否继续执行开机操作。The embodiment of the present application does not limit the conditions for the electronic device to be in the triggered start state. For example, the electronic device can determine that the electronic device is currently in the triggered start state by detecting that the power button of the electronic device is turned on or pressed. Taking the electronic device as a mobile phone as an example, in this case, it can be understood that the user presses the power button of the mobile phone, and after the operation continues for a certain period of time, the electronic device is in the triggered start state. Then, the electronic device needs to perform subsequent steps 302 and 303 to determine whether to continue the power-on operation.

302:电子设备获取电池1和电池2分别对应的第一电流。302: The electronic device obtains first currents corresponding to battery 1 and battery 2 respectively.

本申请实施例不对电子设备获取电池1和电池2分别对应的第一电流的方式加以限定,示例性地,电子设备可以利用电量计获取电池1和电池2分别对应的第一电流。具体地,电量计1用于检测电池1对应的第一电流,电量计2用于检测电池2对应的第一电流。以电量计1检测电池1对应的第一电流为例,电量计1可以通过检测与电池1串联的检流电阻两端的电压,得到检流电阻的电流,因为检流电阻和电池1串联,所以电池1对应的第一电流便与检流电阻的电流相同。电池2对应的第一电流的获取方式和电池1对应的第一电流的获取方式类似,此处不再赘述。The embodiments of the present application do not limit the manner in which the electronic device obtains the first currents corresponding to battery 1 and battery 2, respectively. Exemplarily, the electronic device may use a fuel meter to obtain the first currents corresponding to battery 1 and battery 2, respectively. Specifically, fuel meter 1 is used to detect the first current corresponding to battery 1, and fuel meter 2 is used to detect the first current corresponding to battery 2. Taking fuel meter 1 detecting the first current corresponding to battery 1 as an example, fuel meter 1 can obtain the current of the current-sensing resistor by detecting the voltage across the current-sensing resistor connected in series with battery 1. Because the current-sensing resistor is connected in series with battery 1, the first current corresponding to battery 1 is the same as the current of the current-sensing resistor. The manner in which the first current corresponding to battery 2 is obtained is similar to the manner in which the first current corresponding to battery 1 is obtained, and will not be repeated here.

303:若电池1和电池2分别对应的第一电流均大于电流阈值,确定电池1和电池2均不是死电池,电子设备执行开机操作。303: If the first currents corresponding to battery 1 and battery 2 are both greater than the current threshold, it is determined that battery 1 and battery 2 are not dead batteries, and the electronic device performs a power-on operation.

可以理解,若电池为死电池,则该电池无法进行充放电操作,也即该电池的电流为0安(A)的偏差值。其中,偏差值也可以理解为误差值,该偏差值可以根据对电流多次采样得到。It can be understood that if the battery is a dead battery, the battery cannot be charged or discharged, that is, the current of the battery is a deviation value of 0 ampere (A). The deviation value can also be understood as an error value, which can be obtained by sampling the current multiple times.

本申请实施例中,在电池1和电池2分别对应的第一电流均大于电流阈值的情况下,电子设备执行开机操作,也就是说,此时可以确定电池1和电池2均不是死电池,因此可以执行开机操作。因此,可以理解,本申请实施例中的电流阈值可以为0电流的偏差值。示例性地,若经过电流的多次采样之后得到电流的偏差值为10mA,那么,电流阈值便可以为10mA。以电流阈值为10mA为例,若电池1和电池2分别对应的第一电流均大于10mA,则电池1和电池2均不是死电池,电子设备可以执行开机操作;若电池1和电池2分别对应的第一电流中至少有一个电流小于10mA,则可以确定电池1和电池2中存在死电池,此时为了避免电子设备开机之后电池的放电不足以支撑电子设备的消耗,而造成电子设备的卡顿等现象,电子设备不执行开机操作。In the embodiment of the present application, when the first currents corresponding to battery 1 and battery 2 are both greater than the current threshold, the electronic device performs a power-on operation, that is, at this time, it can be determined that battery 1 and battery 2 are not dead batteries, so the power-on operation can be performed. Therefore, it can be understood that the current threshold in the embodiment of the present application can be a deviation value of 0 current. For example, if the deviation value of the current is 10mA after multiple sampling of the current, then the current threshold can be 10mA. Taking the current threshold of 10mA as an example, if the first currents corresponding to battery 1 and battery 2 are both greater than 10mA, then battery 1 and battery 2 are not dead batteries, and the electronic device can perform a power-on operation; if at least one of the first currents corresponding to battery 1 and battery 2 is less than 10mA, it can be determined that there are dead batteries in battery 1 and battery 2. At this time, in order to avoid the discharge of the battery after the electronic device is turned on, which is insufficient to support the consumption of the electronic device, and causing the phenomenon of the electronic device being stuck, the electronic device does not perform a power-on operation.

在本申请实施例中,电流阈值的选取除了与0电流的偏差值相同之外,还可以稍大于0电流的偏差值。例如,若电流的偏差值为10mA,则可以确定电流阈值为15mA。此种情况下,在电池1和电池2分别对应的第一电流大于电流阈值15mA时,电子设备执行开机操作,此种电流阈值的选取稍大于偏差值的方式可以使得死电池的判断结果更加准确。In the embodiment of the present application, the current threshold value may be selected to be the same as the deviation value of 0 current, or slightly larger than the deviation value of 0 current. For example, if the deviation value of the current is 10mA, the current threshold value may be determined to be 15mA. In this case, when the first currents corresponding to battery 1 and battery 2 are respectively larger than the current threshold value of 15mA, the electronic device performs a power-on operation. The current threshold value is selected to be slightly larger than the deviation value, which can make the judgment result of the dead battery more accurate.

图4为本申请实施例提供的电池检测方法的逻辑判断图。图4中,以电子设备为手机为例,若手机处于启动状态,也即对应前文的触发启动状态,则手机需要获取电量计1和电量计2所检测出的电流。其中,电量计1检测电池1对应的第一电流,电量计2检测电池2对应的第一电流。然后判断进行滤波操作之后的电池1和电池2分别对应的第一电流绝对值是否均大于电流阈值(Ith),若是,则说明电池1和电池2均不是死电池,手机便可以正常开机;若否,则说明电池1和电池2中至少有一个电池是死电池,手机不执行开机操作。FIG4 is a logic judgment diagram of the battery detection method provided in an embodiment of the present application. In FIG4, taking the electronic device as a mobile phone as an example, if the mobile phone is in the startup state, that is, corresponding to the trigger startup state mentioned above, the mobile phone needs to obtain the current detected by the fuel gauge 1 and the fuel gauge 2. Among them, the fuel gauge 1 detects the first current corresponding to the battery 1, and the fuel gauge 2 detects the first current corresponding to the battery 2. Then, it is determined whether the absolute values of the first currents corresponding to the battery 1 and the battery 2 respectively after the filtering operation are greater than the current threshold value (Ith). If so, it means that both the battery 1 and the battery 2 are not dead batteries, and the mobile phone can be turned on normally; if not, it means that at least one of the batteries 1 and 2 is a dead battery, and the mobile phone does not perform the startup operation.

其中,以电池1对应的第一电流为例,将进行滤波操作的电池1对应的第一电流与Ith进行比较的方式包括但不限于以下几种:Taking the first current corresponding to battery 1 as an example, the manner of comparing the first current corresponding to battery 1 that is subjected to filtering operation with Ith includes but is not limited to the following:

方式一:每隔固定时间间隔对电池1的电流进行一次采样,对电池1的电流进行多次采样之后,得到电池1对应的多个第二电流,对多个第二电流求取平均值,将该平均值作为电池1对应的第一电流,并与Ith进行比较。若电池1对应的第一电流大于Ith,则说明电池1不是死电池。若电池1对应的第一电流小于Ith,则说明电池1是死电池。Method 1: Sample the current of battery 1 once at fixed time intervals. After sampling the current of battery 1 multiple times, obtain multiple second currents corresponding to battery 1, calculate the average value of the multiple second currents, use the average value as the first current corresponding to battery 1, and compare it with Ith. If the first current corresponding to battery 1 is greater than Ith, it means that battery 1 is not a dead battery. If the first current corresponding to battery 1 is less than Ith, it means that battery 1 is a dead battery.

方式二:每隔固定时间间隔对电池1的电流进行一次采样,对电池1的电流进行多次采样之后,得到电池1对应的多个第二电流,将多个第二电流分别与Ith进行比较。若每个第二电流均大于Ith,则说明电池1不是死电池。若多个第二电流中至少有一个第二电流小于Ith,则说明电池1是死电池。Method 2: Sample the current of battery 1 once at a fixed time interval. After sampling the current of battery 1 multiple times, obtain multiple second currents corresponding to battery 1, and compare the multiple second currents with Ith respectively. If each second current is greater than Ith, it means that battery 1 is not a dead battery. If at least one of the multiple second currents is less than Ith, it means that battery 1 is a dead battery.

方式三:每隔固定时间间隔对电池1的电流进行一次采样,对电池1的电流进行多次采样之后,得到电池1对应的多个第二电流,去掉多个第二电流中的最大值和最小值,然后求取平均值,将该平均值作为电池1对应的第一电流,并与Ith进行比较。若电池1对应的第一电流大于Ith,则说明电池1不是死电池。若电池1对应的第一电流小于Ith,则说明电池1是死电池。Method 3: Sample the current of battery 1 once at fixed time intervals. After sampling the current of battery 1 multiple times, obtain multiple second currents corresponding to battery 1, remove the maximum and minimum values of the multiple second currents, and then calculate the average value, use the average value as the first current corresponding to battery 1, and compare it with Ith. If the first current corresponding to battery 1 is greater than Ith, it means that battery 1 is not a dead battery. If the first current corresponding to battery 1 is less than Ith, it means that battery 1 is a dead battery.

本申请实施例不对电池1的电流的采样方式加以限定,示例性地,该方式可以为,电量计获取与电池1串联连接的电阻的电压,然后基于电压和电阻的阻值确定电阻的电流以及电池1的电流。The embodiment of the present application does not limit the sampling method of the current of the battery 1. Exemplarily, the method may be that the fuel meter obtains the voltage of the resistor connected in series with the battery 1, and then determines the current of the resistor and the current of the battery 1 based on the voltage and the resistance value of the resistor.

上述仅以电池1为例,对电池1对应的第一电流与Ith进行比较的方式进行了举例说明,可以理解,电池2对应的第一电流与Ith进行比较的方式与电池1的方式原理相同,此处不再赘述。The above only takes battery 1 as an example to illustrate the method of comparing the first current corresponding to battery 1 with Ith. It can be understood that the method of comparing the first current corresponding to battery 2 with Ith is the same as that of battery 1 and will not be repeated here.

可以理解,上述仅以电子设备包括两个电池为例对本申请实施例提供的电池检测方法进行了解释说明,但是这并不构成对本申请实施例的全部限制。本申请提供的方法可以应用于具备多个电池的电子设备。此种情况下,电子设备需要获取多个电池分别对应的电流并在各个电流均大于Ith的情况下,电子设备才能开机,否则电子设备不能开机。It is understandable that the above only takes the electronic device including two batteries as an example to explain the battery detection method provided in the embodiment of the present application, but this does not constitute all limitations on the embodiments of the present application. The method provided in the present application can be applied to an electronic device with multiple batteries. In this case, the electronic device needs to obtain the current corresponding to the multiple batteries respectively and the electronic device can only be turned on when each current is greater than Ith, otherwise the electronic device cannot be turned on.

本申请实施例提供的方法,在电子设备处于触发启动状态之后,检测电子设备的多个电池分别对应的电流,并根据电流是否超过电流阈值确定电池是否为死电池,进一步确定是否执行电子设备的开机操作。该方法提高了死电池检测的准确性,也避免了因为将死电池误判断为正常电池而导致的电子设备开机之后的卡顿、花屏等现象,提升了用户的使用体验。The method provided in the embodiment of the present application detects the currents corresponding to the multiple batteries of the electronic device after the electronic device is in the triggered startup state, and determines whether the battery is a dead battery according to whether the current exceeds the current threshold, and further determines whether to execute the power-on operation of the electronic device. This method improves the accuracy of dead battery detection, and also avoids the phenomenon of freezing and screen distortion after the electronic device is turned on due to the mistaken judgment of a dead battery as a normal battery, thereby improving the user experience.

此外,本申请实施例提供了一种电子设备,该电子设备可以包含上述实施例中提及的电池检测电路。In addition, an embodiment of the present application provides an electronic device, which may include the battery detection circuit mentioned in the above embodiment.

本申请提供了一种电子设备,该电子设备包括:一个或多个处理器;一个或多个存储器;一个或多个存储器存储有一个或多个程序,当一个或者多个程序被一个或多个处理器执行时,使得电子设备执行上述实施例中提及的电池检测方法。The present application provides an electronic device, which includes: one or more processors; one or more memories; one or more memories storing one or more programs, when the one or more programs are executed by the one or more processors, the electronic device executes the battery detection method mentioned in the above embodiment.

本申请提供了一种芯片,该芯片用于执行上述实施例中提及的电池检测方法。The present application provides a chip, which is used to execute the battery detection method mentioned in the above embodiment.

本申请还提供了一种计算机可读存储介质,该可读存储介质上存储有指令,指令在计算机上执行时使计算机执行上述实施例中提及的电池检测方法。The present application also provides a computer-readable storage medium, on which instructions are stored. When the instructions are executed on a computer, the computer executes the battery detection method mentioned in the above embodiment.

图5示出了电子设备500的结构示意图。电子设备500可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriberidentification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L等。5 shows a schematic diagram of the structure of an electronic device 500. The electronic device 500 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, and the like.

可以理解的是,本发明实施例示意的结构并不构成对电子设备500的具体限定。在本申请另一些实施例中,电子设备500可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 500. In other embodiments of the present application, the electronic device 500 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

电源管理模块141可以包含本申请实施例中涉及的电路。电池142可以为包括多个电池的电池模块,在本申请实施例中,电池142可以包括前文的电池1和电池2。The power management module 141 may include the circuits involved in the embodiments of the present application. The battery 142 may be a battery module including a plurality of batteries. In the embodiments of the present application, the battery 142 may include the battery 1 and the battery 2 mentioned above.

处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从上述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。处理器可以用于执行本申请提及的电池检测方法。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the above-mentioned memory. Repeated access is avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved. The processor may be used to execute the battery detection method mentioned in the present application.

电子设备500的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 500 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

天线1和天线2用于发射和接收电磁波信号。电子设备500中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 500 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

移动通信模块150可以提供应用在电子设备500上的包括2G/3G/4G/5G等无线通信的解决方案。The mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G etc. applied to the electronic device 500 .

调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and may be set in the same device as the mobile communication module 150 or other functional modules.

无线通信模块160可以提供应用在电子设备500上的包括无线局域网(wirelesslocal area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 500. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and filters it, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

可以理解,如本文所使用的,术语“模块”可以指代或者包括专用集成电路(ASIC)、电子电路、执行一个或多个软件或固件程序的处理器(共享、专用、或群组)和/或存储器、组合逻辑电路、和/或提供所描述的功能的其他适当硬件组件,或者可以作为这些硬件组件的一部分。It will be understood that, as used herein, the term "module" may refer to or include an application specific integrated circuit (ASIC), an electronic circuit, a processor (shared, dedicated, or group) and/or memory that executes one or more software or firmware programs, a combinational logic circuit, and/or other appropriate hardware components that provide the described functionality, or may be part of these hardware components.

可以理解,在本申请各实施例中,处理器可以是微处理器、数字信号处理器、微控制器等,和/或其任何组合。根据另一个方面,所述处理器可以是单核处理器,多核处理器等,和/或其任何组合。It is understood that in each embodiment of the present application, the processor may be a microprocessor, a digital signal processor, a microcontroller, etc., and/or any combination thereof. According to another aspect, the processor may be a single-core processor, a multi-core processor, etc., and/or any combination thereof.

本申请公开的各实施例可以被实现在硬件、软件、固件或这些实现方法的组合中。本申请的实施例可实现为在可编程系统上执行的计算机程序或程序代码,该可编程 系统包括至少一个处理器、存储系统(包括易失性和非易失性存储器和/或存储元件)、至少一个输入设备以及至少一个输出设备。The embodiments disclosed in the present application may be implemented in hardware, software, firmware, or a combination of these implementation methods. The embodiments of the present application may be implemented as a computer program or program code executed on a programmable system, the programmable system comprising at least one processor, a storage system (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device.

可将程序代码应用于输入指令,以执行本申请描述的各功能并生成输出信息。可以按已知方式将输出信息应用于一个或多个输出设备。为了本申请的目的,处理系统包括具有诸如例如数字信号处理器(DSP)、微控制器、专用集成电路(ASIC)或微处理器之类的处理器的任何系统。Program code may be applied to input instructions to perform the functions described herein and generate output information. The output information may be applied to one or more output devices in a known manner. For purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

程序代码可以用高级程序化语言或面向对象的编程语言来实现,以便与处理系统通信。在需要时,也可用汇编语言或机器语言来实现程序代码。事实上,本申请中描述的机制不限于任何特定编程语言的范围。在任一情形下,该语言可以是编译语言或解释语言。Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.

在一些情况下,所公开的实施例可以以硬件、固件、软件或其任何组合来实现。所公开的实施例还可以被实现为由一个或多个暂时或非暂时性机器可读(例如,计算机可读)存储介质承载或存储在其上的指令,其可以由一个或多个处理器读取和执行。例如,指令可以通过网络或通过其他计算机可读介质分发。因此,机器可读介质可以包括用于以机器(例如,计算机)可读的形式存储或传输信息的任何机制,包括但不限于,软盘、光盘、光碟、只读存储器(CD-ROMs)、磁光盘、只读存储器(ROM)、随机存取存储器(RAM)、可擦除可编程只读存储器(EPROM)、电可擦除可编程只读存储器(EEPROM)、磁卡或光卡、闪存、或用于利用因特网以电、光、声或其他形式的传播信号来传输信息(例如,载波、红外信号数字信号等)的有形的机器可读存储器。因此,机器可读介质包括适合于以机器(例如,计算机)可读的形式存储或传输电子指令或信息的任何类型的机器可读介质。In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed over a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including, but not limited to, floppy disks, optical disks, optical discs, read-only memories (CD-ROMs), magneto-optical disks, read-only memories (ROMs), random access memories (RAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in electrical, optical, acoustic, or other forms of propagation signals. Therefore, machine-readable media include any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).

在附图中,可以以特定布置和/或顺序示出一些结构或方法特征。然而,应该理解,可能不需要这样的特定布置和/或排序。而是,在一些实施例中,这些特征可以以不同于说明性附图中所示的方式和/或顺序来布置。另外,在特定图中包括结构或方法特征并不意味着暗示在所有实施例中都需要这样的特征,并且在一些实施例中,可以不包括这些特征或者可以与其他特征组合。In the accompanying drawings, some structural or method features may be shown in a specific arrangement and/or order. However, it should be understood that such a specific arrangement and/or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and/or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.

需要说明的是,本申请各设备实施例中提到的各单元/模块都是逻辑单元/模块,在物理上,一个逻辑单元/模块可以是一个物理单元/模块,也可以是一个物理单元/模块的一部分,还可以以多个物理单元/模块的组合实现,这些逻辑单元/模块本身的物理实现方式并不是最重要的,这些逻辑单元/模块所实现的功能的组合才是解决本申请所提出的技术问题的关键。此外,为了突出本申请的创新部分,本申请上述各设备实施例并没有将与解决本申请所提出的技术问题关系不太密切的单元/模块引入,这并不表明上述设备实施例并不存在其它的单元/模块。It should be noted that the units/modules mentioned in the various device embodiments of the present application are all logical units/modules. Physically, a logical unit/module can be a physical unit/module, or a part of a physical unit/module, or can be implemented as a combination of multiple physical units/modules. The physical implementation method of these logical units/modules themselves is not the most important. The combination of functions implemented by these logical units/modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units/modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units/modules in the above-mentioned device embodiments.

需要说明的是,在本专利的示例和说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the elements.

虽然通过参照本申请的某些优选实施例,已经对本申请进行了图示和描述,但本领域的普通技术人员应该明白,可以在形式上和细节上对其作各种改变,而不偏离本申请的范围。Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the present application.

Claims (14)

1. A battery detection method applied to an electronic device, the electronic device comprising a plurality of batteries, the method comprising:
detecting that the electronic equipment is in a trigger starting state; under the condition that the electronic equipment comprises an equalization circuit, acquiring a plurality of first currents respectively corresponding to a plurality of batteries connected in parallel, wherein the equalization circuit is used for equalizing the voltages of the batteries, and the equalization circuit is positioned among the batteries;
and determining that the batteries are in the charge-discharge circuits of the batteries corresponding to the first currents being larger than the current threshold, and executing starting operation on the electronic equipment, wherein when the first currents are larger than the current threshold, the batteries are normally charged and discharged.
2. The method of claim 1, wherein the obtaining a plurality of first currents respectively corresponding to a plurality of batteries included in the electronic device comprises:
for any one of the plurality of batteries, acquiring a first voltage of a resistor corresponding to the any one battery, wherein the resistor corresponding to the any one battery and the any one battery are connected in series in a charge-discharge circuit of the any one battery;
Determining a second current corresponding to the resistor corresponding to any battery based on the first voltage and the resistance value of the resistor corresponding to any battery;
and determining the first current corresponding to any battery based on the second current.
3. The method according to claim 1, wherein the method further comprises:
and determining that a battery corresponding to any one of the first currents is not in a charge-discharge circuit of the battery, and not executing starting operation on the electronic equipment, wherein the battery corresponding to any one of the first currents is smaller than the current threshold.
4. The method of claim 1, wherein the current threshold is determined based on a deviation value of zero current, wherein the deviation value of zero current is derived from sampling the zero current a plurality of times.
5. The method of claim 2, wherein determining the manner in which the first current corresponds to any of the plurality of batteries comprises:
sampling the current corresponding to any one of the batteries for multiple times according to a fixed time interval to obtain multiple second currents;
and taking the average value of the second currents as the first current corresponding to any battery.
6. The method of claim 2, wherein determining the manner in which the first current corresponds to any of the plurality of batteries comprises:
sampling the current corresponding to any one of the batteries for multiple times according to a fixed time interval to obtain multiple second currents;
and taking the second currents as the first currents corresponding to any battery.
7. The method of claim 2, wherein determining the manner in which the first current corresponds to any of the plurality of batteries comprises:
sampling the current corresponding to any one of the batteries for multiple times according to a fixed time interval to obtain multiple second currents;
and taking the average value of the currents excluding the maximum value and the minimum value in the second currents as the first current corresponding to any battery.
8. The method of any of claims 1-4, the electronic device comprising the equalization circuit, a detection module, a battery module, and a resistance module, the detection module comprising a first fuel gauge and a second fuel gauge, the battery module comprising a first battery and a second battery, the resistance module comprising a first resistance and a second resistance;
The output end of the first battery is connected with one end of the equalizing circuit, and the output end of the second battery is connected with the other end of the equalizing circuit;
the input end of the first battery is connected with one end of the first resistor, and the other end of the first resistor is grounded;
the input end of the second battery is connected with one end of the second resistor, and the other end of the second resistor is grounded;
the first electricity meter comprises a first end, a second end, a third end and a fourth end, wherein the first end is connected with the output end of the first battery, the second end is connected with one end of the first resistor, and the third end and the fourth end are both connected with the other end of the first resistor;
the second electricity meter comprises a fifth end, a sixth end, a seventh end and an eighth end, wherein the fifth end is connected with the output end of the second battery, the sixth end is connected with one end of the second resistor, and the seventh end and the eighth end are both connected with the other end of the second resistor.
9. The battery detection circuit is characterized by being applied to electronic equipment, and comprises a detection module, a battery module, a resistance module and a control module, wherein the battery module comprises a plurality of batteries connected in parallel, the resistance module comprises a plurality of resistors, and each resistor is respectively connected with each corresponding battery;
The detection module is used for detecting a plurality of voltages corresponding to a plurality of resistors in the resistor module respectively when the electronic equipment is in a trigger starting state;
the control module is used for determining a first current of each battery connected in series with each resistor based on the voltage corresponding to each resistor and the resistance value of each resistor when the electronic equipment comprises an equalization circuit, wherein the equalization circuit is used for equalizing the voltage of each battery and is positioned between the batteries;
and determining that each battery is in a charging and discharging circuit of each battery according to the fact that the first current of each battery is larger than a current threshold value, and executing starting operation on the electronic equipment, wherein when the first current of each battery is larger than the current threshold value, each battery is charged and discharged normally.
10. The circuit of claim 9, wherein the circuit further comprises a logic circuit,
the control module is further configured to determine that any battery is not in the charge-discharge circuit of any battery, and not perform a startup operation on the electronic device, where the first current of any battery in the first currents of the batteries is smaller than the current threshold.
11. An electronic device comprising the battery detection circuit of claim 9 or 10.
12. An electronic device, comprising: one or more processors; one or more memories; the one or more memories stores one or more programs that, when executed by the one or more processors, cause the electronic device to perform the battery detection method of any of claims 1-8.
13. A chip for performing the battery detection method according to any one of claims 1 to 8.
14. A computer readable storage medium having stored thereon instructions that, when executed on a computer, cause the computer to perform the battery detection method of any one of claims 1 to 8.
CN202311044199.3A 2023-08-18 2023-08-18 Battery detection method, circuit, device, chip and readable storage medium Active CN116774092B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311044199.3A CN116774092B (en) 2023-08-18 2023-08-18 Battery detection method, circuit, device, chip and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311044199.3A CN116774092B (en) 2023-08-18 2023-08-18 Battery detection method, circuit, device, chip and readable storage medium

Publications (2)

Publication Number Publication Date
CN116774092A CN116774092A (en) 2023-09-19
CN116774092B true CN116774092B (en) 2024-04-09

Family

ID=87991599

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311044199.3A Active CN116774092B (en) 2023-08-18 2023-08-18 Battery detection method, circuit, device, chip and readable storage medium

Country Status (1)

Country Link
CN (1) CN116774092B (en)

Citations (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1929188A (en) * 2005-09-06 2007-03-14 富士通株式会社 Anomaly detection method of battery pack, battery pack and electronic apparatus
CN101086516A (en) * 2006-06-07 2007-12-12 华为技术有限公司 Battery in-position detection system when charging of electronic apparatus
JP2009025032A (en) * 2007-07-17 2009-02-05 Toyota Motor Corp Battery state detection device and method, and output control device and method
CN101421883A (en) * 2006-04-13 2009-04-29 松下电器产业株式会社 Battery pack and method for detecting disconnection of same
CN102760917A (en) * 2012-06-28 2012-10-31 华为技术有限公司 Hybrid battery and charge-discharge control method thereof
CN103311965A (en) * 2012-03-06 2013-09-18 北京联动天翼科技有限公司 Intelligent management device and method of charging and discharging of parallel-connected battery group
CN103490389A (en) * 2013-09-25 2014-01-01 无锡中星微电子有限公司 Battery protecting circuit and system
CN104009512A (en) * 2013-02-25 2014-08-27 波音公司 Battery module system
CN104270530A (en) * 2014-10-17 2015-01-07 深圳市中兴移动通信有限公司 Method and device for preventing starting abnormity and mobile terminal
CN104777432A (en) * 2015-04-30 2015-07-15 无锡中星微电子有限公司 Safety detection method and safety detection circuit for rechargeable battery and charger
CN204666703U (en) * 2015-04-14 2015-09-23 东莞市德尔能新能源股份有限公司 Current detection circuit of fast charging battery protection board
CN106340923A (en) * 2016-09-29 2017-01-18 杰华特微电子(张家港)有限公司 Battery equalization circuit, control method and battery system
JP2017163749A (en) * 2016-03-10 2017-09-14 ニシム電子工業株式会社 Secondary battery system
CN108461834A (en) * 2018-02-12 2018-08-28 维沃移动通信有限公司 A kind of battery pack structure, mobile terminal and charge/discharge control method
CN208000981U (en) * 2018-02-05 2018-10-23 北京拓盛智联技术有限公司 A kind of rechargeable battery
CN109239609A (en) * 2018-11-02 2019-01-18 西安航远数字技术有限公司 A kind of in-place detection system of unmanned plane more batteries in parallel
CN109870660A (en) * 2019-03-25 2019-06-11 广西电网有限责任公司钦州供电局 An open circuit detection system and method for a battery pack
CN110221226A (en) * 2019-04-30 2019-09-10 蜂巢能源科技有限公司 The test method and test macro of battery pack Capacity uniformity
CN210347876U (en) * 2019-06-03 2020-04-17 长沙优力电驱动系统有限公司 Battery cell charging and discharging information detection device
CN111537793A (en) * 2020-05-26 2020-08-14 惠州Tcl移动通信有限公司 Power consumption testing method and system of mobile terminal
CN113541256A (en) * 2021-07-21 2021-10-22 研祥智慧物联科技有限公司 Discharge method and discharge system

Patent Citations (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1929188A (en) * 2005-09-06 2007-03-14 富士通株式会社 Anomaly detection method of battery pack, battery pack and electronic apparatus
CN101421883A (en) * 2006-04-13 2009-04-29 松下电器产业株式会社 Battery pack and method for detecting disconnection of same
CN101086516A (en) * 2006-06-07 2007-12-12 华为技术有限公司 Battery in-position detection system when charging of electronic apparatus
JP2009025032A (en) * 2007-07-17 2009-02-05 Toyota Motor Corp Battery state detection device and method, and output control device and method
CN103311965A (en) * 2012-03-06 2013-09-18 北京联动天翼科技有限公司 Intelligent management device and method of charging and discharging of parallel-connected battery group
CN102760917A (en) * 2012-06-28 2012-10-31 华为技术有限公司 Hybrid battery and charge-discharge control method thereof
CN104009512A (en) * 2013-02-25 2014-08-27 波音公司 Battery module system
CN103490389A (en) * 2013-09-25 2014-01-01 无锡中星微电子有限公司 Battery protecting circuit and system
CN104270530A (en) * 2014-10-17 2015-01-07 深圳市中兴移动通信有限公司 Method and device for preventing starting abnormity and mobile terminal
CN204666703U (en) * 2015-04-14 2015-09-23 东莞市德尔能新能源股份有限公司 Current detection circuit of fast charging battery protection board
CN104777432A (en) * 2015-04-30 2015-07-15 无锡中星微电子有限公司 Safety detection method and safety detection circuit for rechargeable battery and charger
JP2017163749A (en) * 2016-03-10 2017-09-14 ニシム電子工業株式会社 Secondary battery system
CN106340923A (en) * 2016-09-29 2017-01-18 杰华特微电子(张家港)有限公司 Battery equalization circuit, control method and battery system
CN208000981U (en) * 2018-02-05 2018-10-23 北京拓盛智联技术有限公司 A kind of rechargeable battery
CN108461834A (en) * 2018-02-12 2018-08-28 维沃移动通信有限公司 A kind of battery pack structure, mobile terminal and charge/discharge control method
CN109239609A (en) * 2018-11-02 2019-01-18 西安航远数字技术有限公司 A kind of in-place detection system of unmanned plane more batteries in parallel
CN109870660A (en) * 2019-03-25 2019-06-11 广西电网有限责任公司钦州供电局 An open circuit detection system and method for a battery pack
CN110221226A (en) * 2019-04-30 2019-09-10 蜂巢能源科技有限公司 The test method and test macro of battery pack Capacity uniformity
CN210347876U (en) * 2019-06-03 2020-04-17 长沙优力电驱动系统有限公司 Battery cell charging and discharging information detection device
CN111537793A (en) * 2020-05-26 2020-08-14 惠州Tcl移动通信有限公司 Power consumption testing method and system of mobile terminal
CN113541256A (en) * 2021-07-21 2021-10-22 研祥智慧物联科技有限公司 Discharge method and discharge system

Also Published As

Publication number Publication date
CN116774092A (en) 2023-09-19

Similar Documents

Publication Publication Date Title
CN108899952B (en) A multi-battery charging and discharging device and mobile terminal
US9343226B2 (en) Entering a battery power down mode using over-the-air command for wireless devices
US9979220B2 (en) Electronic device and method for controlling charging of the same
US8949631B2 (en) USB power supply method and device, and end device and system using the same
EP4002545B1 (en) Charging/discharging protection circuit, terminal device, and battery discharging control method
CN110085934A (en) A charging method for a terminal battery and a mobile terminal
US9077195B2 (en) Input-output circuit
CN116707097B (en) Charging and discharging method, device, chip and readable storage medium
CN112448448A (en) Charging control method and device, earphone, electronic equipment and readable storage medium
CN114865755B (en) Multi-battery power supply, charging and discharging method and electronic equipment
CN114844182B (en) Charging circuit, charging method and electronic device
WO2021054647A1 (en) Power supply method and electronic device therefor
CN116365079B (en) Electronic equipment, methods for determining battery condition and computer-readable storage media
WO2020253520A1 (en) Device to be charged and charging method
CN116774092B (en) Battery detection method, circuit, device, chip and readable storage medium
CN113767571B (en) FET control device and method
CN114222018A (en) Charging test system and method
CN106487061B (en) Charging circuit and method
US20150357835A1 (en) Usb energy harvesting
CN116662232A (en) Electronic equipment and detection method
CN115173913A (en) Self-adaptive switching device and method for built-in external antenna of vehicle-mounted terminal
KR20080028170A (en) Battery charger and method
TW201733236A (en) Charging method of detecting battery voltage in charging process for adjusting power supply current accordingly capable of preventing sudden temperature rising during a charging process
CN119181877B (en) Method and circuit for improving output voltage of battery and electronic equipment
CN220775425U (en) Power supply 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
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Patentee after: Honor Terminal Co.,Ltd.

Country or region after: China

Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong

Patentee before: Honor Device Co.,Ltd.

Country or region before: China