Charging and discharging method, device, chip and readable storage medium
By real-time detection of dual-battery voltage and control of battery connection and disconnection, the problems of overcharging and capacity loss in dual-battery electronic devices are solved, achieving uniform charging and stable power supply.
Patent Information
- Application Number
- CN202410868517.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-02
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2043-08-02
AI Technical Summary
In dual-battery electronic devices, how can we avoid overcharging or capacity loss of the batteries and ensure that both batteries are fully charged evenly to improve device performance?
By monitoring the voltage status of the dual batteries in real time, the charging and discharging circuit of one battery is disconnected when it is fully charged, and the other battery continues to be charged until all batteries are fully charged. The connection and disconnection of the batteries are controlled by the SW pin, avoiding the need to add an additional equalization circuit.
It achieves uniform charging of dual batteries, avoiding overcharging and capacity loss, reducing costs, and ensuring stable operation of the device in high-energy-consumption applications.
Smart Images

Figure CN119448474B_ABST
Abstract
Description
[0001] This application is a divisional application. The original application has the application number 2023109644408 and the original application date is August 2, 2023. The entire contents of the original application are incorporated herein by reference. Technical Field
[0002] This application relates to the field of battery technology, and in particular to a charging and discharging method, apparatus, chip, and readable storage medium. Background Technology
[0003] Currently, with the continuous development of terminal technology, the forms of electronic devices such as mobile phones are becoming increasingly diverse. Taking mobile phones as an example, they can be divided into single-screen phones and foldable screen phones. Foldable screen phones typically have dual batteries (i.e., two batteries). During user operation, these dual batteries provide power to the phone, and the amount of power they can hold directly affects performance aspects such as standby time. Therefore, how to ensure that both batteries reach their rated capacity, i.e., achieve a full charge, to improve the phone's performance is a technical problem that needs to be solved. Summary of the Invention
[0004] To address the aforementioned issues, embodiments of this application provide a charging and discharging method, apparatus, chip, and readable storage medium. This method stops charging one battery of an electronic device after it is fully charged, and continues charging the remaining battery that is not fully charged. This achieves full charging of the battery, avoids overcharging or capacity loss, and improves the performance of the mobile phone.
[0005] In a first aspect, this application provides a charging and discharging method, the method comprising: detecting that a battery module is in a charging state, the battery module comprising a plurality of batteries; detecting that the voltage of a first battery among the plurality of batteries of the battery module reaches a first full charge voltage of the first battery, and the voltage of a second battery among the plurality of batteries does not reach a second full charge voltage of the second battery, disconnecting the charging and discharging circuit of the first battery, and keeping the charging and discharging circuit of the second battery in a connected state.
[0006] For example, the charging and discharging method provided in this application can be applied to an electronic device, and the electronic device can be a foldable screen device. In this case, the electronic device includes two body parts, which can be folded along the folding axis of the electronic device. This situation can be described as follows... Figure 1A As shown, Figure 1A The first unit 101 and the second unit 102 are the two parts of the electronic equipment. This can be understood as... Figure 1A Battery 1 refers to the first battery, and battery 2 refers to the second battery. Furthermore, Figure 1AThe application also includes a charging module, meaning that the electronic device in this application may also include a charging module that can charge the multiple batteries included in the electronic device.
[0007] In the case of a foldable screen device, the first battery is typically located in either of the two main components of the device, along with the charging module. For example... Figure 1A As shown, the first battery (battery 1) and the charging module are both located in the first body 101. This layout makes the circuit between the first battery and the charging module shorter than the circuit between the second battery and the charging module, resulting in a lower first charging impedance between the first battery and the charging module compared to the second charging impedance between the second battery and the charging module. Under the same voltage, the charging current of the first battery is greater than that of the second battery, meaning the first battery charges faster. Therefore, the first battery may be fully charged before the second battery; that is, when the first battery reaches its first full-charge voltage, the second battery has not yet reached its second full-charge voltage.
[0008] When the first battery is fully charged but the second battery is not, charging of the first battery is stopped by disconnecting its charging and discharging circuit, while charging of the incomplete second battery continues. This method can fully charge multiple batteries in an electronic device, avoiding overcharging of the first battery that is already fully charged due to continuous charging of multiple batteries until all batteries are fully charged, and also avoiding capacity loss of the incomplete batteries caused by stopping charging of all batteries after one battery is fully charged.
[0009] In one possible implementation of the first aspect described above, the method further includes setting the voltage of the switch control SW pin on the first battery to a first voltage, thereby disconnecting the first battery from the charging and discharging circuit of the first battery.
[0010] In this application, the SW pin is a pin set on the battery protection board during the battery production line testing process. After production line testing, this pin can be retained on the battery protection board so that during battery charging, the connection or disconnection of the first battery in the charging and discharging circuit can be controlled based on this pin according to the method provided in this application. If a first voltage is applied to the SW pin on the first battery, the SW pin will disconnect, which can also be understood as removing the first battery from the charging and discharging circuit, and the first battery can no longer perform charging and discharging operations. The first voltage can be a high level, for example, the first voltage can be 1.8V mentioned later.
[0011] In one possible implementation of the first aspect described above, the method further includes: detecting that the voltage of the second battery has reached the second full-charge voltage of the second battery, reconnecting the first battery to the charging and discharging circuit of the first battery, and stopping charging the first battery and the second battery.
[0012] If the voltage of the second battery reaches the second full charge voltage, it means that the second battery is fully charged. At this time, the first battery needs to be reconnected to the charging and discharging circuit, and the first and second batteries should no longer be charged. In this way, the first and second batteries can discharge simultaneously to power the electronic device.
[0013] In one possible implementation of the first aspect described above, the method further includes: setting the voltage of the switch control SW pin on the first battery to a second voltage, such that when the first battery is reconnected to the charging and discharging circuit of the first battery, the second voltage is less than the first voltage.
[0014] If a second voltage is applied to the SW pin, the SW pin will conduct, thus reconnecting the second battery to the charging and discharging circuit, allowing the second battery to perform subsequent charging and discharging operations. This second voltage can be a low level; for example, it could be 0V, as mentioned later.
[0015] In one possible implementation of the first aspect above, the method further includes: detecting that the second battery is in a discharging state; detecting that the voltage of the second battery is less than a voltage threshold and the first battery is not connected to the charging and discharging circuit of the first battery; setting the voltage of the switch control SW pin on the first battery to a second voltage, so that the first battery is connected to the charging and discharging circuit of the first battery.
[0016] When the second battery is discharging and the first battery is not connected to the charging / discharging circuit (i.e., the first battery is not discharging), if the voltage of the second battery is detected to be lower than the voltage threshold, it indicates that the discharge of the second battery is insufficient to support the high-power-consumption applications of the electronic device, and the electronic device may experience stuttering, screen flickering, or other issues. Therefore, to avoid this situation, it is necessary to force the first battery to be connected by setting the voltage of the SW pin of the first battery to the second voltage (e.g., 0V).
[0017] Secondly, this application provides an electronic device comprising: a charging module, a battery module, a detection module, and a control module. The battery module includes multiple batteries. The charging module is used to charge the battery module. The detection module is used to detect the voltage of each battery in the battery module when the battery module is charging. The control module is used to: disconnect the charging and discharging circuit of the first battery and keep the charging and discharging circuit of the second battery connected when the voltage of the first battery among the multiple batteries in the battery module reaches the first full charge voltage of the first battery and the voltage of the second battery among the multiple batteries does not reach the second full charge voltage of the second battery.
[0018] In one possible implementation of the second aspect described above, the electronic device includes two body parts that are foldable along the folding axis of the electronic device; the first battery and the charging module are both located in either body part.
[0019] This situation can still be discussed later. Figure 1A As shown, this will not be repeated here, and as... Figure 1A The circuit between the first battery and the charging module is shorter than that between the second battery and the charging module, which results in the first charging impedance between the first battery and the charging module being less than the second charging impedance between the second battery and the charging module. As a result, the first battery may be fully charged before the second battery.
[0020] In one possible implementation of the second aspect above, the control module is further configured to: set the voltage of the switch control SW pin on the first battery to a second voltage when the voltage of the second battery in the discharge state is less than a voltage threshold and the first battery is not connected to the charging and discharging circuit of the first battery, so that the first battery is connected to the charging and discharging circuit of the first battery.
[0021] The second voltage can be 0V.
[0022] In one possible implementation of the second aspect described above, the charging and discharging circuit of the first battery further includes a switch located on the first battery; and the control module is further configured to set the voltage of the switch on the first battery to a first voltage, thereby disconnecting the first battery from the charging and discharging circuit of the first battery.
[0023] It can be understood that the switch here refers to the SW pin mentioned in the first aspect above, that is, the SW pin can act as a switch.
[0024] In one possible implementation of the second aspect described above, the control module is further configured to reconnect the first battery to the charging and discharging circuit of the first battery and stop charging the first battery and the second battery when the voltage of the second battery reaches the second full charge voltage of the second battery.
[0025] In one possible implementation of the second aspect described above, the control module further includes a first resistor, a second resistor, a third resistor, a fourth resistor, a first field-effect transistor, and a general purpose input / output (GPIO) port; one end of the first resistor is connected to the output terminal of the second battery, the drain of the first field-effect transistor, and one end of the third resistor, and the other end of the first resistor is connected to one end of the second resistor; the other end of the third resistor is connected to the GPIO port and one end of the fourth resistor; one end of the fourth resistor is connected to the GPIO port, and the other end is connected to a switch on the first battery; the gate of the first field-effect transistor is connected to the other end of the first resistor and one end of the second resistor; the other end of the second resistor, the source of the first field-effect transistor, and the output terminal of the second battery are grounded.
[0026] The first resistor corresponds to the following text. Figure 4 The first resistor is R1; the second resistor is R2; the third resistor is R3; the fourth resistor is R4; and the first field-effect transistor is a MOSFET.
[0027] In one possible implementation of the second aspect described above, the control module further includes a signal processing unit, which is configured to, when the voltage of the first battery reaches a first full-charge voltage, provide a first signal to the GPIO to disconnect the first battery from the charging and discharging circuit of the first battery; and, when the voltage of the second battery reaches a second full-charge voltage, provide a second signal to the GPIO to reconnect the first battery to the charging and discharging circuit of the first battery.
[0028] It is understood that the first signal is used to pull the GPIO voltage high; for example, the GPIO voltage can be set to 1.8V. Since the resistance of the fourth resistor is small, it ensures that the voltage on the SW pin of the first battery remains high, thus disconnecting the first battery from the charging / discharging circuit. The second signal is used to pull the GPIO voltage low; for example, the GPIO voltage can be set to 0V. When the first battery is disconnected from the circuit, the GPIO voltage is 0V, and the voltage on the SW pin of the first battery is also 0V, allowing the first battery to be reconnected to the charging / discharging circuit.
[0029] Thirdly, this application provides an electronic device, including: one or more processors; one or more memories; the one or more memories storing one or more programs, which, when executed by one or more processors, cause the electronic device to perform the first aspect and any possible charging and discharging method of the first aspect.
[0030] Fourthly, this application provides a chip for detecting that a battery module is in a charging state. When the voltage of the first battery among the multiple batteries in the battery module reaches the first full charge voltage of the first battery, and the voltage of the second battery among the multiple batteries does not reach the second full charge voltage of the second battery, the chip controls the charging and discharging circuit of the first battery to be disconnected, and keeps the charging and discharging circuit of the second battery in a connected state.
[0031] Fifthly, this application provides an electronic device, including a battery module and a chip as described in the fourth aspect.
[0032] In a sixth aspect, this application provides a computer-readable storage medium having instructions stored thereon that, when executed on a computer, cause the computer to perform the first aspect and any possible charging and discharging method of the first aspect.
[0033] In a seventh aspect, this application also provides a computer program product, comprising: execution instructions stored in a readable storage medium, wherein at least one processor of an electronic device can read the execution instructions from the readable storage medium, and the at least one processor executes the execution instructions to cause the electronic device to implement the first aspect and any possible charging and discharging method of the first aspect. Attached Figure Description
[0034] Figure 1A According to some embodiments of this application, a schematic diagram showing the positional relationship between dual batteries and a charging module inside a foldable screen phone is provided.
[0035] Figure 1B According to some embodiments of this application, a schematic diagram of setting an equalization circuit between the charging module and the battery 1 is shown;
[0036] Figure 2 According to some embodiments of this application, a schematic flowchart of a charging and discharging method is shown;
[0037] Figure 3 According to some embodiments of this application, a schematic diagram of the structure of a charging and discharging circuit included in an electronic device is shown;
[0038] Figure 4 According to some embodiments of this application, a circuit diagram is shown for forcibly connecting battery 1 during battery discharge;
[0039] Figure 5 According to some embodiments of this application, a schematic diagram of the structure of an electronic device is shown. Detailed Implementation
[0040] The illustrative embodiments of this application include, but are not limited to, battery charging and discharging methods, devices, chips, and readable storage media.
[0041] The following section will first explain the proper nouns used in the embodiments of this application.
[0042] Batteries typically consist of a battery protection board and battery cells, which are connected via board-to-board connectors (BTB). Taking mobile phones as an example, the batteries currently used in mobile phones are usually lithium-ion batteries.
[0043] Impedance: In a circuit with resistance, inductance, and capacitance, the opposition to the flow of current in the circuit is called impedance. Impedance is commonly represented by Z, is a complex number, and its unit is ohms.
[0044] The full-charge voltage of a battery: This is the maximum voltage that a battery can be charged to, and can also be understood as the voltage of the battery when it is fully charged. Taking a lithium battery as an example, the maximum voltage limit (full-charge voltage) of a lithium battery is usually 4.2V. If the voltage of a lithium battery rises to 4.2V, it can be considered that the lithium battery is fully charged. Furthermore, during the charging process, the battery voltage gradually rises to the full-charge voltage; this can also be understood as the higher the battery's charge level, the higher the battery voltage.
[0045] Overcharging a battery: This refers to the act of continuing to charge a battery after it has been fully charged through a certain charging process. It can also be understood as the battery voltage exceeding its full-charge voltage during overcharging. Taking lithium batteries as an example, since the full-charge voltage of a lithium battery is typically 4.2V, if the voltage exceeds 4.2V during charging, it will result in overcharging.
[0046] When a battery is overcharged, its voltage rises rapidly, causing irreversible changes in the structure of the positive electrode active material and the decomposition of the electrolyte. This generates a large amount of gas and releases a lot of heat, causing the battery temperature and internal pressure to increase sharply. The internal separator may melt or shrink, posing a risk of battery explosion or combustion.
[0047] Metal-oxide-semiconductor field-effect transistors (MOS transistors): Also known as insulated-gate field-effect transistors, MOS transistors are commonly used in amplifier circuits or switching circuits in general electronic circuits. A MOS transistor consists of a source (S), a gate (G), and a drain (D), and is divided into two main categories: P-channel enhancement-mode MOS transistors and N-channel enhancement-mode MOS transistors. P-channel enhancement-mode MOS transistors, also known as PMOS transistors, operate when the voltage Vgs between the gate (G) and source (S) is less than a certain threshold. N-channel enhancement-mode MOS transistors, also known as NMOS transistors, operate when the voltage Vgs between the gate (G) and source (S) is greater than a certain threshold.
[0048] Fuel meter: A device used to monitor the charge of a battery. It works on the principle of Faraday's law, using the amount of substance reacting at the electrodes to accurately calculate the amount of charge passing through the circuit.
[0049] The background of the battery charging and discharging method in the embodiments of this application will be explained below.
[0050] Currently, with the continuous development of terminal technology, electronic devices can contain dual batteries, i.e., two batteries. Compared to a single battery, a dual battery can store more electricity. During the use of electronic devices, both batteries discharge simultaneously, resulting in a greater discharge capacity than a single battery. Furthermore, the simultaneous discharge of both batteries can support the power consumption of high-power applications within the electronic device, making the display smoother.
[0051] Taking mobile phones as an example, current mobile phones mainly fall into two categories: single-screen phones and foldable phones. Both single-screen and foldable phones can contain one or more batteries. Taking a foldable phone with dual batteries as an example, charging a foldable phone essentially charges the dual batteries inside. When the foldable phone is in use, such as when the user is watching videos, the dual batteries discharge. In some cases, the dual batteries need to be charged first and then discharged; that is, the dual batteries are charged first, and after charging is complete, when the phone is powered on, the dual batteries can discharge to power the phone.
[0052] When charging the dual batteries of a foldable phone, the charging module located inside the phone charges both batteries. Because foldable phones typically consist of two or more foldable sections, each section usually contains one battery. For example, in a two-section foldable phone, each section contains one battery. The charging module inside the phone is usually located on one side of one of the dual batteries. Therefore, the charging module is often closer to one battery and farther from the other.
[0053] Figure 1A A schematic diagram showing the positional relationship between the dual batteries and the charging module inside a foldable screen phone is provided. Figure 1A In China, foldable phones can be folded vertically and horizontally. Figure 1A The foldable phone in the picture is in its unfolded state. The upper part of the foldable phone is the first body 101, and the lower part is the second body 102. The first body 101 and the second body 102 each contain a battery; that is, the first body 101 contains battery 1, and the second body 102 contains battery 2. Furthermore, the charging module is located inside the first body 101, that is, the charging module is located on the side of battery 1. Figure 1A It can be seen that the charging module is connected to both battery 1 and battery 2 via wires, and the length of the wire between the charging module and battery 1 is shorter than the length of the wire between the charging module and battery 2. This is because the shorter the wire, the lower the impedance. Figure 1A In this process, the impedance between the charging module and battery 1 is smaller than that between the charging module and battery 2.
[0054] When the output voltage of the charging module (i.e., the voltage at point A) is the same as the voltage difference between battery 1 and battery 2, the smaller the impedance, the larger the current. This means the first current between the charging module and battery 1 is greater than the second current between the charging module and battery 2. A larger current results in a faster charging speed. With the same battery type, the battery voltage increases more quickly, leading to a shorter charging time for battery 1 compared to battery 2. In other words, when battery 1 is fully charged, battery 2 is not yet fully charged. "Fully charged" means the battery voltage has reached its maximum charge voltage, while "not fully charged" means the battery voltage has not yet reached its maximum charge voltage.
[0055] In some implementation schemes, if the charging operation of battery 1 and battery 2 ends after battery 1 is fully charged, but battery 2 is not fully charged at this time, it will cause a loss of capacity of battery 2; if battery 1 is fully charged and charging continues until battery 2 is fully charged, it will lead to overcharging of battery 1 and a decrease in the performance of battery 1.
[0056] To avoid the situation where the two batteries are fully charged one after the other, resulting in battery capacity loss or overcharging, some embodiments add a balancing circuit between the charging module and the battery on the side with lower impedance. For example, a balancing circuit is added between the charging module and the charging module to increase the impedance between the charging module and the battery 1, thereby reducing the current of the battery 1, so as to balance the voltage of the two batteries, so that the charging time of the two batteries is the same, reducing the risk of battery capacity loss or overcharging.
[0057] Figure 1B A schematic diagram shows an equalization circuit placed between the charging module and battery 1. It can be understood that... Figure 1B The arrows in the diagram indicate the direction of current flow during charging. Figure 1B In this circuit, the impedance between the charging module and battery 1 is less than the impedance between the charging module and battery 2. Therefore, the balancing circuit is placed on the side with lower impedance, i.e., between the charging module and battery 1. Since the balancing circuit increases impedance, the impedance between the charging module and battery 1 increases, leading to a decrease in the current flowing through battery 1. Given that the total output current of the charging module is constant, the current flowing through battery 2 increases, thus achieving the goal of balancing the currents of battery 1 and battery 2. With the current in battery 1 decreasing and the current in battery 2 increasing, the voltage increase rate of battery 1 slows down, while the voltage increase rate of battery 2 accelerates. Therefore, the voltages of battery 1 and battery 2 are balanced, allowing both batteries to reach full charge voltage simultaneously, enabling them to be fully charged at the same time.
[0058] However, this method requires an additional balancing circuit, which is complex and costly to design. Therefore, to address these technical problems, this application provides a charging and discharging method. In this method, during the charging process of battery 1 and battery 2, the first voltage and second voltage corresponding to battery 1 and battery 2 at the current moment are detected in real time. If the first voltage reaches the first fully charged voltage of battery 1, but the second voltage has not yet reached the second fully charged voltage of battery 2, the charging and discharging circuit of battery 1 is disconnected, preventing battery 1 from continuing to charge, and the charging operation of battery 2 continues until battery 2 is fully charged. Thus, no additional balancing circuit is needed, effectively reducing costs.
[0059] In some embodiments, a switch control (SW) pin can be added to the battery 1, which is closer to the charging module (or has a smaller impedance to the charging module), to disconnect the charging and discharging circuit of the battery 1 by inputting a high level (e.g., 1.8V) to the SW pin on the battery 1 when the first voltage is detected to reach the first full charge voltage of the battery 1, but the second voltage has not yet reached the second full charge voltage of the battery 2.
[0060] It is understood that the SW pin can be located on the battery protection board in battery 1. The working principle of the SW pin is as follows: if a high level is applied to the SW pin, the SW pin will be disconnected; this can be understood as the battery protection board disconnecting the battery output through the SW pin. This step is equivalent to removing the battery, meaning the battery cannot be charged or discharged. If a low level is applied to the SW pin, the SW pin will be turned on, meaning the battery is reconnected to the circuit, and the battery can then perform subsequent charging and discharging operations. In this embodiment, the connection of the battery to the circuit can be controlled by controlling the high or low level of the SW pin.
[0061] In some embodiments, the battery 1 can also be disconnected in any other feasible manner to stop charging the battery 1. For example, a switch or control circuit can be added to the circuit to control the charging process of the battery 1.
[0062] This method disconnects battery 1 from the circuit after it is fully charged, thus preventing overcharging and the risk of overcharging. Meanwhile, battery 2 continues to charge until the second voltage reaches the second full-charge voltage, ensuring it is fully charged and preventing capacity loss due to incomplete charging. Furthermore, this method requires no additional balancing circuitry, only an additional SW pin, resulting in lower costs.
[0063] The method provided in this application can be applied not only to electronic devices containing dual batteries, but also to electronic devices containing two or more batteries. Regardless of the number of batteries, the method simply involves sequentially disconnecting the fully charged batteries from the circuit until the last battery is fully charged.
[0064] It is understood that the charging and discharging method provided in this application is applicable to any electronic device with communication function, including but not limited to mobile phones, tablets, computers, wearable devices, augmented reality (AR) devices, etc. This application does not limit the type and form of electronic devices.
[0065] The charging and discharging method provided in the embodiments of this application will be described in detail below. This method can be executed by an electronic device. Taking an electronic device including battery 1 and battery 2 as an example, Figure 2 As shown, the method may include the following steps:
[0066] 201: Obtain the first voltage of battery 1 and the second voltage of battery 2.
[0067] This application does not limit the timing of when the electronic device acquires the first voltage and the second voltage. For example, the electronic device can acquire the first voltage and the second voltage in real time, or it can acquire them only when batteries 1 and 2 are charging. Taking the electronic device acquiring the first voltage and the second voltage while batteries 1 and 2 are charging as an example, if batteries 1 and 2 are being charged, the first voltage of battery 1 and the second voltage of battery 2 in the current charging state can be acquired. The electronic device can acquire the first voltage and the second voltage through a fuel gauge or similar means.
[0068] 202: If the first voltage reaches the first full charge voltage and the second voltage does not reach the second full charge voltage, increase the voltage of the SW pin on battery 1 to disconnect battery 1, stop charging battery 1, and continue charging battery 2.
[0069] It can be understood that the first full-charge voltage is the voltage when battery 1 is fully charged, and the second full-charge voltage is the voltage when battery 2 is fully charged. Taking a mobile phone as an example, the full-charge voltage of the battery inside a mobile phone is usually 4.2V.
[0070] As the battery is continuously charged, its voltage increases. If the battery voltage reaches the full charge voltage, it indicates that the battery is fully charged. Therefore, in this embodiment, if the first voltage reaches the first full charge voltage, it indicates that battery 1 is fully charged; if the second voltage does not reach the second full charge voltage, it indicates that battery 2 is not yet fully charged. At this point, charging battery 1 can be stopped, and charging battery 2 can continue.
[0071] The methods for ceasing charging of battery 1 include, but are not limited to, disconnecting battery 1 from the circuit by giving a high level to the SW pin on battery 1, thus preventing the electronic device from continuing to charge battery 1. In some embodiments, the SW pin is a pin set on the battery protection board during battery production line testing. After production line testing, this pin can be retained on the battery protection board so that during battery charging, the connection or disconnection of battery 1 in the circuit can be controlled based on this pin according to the methods provided in the embodiments of this application.
[0072] 203: If the second voltage reaches the second full charge voltage, the charging operation of battery 2 ends.
[0073] It is understandable that when the second voltage reaches the second full-charge voltage, it means that battery 2 is fully charged and charging of battery 2 can be stopped. At this time, both battery 1 and battery 2 have finished charging and are both in a fully charged state. Therefore, this battery charging method avoids the risk of overcharging of battery 1 and also avoids capacity loss of battery 2.
[0074] Figure 3 A schematic diagram of the charging and discharging circuit to which the method provided in this application is applied is shown. This charging and discharging circuit is located in an electronic device. The method provided in this application will be described in detail below with reference to the circuit structure.
[0075] like Figure 3 As shown, the charging and discharging circuit includes a detection module 301, a control module 302, a charging module 303, and a battery module 304. The battery module 304 includes battery 1 and battery 2.
[0076] The detection module 301 can detect the voltages of batteries 1 and 2 included in the battery module 304 in real time, obtaining a first voltage and a second voltage respectively. This embodiment does not limit the timing of the detection module 301's detection of the first and second voltages. For example, the detection module 301 can detect the first and second voltages in real time, or it can detect them only when batteries 1 and 2 are charging. Taking the detection module 301 detecting the first and second voltages when batteries 1 and 2 are charging as an example, if the detection module 301 detects that batteries 1 and 2 are being charged, it can obtain the first voltage of battery 1 and the second voltage of battery 2 in the current charging state. It is understood that the battery voltage increases as the battery is continuously charged; that is, during charging, the higher the charge level, the higher the battery voltage.
[0077] After the detection module 301 obtains the first voltage and the second voltage, the control module 302 can read the first voltage and the second voltage from the detection module 301 in real time. For example, the detection module 301 can be a fuel gauge. Alternatively, the detection module 301 can be any other module capable of performing detection and having storage capabilities. Taking a detection module 301 with storage capabilities as an example, after obtaining the first voltage and the second voltage, the detection module 301 stores the first voltage and the second voltage internally for the control module 302 to read.
[0078] After reading the first voltage and the second voltage, the control module 302 compares the first voltage with the first full-charge voltage and the second voltage with the second full-charge voltage to determine whether the first voltage has reached the first full-charge voltage and whether the second voltage has reached the second full-charge voltage. If neither the first voltage nor the second voltage has reached the corresponding full-charge voltage, the control module 302 can send a command to the charging module 303 to continue charging batteries 1 and 2. The charging module can be a charging chip, etc. It is understood that the first full-charge voltage is the voltage of battery 1 when fully charged, and the second full-charge voltage is the voltage of battery 2 when fully charged. The first full-charge voltage and the second full-charge voltage can be the same or different; this embodiment does not limit this.
[0079] If the first voltage reaches the first full-charge voltage, but the second voltage does not reach the second full-charge voltage, it indicates that battery 1 is fully charged, while battery 2 is not yet fully charged. At this time, to avoid the risk of overcharging battery 1 by continuing to charge it, the control module 302 sends a high level (e.g., 1.8V) to the SW pin on battery 1. This disconnects the SW pin, meaning battery 1 is disconnected from the circuit. The charging module 303 can no longer charge battery 1, and the detection module 301 cannot detect the voltage of battery 1. Alternatively, the control module 302 can also send a command to the charging module 303 to continue charging. Because battery 1 is now disconnected from the circuit, the charging module 303 cannot continue charging battery 1, but battery 2 remains in the circuit, so the charging module 303 can continue charging battery 2.
[0080] If, when battery 1 has finished charging and battery 2 is still charging, the detection module 301 detects that the third voltage of battery 2 reaches the second full-charge voltage, it indicates that battery 2 is fully charged. The third voltage can also be understood as the voltage of battery 2 at the next moment. In other words, the detection module 301 needs to monitor the voltage of battery 2 in real time so that the control module 302 can control the charging module 303 to stop charging battery 2 and reconnect battery 1 to the circuit when battery 2 is fully charged.
[0081] Once the third voltage of battery 2 is detected to have reached the second full-charge voltage, battery 1 can be reconnected to the circuit to allow both batteries 1 and 2 to discharge simultaneously. Control module 302 can provide a low-level signal (e.g., 0V) to the SW pin on battery 1, causing battery 1 to be reconnected to the circuit. At this point, both batteries 1 and 2 are in the circuit. In this situation, batteries 1 and 2 will discharge together at full charge to support the power-on state of the electronic device and power the various applications within the device.
[0082] In addition, the control module 302 sends a stop charging command to the charging module 303, notifying the charging module 303 to stop charging operations to avoid continuing to charge the battery 2 and causing the risk of overcharging the battery 2.
[0083] Based on the above description, the electronic device including a charging and discharging circuit provided in this application stops charging one battery after detecting that it is fully charged, while continuing to charge the other battery that is not yet fully charged until charging is complete. This method can avoid overcharging of the battery that is fully charged first, which would occur if both batteries were continuously charged until both were fully charged, and it can also avoid capacity loss of the uncharged battery, which would occur if charging of both batteries was stopped after one battery was fully charged.
[0084] When battery 2 is fully charged, the control module reconnects battery 1 to the circuit. However, if the control module fails (i.e., battery 1 is not reconnected), only battery 2 discharges to power the phone. When the phone experiences high power consumption, the voltage of battery 2 drops rapidly. If the discharge of battery 2 is insufficient to support the phone's high-power applications, the phone will experience lag, screen flickering, and other issues, affecting the user experience.
[0085] Therefore, the charging and discharging circuit in this embodiment also has the function of forcibly connecting battery 1 to the circuit when the voltage of battery 2 is lower than the first threshold and battery 1 is not connected to the circuit, so that battery 1 and battery 2 discharge together to power the mobile phone. In this embodiment, the size of the first threshold is not limited. For example, the first threshold can be set based on experience or flexibly adjusted according to the actual application scenario.
[0086] Figure 4 A circuit diagram illustrating forced connection of battery 1 is shown. (For example...) Figure 4As shown, the circuit includes battery 1, battery 2, a MOSFET, resistors R1, R2, R3, and R4. Battery 1 has an SW pin and is connected to one end of resistor R4. The other end of resistor R4 is connected to a general purpose input / output (GPIO) port and one end of resistor R3. One end of resistor R3 is connected to the GPIO port and resistor R4, while the other end is connected to the drain of the MOSFET, one end of resistor R1, and the positive terminal of battery 2.
[0087] As can be understood, GPIO can also be simply referred to as "IO port." GPIO can be used as both an input and output port, and is typically used for switch control. In this embodiment, the off-state and on-state of the SW pin on the battery can be controlled by adjusting the level (voltage) of the GPIO. The GPIO level can be controlled by software code; for example, a high level (e.g., 1.8V) can be given to the GPIO by calling a function to pull it high, and a low level (e.g., 0V) can be given to the GPIO by calling a function to pull it low.
[0088] In addition, resistors R1 and R2 are connected in series to divide the voltage of battery 2. One end of resistor R1 is connected to one end of resistor R3, the drain of the MOSFET, and the positive terminal of battery 2. The other end of resistor R1 is connected to one end of resistor R2, and the other end of resistor R2 is grounded. The negative terminal of battery 2 is also grounded.
[0089] The MOSFET is a PMOS transistor with its source grounded and its gate connected to point B, the voltage divider between resistors R1 and R2. In other words, the gate voltage of the MOSFET is the voltage at point B. The characteristic of this MOSFET is that it conducts when the voltage difference Vgs between the gate and source is less than a threshold value; otherwise, it is turned off.
[0090] because Figure 4 The source of the MOSFET in the circuit is grounded, so the source voltage is 0. This means the MOSFET turns on when the gate voltage is less than the second threshold voltage of the MOSFET's turn-on voltage. It can be understood that the second threshold is determined based on the different models of the MOSFET. After determining the first threshold of battery 2, a MOSFET with a turn-on voltage of the second threshold can be selected based on the first threshold. This application does not limit the size of the second threshold, as long as it is less than the first threshold. Furthermore, after both the first and second thresholds are determined, the resistance values of resistors R1 and R2 for voltage division can be determined based on the values of the first and second thresholds. As long as the first threshold voltage of battery 2 is divided by resistors R1 and R2, Figure 4The voltage at point B in the diagram is the second threshold. This ensures that the voltage at the gate of the MOSFET is less than the second threshold. In other words, the MOSFET can be turned on when the voltage of battery 2 is less than the first threshold.
[0091] The following is based on Figure 4 The circuit structure in the document introduces the control principle of the circuit.
[0092] Figure 4 In the circuit shown, when battery 1 is fully charged but battery 2 is not fully charged, the control module can pull GPIO high (i.e., give GPIO a high level), for example, setting the GPIO voltage to 1.8V. Since the MOSFET is off at this time, resistors R4 and R3 are connected in parallel and in series with battery 1. The voltage across GPIO, after being divided by resistor R4, will be distributed to the SW pin of battery 1. Because resistor R4 is a small resistor, the voltage division is minimal, ensuring a high voltage at the SW pin. The SW pin is then disconnected, disconnecting battery 1 from the circuit, preventing it from charging or discharging.
[0093] After battery 1 is disconnected from the circuit, battery 2 continues to be charged. When battery 2 is also fully charged, battery 1 needs to be reconnected to the circuit so that both batteries discharge simultaneously to power the phone. Therefore, the control module can pull GPIO low (i.e., give GPIO a low level), for example, by setting the GPIO voltage to 0V, and the voltage of the SW pin to be low, so that battery 1 can be connected to the circuit.
[0094] When battery 2 is fully charged, if the control module fails (i.e., adjusting the GPIO voltage does not reconnect battery 1 to the circuit, and only battery 2 is discharging), and the voltage across battery 2 is less than the first threshold (meaning the gate voltage of the MOSFET is less than the second threshold), the MOSFET will conduct. At this time, the right end of resistor R3 will be grounded through the conducting MOSFET, and the voltage will be 0. Because battery 1 is disconnected from the circuit, regardless of whether the GPIO voltage is high or low, the voltage at the SW pin will be 0V. Therefore, the SW pin will conduct, and battery 1 will be connected to the circuit. At this point, battery 1 and battery 2 can discharge together to power the phone.
[0095] The circuit described above, when controlling the voltage of the SW pin through the voltage of the GPIO to reconnect battery 1 to the circuit, if this method does not work, that is, if battery 1 is not connected to the circuit and battery 1 cannot discharge together with battery 2, the MOSFET can be turned on to ground, forcing the voltage of the SW pin to become 0V, at which point battery 1 can be connected to the circuit.
[0096] Therefore, compared to discharging battery 2 before it is fully charged, the method and circuit described above allow both battery 1 and battery 2 to be fully charged, resulting in more complete charging and thus more discharge. Furthermore, this method and the corresponding charging and discharging circuit can prevent phone lag, screen flickering, and other issues caused by battery 1 not being connected to the circuit after battery 2 is fully charged, and battery 2's power being insufficient to support the phone's power consumption, thus improving the user experience.
[0097] Furthermore, it is understood that the charging and discharging method provided in this application embodiment is applicable not only to charging dual batteries, but also to fully charging two or more batteries. Taking charging three batteries, battery 1, battery 2, and battery 3, as an example, if battery 1 is detected to be fully charged, but battery 2 and battery 3 are not fully charged, battery 1 is disconnected from the circuit, preventing it from charging and discharging, and then charging battery 2 and battery 3 continues. If battery 2 is detected to be fully charged, but battery 3 is not fully charged, battery 2 is disconnected from the circuit, preventing it from charging and discharging, and then charging battery 3 continues. If battery 3 is detected to be fully charged, charging battery 3 is stopped, and battery 1 and battery 2 are reconnected to the circuit, allowing battery 1, battery 2, and battery 3 to discharge simultaneously for power consumption by the mobile phone.
[0098] Furthermore, this application provides an electronic device, including: one or more processors; one or more memories; the one or more memories storing one or more programs, which, when executed by one or more processors, cause the electronic device to perform the charging and discharging method provided in the embodiments of this application.
[0099] This application provides a chip for detecting that a battery module is in a charging state. When the voltage of the first battery in the battery module reaches the first full charge voltage of the first battery, and the voltage of the second battery in the battery module does not reach the second full charge voltage of the second battery, the chip controls the charging and discharging circuit of the first battery to be disconnected, while keeping the charging and discharging circuit of the second battery connected. In addition, the chip can also be used to execute the charging and discharging method provided in the embodiments of this application.
[0100] This application provides an electronic device, including the aforementioned battery module and chip.
[0101] This application provides a computer-readable storage medium storing instructions thereon, which, when executed on a computer, cause the computer to perform the charging and discharging method provided in the embodiments of this application.
[0102] This application also provides a computer program product, including: execution instructions, the execution instructions being stored in a readable storage medium, at least one processor of an electronic device being able to read the execution instructions from the readable storage medium, and at least one processor executing the execution instructions causing the electronic device to implement the charging and discharging method provided in the embodiments of this application.
[0103] Figure 5 A schematic diagram of the structure of electronic device 100 is shown. Electronic device 100 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, antenna 1, 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, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer 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, etc.
[0104] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0105] The power management module 141 may include the charging and discharging circuit provided in this application embodiment, so that the batteries 142 included in the electronic device 100 can be fully charged respectively. The batteries 142 may include multiple batteries such as the aforementioned battery 1 and battery 2, and this application embodiment does not limit the specific batteries included in this configuration.
[0106] 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.
[0107] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0108] 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 directly retrieve it from the aforementioned memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system. The processor can be used to execute the battery charging method mentioned in this application.
[0109] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0110] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0111] The mobile communication module 150 can provide wireless communication solutions, including 2G / 3G / 4G / 5G, for use on electronic devices 100.
[0112] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates 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 processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0113] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. 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 antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0114] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. Electronic device 100 implements display functions through a GPU, display screen 194, and application processor. The GPU is a microprocessor for image processing, connected to display screen 194 and application processor. The GPU performs mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0115] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0116] Internal memory 121 can be used to store computer executable program code, including instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). In addition, internal memory 121 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. Processor 110 executes various functional applications and data processing of electronic device 100 by running instructions stored in internal memory 121 and / or instructions stored in memory disposed in the processor.
[0117] The SIM card interface 195 is used to connect the SIM card.
[0118] It is understood that, as used herein, the term “module” may refer to or include, or be part of, an application-specific integrated circuit (ASIC), electronic circuitry, a processor (shared, dedicated, or grouped) and / or memory that executes one or more software or firmware programs, combinational logic circuitry, and / or other suitable hardware components that provide the described functionality.
[0119] It is understood that in the various embodiments of this 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.
[0120] The embodiments disclosed in this application can be implemented in hardware, software, firmware, or a combination of these implementation methods. Embodiments of this application can be implemented as computer programs or program code executable on a programmable system, the programmable system including 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.
[0121] Program code can be applied to input instructions to execute the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, the 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.
[0122] The program code can be implemented using a high-level procedural language or an object-oriented programming language to communicate with the processing system. Assembly language or machine language can also be used when needed. In fact, the mechanisms described in this application are not limited to any particular programming language. In either case, the language can be a compiled language or an interpreted language.
[0123] 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 thereon 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 via a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine-readable (e.g., computer-readable) form, including but not limited to floppy disks, optical disks, CD-ROMs, magneto-optical disks, read-only memory (ROM), random access memory (RAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic cards or optical cards, flash memory, or tangible machine-readable storage for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in the form of electrical, optical, acoustic, or other propagation signals. Therefore, machine-readable media include any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a machine-readable (e.g., computer-readable) form.
[0124] In the accompanying drawings, some structural or methodological 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 necessary. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. Furthermore, the inclusion of structural or methodological features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, these features may be omitted or may be combined with other features.
[0125] It should be noted that all units / modules mentioned in the device embodiments of this application are logical units / modules. Physically, a logical unit / module can be a physical unit / module, a part of a physical unit / module, or a combination of multiple physical units / modules. The physical implementation of these logical units / modules themselves is not the most important factor; the combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed in this application. Furthermore, to highlight the innovative aspects of this application, the above-described device embodiments of this application have not introduced units / modules that are not closely related to solving the technical problems proposed in this application. This does not mean that the above-described device embodiments do not contain other units / modules.
[0126] It should be noted that in the examples and description of this patent, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0127] Although this application has been illustrated and described with reference to certain preferred embodiments thereof, those skilled in the art will understand that various changes in form and detail may be made thereto without departing from the scope of this application.
Claims
1. An electronic device, characterized in that, The electronic device includes: a battery module, a switch, and a control module; The battery module includes a first battery and a second battery. The first battery includes battery cells and a battery protection board. The switch is located on the battery protection board. The control module includes: a first resistor, a second resistor, a third resistor, a fourth resistor, a first field-effect transistor (FET), and a general purpose input / output (GPIO). One end of the first resistor is connected to the output terminal of the second battery, the drain of the first FET, and one end of the third resistor. The other end of the first resistor is connected to one end of the second resistor. The other end of the third resistor is connected to the GPIO. One end of the fourth resistor is connected to the GPIO, and the other end of the fourth resistor is connected to a switch on the first battery. The gate of the first FET is connected to the other end of the first resistor and one end of the second resistor. The other end of the second resistor, the source of the first FET, and the output terminal of the second battery are grounded. The switch is used for: When the control pin voltage of the switch is set to a first voltage, the first battery is disconnected from the charging and discharging circuit of the first battery. When the control pin voltage of the switch is set to the second voltage, the first battery is reconnected to its charging and discharging circuit, and charging of both the first and second batteries is stopped. The second voltage is less than the first voltage. The control module is used for: When the voltage of the first battery reaches its first full-charge voltage, and the voltage of the second battery has not reached its second full-charge voltage, the control pin voltage of the switch is set to the first voltage. When the voltage of the second battery is less than the voltage threshold during the discharge state, and the first battery is not connected to the charging / discharging circuit of the first battery, the control pin voltage of the switch is set to the second voltage.
2. The electronic device according to claim 1, characterized in that, The control module also includes a signal processing unit. The signal processing unit is used for: When the voltage of the first battery reaches the first full charge voltage of the first battery, a first signal is given to the general purpose input / output port GPIO to set the control pin voltage of the switch to the first voltage; When the voltage of the second battery reaches the second full charge voltage of the second battery, the second signal of the general purpose input / output port (GPIO) is given to set the control pin voltage of the switch to the second voltage.
3. A charging and discharging method, characterized in that, Applied to an electronic device according to any one of claims 1 to 2, and the method comprising: When the control pin voltage of the switch is detected to be a first voltage, the first battery is disconnected from the charging and discharging circuit of the first battery. When the control pin voltage of the switch in the electronic device is detected to be the second voltage, the first battery is reconnected to the charging and discharging circuit of the first battery, and charging of the first battery and the second battery is stopped, wherein the second voltage is less than the first voltage.
4. The method according to claim 3, characterized in that, The method further includes: If the voltage of the first battery reaches the first full-charge voltage of the first battery, and the voltage of the second battery does not reach the second full-charge voltage of the second battery, Set the control pin voltage of the switch to the first voltage.
5. The method according to claim 3, characterized in that, The method further includes: If the voltage of the second battery in its discharge state is detected to be less than a voltage threshold, and the first battery is not connected to the charging / discharging circuit of the first battery, Set the control pin voltage of the switch to the second voltage.
6. An electronic device, characterized in that, include: One or more processors; One or more memories; the one or more memories storing one or more programs, which, when executed by the one or more processors, cause the electronic device to perform the charging and discharging method according to any one of claims 3 to 5.
7. A computer-readable storage medium, characterized in that, The readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the charging and discharging method according to any one of claims 3 to 5.
8. A computer program product, characterized in that, include: An execution instruction is stored in a readable storage medium, and at least one processor of the electronic device can read the execution instruction from the readable storage medium. The at least one processor executes the execution instruction to cause the electronic device to implement the charging and discharging method according to any one of claims 3 to 5.
Citation Information
Patent Citations
Double-battery circuit, control method thereof and electronic equipment
CN113809812A
Double-battery switching circuit, battery switching method, electronic equipment and storage medium
CN115208041A