Charging and discharging method and device, chip and readable storage medium

By detecting the voltage of the battery module in the folding screen mobile phone, disconnecting its charging and discharging circuit after the first battery is fully charged, no longer charging it, but continuing to charge the second battery until it is fully charged, the problem of full charge of the dual battery is solved. , avoid overcharging and capacity loss, improve mobile phone performance and reduce costs.

CN119448474AActive Publication Date: 2025-02-14HONOR DEVICE CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410868517.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-02
Publication Date
2025-02-14
Estimated Expiration
2043-08-02

AI Technical Summary

Technical Problem

How to fully charge the dual battery in a folding screen mobile phone, avoid overcharging or capacity loss, and improve the performance of the mobile phone.

Method used

By detecting the voltage of the battery module, after the first battery is fully charged, the charging and discharging circuit is disconnected, and no longer charged, but the unfilled second battery continues to charge until it is fully charged.

Benefits of technology

The dual battery full charge is achieved, which avoids overcharging and capacity loss, improves the performance of the mobile phone, reduces costs, and avoids additional balanced circuit design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119448474A_ABST
    Figure CN119448474A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of batteries, and discloses a charging and discharging method and device, a chip and a readable storage medium. The method is applied to the electronic equipment, the electronic equipment comprises a plurality of batteries, and the method comprises the following steps: in the charging process of the plurality of batteries, detecting the voltage of each battery in real time, and if the voltage of a first battery in the plurality of batteries reaches a first full-charge voltage, but the voltage of a second battery does not reach a second full-charge voltage, starting the charging of the plurality of batteries; the first battery is disconnected from the charging and discharging circuit, so that the first battery cannot be continuously charged, the second battery is continuously charged until the voltage of the second battery reaches the second full-charge voltage, and the second battery is not charged any more. Therefore, full charge of the plurality of batteries included in the electronic equipment can be realized, and overcharge or capacity loss of the batteries is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application. The application number of the original application is 2023109644408, and the original application date is August 2, 2023. The entire contents of the original application are incorporated into this application by reference. Technical Field

[0002] The present application relates to the field of battery technology, and in particular to a charging and discharging method, device, chip and readable storage medium. Background Art

[0003] At present, with the continuous development of terminal technology, the forms of electronic devices such as mobile phones are also diverse. Taking mobile phones as an example, mobile phones can be divided into single-screen mobile phones and folding-screen mobile phones. Folding-screen mobile phones usually have dual batteries (i.e. two batteries). When users use the mobile phone, the dual batteries can power the mobile phone, and the amount of storage capacity of the dual batteries directly affects the performance of the mobile phone such as standby time. Therefore, how to make the storage capacity of the dual batteries reach the rated capacity, that is, how to fully charge both batteries to improve the performance of the mobile phone is a technical problem that needs to be solved. Summary of the invention

[0004] To solve the above problems, the embodiments of the present application provide a charging and discharging method, device, chip and readable storage medium. The method stops charging a battery after a battery of an electronic device is fully charged, and continues to charge the battery that is not fully charged, so as to fully charge the battery, avoid overcharging or capacity loss of the battery, and improve the performance of the mobile phone.

[0005] In a first aspect, the present application provides a charging and discharging method, the method comprising: detecting that a battery module is in a charging state, the battery module comprising multiple batteries; detecting that a voltage of a first battery among the multiple batteries of the battery module reaches a first full-charge voltage of the first battery, and a voltage of a second battery among the multiple 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 the present application can be applied to an electronic device, and the electronic device can be a folding screen device. In this case, the electronic device includes two parts of the body, and the two parts of the body can be folded along the folding axis of the electronic device. This situation can be described later. Figure 1A As shown, Figure 1A The first body 101 and the second body 102 in the figure are two parts of the electronic device. It can be understood that Figure 1A The battery 1 included in the figure refers to the first battery, and the battery 2 refers to the second battery. In addition, Figure 1AThe electronic device also includes a charging module, that is, the electronic device in the present application may also include a charging module, which can charge multiple batteries included in the electronic device.

[0007] In the case where the electronic device is a folding screen device, the first battery is usually located together with the charging module in one of the two parts of the electronic device. Figure 1A As shown, the first battery (battery 1) is co-located with the charging module in the first body 101. This layout makes the line between the first battery and the charging module shorter than the line between the second battery and the charging module, resulting in the first charging impedance between the first battery and the charging module being smaller than 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 the charging current of the second battery, that is, the charging speed of the first battery is faster, and the first battery may be fully charged before the second battery, that is, when the voltage of the first battery reaches the first full-charge voltage, the voltage of the second battery has not yet reached the second full-charge voltage.

[0008] When the first battery is fully charged but the second battery is not fully charged, the first battery is no longer charged by disconnecting the charging and discharging circuit of the first battery, and the second battery that is not fully charged continues to be charged. This method can achieve full charging of multiple batteries included in the electronic device, avoid overcharging of the first fully charged battery due to continuous charging of multiple batteries until all batteries are fully charged, and avoid capacity loss of the unfull battery due to stopping charging of all batteries after one battery is fully charged.

[0009] In a possible implementation of the first aspect above, the method further includes: setting a voltage of a switch control SW pin on the first battery to a first voltage so that the first battery is disconnected from a charge and discharge circuit of the first battery.

[0010] In the present application, the SW pin is a pin set on the battery protection board during the production line test of the battery. After the production line test, the pin can be retained on the battery protection board so that during the charging process of the battery, the first battery is connected or disconnected in the charge and discharge circuit based on the 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 be disconnected, which can also be understood as removing the first battery from the charge and discharge circuit, and the first battery cannot be charged and discharged. Among them, the first voltage can be a high level, and exemplarily, the first voltage can be the 1.8V mentioned later.

[0011] In a possible implementation of the first aspect above, the method further includes: detecting that the voltage of the second battery reaches a 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 battery and the second battery are no longer charged. In this way, the first battery and the second battery can be discharged at the same time for consumption by the electronic device.

[0013] In a possible implementation of the first aspect above, the method further includes: setting the voltage of the switch control SW pin on the first battery to a second voltage, so that the first battery is reconnected to the charging and discharging circuit of the first battery, and the second voltage is less than the first voltage.

[0014] If a second voltage is applied to the SW pin, the SW pin will be turned on, that is, the second battery is connected to the charge and discharge circuit again, and the second battery can perform subsequent charge and discharge operations. The second voltage may be a low level, and illustratively, the second voltage may be 0V mentioned later.

[0015] In a 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 in a discharging state and the first battery is not connected to the charging and discharging circuit, that is, the first battery is not discharging, if the voltage of the second battery is detected to be less than the voltage threshold, it means that the discharge of the second battery is not enough to support the use of high-energy consumption applications of the electronic device, and the electronic device may experience freezes, screen distortion, etc. Therefore, in order to avoid this situation, the first battery needs to be forcibly connected at this time, and the voltage of the SW pin of the first battery can be set to the second voltage (for example, 0V).

[0017] In a second aspect, the present application provides an electronic device, which includes: a charging module, a battery module, a detection module and a control module, the battery module including 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 in a charging state; the control module is used to: when the voltage of a first battery among the multiple batteries in the battery module reaches a first full-charge voltage of the first battery, and the voltage of a second battery among the multiple batteries does not reach a second full-charge voltage of the second battery, control the charging and discharging circuit of the first battery to be disconnected, and keep the charging and discharging circuit of the second battery in a connected state.

[0018] In a possible implementation of the second aspect, the electronic device includes two body parts, which can be folded along a folding axis of the electronic device; and the first battery and the charging module are co-located in either body part of the two body parts.

[0019] This situation can still be Figure 1A As shown, no further description is given here, and as Figure 1A , the line between the first battery and the charging module is shorter than the line between the second battery and the charging module, resulting in the first charging impedance between the first battery and the charging module being smaller than the second charging impedance between the second battery and the charging module, and the first battery may be fully charged before the second battery.

[0020] In a possible implementation of the second aspect above, the control module is further used to: when the voltage of the second battery in the discharge state is less than the voltage threshold and the first battery is not connected to the charging and discharging circuit of the first battery, set the voltage of the switch control SW pin on the first battery to the second voltage, so that the first battery is connected to the charging and discharging circuit of the first battery.

[0021] The second voltage may be 0V.

[0022] In a possible implementation of the second aspect above, the charge and discharge circuit of the first battery also includes a switch, which is located on the first battery; and the control module is further used to set the voltage of the switch on the first battery to a first voltage, so that the first battery is disconnected from the charge and discharge 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 function as a switch.

[0024] In a possible implementation of the second aspect above, the control module is further used 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 a possible implementation of the second aspect above, the control module also includes a first resistor, a second resistor, a third resistor, a fourth resistor, a first field effect transistor and a general input and output port GPIO; one end of the first resistor is connected to the output end 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 and one end of the fourth resistor; one end of the fourth resistor is connected to the GPIO, and the other end is connected to the 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 end of the second battery are grounded.

[0026] The first resistor corresponds to Figure 4 The resistor R1 in the circuit; the second resistor corresponds to the resistor R2; the third resistor corresponds to the resistor R3; the fourth resistor corresponds to the resistor R4; the first field effect transistor corresponds to the MOS transistor.

[0027] In a possible implementation of the second aspect above, the control module also includes a signal processing unit, which is used to, when the voltage of the first battery reaches a first full-charge voltage, send a first signal to the GPIO so that the first battery is disconnected from the charging and discharging circuit of the first battery; when the voltage of the second battery reaches a second full-charge voltage, send a second signal to the GPIO so that the first battery is reconnected to the charging and discharging circuit of the first battery.

[0028] It can be understood that the first signal is used to pull up the voltage of the GPIO. For example, the voltage of the GPIO can be set to 1.8V. Since the resistance value of the fourth resistor is small, it can be ensured that the voltage on the SW pin of the first battery is still a high voltage, so that the first battery can be disconnected from the charge and discharge circuit. The second signal is used to pull down the voltage of the GPIO. For example, the voltage of the GPIO can be set to 0V. When the first battery is disconnected from the circuit, the voltage of the GPIO is 0V, and the voltage of the SW pin on the first battery is also 0V, so that the first battery can be reconnected to the charge and discharge circuit.

[0029] In a third aspect, the present application provides an electronic device comprising: one or more processors; one or more memories; one or more memories storing one or more programs, and when the one or more programs are executed by the one or more processors, the electronic device executes the first aspect and any possible charging and discharging method of the first aspect.

[0030] In a fourth aspect, the present application provides a chip for detecting that a battery module is in a charging state, and when the voltage of a first battery among multiple batteries in the battery module reaches a first full-charge voltage of the first battery and the voltage of a second battery among the multiple batteries does not reach a 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] In a fifth aspect, the present application provides an electronic device comprising a battery module and the chip of the fourth aspect.

[0032] In a sixth aspect, the present application provides a computer-readable storage medium having instructions stored thereon, which, when executed on a computer, causes the computer to execute the first aspect and any possible charging and discharging method of the first aspect.

[0033] In the seventh aspect, the present application also provides a computer program product, including: execution instructions, the execution instructions are stored in a readable storage medium, at least one processor of the electronic device can read the execution instructions from the readable storage medium, and at least one processor executes the execution instructions to enable the electronic device to implement the first aspect and any possible charging and discharging method of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1A According to some embodiments of the present application, a schematic diagram showing the positional relationship between a dual battery and a charging module inside a folding screen mobile phone is shown;

[0035] Figure 1B According to some embodiments of the present application, a schematic diagram of providing an equalization circuit between a charging module and a battery 1 is shown;

[0036] Figure 2 According to some embodiments of the present application, a schematic flow chart of a charging and discharging method is shown;

[0037] Figure 3 According to some embodiments of the present 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 the present application, a schematic diagram of a circuit for forcibly connecting the battery 1 when the battery is discharged is shown;

[0039] Figure 5 According to some embodiments of the present application, a schematic structural diagram of an electronic device is shown. DETAILED DESCRIPTION

[0040] The illustrative embodiments of the present application include, but are not limited to, battery charging and discharging methods, devices, chips, and readable storage media.

[0041] The following first explains the special terms involved in the embodiments of the present application.

[0042] Battery: Usually consists of a battery protection board and a battery cell, wherein the battery protection board and the battery cell are connected via a board-to-board connector (BTB). Taking a mobile phone as an example, the battery in a mobile phone is usually a lithium battery.

[0043] Impedance: In a circuit with resistance, inductance and capacitance, the resistance to the current in the circuit is called impedance. Impedance is usually represented by Z, which is a complex number with the unit of ohm.

[0044] Fully charged voltage of the battery: The maximum limit voltage of the battery charging can also be understood as the voltage of the battery when it is fully charged. Taking the lithium battery as an example, the maximum limit voltage (full charge voltage) of the lithium battery is usually 4.2V. If the voltage of the lithium battery is increased to 4.2V, it can be considered that the lithium battery is fully charged. In addition, during the battery charging process, the battery voltage gradually rises to the fully charged voltage, which can also be understood as the higher the battery charge, the greater the battery voltage.

[0045] Battery overcharge: refers to the act of continuing to charge a battery after it is fully charged through a certain charging process. It can also be understood that when a battery is overcharged, the battery voltage exceeds the full-charge voltage of the battery. Take lithium batteries as an example, because the full-charge voltage of lithium batteries is usually 4.2V, that is, if the voltage of a lithium battery is greater than 4.2V during the charging process, it will cause overcharging of the battery.

[0046] When the battery is overcharged, the battery voltage rises rapidly, causing irreversible changes in the structure of the positive electrode active material inside the battery and decomposition of the electrolyte, generating a large amount of gas and releasing a large amount of heat, causing the battery temperature and internal pressure to increase sharply, and the internal diaphragm to melt or shrink, posing hidden dangers of battery explosion and combustion.

[0047] Metal Oxide Semiconductor Field Effect Transistor (MOS): It can also be called an insulated gate field effect transistor. In general electronic circuits, MOS tubes are usually used in amplifier circuits or switch circuits. MOS tubes include a source S, a gate G, and a drain D, and are divided into two categories: P-channel enhancement MOS tubes and N-channel enhancement MOS tubes. Among them, the P-channel enhancement MOS tube can also be called a PMOS tube. The working characteristic of the PMOS tube is that when the voltage Vgs between the gate G and the source S is less than a certain threshold, the PMOS tube is turned on. The N-channel enhancement MOS tube can also be called an NMOS tube. The working characteristic of the NMOS tube is that when the voltage Vgs between the gate G and the source S is greater than a certain threshold, the NMOS tube is turned on.

[0048] Fuel meter: A device used to monitor the charge of a battery. It uses Faraday's law to accurately calculate the amount of electricity passing through the circuit using the amount of substance reacting at the electrodes.

[0049] The following is an explanation of the background of the battery charging and discharging method in the embodiment of the present application.

[0050] At present, with the continuous development of terminal technology, electronic devices can contain dual batteries, that is, two batteries. Compared with a single battery, a dual battery can store more electricity. During the use of electronic devices, the dual batteries are discharged at the same time, and the discharge amount is greater than the discharge amount of a single battery. In addition, the simultaneous discharge of the dual batteries can also support the consumption of high-power applications in electronic devices, making the display of electronic devices smoother.

[0051] Taking the mobile phone as an example of an electronic device, current mobile phones mainly include two categories: single-screen mobile phones and folding-screen mobile phones. Whether it is a single-screen mobile phone or a folding-screen mobile phone, it can contain one or more batteries inside. Taking a folding-screen mobile phone with dual batteries as an example, when charging a folding-screen mobile phone, the essence is to charge the dual batteries inside the folding-screen mobile phone. When the folding-screen mobile phone is in use, for example, when the user uses the mobile phone to watch videos, the dual batteries are discharged. In some examples, the dual batteries need to be charged first and then discharged, that is, the dual batteries are charged first. After charging is completed, when the mobile phone is in the on state, the dual batteries can be discharged for consumption by the mobile phone.

[0052] When charging the dual batteries of a foldable screen mobile phone, the dual batteries are charged through a charging module located inside the mobile phone. Because a foldable screen mobile phone usually includes two or more parts that can be folded together, based on the form factor of the foldable screen mobile phone, each part of the body of the foldable screen mobile phone usually includes a battery. For example, a foldable screen mobile phone includes two parts of the body, each of which includes a battery. The charging module inside the mobile phone is usually located on one side of one of the dual batteries. Therefore, the charging module is closer to one battery and farther from the other battery.

[0053] Figure 1A A schematic diagram showing the positional relationship between a dual battery and a charging module inside a foldable screen mobile phone. Figure 1A In the folding screen mobile phone, the folding screen mobile phone can be folded up and down, and Figure 1A The foldable screen mobile phone in the figure is in the unfolded state, the upper part of the foldable screen mobile 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. In addition, the charging module (Charger) 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. Because the shorter the wire, the smaller the impedance. Therefore, Figure 1A In the embodiment, the impedance between the charging module and battery 1 is smaller than the impedance 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, that is, the first current between the charging module and battery 1 is greater than the second current between the charging module and battery 2. The larger the current, the faster the charging speed. Under the condition of the same battery model, the faster the battery voltage increases, which will cause the full charge time of battery 1 to be shorter than the full charge time of battery 2, that is, when battery 1 is fully charged, battery 2 is not fully charged yet. It can be understood that fully charged means that the battery voltage reaches the full charge voltage, and not fully charged means that the battery voltage does not reach the full charge voltage.

[0055] In some implementation schemes, if battery 1 is fully charged, the charging operation of battery 1 and battery 2 is terminated, but battery 2 is not fully charged at this time, which will cause capacity loss of battery 2; if battery 1 is fully charged and charging continues until battery 2 is fully charged, it will cause overcharging of battery 1, resulting in a decrease in the performance of battery 1.

[0056] In order to avoid the situation where the two batteries are fully charged one after another, causing battery capacity loss or overcharging, some embodiments add a balancing circuit between the charging module and the battery on the side with smaller impedance. For example, a balancing circuit is added between the above-mentioned battery 1 and the charging module to increase the impedance between the charging module and the battery 1, thereby reducing the current of the battery 1 to achieve the purpose of balancing the voltages of the two batteries, so that the two batteries are fully charged in the same time, reducing the risk of battery capacity loss or overcharging.

[0057] Figure 1B The schematic diagram of setting the equalization circuit between the charging module and the battery 1 is shown. It can be understood that Figure 1B The direction of the arrow in the figure represents the direction of current flow during charging. Figure 1B In the figure, the impedance between the charging module and battery 1 is smaller than that between the charging module and battery 2, so the balancing circuit is placed on the side with smaller impedance, that is, between the charging module and battery 1. Since the balancing circuit can increase the impedance, the impedance between the charging module and battery 1 increases, resulting in a decrease in the current flowing through battery 1, and the total current output by the charging module is constant, so the current flowing through battery 2 increases, that is, the purpose of balancing the currents of battery 1 and battery 2 is achieved. The current of battery 1 decreases, the current of battery 2 increases, the growth rate of the voltage of battery 1 slows down, and the growth rate of the voltage of battery 2 accelerates, so the voltage of battery 1 and the voltage of battery 2 are also balanced, so that the voltages of battery 1 and battery 2 can reach the full-charge voltage at the same time, that is, the battery 1 and battery 2 can be fully charged at the same time.

[0058] However, this method requires the addition of an additional balancing circuit, and the design process of the balancing circuit is cumbersome and costly. Therefore, in order to solve the above technical problems, the present application provides a charging and discharging method. In this method, during the charging process of battery 1 and battery 2, the first voltage and the 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 full-charge voltage of battery 1, but the second voltage has not reached the second full-charge voltage of battery 2, the charging and discharging circuit of battery 1 is disconnected, so that battery 1 cannot continue to charge, and the charging operation of battery 2 continues until battery 2 is fully charged. In this way, there is no need to add an additional balancing circuit, which can effectively reduce costs.

[0059] In some embodiments, a switch control (Switch, SW) pin can be pre-added on battery 1 which is closer to the charging module (or has a smaller impedance to the charging module) so that when it is detected that the first voltage reaches the first full-charge voltage of battery 1 but the second voltage has not yet reached the second full-charge voltage of battery 2, a high level (for example, 1.8V) is input to the SW pin on battery 1 to disconnect the charging and discharging circuit of battery 1.

[0060] It can be understood that the SW pin can be set on the battery protection board in the battery 1. The working principle of the SW pin is that if a high level is given to the SW pin, the SW pin will be disconnected. It can also be understood that the battery protection board of the battery disconnects the output of the battery through the SW pin. This step is equivalent to removing the battery, that is, the battery cannot be charged or discharged. If a low level is given to the SW pin, the SW pin will be turned on, that is, the battery is reconnected to the circuit, and the battery can perform subsequent charging and discharging operations. In an embodiment of the present application, whether the battery is connected to the circuit can be controlled by controlling the level of the SW pin.

[0061] In some embodiments, the battery 1 may be disconnected by any other feasible method to stop charging the battery 1. For example, a switch may be added to the circuit, or a control circuit may be added to control the charging process of the battery 1.

[0062] After battery 1 is fully charged, this method stops charging battery 1 by disconnecting battery 1 from the circuit, thus avoiding the risk of overcharging battery 1. In addition, battery 2 will continue to be charged until the second voltage reaches the second full-charge voltage, thus ensuring that battery 2 is fully charged, thus avoiding the capacity loss of battery 2 due to incomplete charging. In addition, this method does not require the addition of an additional balancing circuit, but only requires the addition of an SW pin, which is low in cost.

[0063] The method provided in the embodiment of the present application can be applied not only to electronic devices containing dual batteries, but also to electronic devices containing more than two batteries. Regardless of the number of batteries, it is only necessary to disconnect the charged batteries from the circuit in sequence until the last battery is fully charged.

[0064] It can be understood that the charging and discharging method provided in the embodiment of the present application is applicable to any electronic device with communication function, including but not limited to mobile phones, tablet computers, computers, wearable devices, augmented reality (AR) devices and other electronic devices. The embodiment of the present application does not limit the type and form of the electronic device.

[0065] The following is a detailed description of the charging and discharging method provided in the embodiment of the present application. The method can be performed by an electronic device. For example, the electronic device includes a battery 1 and a battery 2. Figure 2 As shown, the method may include the following steps:

[0066] 201: Obtain a first voltage of battery 1 and a second voltage of battery 2.

[0067] The embodiments of the present application do not limit the timing when the electronic device obtains the first voltage and the second voltage. For example, the electronic device can obtain the first voltage and the second voltage in real time, or can obtain the first voltage and the second voltage only when battery 1 and battery 2 are in a charging state. Taking the electronic device obtaining the first voltage and the second voltage in the charging state of battery 1 and battery 2 as an example, if battery 1 and battery 2 are being charged, the first voltage of battery 1 in the current charging state and the second voltage of battery 2 in the current charging state can be obtained. Among them, the electronic device can obtain the first voltage and the second voltage through a fuel meter, etc.

[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 the battery 1 is fully charged, and the second full-charge voltage is the voltage when the battery 2 is fully charged. Taking the electronic device as a mobile phone as an example, usually, the full-charge voltage of the battery inside the mobile phone is 4.2V.

[0070] As the battery is continuously charged, the voltage of the battery increases. If the voltage of the battery reaches the full-charge voltage, it means that the battery is fully charged. Therefore, in the embodiment of the present application, if the first voltage reaches the first full-charge voltage, it means that the battery 1 is fully charged; if the second voltage does not reach the second full-charge voltage, it means that the battery 2 is not fully charged. At this time, the battery 1 can be stopped and the battery 2 can be charged continuously.

[0071] The method of not charging the battery 1 further includes but is not limited to disconnecting the battery 1 from the circuit by giving a high level to the SW pin on the battery 1, so that the electronic device can no longer charge the battery 1. In some embodiments, the SW pin is a pin set on the battery protection board during the production line test of the battery. After the production line test, the pin can be retained on the battery protection board so that during the charging process of the battery, the connection or disconnection of the battery 1 in the circuit can be controlled based on the pin according to the method provided in the embodiment of the present application.

[0072] 203: If the second voltage reaches the second full-charge voltage, the charging operation of the battery 2 is terminated.

[0073] It can be understood that when the second voltage reaches the second full-charge voltage, it means that the battery 2 is fully charged and the charging of the battery 2 can be terminated. At this time, the charging operation of the battery 1 and the battery 2 is completed, and the battery 1 and the battery 2 are both in a fully charged state. Therefore, this battery charging method avoids the risk of overcharging the battery 1 and the capacity loss of the battery 2.

[0074] Figure 3 The schematic diagram of the structure of the charging and discharging circuit to which the method provided in the embodiment of the present application is applied is shown, and the charging and discharging circuit is located in the electronic device. The method provided in the present application is described in detail below in combination with the circuit structure.

[0075] like Figure 3 As shown, the charge and discharge circuit includes a detection module 301, a control module 302, a charging module 303 and a battery module 304. The battery module 304 includes a battery 1 and a battery 2.

[0076] The detection module 301 can detect the voltages of the battery 1 and the battery 2 included in the battery module 304 in real time, and obtain the first voltage and the second voltage respectively. Among them, the embodiment of the present application does not limit the timing of the detection module 301 detecting the first voltage and the second voltage. Exemplarily, the detection module 301 can detect the first voltage and the second voltage in real time, or it can detect the first voltage and the second voltage only when the battery 1 and the battery 2 are in a charging state. Taking the detection module 301 detecting the first voltage and the second voltage in the charging state of the battery 1 and the battery 2 as an example, if the detection module 301 detects that the battery 1 and the battery 2 are being charged, the first voltage of the battery 1 in the current charging state and the second voltage of the battery 2 in the current charging state can be obtained. It can be understood that the voltage of the battery will increase as the battery is continuously charged, that is, the higher the battery power is during the charging process, the greater the battery voltage will be.

[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. Exemplarily, the detection module 301 can be a power meter. In addition, the detection module 301 can also be any other module that can realize the detection function and has a storage function. Taking the detection module 301 with a storage function as an example, after the detection module 301 obtains the first voltage and the second voltage, the first voltage and the second voltage are stored inside the module so that the control module 302 can read them.

[0078] After the control module 302 reads the first voltage and the second voltage, it 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 reaches the first full-charge voltage and whether the second voltage reaches the second full-charge voltage. If neither the first voltage nor the second voltage reaches the corresponding full-charge voltage, the control module 302 may send an instruction to the charging module 303 to notify the charging module 303 to continue charging battery 1 and battery 2. The charging module may be a charging chip, etc. It can be understood that the first full-charge voltage is the voltage of battery 1 in a fully charged state, the second full-charge voltage is the voltage of battery 2 in a fully charged state, and the first full-charge voltage and the second full-charge voltage may be the same or different, and the embodiment of the present application 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 means that battery 1 is fully charged, but battery 2 is not fully charged. At this time, in order to avoid the risk of overcharging battery 1 by continuing to charge battery 1, the control module 302 gives a high level (for example, 1.8V) to the SW pin on battery 1, and the SW pin will be disconnected, that is, battery 1 is disconnected from the circuit, and the charging module 303 can no longer charge battery 1, and the detection module 301 cannot detect the voltage of battery 1. In addition, the control module 302 can also send instructions to the charging module 303 to notify the charging module 303 to continue charging. Because battery 1 has been disconnected from the circuit at this time, the charging module 303 cannot continue to charge battery 1, but battery 2 is still in the circuit, so the charging module 303 can continue to charge battery 2.

[0080] When the battery 1 has finished charging and the battery 2 is still in the charging state, if the detection module 301 detects that the third voltage of the battery 2 reaches the second full-charge voltage, it means that the battery 2 is fully charged. The third voltage can also be understood as the voltage of the battery 2 at the next moment after the current moment. That is, the detection module 301 needs to detect the voltage of the battery 2 in real time, so that the control module 302 can control the charging module 303 to end the charging of the battery 2 and reconnect the battery 1 to the circuit when the battery 2 is fully charged.

[0081] After detecting that the third voltage of battery 2 reaches the second full-charge voltage, battery 1 can be reconnected to the circuit to discharge battery 1 and battery 2 simultaneously. Control module 302 can give a low level (e.g., 0V) to the SW pin on battery 1 to allow battery 1 to reconnect to the circuit, and at this time, battery 1 and battery 2 are both in the circuit. In this case, battery 1 and battery 2 will be discharged together in the form of full charge to support the power-on state of the electronic device and be consumed by various applications inside the electronic device.

[0082] In addition, the control module 302 sends a charging stop instruction to the charging module 303, notifying the charging module 303 not to perform the charging operation any more, so as to avoid continuing to charge the battery 2 and causing the risk of overcharging the battery 2.

[0083] Through the above description, the electronic device including the charging and discharging circuit provided by the embodiment of the present application stops charging the battery after detecting that one battery is fully charged, and continues charging the other battery that is not fully charged until charging is completed. This method can avoid the overcharging of the battery that is fully charged first due to continuous charging of both batteries until all batteries are fully charged, and can also avoid the capacity loss of the battery that is not fully charged due to stopping charging of both batteries after one battery is fully charged.

[0084] When battery 2 is fully charged, the control module reconnects battery 1 to the circuit. If the control module fails, that is, battery 1 is not reconnected to the circuit, only battery 2 is discharged for the mobile phone to consume. When the mobile phone experiences high energy consumption, the voltage of battery 2 drops rapidly. If the discharge of battery 2 is not enough to support the use of high energy consumption applications of the mobile phone, the mobile phone will freeze, display distortion, etc., affecting the user experience.

[0085] Therefore, the charging and discharging circuit in the embodiment of the present application also has the function of forcing battery 1 to be connected 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 are discharged together for consumption by the mobile phone. Among them, the embodiment of the present application does not limit the size of the first threshold. For example, the first threshold can be set according to experience, and can also be flexibly adjusted according to the actual application scenario.

[0086] Figure 4 FIG. 1 shows a circuit diagram for forcibly accessing the battery 1. Figure 4As shown, the circuit includes battery 1, battery 2, MOS tube, resistor R1, resistor R2, resistor R3 and resistor R4. Battery 1 has a SW pin, and battery 1 is connected to one end of resistor R4. In addition, the other end of resistor R4 is connected to the general purpose input output (GPIO) and one end of resistor R3. One end of resistor R3 is connected to GPIO and resistor R4, and the other end is connected to the drain of the MOS tube, one end of resistor R1 and the positive electrode of battery 2.

[0087] It can be understood that GPIO can also be referred to as "IO port" for short. GPIO can be used as both an input port and an output port, and is usually used for switch control. In the embodiment of the present application, the disconnection state and the on state of the SW pin on the battery can be controlled by adjusting the level (voltage) of GPIO. The level of GPIO can be controlled by software code. For example, a high level (for example, 1.8V) can be given to GPIO by calling a function that pulls up GPIO, and a low level (for example, 0V) can be given to GPIO by calling a function that pulls down GPIO.

[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 MOS tube and the positive electrode of battery 2, and the other end of resistor R1 is connected to one end of resistor R2, and the other end of resistor R2 is grounded, and the negative electrode of battery 2 is also grounded.

[0089] The MOS tube is a PMOS tube, the source of the MOS tube is grounded, and the gate is connected to the voltage-dividing point B of the resistor R1 and the resistor R2, that is, the gate voltage of the MOS tube is the voltage at point B. The characteristic of the MOS tube is that when the voltage difference Vgs between the gate and the source is less than the threshold, the MOS tube is turned on, otherwise, the MOS tube is turned off.

[0090] because Figure 4 The source of the MOS tube is grounded, so the source voltage is 0, that is, when the gate voltage of the MOS tube is less than the second threshold of the on-voltage of the MOS tube, the MOS tube is turned on. It can be understood that the second threshold is determined according to different models of the MOS tube. After determining the first threshold of battery 2, a MOS tube with a turn-on voltage of the second threshold can be selected according to the first threshold. The present application does not limit the size of the second threshold, as long as the second threshold is less than the first threshold. In addition, after the first threshold and the second threshold are determined, the resistance values ​​of the resistors R1 and R2 for voltage division can be determined according to the sizes of the first threshold and the second threshold. As long as the resistors R1 and R2 divide the first threshold of the battery 2, Figure 4The voltage at point B in the circuit can be the second threshold value. At this time, it can be ensured that the voltage at the gate of the MOS tube is less than the second threshold value. That is, when the voltage of the battery 2 is less than the first threshold value, the MOS tube can be turned on.

[0091] The following is based on Figure 4 The control principle of the circuit is introduced in the circuit structure.

[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 up GPIO (i.e., give GPIO a high level), for example, set the voltage of GPIO to 1.8V. Since the MOS tube is in a disconnected state at this time, resistor R4 is connected in parallel with resistor R3 and in series with battery 1. Then, after the voltage of GPIO is divided by resistor R4, it will be distributed to the SW interface of battery 1. Since resistor R4 is a small resistor, the voltage division is small, which can ensure that the voltage of the SW pin is high. When the SW pin is disconnected, battery 1 is disconnected from the circuit, and battery 1 cannot be charged or discharged.

[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 battery 1 and battery 2 are discharged at the same time for consumption by the mobile phone. Therefore, the control module can pull down the GPIO (i.e., give the GPIO a low level), for example, set the GPIO voltage to 0V, and the voltage of the SW pin is low, so that battery 1 can be connected to the circuit.

[0094] When battery 2 is fully charged, if the control module fails to control, that is, battery 1 is not reconnected to the circuit by adjusting the voltage of GPIO, that is, only battery 2 is discharged, if the voltage across battery 2 is less than the first threshold, that is, the gate voltage of the MOS tube is less than the second threshold, the MOS tube is turned on, and the right end of resistor R3 is grounded through the turned-on MOS tube, and the voltage is 0. Because battery 1 is disconnected from the circuit at this time, that is, no matter whether the voltage of GPIO is high or low, the voltage at the SW pin is 0V, and the SW pin is turned on, and battery 1 is connected to the circuit. At this time, battery 1 can be discharged together with battery 2 for consumption by the mobile phone.

[0095] In the circuit provided above, when the voltage of the SW pin is controlled by the voltage of the GPIO so that the battery 1 is reconnected to the circuit, if this method does not work, that is, the battery 1 is not connected to the circuit, resulting in the battery 1 being unable to discharge together with the battery 2, the MOS tube can be turned on and grounded to force the voltage of the SW pin to become 0V, and then the battery 1 can be connected to the circuit.

[0096] Therefore, compared with the case where battery 2 is discharged before it is fully charged, the above-mentioned method and circuit can fully charge battery 1 and battery 2 respectively, and battery 1 and battery 2 are more fully charged, so they are discharged more. In addition, the method and the corresponding charging and discharging circuit can also avoid the phenomenon of freezing and screen distortion of the mobile phone caused by battery 1 not being connected to the circuit after battery 2 is fully charged, and the power of battery 2 is insufficient to support the consumption of the mobile phone, thereby improving the user experience.

[0097] In addition, it can be understood that the charging and discharging method provided in the embodiment of the present application is applicable to full charging of more than two batteries in addition to charging of dual batteries. Taking the charging of three batteries, battery 1, battery 2 and battery 3 as an example, if it is detected that battery 1 is fully charged, but battery 2 and battery 3 are not fully charged, battery 1 is disconnected from the circuit so that battery 1 cannot be charged or discharged, and then battery 2 and battery 3 are continued to be charged. If it is detected that battery 2 is also fully charged, but battery 3 is still not fully charged, battery 2 is disconnected from the circuit so that battery 2 cannot be charged or discharged, and then battery 3 is continued to be charged. If it is detected that battery 3 is fully charged, battery 3 is not charged any more, and battery 1 and battery 2 are connected to the circuit again, so that battery 1, battery 2 and battery 3 are discharged at the same time for consumption by the mobile phone.

[0098] In addition, the present application provides an electronic device, including: one or more processors; one or more memories; one or more memories storing one or more programs, when one or more programs are executed by one or more processors, the electronic device executes the charging and discharging method provided in an embodiment of the present application.

[0099] The present application provides a chip, which is used to detect that a battery module is in a charging state. When the voltage of a first battery among multiple batteries in the battery module reaches a first full-charge voltage of the first battery and the voltage of a second battery among the multiple batteries does not reach a 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. In addition, the chip can also be used to execute the charging and discharging method provided in an embodiment of the present application.

[0100] The present application provides an electronic device, comprising the battery module and chip mentioned above.

[0101] The present application provides a computer-readable storage medium having instructions stored thereon, which, when executed on a computer, enables the computer to execute the charging and discharging method provided in an embodiment of the present application.

[0102] The present application also provides a computer program product, including: execution instructions, the execution instructions are stored in a readable storage medium, at least one processor of the electronic device can read the execution instructions from the readable storage medium, and at least one processor executes the execution instructions so that the electronic device implements the charging and discharging method provided in the embodiment of the present application.

[0103] Figure 5 1 shows a schematic diagram of the structure of the electronic device 100. The 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, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, and the like.

[0104] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0105] The power management module 141 may include the charging and discharging circuit provided in the embodiment of the present application, so that the batteries 142 included in the electronic device 100 can be fully charged. Among them, the battery 142 may include multiple batteries such as the aforementioned battery 1 and battery 2, which is not limited in the embodiment of the present application.

[0106] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0107] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0108] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or circulated. If the processor 110 needs to use the instruction or data again, it may be directly called from the above-mentioned memory. Repeated access is avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved. The processor may be used to execute the battery charging method mentioned in the present application.

[0109] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[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 a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0111] The mobile communication module 150 can provide wireless communication solutions including 2G / 3G / 4G / 5G etc. applied on the electronic device 100 .

[0112] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0113] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0114] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.

[0115] The external memory 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 memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0116] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a 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 internal memory 121, and / or instructions stored in a memory provided in the processor.

[0117] The SIM card interface 195 is used to connect a SIM card.

[0118] It will be understood that, as used herein, the term "module" may refer to or include an application specific integrated circuit (ASIC), an electronic circuit, a processor (shared, dedicated, or group) and / or memory that executes one or more software or firmware programs, a combinational logic circuit, and / or other appropriate hardware components that provide the described functionality, or may be part of these hardware components.

[0119] It is understood that in each embodiment of the present application, the processor may be a microprocessor, a digital signal processor, a microcontroller, etc., and / or any combination thereof. According to another aspect, the processor may be a single-core processor, a multi-core processor, etc., and / or any combination thereof.

[0120] The various embodiments disclosed in the present application may be implemented in hardware, software, firmware, or a combination of these implementation methods. The embodiments of the present application may be implemented as a computer program or program code executed on a programmable system, the programmable system 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 perform 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, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

[0122] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.

[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 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, instructions may be distributed over a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including, but not limited to, floppy disks, optical disks, optical disks, read-only memories (CD-ROMs), magneto-optical disks, read-only memories (ROMs), random access memories (RAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in electrical, optical, acoustic, or other forms of propagation signals. Therefore, machine-readable media include any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a machine (e.g., computer) readable form.

[0124] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.

[0125] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation method of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units / modules in the above-mentioned device embodiments.

[0126] It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0127] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the present application.

Claims

1. An electronic device, characterized in that: The electronic device comprises: a battery module and a switch; The battery module includes a first battery and a second battery, wherein the first battery includes a battery cell and a battery protection board. The switch is arranged on the battery protection board. The switch is used to: 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 a second voltage, the first battery is reconnected to the charge and discharge circuit of the first battery, and charging of the first battery and the second battery is stopped, wherein the second voltage is lower than the first voltage.

2. The electronic device according to claim 1, characterized in that: The electronic device further comprises: a control module; The control module is used for: When the voltage of the first battery reaches a first fully-charged voltage of the first battery and the voltage of the second battery does not reach a second fully-charged voltage of the second battery, the control pin voltage of the switch is set to a first 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 a charge and discharge circuit of the first battery, the control pin voltage of the switch is set to a second voltage.

3. The electronic device according to claim 2, characterized in that: The control module includes: a first resistor, a second resistor, a third resistor, a fourth resistor, a first field effect transistor and a general purpose input and output port GPIO; One end of the first resistor is connected to the output end of the second battery, the drain of the first field effect transistor 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 general purpose input and output port GPOI; One end of the fourth resistor is connected to the general purpose input and output port GPOI, and the other end of the fourth resistor is connected to the 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 electron, the source of the first field effect transistor and the output end of the second battery are grounded.

4. The electronic device according to claim 3, 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 a first fully-charged voltage of the first battery, a first signal is sent to the general purpose input / output port GPOI to set the control pin voltage of the switch to a first voltage; When the voltage of the second battery reaches the second fully-charged voltage of the second battery, a second signal is given to the general purpose input and output port GPOI to set the control pin voltage of the switch to a second voltage.

5. A charging and discharging method, characterized in that: The electronic device comprises a battery module and a switch, wherein the battery module comprises a first battery and a second battery, and The method comprises: When it is detected that the voltage of the control pin of the switch is a first voltage, the first battery is controlled to be disconnected from the charging and discharging circuit of the first battery, When it is detected that the control pin voltage of the switch in the electronic device is a second voltage, the first battery is controlled to be 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.

6. The method according to claim 5, characterized in that The method further comprises: When it is detected that 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, The control pin voltage of the switch is set to a first voltage.

7. The method according to claim 5, characterized in that The method further comprises: When it is detected that the voltage of the second battery in the discharge state is less than the voltage threshold and the first battery is not connected to the charging and discharging circuit of the first battery, The control pin voltage of the switch is set to a second voltage.

8. An electronic device, characterized in that: include: one or more processors; One or more memories; the one or more memories store one or more programs, and when the one or more programs are executed by the one or more processors, the electronic device executes the charging and discharging method according to any one of claims 5 to 7.

9. A computer-readable storage medium, characterized in that: The readable storage medium stores instructions, and when the instructions are executed on a computer, the computer is caused to execute the charging and discharging method according to any one of claims 5 to 7.

10. A computer program product, characterized in that include: An execution instruction is stored in a readable storage medium. At least one processor of an electronic device can read the execution instruction from the readable storage medium. At least one processor executes the execution instruction so that the electronic device implements the charging and discharging method described in any one of claims 5 to 7.

Citation Information

Patent Citations

  • Double-battery circuit, control method thereof and electronic equipment

    CN113809812A

  • Charging and discharging circuit and electronic equipment

    CN115001063A

  • Double-battery switching circuit, battery switching method, electronic equipment and storage medium

    CN115208041A

  • Charging circuit, method and device, electronic equipment and medium

    CN116111659A

  • Charging circuit and method, electronic equipment and readable storage medium

    CN116231778A