Information processing method and electronic equipment
By coordinating control between the fuel gauge and the charging module, the problem of inconsistency between the real-time battery level and the charging status in electronic devices is solved, improving the user experience and shortening the charging time.
Patent Information
- Application Number
- CN202411276130.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2026-03-20
AI Technical Summary
Inconsistencies between the real-time battery level and the charging status displayed in electronic devices lead to a degraded user experience.
By controlling the coordinated operation of the charging module and the fuel gauge, the system ensures consistent battery full-charge detection. This includes controlling the charging module to stop charging when the fuel gauge detects full charge, and controlling the fuel gauge to display full-charge status when the charging module detects full charge.
It enables real-time display of battery level and charging status, improving user experience and avoiding the problem of excessively long charging times.
Smart Images

Figure CN121710487A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of charging and discharging technology, and more particularly to information processing methods and electronic devices. Background Technology
[0002] Electronic devices (such as mobile phones) typically contain a battery to provide power. These devices can display the battery's real-time charge level and charging status. The real-time charge level helps users understand the battery's usage, while the charging status indicates whether the battery is currently charging. Currently, electronic devices sometimes exhibit discrepancies between the real-time charge level and the charging status. For example, the battery may display as fully charged (100%) when it is still charging, or the battery may be fully charged but the real-time charge level may be less than 100%. Summary of the Invention
[0003] This application provides an information processing method and an electronic device that can solve the problem of inconsistency between the real-time battery power displayed in the electronic device and the battery charging status.
[0004] In a first aspect, embodiments of this application provide an information processing method applied to an electronic device. The electronic device includes a first battery, a charging module, and a first fuel gauge. The charging module is used to charge the first battery, and the first fuel gauge is used to measure the charge level of the first battery. The method includes: when the first fuel gauge detects that the first battery is fully charged, controlling the charging module to stop charging the first battery; and / or, when the charging module detects that the first battery is fully charged, controlling the first fuel gauge to set the charge level of the first battery to full charge. This method controls the charging module to stop charging the first battery when the first fuel gauge detects that the first battery is fully charged, and controls the first fuel gauge to set the charge level of the first battery to full charge when the charging module detects that the first battery is fully charged. This ensures that the judgment of the first battery being fully charged in the charging module and the first fuel gauge is consistent, thereby making the real-time battery charge level displayed in the electronic device consistent with the battery charging status, and solving the problem of inconsistency between the real-time battery charge level displayed in the electronic device and the battery charging status.
[0005] In one possible implementation, the electronic device further includes a second battery and a second fuel gauge. The method further includes controlling the second fuel gauge to set the second battery to full charge when the first fuel gauge detects that the first battery is fully charged. This method, by incorporating two batteries and two fuel gauges in the electronic device, ensures that the full charge determinations of the two fuel gauges and the charging module are consistent. This results in the real-time battery level displayed on the electronic device being consistent with the battery charging status, thus resolving the problem of inconsistency between the real-time battery level displayed on the electronic device and the battery charging status.
[0006] In one possible implementation, the electronic device further includes a second battery and a second fuel gauge. The method further includes controlling the second fuel gauge to set the second battery's charge level to full charge when the charging module detects that the first battery is fully charged. This method, by incorporating two batteries and two fuel gauges in the electronic device, ensures that the full charge determinations of the two fuel gauges and the charging module are consistent. This results in the real-time battery charge level displayed on the electronic device being consistent with the battery's charging status, thus resolving the problem of inconsistency between the real-time battery charge level and the battery's charging status displayed on the electronic device.
[0007] In one possible implementation, the method further includes: setting a first measurement cutoff current in the first fuel gauge based on the charging cutoff current of the charging module; the first measurement cutoff current is greater than the charging cutoff current. By making the first measurement cutoff current of the first fuel gauge greater than the charging cutoff current of the charging module, the probability that the first fuel gauge will first measure that the first battery is fully charged can be increased, the charging time of the charging module for the first battery can be shortened, and the problem of excessive charging time of the charging module for the first battery when the first fuel gauge measures that the first battery is fully charged but the charging module does not measure that the first battery is fully charged can be solved.
[0008] In one possible implementation, setting a first measurement cutoff current in the first fuel gauge based on the charging cutoff current of the charging module includes: obtaining the charging cutoff current corresponding to the real-time temperature based on the real-time temperature of the first battery; setting the charging cutoff current corresponding to the real-time temperature as the charging cutoff current of the charging module; determining a first measurement cutoff current based on the charging cutoff current corresponding to the real-time temperature, wherein the first measurement cutoff current is greater than the charging cutoff current corresponding to the real-time temperature; and setting the determined first measurement cutoff current in the first fuel gauge.
[0009] In one possible implementation, the electronic device includes a second fuel gauge, and the method further includes: setting a second measurement cutoff current in the second fuel gauge based on the charging cutoff current of the charging module; the second measurement cutoff current is greater than the charging cutoff current. This method, by incorporating two batteries and two fuel gauges in the electronic device, can increase the probability that the second fuel gauge will first measure that the second battery is fully charged, shorten the charging time of the charging module for the second battery, and solve the problem of excessively long charging time for the second battery when the second fuel gauge measures that the second battery is fully charged but the charging module has not.
[0010] In one possible implementation, when the charging module detects that the first battery is fully charged, controlling the first fuel gauge to set the first battery's charge level to full charge includes: when the charging module detects that the first battery is fully charged, and it is determined that the first fuel gauge has not detected that the first battery is fully charged, controlling the first fuel gauge to set the first battery's charge level to full charge. This method first determines whether the first fuel gauge has detected that the first battery is fully charged, and only controls the first fuel gauge to set the first battery's charge level to full charge when it has not detected that the first battery is fully charged, thus preventing redundant operations of controlling the first fuel gauge to set the first battery's charge level to full charge when the first fuel gauge has already detected that the first battery is fully charged.
[0011] In one possible implementation, controlling the charging module to stop charging the first battery includes: sending a first instruction to a charging module driver, the charging module driver being used to drive the charging module, the first instruction being used to instruct the charging module driver to control the charging module to stop charging the first battery; and the charging module driver sending a first control signal to the charging module, the first control signal being used to control the charging module to stop charging the first battery. This provides a specific implementation of controlling the charging module to stop charging the first battery.
[0012] In one possible implementation, the first fuel gauge detects that the first battery is fully charged by: detecting that the charging current of the first battery is less than the first measurement cutoff current of the first fuel gauge; and detecting that the voltage of the first battery is greater than a preset first voltage threshold; and detecting that the charging capacity of the first battery is not less than a preset charging capacity threshold.
[0013] In one possible implementation, controlling the first fuel gauge to set the first battery to full charge includes: sending a second instruction to the fuel gauge driver, the second instruction being used to instruct the fuel gauge driver to control the first fuel gauge to set the first battery to full charge; the fuel gauge driver sending a third instruction to the first fuel gauge, the third instruction being used to instruct the first fuel gauge to set the first battery to full charge; and the first fuel gauge setting the first battery to full charge.
[0014] In one possible implementation, the first fuel gauge sets the first battery's charge level to full charge, including: in response to a received third instruction, the first fuel gauge sets the charger's full charge flag to a first value, the first value indicating that the charging module has detected that the first battery is fully charged; when the first fuel gauge reaches the forced full charge detection time, it determines that the charger's full charge flag is the first value and the voltage of the first battery is greater than a preset second voltage threshold, and sets the first battery's charge level to full charge.
[0015] In a second aspect, embodiments of this application provide an electronic device, including: a processor and a memory; wherein one or more computer programs are stored in the memory, and the one or more computer programs include instructions that, when executed by the processor, cause the electronic device to perform the method of any one of the first aspects.
[0016] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to perform the method of any one of the first aspects.
[0017] Fourthly, embodiments of this application provide a computer program product, which includes a computer program that, when run on a computer, causes the computer to perform the method of any one of the first aspects. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 A schematic diagram illustrating the interface implementation for displaying battery power and charging status of an electronic device according to an embodiment of this application;
[0020] Figure 2 A schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0021] Figure 3 A schematic diagram of the software structure of an electronic device provided in an embodiment of this application;
[0022] Figure 4A Another structural schematic diagram of the electronic device provided in the embodiments of this application;
[0023] Figure 4B A schematic diagram of another structure of the electronic device provided in the embodiments of this application;
[0024] Figure 5A This is a schematic diagram of one implementation scheme of the external fuel meter provided in the embodiments of this application;
[0025] Figure 5B This is a schematic diagram of one implementation scheme of the built-in fuel meter provided in the embodiments of this application;
[0026] Figure 6 This is a schematic diagram of the battery charging process provided in an embodiment of this application;
[0027] Figure 7AA flowchart illustrating an information processing method provided in an embodiment of this application;
[0028] Figure 7B This is a second flowchart illustrating the information processing method provided in the embodiments of this application;
[0029] Figure 8A This is a schematic diagram of a third type of information processing method provided in the embodiments of this application;
[0030] Figure 8B This is a fourth flowchart illustrating the information processing method provided in the embodiments of this application;
[0031] Figure 9A A fifth flowchart illustrating the information processing method provided in this application embodiment;
[0032] Figure 9B A sixth flowchart illustrating the information processing method provided in this application embodiment;
[0033] Figure 10 This is a schematic diagram of the full charge detection process in the fuel meter provided in the embodiments of this application;
[0034] Figure 11 This is a schematic diagram of the forced full charge process of the fuel meter provided in the embodiments of this application. Detailed Implementation
[0035] The terminology used in the implementation section of this application is for the purpose of explaining specific embodiments of this application only, and is not intended to limit this application.
[0036] Electronic devices (such as mobile phones) typically contain a battery that provides power. These devices can display the real-time battery level to the user, allowing them to understand the battery's status. Furthermore, when the device is connected to a charger, it can display the battery's charging status so the user knows whether the battery is charging.
[0037] For example Figure 1 As shown, the numbers on the battery icon can be used to represent the real-time battery level. A display of 100 indicates that the real-time battery level is 100%, meaning the battery is fully charged. A display of 98 indicates that the real-time battery level is 98%, meaning the battery is not fully charged. Figure 1 The lightning bolt icon on the battery icon indicates that the battery is being charged; the absence of a lightning bolt icon indicates that the battery is not being charged. Generally, when an electronic device is connected to a charger, the number on the battery icon will be 100, and the lightning bolt icon will not be displayed, indicating that the battery is fully charged and charging is complete.
[0038] However, when electronic devices display the above information, there is sometimes a discrepancy between the real-time battery level and the charging status, for example... Figure 1 As shown, the battery's real-time charge level may be displayed as 100% but a lightning bolt icon may still be present to indicate that the battery is currently charging. Alternatively, the battery icon may switch from having a lightning bolt icon to not having one, indicating that charging is complete and the battery is not currently being charged. However, the real-time battery charge level may only be 98%, meaning the real-time battery charge level is not reported as full (less than 100%). This inconsistency between the real-time charge level display and the charging status display can cause users to doubt the charging capability of electronic devices, negatively impacting the user experience.
[0039] Analysis reveals that electronic devices typically include a charging module and a fuel gauge. The charging module determines whether the battery is fully charged based on its own charging conditions, and accordingly begins or stops charging. When the charging module is charging, the electronic device displays the aforementioned lightning bolt icon; when the charging module stops charging, the electronic device does not display the lightning bolt icon. The fuel gauge measures the battery's percentage of charge and whether it is fully charged. The electronic device displays the real-time battery level based on the percentage measured by the fuel gauge (less than 100%). When the fuel gauge determines that the battery is fully charged based on its own charging conditions, the electronic device displays the real-time battery level as 100%, indicating that the battery is fully charged.
[0040] As can be seen, electronic devices display real-time battery level and charging status based on information provided by different components within the device. Specifically, the battery's charging status is displayed based on whether the charging module is charging the battery, while the real-time battery level is displayed based on the percentage measurement result from the fuel gauge. However, the charging module's determination of a fully charged battery and the fuel gauge's determination of a fully charged battery may be inconsistent or conflicting, leading to inconsistencies and conflicts in the electronic device's display of real-time battery level and charging status.
[0041] Specifically, if the fuel gauge measures the battery as fully charged first, but the charging module has not yet measured the battery as fully charged and has not stopped charging, the electronic device will display a real-time battery charge of 100% but will still show a lightning bolt icon, resulting in inconsistencies between the two displays. Furthermore, the charging module will continue charging the battery until it measures it as fully charged, leading to increased charging time for the electronic device.
[0042] If the charging module detects that the battery is fully charged and stops charging, but the fuel gauge does not detect that the battery is fully charged (for example, the battery percentage is measured to be 98%), the electronic device will stop displaying the lightning bolt icon to indicate that the battery is not currently being charged. However, the real-time battery level displayed will only be 98%, which is less than 100%, and the two displays will not be consistent.
[0043] To address the above issues, this application provides an information processing method. When the fuel gauge detects that the battery is fully charged, the method controls the charging module to stop charging the battery. When the charging module detects that the battery is fully charged and stops charging, the method controls the fuel gauge to set the real-time battery level to fully charged. This ensures that the fuel gauge's judgment of the battery being fully charged is consistent with the charging module's judgment, thereby making the real-time battery level display and charging status display of the electronic device consistent and improving the user experience.
[0044] The information processing method of this application embodiment can be applied to electronic devices equipped with batteries, such as mobile phones, personal computers (PCs), tablet computers (PADs), wearable devices, smart screens, etc.
[0045] like Figure 2 The diagram shown is a structural schematic of an electronic device provided in an embodiment of this application, including: a processor 110, a memory 120, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 150, a battery 160, etc.
[0046] Optionally, to further enhance the functionality of the electronic device, it may also include: an antenna, a mobile communication module, a wireless communication module, an audio module, a speaker, a receiver, a microphone, a headphone jack, etc., which are not limited in the embodiments of this application.
[0047] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.
[0048] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0049] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0050] The memory 120 can be used to store computer executable program code, which includes instructions. The memory 120 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.). Furthermore, the memory 120 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the memory 120 and / or instructions stored in memory disposed within the processor.
[0051] The number of batteries 160 can be one or more. When an electronic device includes multiple batteries 160, the multiple batteries 160 can be connected in parallel.
[0052] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via a USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 160, the charging management module 140 can also supply power to the electronic device via the power management module 150.
[0053] The power management module 150 connects the battery 160, the charging management module 140, and the processor 110. The power management module 150 receives input from the battery 160 and / or the charging management module 140, and supplies power to the processor 110, memory 120, etc. The power management module 150 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 150 may also be located within the processor 110. In other embodiments, the power management module 150 and the charging management module 140 may be housed in the same device.
[0054] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment of the invention uses a layered architecture. Taking the system as an example, the software structure of electronic device 100 is illustrated.
[0055] Figure 3 The diagram shown is a software structure block diagram of an electronic device according to an embodiment of this application. The layered architecture divides the software into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. Taking the Android system as an example, in some embodiments, the Android system is divided into five layers, from top to bottom: the application layer, the application framework layer, the system library and Android runtime layer, the hardware abstraction layer (HAL), and the kernel layer.
[0056] The application layer can include several applications (hereinafter referred to as apps), such as camera apps, gallery apps, calendar apps, settings apps, etc.
[0057] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer, including various components and services to support Android development. The application framework layer also includes some predefined functions. For example... Figure 3 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
[0058] The system libraries and Android runtime layer comprise the system libraries and the Android Runtime. The system libraries can include multiple functional modules, such as: a surface manager, a 2D graphics engine, a 3D graphics processing library (e.g., OpenGL ES), a media library, and a font library. Specifically, the browser kernel is responsible for interpreting web page syntax (such as HTML and JavaScript, applications of Standard Generalized Markup Language) and rendering (displaying) the web page; the 2D graphics engine is used for 2D graphics drawing, image rendering, compositing, and layer processing; the 3D graphics processing library is used for 3D graphics drawing, image rendering, compositing, and layer processing; the media library is used for inputting different streaming media; and the font library is used for inputting different fonts. The Android runtime is responsible for the scheduling and management of the Android system, specifically including the core libraries and the virtual machine. The core libraries consist of two parts: one part contains the functional functions that Java needs to call, and the other part contains the Android core libraries; the virtual machine is used to run Android applications developed using the Java language.
[0059] The Hardware Abstraction Layer (HAL) is the interface layer located between the operating system kernel and the hardware circuitry. The HAL includes, but is not limited to, the Camera HAL and the Sensor HAL. The Camera HAL processes the image stream, while the Sensor HAL processes sensor data.
[0060] The kernel layer is the layer between hardware and software. The kernel layer may include: a display driver, a fuel gauge driver, a control module, a charging module driver, etc. The fuel gauge driver drives the fuel gauge, the charging module driver drives the charging module, the control module interacts with the fuel gauge driver and the charging module driver to implement the information processing method of this application embodiment, and the display driver drives the display screen. In some embodiments, the control module can also be implemented through a preset thread, which implements the functions of the control module; in some embodiments, this thread can be a BUCK thread.
[0061] The embodiments of this application will be described in detail below with reference to the above-described electronic device structure.
[0062] Among them, such as Figure 4A As shown, the electronic device may include: a first battery BAT1, a first information acquisition circuit, a second information acquisition circuit, a charging module, a first fuel gauge, and a processor; wherein,
[0063] The charging module includes a charging voltage receiver (VBUS), a charging voltage provider (VBAT), and a system voltage provider (VSYS). The charging voltage receiver (VBUS) receives the charging voltage (Vbus), which can be provided by a wired charging interface such as Type-C, or by a power receiving module used for wireless charging in the electronic device; this embodiment is not limited to these methods. The charging voltage provider (VBAT) is coupled to the positive terminal of the first battery (BAT1) and provides the charging voltage to the first battery (BAT1). The system voltage provider (VSYS) provides power to the user circuitry in the electronic device.
[0064] In some embodiments, the charging module includes a charging circuit that provides a charging voltage to the battery based on the charging voltage Vbus received by the charging voltage receiver VBUS. This charging circuit can be implemented, for example, by a BUCK circuit.
[0065] The first information acquisition circuit and the second information acquisition circuit are respectively located in the charging branch of the first battery BAT1.
[0066] The first information acquisition circuit is used to collect the charging current, battery voltage, and real-time battery temperature required for the charging module to determine the battery's full charge condition, and then send the above information to the charging module.
[0067] The second information acquisition circuit is used to acquire the charging current, battery voltage, real-time battery temperature, etc. required by the first fuel gauge, and send the above information to the first fuel gauge.
[0068] The processor can be coupled to the control terminal of the charging module to control the charging module to charge or stop charging the first battery BAT1. In some embodiments, a switch can be provided between the charging voltage receiving terminal VBUS and the charging voltage providing terminal VBAT of the charging module. The processor can send a control signal to the charging module to control the switch to be turned on or off, thereby controlling the charging module to charge or stop charging the first battery BAT1. The switch can be, for example, a MOSFET.
[0069] When the electronic device is connected to an external charger, the charging module can determine whether the battery is fully charged based on the information collected by the first information acquisition circuit, or whether the first battery BAT1 is fully charged. If the battery is fully charged, the module stops charging the first battery BAT1. If the battery is not fully charged, the module stops charging the first battery BAT1.
[0070] The first fuel gauge can measure the charge level of the first battery BAT1 based on information acquired by the second information acquisition circuit. It can also determine whether the full charge condition is met, or in other words, whether the first battery BAT1 is fully charged. When the full charge condition is met by the first fuel gauge, the processor can set the displayed real-time charge level to 100%, effectively reporting a full charge in real-time.
[0071] It should be noted that, in some embodiments, the first information acquisition circuit described above can be integrated into the charging module. In some embodiments, the second information acquisition circuit described above can be integrated into the first fuel gauge.
[0072] In other embodiments, the electronic device may contain two or more batteries. Figure 4B This diagram illustrates a possible implementation structure of an electronic device comprising a first battery BAT1 and a second battery BAT2. Figure 4A The difference is that the charging branch of the second battery BAT2 is connected in parallel with the charging branch of the first battery BAT1, and the electronic device is also equipped with a second fuel gauge corresponding to the second battery BAT2; the charging branch of the second battery BAT2 is equipped with a third information acquisition circuit and a fourth information acquisition circuit, which provide the charging module and the second fuel gauge with relevant information about the second battery, respectively. For details, please refer to the first information acquisition module and the second information acquisition module, which will not be elaborated here.
[0073] The specific functions of the second fuel gauge can be referenced from those of the first fuel gauge, and will not be repeated here. It is understood that the third information acquisition circuit can also be integrated into the charging module, and / or the fourth information acquisition circuit can also be integrated into the second fuel gauge.
[0074] It should be noted that when an electronic device includes two batteries, the device may display only one, for example... Figure 1 The battery icon in the image shows a 100% charge, indicating that both batteries are fully charged. Otherwise, the number displayed on the battery icon can be calculated based on the real-time charge levels of the two batteries using a specific algorithm. When the charging module is charging both batteries, a lightning bolt symbol is displayed on the battery icon. When neither battery is being charged, the lightning bolt symbol is not displayed.
[0075] In other embodiments, the electronic device may also display two similar... Figure 1The battery icons in the system each correspond to one battery and are used to display the real-time battery level and charging status of that battery. For example, if the first battery corresponds to battery icon 1 and the second battery corresponds to icon 2, then when the charging module is charging the first and second batteries, battery icon 1 will display a lightning bolt symbol to indicate that the first battery is being charged. If battery icon 1 does not display a lightning bolt symbol, it means that the first battery is not being charged or that the first battery has finished charging. The number displayed on battery icon 1 represents the percentage of the first battery's charge. Similarly, battery icon 2 will display a lightning bolt symbol to indicate that the second battery is being charged. If battery icon 2 does not display a lightning bolt symbol, it means that the second battery is not being charged or that the second battery has finished charging. The number displayed on battery icon 2 represents the percentage of the second battery's charge.
[0076] In some embodiments, the charging module may be located at Figure 2 The charging management module in the middle. Figure 4A and Figure 4B The processor in can be Figure 2 The processor of an electronic device, such as an AP, or, Figure 4A and Figure 4B Hong's processor can also be a power management controller (PMC).
[0077] In some embodiments, the fuel gauge (e.g., the first fuel gauge and the second fuel gauge) can communicate with the AP through a preset communication interface such as the I2C interface, and / or the charging module can communicate with the AP through a preset communication interface such as the I2C interface.
[0078] Depending on whether the fuel gauge is located on the battery pack side or the system side, fuel gauges in electronic devices can be either built-in or external. An example of an external fuel gauge is... Figure 5A As shown, the fuel gauge samples the port voltage of the battery pack, not the actual voltage of the battery cells. This includes voltage differences across the CHG FET, DSG FET, connectors, wiring, etc., leading to significant deviations in the sampled battery voltage, especially the full-charge voltage. To accurately obtain the true cell voltage, the fuel gauge can be integrated into the battery pack. An example of an integrated fuel gauge solution is... Figure 5B As shown in the diagram. In this scheme, the fuel gauge is directly connected to the battery cell, enabling it to accurately collect the cell voltage, such as the cell's full-charge voltage.
[0079] Regardless of whether it's an external or internal fuel gauge solution, both the fuel gauge and the charging module perform full charge detection. Electronic devices can experience conflict scenarios due to inconsistencies in their full charge determination results, leading to discrepancies between the real-time battery level and the displayed charging status.
[0080] The following is an illustrative description of the battery charging process. Figure 6 As shown, the charging curve of a single battery is a constant current (CC) / constant voltage (CV) curve. During the entire charging process, the charging current cannot exceed the CC current and the charging voltage cannot exceed the CV voltage.
[0081] like Figure 6 As shown, the battery charging process can be divided into four stages: pre-charging, constant current charging, constant voltage charging, and charging termination. For ease of description, constant current will be referred to as constant current and constant voltage as constant voltage in this embodiment.
[0082] Phase 1: Pre-charging
[0083] Pre-charging is used to recharge a fully discharged battery. A fully discharged battery is one whose voltage is below the pre-charge voltage threshold. For example, this pre-charge voltage threshold can be around 2-3V. During the pre-charge phase, a small constant current can be used to charge the battery. For instance, if the pre-charge voltage threshold is set to 3V, then when the battery voltage is below 3V, a maximum constant current of 0.1C is used to charge the battery. C represents the battery capacity.
[0084] Phase 2: Constant Current Charging
[0085] When the battery voltage rises above the pre-charge voltage threshold, the constant current charging stage begins. During this stage, the charging current remains constant while the charging voltage gradually increases. The constant current charging current during this stage is generally greater than the pre-charge current. Optionally, the constant current charging current is between 0.2C and 1.0C.
[0086] It should be noted that the current during constant current charging does not need to be very precise; quasi-constant current is also acceptable.
[0087] Phase 3: Constant Voltage Charging
[0088] When the battery voltage rises to the final battery adjustment voltage, for example, 4.2V, constant current charging ends and constant voltage charging begins. During this stage, the charging voltage remains constant, while the charging current gradually decreases. The final battery adjustment voltage is the voltage threshold set when switching from constant current charging to constant voltage charging; it is generally equal to the battery's maximum voltage.
[0089] Phase 4: Charging terminated
[0090] When the battery charging current decreases below the cutoff current, charging stops and the battery enters the charging termination phase.
[0091] The cutoff current is a threshold value of the charging current set to stop charging the battery. The specific value of the cutoff current is not limited in this embodiment; for example, it can be equal to the charging current during the pre-charging phase (e.g., 0.1C as mentioned above).
[0092] It should be noted that, as Figure 6 As shown, when the battery stops charging, if the charging port is still connected to the charger, the battery will enter the recharging state when the battery voltage drops to the recharging voltage threshold, and re-enter the constant current charging stage to charge the battery again. For details, please refer to the above explanation of the constant current charging stage, which will not be repeated here.
[0093] It should be noted that the above stages may not necessarily occur during each charge. For example, if the battery voltage is greater than or equal to the pre-charge voltage threshold but less than the constant voltage charging threshold when charging begins, the battery will directly enter the constant current charging stage. If the battery voltage is greater than or equal to the constant voltage charging threshold when charging begins, the battery will directly enter the constant voltage charging stage; and so on.
[0094] The information processing method of this application embodiment will be described by way of example below in conjunction with the above description.
[0095] In some embodiments, when the charging module determines that the battery is fully charged, one of the conditions for full charge can be that the charging current of the battery is less than the charging cutoff current set in the charging module; when the fuel gauge determines that the battery is fully charged, one of the conditions for full charge can also be that the charging current of the battery is less than the measurement cutoff current set in the fuel gauge.
[0096] In the information processing method provided in this application embodiment, the measurement cutoff current in the fuel gauge can be set based on the charging cutoff current of the charging module. A specific implementation process is as follows: Figure 7A and Figure 7B As shown.
[0097] exist Figure 7A In this example, an electronic device is equipped with a first battery and a first fuel gauge. Figure 7A As shown, the method may include:
[0098] Step 701: The control module determines the charging cut-off current of the charging module.
[0099] The charging cutoff current here is used by the charging module to determine whether to stop charging the first battery. It is called the charging cutoff current to distinguish it from the cutoff current set in the fuel gauge. In this embodiment, the cutoff current set in the fuel gauge is called the measurement cutoff current, and the cutoff current of the first fuel gauge is called the first measurement cutoff current. Specifically, the charging cutoff current in this step can be the cutoff current in the aforementioned charging termination stage. The measurement cutoff current in this step is used by the first fuel gauge as one of the criteria for determining whether the first battery is fully charged.
[0100] In some embodiments, the charging cut-off current in the charging module can change with the real-time temperature of the battery. Therefore, in this step, the control module can determine the charging cut-off current corresponding to the real-time temperature of the first battery. The real-time temperature of the first battery can be acquired by the first information acquisition circuit and transmitted to the control module; the specific transmission method is not limited in this embodiment.
[0101] In some embodiments, the control module may be provided with a cutoff current configuration table, which contains charging cutoff currents at different temperatures. The control module can obtain the real-time temperature of the first battery and find the charging cutoff current corresponding to the real-time temperature of the first battery from the configuration table, thereby realizing the above-mentioned step of determining the charging cutoff current corresponding to the real-time temperature based on the real-time temperature of the first battery.
[0102] In other embodiments, the determination of the charging cutoff current can also be achieved by the charging module driver, and then the charging module driver sends the result to the control module. The specific determination method can refer to the above implementation of the control module. In this case, step 702 can be omitted.
[0103] Step 702: The control module sends the charging cutoff current to the charging module driver.
[0104] Step 703: The charging module driver sends the charging cutoff current to the charging module, and the charging module sets the charging cutoff current in the charging module according to the received charging cutoff current.
[0105] If the charging module does not have a default initial charging cutoff current, when the charging module receives the charging cutoff current sent by the charging module driver for the first time after startup, it can directly set the charging cutoff current in the charging module; if the charging module has a charging cutoff current set, the received charging cutoff current can be used to update the charging cutoff current in the charging module in this step.
[0106] Step 704: The control module determines the first measurement cutoff current of the first fuel meter.
[0107] In some embodiments, the control module can determine the first measurement cutoff current based on the charging cutoff current. For example, the first measurement cutoff current can be greater than the charging cutoff current. For instance, the charging cutoff current can be added to a preset value to obtain the first measurement cutoff current. For example, the charging cutoff current at room temperature can be set to 150mA, and the preset value can be 50mA, so the first measurement cutoff current can be determined to be 150mA + 50mA = 200mA.
[0108] The aforementioned preset values may or may not change according to temperature; this application embodiment does not impose any restrictions. The specific values for the preset values are not limited in this application embodiment.
[0109] Step 705: The control module sends the first measurement cutoff current to the fuel meter driver.
[0110] Step 706: The fuel meter driver sends the first measurement cutoff current to the first fuel meter, and the first fuel meter sets the measurement cutoff current in the first fuel meter according to the received first measurement cutoff current.
[0111] If the first fuel gauge does not have a default initial measurement cutoff current, when the first fuel gauge receives the first measurement cutoff current sent by the fuel gauge driver for the first time after starting up, the first measurement cutoff current can be directly set into the first fuel gauge as the measurement cutoff current in the first fuel gauge; if the first fuel gauge already has a measurement cutoff current set, the received first measurement cutoff current can be used to update the measurement cutoff current in the charging module in this step.
[0112] The execution order of steps 702-703 and steps 704-706 is not restricted. In other words, there is no restriction on the execution order between the charging cut-off current setting step in the charging module and the measuring cut-off current setting step in the first fuel meter.
[0113] In the information processing method provided in this application embodiment, if the electronic device is equipped with two or more fuel gauges, the control module can determine a corresponding measurement cutoff current for each fuel gauge and set it to each fuel gauge through the fuel gauge driver. The measurement cutoff current corresponding to each fuel gauge can be the same or different. The method by which the control module determines the corresponding measurement cutoff current for each fuel gauge can refer to step 704. The main difference is that the preset value corresponding to each fuel gauge can be the same or different. When the preset values corresponding to two fuel gauges are the same, the measurement cutoff currents of the two fuel gauges are the same; otherwise, they are different.
[0114] like Figure 7B As shown, taking an electronic device with two fuel gauges as an example, this method is similar to... Figure 7AThe difference in the method shown is that steps 704 to 706 are replaced with steps 707 to 710.
[0115] Step 707: The control module determines the first measurement cutoff current of the first fuel meter and the second measurement cutoff current of the second fuel meter.
[0116] The first measurement cutoff current and the second measurement cutoff current may be the same or different, and this application does not impose any restrictions on the embodiments.
[0117] Step 708: The control module sends the first measurement cutoff current of the first fuel gauge and the second measurement cutoff current of the second fuel gauge to the fuel gauge driver.
[0118] Step 709: The fuel gauge driver sends the first measurement cutoff current of the first fuel gauge to the first fuel gauge, and the first fuel gauge updates the measurement cutoff current in the first fuel gauge according to the received first measurement cutoff current.
[0119] Step 710: The fuel meter driver sends the second measurement cutoff current of the second fuel meter to the second fuel meter, and the second fuel meter updates the measurement cutoff current in the second fuel meter according to the received second measurement cutoff current.
[0120] The execution order between steps 709 and 710 is not restricted.
[0121] The execution order of steps 702-703 and steps 707-710 is not restricted.
[0122] pass Figure 7A and Figure 7B The method shown allows for real-time setting of the cutoff current in both the charging module and the fuel gauge. This enables the cutoff current in both components to dynamically change and match the battery's state, improving the accuracy of both the charging module and the fuel gauge in determining whether the battery is fully charged. Furthermore, since the fuel gauge's measurement cutoff current is greater than the charging module's charging cutoff current, it ensures that in most scenarios, the fuel gauge will detect a full charge first, allowing the charging module to stop charging and preventing excessive charging time.
[0123] In the information processing method provided in this application embodiment, if the fuel gauge first determines that the battery is fully charged, in other words, if the fuel gauge first determines that the battery has reached full charge, then the charging module is controlled to stop charging the battery to maintain consistency between the two. The following is a further explanation... Figure 8A and Figure 8B An example is provided.
[0124] Figure 8AIn this example, an electronic device is equipped with a first battery and a first fuel gauge. Figure 8A As shown, the method may include:
[0125] Step 801: The first fuel gauge determines that the battery is fully charged and sets VCT to 1.
[0126] Here, VCT is the Valid Charge Termination flag in the first fuel gauge, used to record whether the battery is fully charged. In other words, it is used to record whether the battery is fully charged. In some embodiments, 0 and 1 can be used to record whether the battery is fully charged. For example, in this embodiment, VCT set to 1 indicates that the battery is fully charged, and VCT set to 0 indicates that the battery is not fully charged.
[0127] The specific implementation of the first fuel gauge determining that the battery is fully charged can be found in the corresponding description in the subsequent embodiments, and will not be repeated here.
[0128] Step 802: The first fuel gauge triggers an interrupt and reports the full charge event of the first battery to the fuel gauge driver.
[0129] It is understandable that the above-mentioned full charge event refers to the first fuel gauge indicating that the battery is fully charged for the first battery.
[0130] It should be noted that the above-mentioned full charge condition of the battery by the first fuel gauge when the interrupt is triggered is one implementation method. The first fuel gauge can also report the full charge event of the first battery to the fuel gauge driver in other ways. This application embodiment does not impose any restrictions.
[0131] Step 803: The fuel gauge driver reports to the control module the battery full charge event of the first battery.
[0132] Step 804: The control module sends the first instruction to the charging module driver.
[0133] The first indicator is used to instruct the charging module to drive and control the charging module to stop charging the first battery.
[0134] In some embodiments, after receiving the first instruction, the charging module driver can record the charging status of the charging module as "done" in the charging module driver to facilitate charging management of the charging module.
[0135] Step 805: The charger driver sends a first control signal to the charging module. The first control signal is used to control the charging module to stop charging the first battery.
[0136] Correspondingly, in response to the first control signal, the charging module can stop charging the first battery. After the charging module stops charging the first battery, the lightning bolt icon displayed on the electronic device to indicate that the first battery is charging can stop being displayed, thereby prompting the user that the charging of the first battery is complete.
[0137] In some embodiments, if a switch can be provided between the charging voltage receiving terminal VBUS and the charging voltage providing terminal VBAT of the charging module, the first control signal sent by the charger driver to the charging module can specifically be a disconnection control signal of the switch, thereby disconnecting the line between the charging voltage receiving terminal VBUS and the charging voltage providing terminal VBAT by disconnecting the switch, so as to control the charging module to stop charging the first battery.
[0138] pass Figure 8A The method described above ensures consistency between the first fuel gauge and the charging module in determining whether the battery is fully charged. This resolves the conflict between the fuel gauge's assessment of full charge and the charging module's continued charging, which can lead to state and display conflicts. Specifically, after the first fuel gauge determines that the battery is fully charged, the electronic device can display the battery level as 100%. Furthermore, once the charging module stops charging the battery, the electronic device can stop displaying the lightning bolt icon, thus maintaining consistency between the battery level report and the charging status. Moreover, controlling the charger to stop charging the battery can also shorten the charging time of the charging module.
[0139] In the information processing method provided in this application embodiment, two or more power meters are set in the electronic device. If the first power meter first determines that the battery is fully charged, in other words, the first power meter first determines that the battery is fully charged, then the charging module is controlled to stop charging the first battery, and the other power meters are forced to set the corresponding battery to fully charged, so as to maintain the consistency of the power meter and the charging module in determining the battery is fully charged.
[0140] like Figure 8B As shown, taking an electronic device including a first battery, a first fuel gauge corresponding to the first battery, a second battery, and a second fuel gauge corresponding to the second battery as an example, the method is similar to... Figure 8A The difference in the method shown is that in step 805, the first control signal is also used to control the charging module to stop charging the second battery. In addition, this implementation method also includes the following steps 806 to 807.
[0141] Step 806: The fuel gauge driver sends a forced full charge instruction to the second fuel gauge. The forced full charge instruction is used to instruct the second fuel gauge to set the power of the second battery to full charge.
[0142] Step 807: The second fuel gauge sets VCT to 1 and sets the second battery to full charge.
[0143] Specifically, the second fuel gauge can set the battery percentage of the second battery to 100% to indicate that the second battery is fully charged. For details on the implementation, please refer to the corresponding description in the subsequent embodiments; it will not be repeated here.
[0144] When the second battery is set to full charge by the second fuel gauge, if the electronic device displays the real-time charge level of the second battery, the real-time charge level of the second battery can be displayed as 100%.
[0145] pass Figure 8B The method described above ensures consistency in battery charge determination between the fuel gauge and the charging module when the first fuel gauge determines that the first battery is fully charged. This resolves the conflict between the fuel gauge's determination of full charge and the charging module's continued charging, which can lead to state and display conflicts. Specifically, after the first fuel gauge determines that the battery is fully charged, the electronic device can display the battery level as 100%. Furthermore, after controlling the second fuel gauge to set the second battery level to full charge, if the electronic device displays the levels of both batteries, it can also display the second battery level as 100%. Once the charging module stops charging the first battery, the electronic device can stop displaying the lightning bolt icon, thus maintaining consistency between the battery level report and the charging status. Moreover, controlling the charger to stop charging the battery can shorten the charging time of the charging module.
[0146] In the information processing method provided in this application embodiment, if the charging module first determines that the battery is fully charged, in other words, the charging module first determines that the battery is fully charged and stops charging the first battery, then the electronic device forces the fuel gauge to set the corresponding battery's charge level to fully charged, so as to maintain the consistency between the fuel gauge and the charging module's determination of the battery's fully charged state. The following is a further explanation... Figure 9A and Figure 9B An example is provided.
[0147] Figure 9A In this example, an electronic device is equipped with a first battery and a first fuel gauge. Figure 9A As shown, the method may include:
[0148] Step 901: The charging module detects that the first battery is fully charged.
[0149] When the charging module detects that the battery is fully charged, it can stop charging the first battery. In some embodiments, a switch can be provided between the charging voltage receiving terminal VBUS and the charging voltage providing terminal VBAT of the charging module. The charging module can control this switch to open, thereby stopping the charging of the first battery. At this time, the lightning bolt icon used to indicate that the first battery is charging can be stopped in the interface of the electronic device to prompt the user that the charging of the first battery is complete and charging of the first battery has stopped.
[0150] Step 902: The charging module sends a charging cutoff notification 1 to the charging module driver, and the charging module driver sends a charging cutoff notification 2 to the control module.
[0151] Charging cutoff notification 1 is used to notify the charging module driver that the charging module has detected that the battery is fully charged. In other words, charging cutoff notification 1 is used to notify the charging module driver to stop charging the first battery, or to say that the charging module has stopped charging.
[0152] Charging cutoff notification 2 is used to notify the control module that the charging module has detected that the battery is fully charged. In other words, charging cutoff notification 1 is used to notify the control module that the charging module stops charging the first battery, or that the charging module has stopped charging.
[0153] The implementation forms of charging cutoff notification 1 and charging cutoff notification 2 can be the same or different.
[0154] Step 903: The control module determines whether the first fuel gauge is in a fully charged state.
[0155] Whether the first fuel gauge is in a fully charged state refers to whether the first fuel gauge detects that the first battery has reached a full charge, or in other words, whether the first fuel gauge meets the conditions for a full charge of the first battery. A fully charged state means that the first fuel gauge detects that the first battery has not reached a full charge, and a partially charged state means that the first fuel gauge detects that the first battery has reached a full charge.
[0156] Specifically, the control module can query the fuel gauge driver to see if the first fuel gauge is in a fully charged state. The fuel gauge driver queries the VCT of the first fuel gauge. The first fuel gauge sends its own VCT setting information to the fuel gauge driver. The fuel gauge driver then sends feedback to the control module to see if the first fuel gauge is in a fully charged state.
[0157] The VCT setting information of the first fuel gauge can be 0 or 1, and the first fuel gauge can send this information to the fuel gauge driver.
[0158] In some embodiments, the fuel gauge driver may also send the received VCT setting information to the control module to provide feedback to the control module on whether the first fuel gauge is in a fully charged state.
[0159] Step 904: The control module determines that the first fuel gauge is not fully charged.
[0160] Specifically, the control module can determine whether the first fuel gauge is fully charged based on the information from the fuel gauge driver feedback regarding whether the first fuel gauge is in a fully charged state. Taking the fuel gauge driver feedback of VCT setting information as an example, if the feedback is 1, it is determined that the first fuel gauge is fully charged; if the feedback is 0, it is determined that the first fuel gauge is not fully charged. When the control module determines that the first fuel gauge is fully charged, no other processing needs to be performed. Steps 804 to 807 of this embodiment illustrate the situation where the control module determines that the first fuel gauge is fully charged.
[0161] Step 905: The control module sends a second instruction to the fuel gauge driver.
[0162] The second indicator is used to instruct the fuel gauge drive to control the first fuel gauge to set the first battery to full charge.
[0163] Step 906: The fuel gauge driver sends a third instruction to the first fuel gauge.
[0164] The third instruction is used to instruct the first fuel gauge to set the first battery to full charge. In other words, the third instruction can force the first fuel gauge to set the first battery to full charge.
[0165] Step 907: The first fuel gauge sets VCT to 1, and sets the first battery to full charge.
[0166] Specifically, the first fuel gauge can set the battery percentage of the first battery to 100% to indicate that the first battery is fully charged. For details on the implementation, please refer to the corresponding description in the subsequent embodiments; it will not be repeated here.
[0167] When the first battery gauge sets the first battery to full charge, the real-time battery level displayed on the electronic device's interface can be updated to 100% to remind the user that the first battery is fully charged.
[0168] pass Figure 9AThe method described above can force the first fuel gauge to update the battery level to full charge when the charging module determines that the first battery has reached full charge. This ensures consistency between the fuel gauge and the charging module in determining whether the battery is fully charged, resolving the state and display conflicts that arise when the fuel gauge determines the battery is not fully charged while the charging module determines it is fully charged and stops charging. This improves the user experience. Specifically, when the charging module determines that the first battery has reached full charge, the electronic device can stop displaying the lightning bolt icon indicating that charging is in progress. After setting the battery level on the first fuel gauge to full charge, the real-time battery level display will show 100%, thus maintaining consistency between the reported full battery level and the actual charging status.
[0169] In the information processing method provided in this application embodiment, if the charging module first determines that the battery is fully charged, in other words, the charging module first determines that the battery is fully charged and stops charging the battery, then the electronic device forces each fuel gauge to set the corresponding battery's charge level to full charge, so as to maintain the consistency between the fuel gauge and the charging module in judging the battery's full charge status.
[0170] like Figure 9B As shown, taking an electronic device including a first battery, a first fuel gauge corresponding to the first battery, a second battery, and a second fuel gauge corresponding to the second battery as an example, the method is similar to... Figure 9A The difference in the method shown is that it also includes the following steps 908 to 909.
[0171] Step 908: The fuel gauge driver sends a forced full charge instruction to the second fuel gauge. The forced full charge instruction is used to instruct the second fuel gauge to set the power of the second battery to full charge.
[0172] It should be noted that the forced full charge instruction may be the same as or different from the third instruction mentioned above, and this application embodiment does not impose any restrictions.
[0173] Step 909: The second fuel gauge sets VCT to 1 and sets the second battery to full charge.
[0174] Specifically, the second fuel gauge can set the battery percentage of the second battery to 100% to indicate that the second battery is fully charged. For details on the implementation, please refer to the corresponding description in the subsequent embodiments; it will not be repeated here.
[0175] When the second battery is set to full charge by the second fuel gauge, if the electronic device displays the real-time charge level of the second battery, the real-time charge level of the second battery can be displayed as 100%.
[0176] It should be noted that, in this embodiment, since the electronic device includes a first battery and a second battery, in other embodiments, step 901 can be changed to: the charging module detects that the full charge condition of the first battery and / or the second battery is met. Accordingly, when the charging module detects that the full charge condition of the first battery and / or the second battery is met, it can stop charging the second battery in addition to stopping charging the first battery. The full charge conditions of the first battery and the second battery can be the same or different. In this embodiment, step 902 can also be executed when the full charge condition of one battery is met, or when the full charge conditions of both batteries are met. The specific choice can be flexibly made in practical applications, and this embodiment does not impose any limitations.
[0177] pass Figure 9B The method shown can force the fuel gauge to update the corresponding battery status to fully charged when the charging module determines that the battery has reached full charge. This ensures consistency between the fuel gauge and the charging module in determining whether the battery is fully charged, resolving the status and display conflicts that arise when the fuel gauge determines the battery is not fully charged while the charging module determines it is fully charged and stops charging. This improves the user experience. Specifically, when the charging module determines that the battery has reached full charge, the electronic device can stop displaying the lightning bolt icon indicating that charging is in progress. After setting the battery levels of the two fuel gauges to full charge, the real-time battery level display shows 100%, thus maintaining consistency between the reported full battery level and the actual charging status.
[0178] Figure 10 This is another flowchart illustrating the information processing method provided in this application embodiment, demonstrating the battery full-charge measurement process in a fuel gauge. The fuel gauge can be, for example, the first fuel gauge or the second fuel gauge described above. Figure 10 As shown, the method may include:
[0179] Step 1001: Trigger the full charge measurement of the corresponding battery by the fuel gauge.
[0180] In some embodiments, the fuel gauge can trigger a full charge measurement according to a preset cycle, for example, the cycle can be 1 second. When the fuel gauge is the first fuel gauge mentioned above, its corresponding battery can be a first battery; when the fuel gauge is the second fuel gauge mentioned above, its corresponding battery can be a second battery.
[0181] Step 1002: Determine whether the battery charging current and battery voltage meet the full charge conditions respectively. If both meet the full charge conditions, proceed to step 1003; otherwise, exit the full charge measurement.
[0182] It should be noted that when exiting the full charge measurement, the number of full charge measurements can be set to 0.
[0183] Specifically, in this step, it can be determined whether the current is less than the cutoff current. If the current is less than the cutoff current, the current meets the full charge condition; otherwise, the full charge condition is not met.
[0184] Specifically, in this step, it can be determined whether the voltage is greater than the cutoff voltage. If the voltage is greater than the cutoff voltage, the voltage meets the full charge condition; otherwise, the full charge condition is not met.
[0185] It should be noted that the specific values of the cutoff current and cutoff voltage mentioned above are not limited in the embodiments of this application.
[0186] Step 1003: Increase the number of full charge measurement counts by 1.
[0187] With a period of 1 second, the number of times the battery is fully charged can be measured using a timer.
[0188] Step 1004: Determine if the number of full charge measurements is less than the first value. If yes, exit the full charge measurement. If no, proceed to step 1005.
[0189] Step 1005: Determine if the number of full charge measurements is less than the second value. If yes, proceed to step 1006; otherwise, proceed to step 1007.
[0190] The second value is greater than the first value. For example, the first value could be 40, and the second value could be 80.
[0191] Step 1006: Update charging capacity and exit full charge measurement.
[0192] Specifically, since the full charge measurement cycle is 1 second, the updated charging capacity can be calculated using the formula: New charging capacity = Old charging capacity + Current.
[0193] Step 1007: Determine if the number of full charge measurements is greater than or equal to the second value. If yes, proceed to step 1008; otherwise, exit the full charge measurement.
[0194] Step 1008: Determine whether the charging capacity is greater than the preset charging capacity threshold. If yes, proceed to step 1009; otherwise, exit the full charge measurement.
[0195] The specific value of the charging capacity threshold can be determined with reference to relevant technologies, and this application does not impose any restrictions.
[0196] Step 1009: The fuel gauge determines that the full charge condition has been met, that is, the battery has reached full charge, and sets VCT in the fuel gauge to 1.
[0197] visible, Figure 10In the full charge measurement process of the fuel gauge shown, the full charge condition of the battery corresponding to the fuel gauge is determined to be met when the following four conditions are met, in other words, the battery is in a fully charged state:
[0198] The current and voltage meet the full charge conditions respectively, the number of full charge measurements is not less than the preset second value, and the battery's charging capacity is greater than the preset charging capacity threshold.
[0199] To achieve forced full charging of the battery as indicated by the fuel gauge, in one embodiment, the fuel gauge may be equipped with a charger-set full charge flag to record whether the battery full charge condition of the charging module is met. Furthermore, the fuel gauge may periodically execute a forced full charge process. This fuel gauge may be, for example, a first fuel gauge or a second fuel gauge.
[0200] In this embodiment, after the fuel gauge receives the forced full charge instruction sent by the fuel gauge driver, the BUCKVCT value in the fuel gauge can be set to 1. BUCKVCT is used to indicate the charger's valid charge termination flag in the fuel gauge, and is used to record whether the battery full charge condition of the charging module is met. It should be noted that the reason for calling it BUCKVCT here is that charging modules often use BUCK circuits, but this embodiment does not limit the specific circuit structure of the charging module. In some embodiments, the full charge condition of the charging module can be recorded using 0 and 1 respectively. For example, in this embodiment, setting BUCKVCT to 1 indicates that the battery full charge condition of the charging module is met, and setting BUCKVCT to 0 indicates that the battery full charge condition of the charging module is not met. After BUCKVCT is set to 1, the fuel gauge can force the battery level in the fuel gauge to be fully charged through a periodically executed forced full charge process.
[0201] Figure 11 This is a schematic diagram of the forced full charge process of the fuel meter provided in the embodiments of this application, as shown below. Figure 11 As shown, the method may include:
[0202] Step 1101: Trigger forced full charge detection.
[0203] In some embodiments, the fuel gauge may trigger a forced full charge detection at a preset period, for example, the period may be 1 second.
[0204] Step 1102: The fuel gauge checks if BUCKVCT is set to 1. If it is, proceed to step 1103; otherwise, exit the forced full charge detection.
[0205] Through this step, when BUCKVCT is not set to 1, the forced full charge process can end in this step and be triggered again in the next cycle.
[0206] Step 1103: The fuel gauge checks if VCT is set to 1. If not, proceed to step 1104; otherwise, exit the forced full charge test.
[0207] Determining whether VCT is set to 1 can confirm whether the fuel gauge has detected that the battery is fully charged. If it is set to 1, it means that the fuel gauge has detected that the battery is fully charged, so there is no need to continue the forced full charge process.
[0208] Step 1104: The fuel gauge determines whether the battery voltage is greater than the preset voltage threshold. If yes, proceed to step 1105; otherwise, exit the forced full charge detection.
[0209] It should be noted that when the fuel gauge is built-in, the battery voltage can be the cell voltage. When the fuel gauge is external, it can be the battery voltage output by the battery pack or the cell voltage, depending on whether the voltage collected by the fuel gauge is the cell voltage or the battery voltage output by the battery pack.
[0210] Step 1105: Set the fuel gauge VCT to 1 and BUCKVCT to 0, perform a remaining capacity (RM or RC) simulation, calculate the battery's relative state of charge (RSOC), and update RSOC to 100% if RSOC is not 100%.
[0211] The implementation of RM simulation can refer to relevant technologies, and the embodiments in this application are not limited thereto.
[0212] Fuel meters typically need to calculate the battery's RM, full charge capacity (FCC), and RSOC. The relationship between these three is shown in the following formula: RSOC = RM / FCC.
[0213] In some embodiments, in addition to updating RSOC to 100%, the fuel gauge can also update RM to be the same as FCC, so as to keep the relationship between RM, FCC and RSOC satisfying the above formula, and enable the fuel gauge to more accurately measure the real-time battery power in the future.
[0214] In this step, even if RSOC is not 100%, RM can be updated to be the same as FCC, thereby forcing RSOC to be updated to 100%, ensuring that the battery in the fuel gauge is in a fully charged state, consistent with the fully charged state of the battery in the charging module.
[0215] This application also provides an electronic device, including a processor and a memory, wherein the processor is used to execute the method provided in this application.
[0216] This application also provides a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to execute the method provided in this application.
[0217] This application also provides a computer program product, which includes a computer program that, when run on a computer, causes the computer to perform the method provided in this application.
[0218] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, A and B simultaneously, or B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.
[0219] Those skilled in the art will recognize that the units and algorithm steps described in the embodiments disclosed herein can be implemented using electronic hardware, computer software, or a combination of electronic hardware and software. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0220] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0221] In the several embodiments provided in this application, any function, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0222] The above description is merely a specific embodiment of this application. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application. The protection scope of this application should be determined by the protection scope of the claims.
Claims
1. An information processing method, characterized in that, The method is applied to an electronic device, the electronic device including a first battery, a charging module, and a first fuel gauge, wherein the charging module is used to charge the first battery, and the first fuel gauge is used to measure the charge level of the first battery; the method includes: When the first fuel gauge detects that the first battery is fully charged, the charging module is controlled to stop charging the first battery; and / or, When the charging module detects that the first battery is fully charged, it controls the first fuel gauge to set the battery level to full charge.
2. The method according to claim 1, characterized in that, The electronic device further includes: a second battery and a second fuel gauge, and the method further includes: When the first fuel gauge detects that the first battery is fully charged, it controls the second fuel gauge to set the second battery to fully charged.
3. The method according to claim 1, characterized in that, The electronic device further includes: a second battery and a second fuel gauge, and the method further includes: When the charging module detects that the first battery is fully charged, it controls the second fuel gauge to set the power of the second battery to full charge.
4. The method according to any one of claims 1 to 3, characterized in that, Also includes: The first measurement cutoff current in the first fuel meter is set according to the charging cutoff current of the charging module; The first measured cutoff current is greater than the charging cutoff current.
5. The method according to claim 4, characterized in that, Setting the first measurement cutoff current in the first fuel meter according to the charging cutoff current of the charging module includes: The charging cutoff current corresponding to the real-time temperature is obtained based on the real-time temperature of the first battery. Set the charging cutoff current corresponding to the real-time temperature as the charging cutoff current of the charging module. The first measured cutoff current is determined based on the charging cutoff current corresponding to the real-time temperature, and the first measured cutoff current is greater than the charging cutoff current corresponding to the real-time temperature. The determined first measurement cutoff current is set into the first fuel meter.
6. The method according to claim 4, characterized in that, The electronic device includes a second battery timer, and the method further includes: The second measurement cutoff current in the second fuel gauge is set according to the charging cutoff current of the charging module; the second measurement cutoff current is greater than the charging cutoff current.
7. The method according to any one of claims 1 to 3, characterized in that, When the charging module detects that the first battery is fully charged, it controls the first fuel gauge to set the first battery's charge level to full charge, including: When the charging module detects that the first battery is fully charged, and determines that the first fuel gauge has not detected that the first battery is fully charged, the first fuel gauge is controlled to set the first battery to full charge.
8. The method according to any one of claims 1 to 3, characterized in that, The control of the charging module to stop charging the first battery includes: Send a first instruction to the charging module driver, the charging module driver being used to drive the charging module, the first instruction being used to instruct the charging module driver to control the charging module to stop charging the first battery; The charging module driver sends a first control signal to the charging module, the first control signal being used to control the charging module to stop charging the first battery.
9. The method according to any one of claims 1 to 3, characterized in that, The first fuel gauge detects that the first battery is fully charged, including: The charging current of the first battery is detected to be less than the first measurement cutoff current of the first fuel gauge; and, The voltage of the first battery is detected to be greater than a preset first voltage threshold; and, The charging capacity of the first battery is detected to be not less than a preset charging capacity threshold.
10. The method according to any one of claims 1 to 3, characterized in that, The step of controlling the first fuel gauge to set the first battery to full charge includes: Send a second instruction to the fuel gauge driver, the second instruction being used to instruct the fuel gauge driver to control the first fuel gauge to set the first battery to full charge; The fuel gauge driver sends a third instruction to the first fuel gauge, the third instruction being used to instruct the first fuel gauge to set the first battery to full charge; The first fuel gauge sets the first battery to full charge.
11. The method according to claim 10, characterized in that, The first fuel gauge sets the first battery to full charge, including: In response to the received third instruction, the first fuel gauge sets the charger full charge flag to a first value, which indicates that the charging module has detected that the first battery is fully charged. When the forced full charge detection time of the first fuel gauge is reached, the charger is determined to be fully charged with a first value, and the voltage of the first battery is greater than a preset second voltage threshold. The percentage of the first battery's charge is then set to full charge.
12. An electronic device, characterized in that, include: Processor, memory; One or more computer programs are stored in the memory, the one or more computer programs including instructions that, when executed by the processor, cause the electronic device to perform the method of any one of claims 1 to 11.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to perform the method described in any one of claims 1 to 11.
14. A computer program product, characterized in that, The computer program product includes a computer program that, when run on a computer, causes the computer to perform the method described in any one of claims 1 to 11.