The first embodiment is as follows:
as shown in fig. 1, an embodiment of the invention provides anelectronic device 10, which includes anelectrical load 101 and abattery 102. In a normal case, thebattery 102 supplies power to theelectrical load 101, so that theelectronic device 10 performs corresponding functions. Thepower load 101 may specifically include a display screen, a processor, and other devices in the electronic device.
Theelectronic device 10 further comprises a charging circuit 103. Wherein the charging circuit 103 specifically includes: aconversion unit 1031, and acharging control unit 1032. Wherein,
the input terminal of theconversion unit 1031 is connected to the charging interface of theelectronic device 10, and the output terminal thereof is connected to the node VPH _ PWR, the input terminal of the chargingcontrol unit 1032, and the power input terminal of theelectric load 101. An output terminal of thecharge control unit 1032 is connected to thebattery 102.
Specifically, the charging interface of theelectronic device 10 may refer to an interface in the electronic device for connecting with an external power source and inputting the voltage of the external power source into the electronic device. For example, the charging interface of theelectronic device 10 may be a charging pin on the USB interface of theelectronic device 10, or may be another interface pin connected to the charging pin on the USB interface.
Theconversion unit 1031 is configured to step down a voltage of an external power source connected from a charging interface of theelectronic device 10, and output the voltage from an output terminal of theconversion unit 1031, so as to supply power to theelectric load 101 and charge thebattery 102 through the chargingcontrol unit 1032;
and a chargingcontrol unit 1032, configured to disconnect a path between the input terminal and the output terminal of the chargingcontrol unit 1032 after a preset condition is satisfied, and stop charging thebattery 102.
For example, at present, the external power supply connected to the USB interface of the household electronic device is generally about 5V. Therefore, after the external power supply is connected to the charging interface, the connected external power supply needs to be stepped down. Specifically, the voltage of the external power source is reduced to 5V to 3V-4.4V by the convertingunit 1031 in fig. 1. Then, thepower load 101 is supplied and thebattery 102 is charged through the VPH _ PWR node. At this time, the output current of the convertingunit 1031 is the sum of the current consumption of thepower load 101 and the charging current of the battery 102 (specifically, the average current of the current power load of the conventional smartphone is about 400mA, and the charging current of the battery is about 2000 mA). This results in inefficient use of the power from the external power source. Particularly, when the external power supply is a portable power supply, efficient use of electric power in the portable power supply is affected.
Furthermore, in the embodiment of the present invention, the chargingcontrol unit 1032 is provided between the VPH _ PWR node and thebattery 102, and the chargingcontrol unit 1032 is enabled to disconnect the path between the input terminal and the output terminal of the charging control unit to stop charging the battery when the preset condition is satisfied. At this time, the current at the VPH _ PWR node is equal to the power consumption of the electrical load 101 (i.e., the current is reduced from about 1900mA to about 400 mA), so the path loss is greatly reduced.
In addition, after the path between the input terminal and the output terminal of thecharge control unit 1032 is disconnected, the voltage of the VPH _ PWR node can be maintained at the level of the rated operation voltage (typically, 4.4V). Therefore, the voltage difference between the input terminal and the output terminal of the convertingunit 1031 is the voltage difference VBUS-VPH _ PWR between the charging interface and the VPH _ PWR node at this time, which is lower than the voltage difference VBUS-VBAT between the charging interface and the positive electrode of the battery 102 (the voltage VBAT of the power supply input terminal of thebattery 102 is between 3-4.4V). For example, if the voltage of the external power supply is 5V, VBUS-VPH _ PWR = 5V-4.4V; VBUS-VBAT =5V-VBAT, since VBAT can reach 4.4V when it is highest when the battery is fully charged, VBUS-VPH _ PWR is generally lower than VBUS-VBAT. Thus, since the voltage drop between the input terminal and the output terminal of the convertingunit 1031 becomes small, the conversion efficiency of the convertingunit 1031 is improved, and the power supply efficiency is improved.
Specifically, the conversion unit includes: the PWM driving module, the first MOS tube, the second MOS tube, the inductor and the first capacitor; the PWM driving module is respectively connected with the grid electrode of the first MOS tube and the grid electrode of the second MOS tube; the drain electrode of the first MOS tube is connected with one end of a capacitor, and the other end of the capacitor is grounded; the drain electrode of the first MOS tube is also connected with a charging interface; the source electrode of the first MOS tube is connected with the drain electrode of the second MOS tube, and the source electrode of the first MOS tube is also connected with the output end of the conversion unit through an inductor; the source electrode of the second MOS tube is grounded. The PWM driving module is used for driving the first MOS tube and the second MOS tube to be switched on and off, the first MOS tube, the second MOS tube, the capacitor and the inductor form a buck voltage reduction circuit, and the voltage VBUS of an external power supply accessed by the charging interface is converted into the specified voltage VPH _ PWR.
Further, the conversion unit further includes: a current path control module and a fourth MOS tube. The current path control module is connected with a grid electrode of the fourth MOS tube, and a drain electrode of the first MOS tube is connected with the charging interface through a source electrode and a drain electrode of the fourth MOS tube.
A charge control unit comprising: the charging control module and the third MOS tube; the charging control module is connected with a grid electrode of a third MOS tube, a drain electrode of the third MOS tube is connected with the output end of the conversion unit, and a source electrode of the third MOS tube is connected with the battery; and the charging control module is used for controlling the third MOS tube to be in a cut-off state after a preset condition is met.
Specifically, as shown in fig. 2, theconversion unit 1031 specifically includes a Current path control module (Current path control), a PWM driving module (PWM drivers), a first MOS transistor Q1, a second MOS transistor Q2, a fourth MOS transistor Q4, an inductor L1, and a first capacitor C1, where the PWM driving module is configured to drive the Q1 and the Q2 to be turned on and off, Q1, Q2, C1, and C L constitute a buck circuit, and the voltage VBUS of an external power source connected to the charging interface is converted into a specified voltage VPH _ pwr, and the Current path control module controls the Q4 to be turned on and off.
In addition, theelectronic device 10 may further include a logic control module (logic control), and the logic control module is configured to control the current path control module, the PWM driving module, and the battery control module to operate. Specifically, the logic control module may control the PWM driving module to control on/off of Q1 and Q2 according to the voltage value of thebattery 102, so as to control the voltage of the VPH _ PWR node. In addition, the logic control module also controls the battery control module to control the Q3 to be turned off after the preset condition is met.
In one implementation, the chargingcontrol unit 1032 is specifically configured to disconnect a path between the input and the output of the chargingcontrol unit 1032 when it is detected that the external power source is the mobile power source and it is detected that the power amount of thebattery 102 is greater than the power amount threshold.
Illustratively, the remaining capacity of thebattery 102 may be detected, for example, after theelectronic device 10 is connected to a mobile power source. If the remaining power of thebattery 102 is higher than the predetermined power (e.g., 30% remaining power), the input terminal and the output terminal of the chargingcontrol unit 1032 are disconnected, and the charging of thebattery 102 is stopped. At this time, the mobile power supply supplies power only to the power load of theelectronic device 10, so the current is small; meanwhile, the voltage of the VPH _ PWR node is high, so that the conversion efficiency of theconversion unit 1031 is high, and the power supply efficiency is improved. The mobile power supply can supply power to theelectronic equipment 10 for a longer time, and the standby time and the endurance time of theelectronic equipment 10 are prolonged.
Additionally, in another implementation, the user may also select when to have the external power source alone power the electronic device without charging the battery. Therefore, the chargingcontrol unit 1032 is also specifically configured to disconnect the path between the input terminal and the output terminal of the chargingcontrol unit 1032 when a preset operation by the user is detected.
In addition, in the embodiment of the invention, the situation of the residual capacity of the mobile power supply can be directly and clearly known by a user. Theelectronic device 10 provided by the embodiment of the present invention further includes a display module 104. The display module 104 is configured to display a circuit of the mobile power supply on a display interface of the electronic device when the external power supply is the mobile power supply.
For example, as shown in fig. 3, after acquiring the power information of the mobile power supply in some way, the electronic device displays the power of the mobile power supply on the interface of the mobile phone through the display module 104.
Specifically, in order to keep the display interface concise and beautiful, the circuit of the mobile power supply is displayed on the display interface of the electronic device, and the circuit is arranged at a position parallel to the position where the electric quantity of thebattery 102 of theelectronic device 10 is displayed.
In addition, in one implementation, theelectronic device 10 provided by the embodiment of the invention can be used in cooperation with themobile power supply 20 fixed on theelectronic device 10. The portable power source that can be fixed to theelectronic device 10 may be a vest that is fixed to the back of theelectronic device 10. The shape of the vest can resemble an existing protective case for electronic equipment.
Illustratively, as shown in FIG. 4,electronic device 10 has a pin contact interface on the device back surface and a corresponding second pin contact interface on the inner surface of a vest 20a that mates withelectronic device 10. Specifically, in practical application, the contact interface of the thimble on theelectronic device 10 may be a metal groove. The contact interface of the thimble on the vest 20a may be a metal raised spring corresponding to the metal recess. The relationship of the pin contact interfaces on theelectronic device 10 to the pin contact interfaces on the vest 20a may be similar to the relationship of a male-female connector. In addition, it should be noted that the contact of the thimble contact interface in the embodiment of the present invention may be in a circular shape, a square shape, or other shapes, and the present invention is not limited thereto.
The vest 20a may be mounted to the back of theelectronic device 10 in use. After the vest 20a is mounted on the back of theelectronic device 10, the vest 20a is coupled to the pin contact interface on theelectronic device 10, thereby allowing power from the vest 20a to be transferred to theelectronic device 10. Theelectronic device 10 may be a mobile phone, a tablet computer, or the like.
Illustratively, as shown in fig. 5, is a photograph of a pin contact interface on the back of anelectronic device 10, which includes 10 contacts. In use, there are 10 ejector pin spring pieces at corresponding positions on the vest 20a for coupling with 10 contacts on theelectronic device 10.
Specifically, table 1 below provides an interface definition of a thimble contact interface:
| pin number | Name of Pin | Description of thefunction |
| 1 | VBUS | The back clip battery outputs power to the electronic device. 5V specification. |
| 2 | HDQ | A one-wire electricity meter communication interface. |
| 3 | DET | The electronic equipment detects the loading and unloading of the back splint battery, and the back splint battery is grounded through a resistor on a circuit. |
| 4 | USB_D+ | A USB data signal. |
| 5 | GND | The power ground and the signal ground are common. |
| 6 | GND | The power ground and the signal ground are common. |
| 7 | USB_D- | A USB data signal. |
| 8 | EN | The electronic device enables the back-clip battery output VBUS. |
| 9 | USB_ID | OTG function | |
| 10 | VBUS | The back clip battery outputs power to the electronic device. 5V specification. |
TABLE 1
Fig. 6 is a schematic structural diagram of themobile power supply 20 according to the embodiment of the present invention. In conjunction with the interface definitions of table 1, in fig. 6, the detection circuit is configured to send a detection signal to theelectronic device 10 through the DET pin, so that theelectronic device 10 detects the attachment or detachment of theportable power source 20. And the electricity meter chip is used for detecting the electricity quantity information of the battery of themobile power supply 20 and sending the electricity quantity information to theelectronic equipment 10 through the HDQ terminal pin. The main battery circuit in theportable power source 20 charges theelectronic device 10 through VBUS, i.e., connects to a charging interface of theelectronic device 10. The battery main circuit in themobile power supply 20 also receives an enable signal of theelectronic device 10 through the EN terminal pin, and starts supplying power to theelectronic device 10 in response to the enable signal. In addition, the USB interface of the mobile power supply is connected through the USB _ D + terminal pin and the USB _ D-terminal pin of the thimble contact interface, so that the data transmission task of theelectronic device 10 is completed through the USB interface of themobile power supply 20.
The connection and operation modes of theelectronic device 10 and themobile power supply 20 are combined. As shown in fig. 7, in the embodiment of the present invention, theelectronic device 10 further includes: the first USB interface, the first thimble contact interface and the power switch unit U2. After themobile power source 20 is fixed on the electronic device, the first pin contact interface is used for coupling with a second pin contact interface on the mobile power source. The charging terminal pin of the first USB interface and the charging terminal pin of the first thimble contact interface are respectively connected to the power switch unit U2, and the power switch unit U2 is further connected to the charging interface. The position of the charging interface is exemplarily marked in fig. 7.
Specifically, as shown in fig. 7, the charging circuit 103 is integrated into a Power Management IC (PMIC) U1. The power switch unit U2 is connected to the charging circuit 103 via a charging interface.
And the power switch unit U2 is configured to, when the first thimble contact interface is coupled with the second thimble contact interface on themobile power supply 20, turn on the charging terminal pin of the first thimble contact interface with the charging interface.
When theportable power source 20 is installed on theelectronic device 10, the second pin contact interface is coupled to the first pin contact interface, so that theportable power source 20 outputs an external power voltage to the charging interface through the charging pin of the first pin contact interface.
For example, as shown in fig. 7, when themobile power supply 20 is installed on theelectronic device 10, theelectronic device 10 detects whether the mobile power supply is installed through the DET pin of the first pin contact interface. After detecting that the mobile power supply is installed, the power switch U2 connects the VBUS terminal pin of the first thimble contact interface with the charging interface, so that themobile power supply 20 can charge theelectronic device 10 through the VBUS terminal pin.
In the above embodiment of the present invention, after the first pin contact interface of theelectronic device 10 is coupled to the second pin contact interface of themobile power supply 20, the power switch unit will conduct the charging pin of the first pin contact interface with the charging interface, so as to charge themobile phone 10 by using themobile power supply 20. Therefore, when the portable power source is not worn at ordinary times, the charging terminal pin of the first thimble contact interface and the charging interface are isolated and uncharged, and therefore the reliability of the circuit is guaranteed.
Further, as shown in fig. 7, theelectronic device 10 further includes a USB switching unit U3. The first pin contact interface further includes a data transmission terminal pin, such as the USB _ D + terminal pin and the USB _ D-terminal pin. The data transmission terminal pin is used for being connected with a second USB interface on themobile power supply 20, and the specific data transmission terminal pin USB _ D +, USB _ D-is connected with the second USB interface on themobile power supply 20 through a second thimble contact interface.
And the USB switch unit U3 is respectively connected with the first USB interface, the first thimble contact interface and the data transmission terminal pin.
And the USB switch unit U3 is used for selecting one of the first USB interface or the first thimble contact interface according to a preset mode and executing a data interaction task of the electronic equipment.
In the above embodiment of the present invention, it is considered that after theportable power source 20 is installed, the first USB interface carried by theelectronic device 10 may be blocked by theportable power source 20, and thus is inconvenient to use. Therefore, by providing the USB switching unit U3 in theelectronic device 10, the data interaction task can be completed by using the second USB interface on theportable power source 20 after theportable power source 20 is installed.
In one implementation, as shown in fig. 7, in theelectronic device 10, the first pin contact interface further includes a DET detection pin and an EN enable pin.
When the DET detection pin receives the preset signal, theelectronic device 10 determines that the first thimble contact interface is coupled with the second thimble contact interface on themobile power supply 20;
after determining that the first thimble contact interface is coupled with the second thimble contact interface, the electronic device sends an enable signal to themobile power supply 20 through the EN enable pin, so that themobile power supply 20 outputs an external power supply voltage to the charging interface through the charging pin VBUS of the first thimble contact interface in response to the enable signal, and charges theelectronic device 10.
In one implementation, as shown in fig. 7, the first thimble contact interface further includes an HDQ communication terminal pin; theelectronic device 10 obtains the power information of themobile power supply 20 through the HDQ communication terminal pin. So as to display the power information of themobile power supply 20 on the interface of the electronic device.
According to the electronic equipment provided by the embodiment of the invention, whether the external power supply simultaneously charges the battery of the electronic equipment and supplies power to the load of the electronic equipment or the external power supply only supplies power to the load of the electronic equipment after the battery charging is stopped can be selected according to requirements. For example, when the external power source is a mobile power source, the charging of the battery can be selected to be stopped, and only the external power source supplies power to the load of the electronic device, so as to improve the utilization efficiency of the electric quantity in the mobile power source; when the external power supply is the power adapter, the battery of the electronic equipment is charged and the load of the electronic equipment is supplied with power at the same time, so that the battery is charged as soon as possible.
Example two:
the embodiment of the present invention further provides a charging method for an electronic device, which is applied to charging theelectronic device 10 provided in the first embodiment. As shown in fig. 8, the method includes:
s301, the voltage of an external power supply connected to a charging interface of the electronic equipment is reduced, so that the electronic equipment is charged to an electric load and the battery is charged.
And S302, stopping charging the battery after the preset condition is met.
Optionally, S302 may specifically include:
and S302a, when the external power supply is detected to be the mobile power supply and the electric quantity of the battery is detected to be larger than the electric quantity threshold value, stopping charging the battery.
Or, S302 may specifically further include:
s302b, when the preset operation by the user is detected, the charging of the battery is stopped.
A block diagram of a hardware configuration of the terminal 100 according to an exemplary embodiment is exemplarily shown in fig. 9. As shown in fig. 9, the terminal 100 includes: a Radio Frequency (RF)circuit 110, amemory 120, aninput unit 130, adisplay unit 140, asensor 150, anaudio circuit 160, a Wireless Fidelity (Wi-Fi)module 170, aprocessor 180, abluetooth module 181, and apower supply 190.
TheRF circuit 110 may be used for receiving and transmitting signals during information transmission and reception or during a call, and may receive downlink data of a base station and then send the downlink data to theprocessor 180 for processing; the uplink data may be transmitted to the base station. Typically, the RF circuitry includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like.
Thememory 120 may be used to store software programs and data. Theprocessor 180 performs various functions of the terminal 100 and data processing by executing software programs or data stored in thememory 120. Thememory 120 may include high speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Thememory 120 stores an operating system that enables the terminal 100 to operate. Thememory 120 may store an operating system and various application programs, and may also store codes for performing the methods described in the embodiments of the present application.
Theinput unit 130, such as a touch screen, may be used to receive input numeric or character information, generate signal inputs related to user settings and function control of the terminal 100. Specifically, theinput unit 130 may include atouch screen 131 disposed on a front surface of the terminal 100 and may collect a touch operation by a user thereon or nearby. Theinput unit 130 in this application may receive a touch operation of a user, such as clicking a button, dragging a scroll box, and the like.
Thedisplay unit 140 may be used to display information input by the user or information provided to the user and a Graphical User Interface (GUI) of various menus of the terminal 100. Thedisplay unit 140 may include adisplay screen 141 disposed on the front surface of the terminal 100. Thedisplay screen 141 may be configured in the form of a liquid crystal display, a light emitting diode, or the like. Thedisplay unit 140 may be used to display various graphical user interfaces described herein. Thetouch screen 131 may cover thedisplay screen 141, or thetouch screen 131 and thedisplay screen 141 may be integrated to implement input and output functions of the terminal 100, and after the integration, the touch screen may be referred to as a touch display screen for short. In the present application, thedisplay unit 140 may display the application programs and the corresponding operation steps.
The terminal 100 may also include at least onesensor 150, such as anacceleration sensor 155, a light sensor, a motion sensor. The terminal 100 may also be configured with other sensors such as a gyroscope, barometer, hygrometer, thermometer, infrared sensor, and the like.
Audio circuitry 160,speaker 161, andmicrophone 162 may provide an audio interface between a user andterminal 100. Theaudio circuit 160 may transmit the electrical signal converted from the received audio data to thespeaker 161, and convert the electrical signal into a sound signal for output by thespeaker 161. The terminal 100 may also be provided with a volume button for adjusting the volume of the sound signal. On the other hand, themicrophone 162 converts the collected sound signal into an electrical signal, converts the electrical signal into audio data after being received by theaudio circuit 160, and outputs the audio data to theRF circuit 110 to be transmitted to, for example, another terminal or outputs the audio data to thememory 120 for further processing. In this application, themicrophone 162 may capture the voice of the user.
Wi-Fi belongs to a short-distance wireless transmission technology, and the terminal 100 can help a user to send and receive e-mails, browse webpages, access streaming media, and the like through the Wi-Fi module 170, and provides wireless broadband internet access for the user.
Theprocessor 180 is a control center of the terminal 100, connects various parts of the entire terminal using various interfaces and lines, and performs various functions of the terminal 100 and processes data by running or executing software programs stored in thememory 120 and calling data stored in thememory 120. In some embodiments,processor 180 may include one or more processing units; theprocessor 180 may also integrate an application processor, which mainly handles operating systems, user interfaces, applications, etc., and a baseband processor, which mainly handles wireless communications. It will be appreciated that the baseband processor described above may not be integrated into theprocessor 180. In the present application, theprocessor 180 may run an operating system, an application program, a user interface display, and a touch response, and the processing method described in the embodiments of the present application. In addition, theprocessor 180 is coupled with theinput unit 130 and thedisplay unit 140.
And thebluetooth module 181 is configured to perform information interaction with other bluetooth devices having a bluetooth module through a bluetooth protocol. For example, the terminal 100 may establish a bluetooth connection with a wearable electronic device (e.g., a smart watch) having a bluetooth module via thebluetooth module 181, so as to perform data interaction.
The terminal 100 also includes a power supply 190 (e.g., a battery) to power the various components. The power supply may be logically connected to theprocessor 180 through a power management system to manage charging, discharging, power consumption, etc. through the power management system. The terminal 100 may also be configured with power buttons for powering the terminal on and off, and locking the screen.
Fig. 10 is a schematic diagram for illustrating a user interface on a terminal (e.g.,terminal 100 of fig. 9). In some implementations, a user can open a corresponding application by touching an application icon on the user interface, or can open a corresponding folder by touching a folder icon on the user interface.
Fig. 11(a) and 11(b) are schematic structural views for illustrating the rear surface and the front surface of the terminal, respectively. Fig. 12(a) and 12(b) are schematic structural views for illustrating the front side of the back splint battery and the back side of the back splint battery, respectively. Fig. 13(a) and 13(b) are schematic structural views for illustrating the front and rear surfaces of the terminal to which the back-clip battery has been mounted, respectively.
With reference to fig. 11-13, in some implementations, a firstpin contact interface 300 is provided on the back surface of the terminal, a secondpin contact interface 400 is provided on the back surface of the back-clip battery, and after the back-clip battery is mounted on the terminal, the firstpin contact interface 300 and the secondpin contact interface 400 are electrically connected, so that the electric quantity of the back-clip battery can be transmitted to the terminal.
It should be noted that the terminal itself has a battery, and when the back-clip battery is not installed, the battery is used to supply power to the host of the terminal, and is collectively referred to as "main battery" in the following description, and correspondingly, the back-clip battery is collectively referred to as "sub battery" in the following description.
Fig. 14 is a flowchart for illustrating a processing method provided by an embodiment of the present invention.
In an alternative embodiment, a processing method is provided, which includes: at a terminal having one or more processors, memory, an input unit, and a display unit:
step 601, determining that a charger is plugged in.
Step 602, determining whether the main battery is full of electricity, if yes, performingstep 605, and if not, performingstep 603. A battery charge of 100 indicates that the battery is full, otherwise, the battery is considered to be not full.
And step 603, controlling a charging path of the main battery to be opened. The charger charges the main battery through a charging path of the main battery.
Step 604, determining whether the output current of the charger is greater than the charging current of the main battery, if so, executingstep 605, and if not, executingstep 602.
Step 605, determining whether the electric quantity of the secondary battery is full, if yes, ending the process, and if not, executingstep 606. Similarly, a charge of 100 for the sub-battery indicates full charge, otherwise, the charge is considered to be under-full.
And step 606, configuring the charging current of the secondary battery according to the output current of the charger and the charging current of the main battery, and controlling the charging path of the secondary battery to be opened.
The charger charges the sub-battery through a charging path of the sub-battery. In an alternative embodiment, the difference between the output current of the charger and the charging current of the main battery is configured as the charging current of the sub-battery. In an alternative embodiment, 80% of the difference between the output current of the charger and the charging current of the main battery is configured as the charging current of the sub-battery.
In this embodiment, when the main battery is not fully charged, the charger preferentially ensures that the main battery obtains the maximum charging current, and the remaining part charges the sub-battery. For example, if the output current of the charger is 3A, the charging current of the main battery is 2A, and the electric quantities of the main battery and the auxiliary battery are not full, the charger charges the main battery and the auxiliary battery at the same time; assuming that the output current of the charger is 1A, the charging current of the main battery is 2A, and the electric quantity of the main battery and the electric quantity of the auxiliary battery are not full, the charger only charges the main battery; assuming that the output current of the charger is 2A, the charging current of the main battery is 2A, and the electric quantities of the main battery and the auxiliary battery are not full, the charger charges only the main battery.
In an alternative embodiment, the secondary battery provides power to the terminal in two modes:
mode one, charging mode: the auxiliary battery directly provides electric quantity for the mobile phone and simultaneously charges the main battery;
mode two, intelligent mode: the auxiliary battery directly provides electric quantity for the mobile phone, and when the charging electric quantity of the main battery is less than a first preset threshold value, the main battery is automatically charged.
Fig. 15 is a schematic diagram for illustrating thedisplay unit 140 displaying a dual battery management interface. The user may select the charging mode or the smart mode through an interface as shown in fig. 7. In this embodiment, the first preset threshold is 15%.
Fig. 16 is a flowchart for illustrating a processing method according to another embodiment of the present invention. Specifically, the processing method provided by the embodiment of the present invention includes: at a terminal having one or more processors, memory, an input unit, and a display unit:
step 801, determining the insertion of a secondary battery;
afterstep 801, the current mode of the terminal needs to be judged, if the current mode is the intelligent mode,step 802 is executed, and if the current mode is the charging mode,step 806 is executed;
step 802, determining whether the electric quantity of the main battery is smaller than a first preset threshold, if so, executingstep 803, and if not, executingstep 806;
step 803, judging whether the electric quantity of the auxiliary battery is smaller than a second preset threshold value, if so, executingstep 804, and if not, executingstep 805;
and step 804, controlling the main battery to supply power to the host, and ending the process.
And step 805, controlling the auxiliary battery to charge the main battery, and ending the process.
And step 806, controlling the secondary battery to supply power to the host, and ending the process.
In a specific example, the first preset threshold instep 802 is 15%, and the second preset threshold instep 803 is 1%.
In another example, the first predetermined threshold instep 802 is 30% and the second predetermined threshold instep 803 is 2%.
In an optional implementation manner, the operating system of the terminal is an Android system. The kernel layer can detect events such as whether the auxiliary battery is inserted, the electric quantity of the main battery and the auxiliary battery, whether the charger is inserted and the like through the interruption or the level of the I/O port.
In some implementations, the kernel layer registers the main battery and the sub-battery as separate devices under the sys/class/power-supply directory of the system, and names them, for example, the main battery is named as battery and the sub-battery is named as motion-battery.
When the information such as the electric quantity level and the state status (including the charging state charging, the discharging state discharging, and the non-charging state charging) of the main battery changes, the kernel layer writes the changed value into the battery directory.
When the information of the electric quantity motion _ level, the state motion _ status (including the charging state charging, the discharging state discharging, the non-charging state not charging), the insertion state motion _ present, and the like of the sub-battery changes, the kernel layer writes the changed value into the motion-based directory.
And monitoring and reading the battery catalog and the motion-battery catalog through the health module, and reporting to the battery service. And if the BatteryService service receives the state change of the main battery and/or the auxiliary battery, sending a battery _ changed broadcast to the upper application program. The upper application program can analyze the information of the electric quantity, the charge and discharge state of the main battery, the electric quantity, the charge and discharge state, the insertion state and the like of the auxiliary battery from the received battery _ changed broadcast.
Instep 801, if the insertion state motion _ present of the secondary battery is analyzed as true from the received battery _ changed broadcast, it is determined that the secondary battery is inserted.
Fig. 17 is a schematic view of a user interface for showing thedisplay unit 140 displaying an unlocked state. Fig. 18 is an enlarged schematic view for illustrating a portion a of fig. 17, including a main battery charging icon and a sub-battery general icon. Thelightning marker 700 in the main battery charge icon is used to indicate that the auxiliary battery is charging the main battery. Fig. 19 and 20 are schematic views of user interfaces for illustrating a state where thedisplay unit 140 displays a lock screen.
In an alternative embodiment, the terminal is plugged into a charger to simultaneously charge the primary and secondary batteries. And if the main battery is detected to be in a charging state charging and the electric quantity is less than 100, and the auxiliary battery is detected to be in a charging state and the electric quantity is less than 100, displaying a main battery charging icon and an auxiliary battery charging icon.
In an alternative embodiment, the terminal is plugged into a charger to charge the main battery separately. And if the main battery is detected to be in a charging state charging and the electric quantity level is less than 100, and the auxiliary battery is detected to be in an uncharged state notchasinging, displaying a main battery charging icon and an auxiliary battery common icon.
In an alternative embodiment, the terminal is not plugged into a charger, and the secondary battery charges the primary battery. If it is detected that the main battery is in a charging state charging and the level of the electric quantity is less than 100, and the sub-battery is in a discharging state discharging, a main battery charging icon and a sub-battery common icon are displayed, as shown in fig. 8 and 9. In some implementations, if it is detected that the terminal is in the lock screen state, a word "the secondary battery is charging the primary battery" is displayed on the lock screen desktop.
In an optional implementation manner, when the terminal is in the screen locking state, if a battery _ changed broadcast is received, and it is determined that the secondary battery is in the discharging state changing and the primary battery is in the charging state changing and the level of the electric quantity is less than 100, the animation is displayed for a period of time, for example, 6s is displayed, and then, a picture interface is displayed.
Fig. 21 is a schematic view of a user interface for showing that thedisplay unit 140 displays the predicted available time of the main and sub batteries. In order to enable the user to visually see the expected availability times of the main and sub batteries without the terminal inserted into the charger, in an alternative embodiment, the expected availability times of the main and sub batteries are presented to the user in a user interface as shown in fig. 21.
In an alternative embodiment, the predicted available time of the main battery is directly obtained through an interface of an Android native system, such as computeBatteryTimeRemaining of battterystats class.
In an alternative embodiment, the available time of the sub-battery is estimated based on the output current of the sub-battery. In some implementations, the terminal begins calculating the expected available time for the secondary battery after the trigger condition is satisfied.
In an alternative embodiment, the trigger condition for calculating the expected usable time of the secondary battery is that the secondary battery is inserted without a charger.
In an alternative embodiment, the trigger condition for calculating the expected time of availability of the secondary battery is pulling out the charger in the case where the secondary battery is already installed.
In some implementations, if the insertion condition motion _ present of the secondary battery is true and the primary battery and the secondary battery are in the non-charging state, as analyzed from the received battery _ changed broadcast, the expected available time of the secondary battery is calculated.
In an alternative embodiment, the estimated time of availability of the secondary battery is calculated with reference to the estimated time of availability of the primary battery. Specifically, the method comprises the following steps:
calculating the remaining capacity EQ1 of the main battery according to the remaining capacity percentage X1% and the capacity Y1 of the main battery, specifically EQ1= X1% Y1;
calculating a remaining capacity EQ2 of the sub-battery, specifically EQ2= X2% by Y2, from the remaining capacity percentage X2% of the sub-battery and the capacity Y2 of the sub-battery;
the predicted available time BT2 of the sub-battery, specifically, BT2= BT1 EQ2/EQ1 is calculated from the remaining energy EQ1 of the main battery, the remaining energy EQ2 of the sub-battery, and the predicted available time BT1 of the main battery. The predicted available time BT1 of the main battery can be directly obtained according to an interface of an Android native system.
For example, assuming that the percentage of remaining capacity X1% of the main battery is 80%, the capacity Y1 of the main battery is 4400mAh, the percentage of remaining capacity X2% of the sub-battery is 60%, the capacity Y2 of the sub-battery is 3400mAh, it can be calculated that the remaining capacity EQ1 of the main battery is 80% 4400mAh =3520mAh, the remaining capacity EQ2 of the sub-battery is 60% 3400mAh =2040mAh, and the predicted available time BT1 obtained from the system interface to the main battery is 48h, so that the predicted available time BT2 of the sub-battery is 48h 2040mAh/3520mAh =27.8h, that is, the predicted available time of the sub-battery is 27.8 h.
In order to improve the accuracy of the predicted available time of the sub-battery, in an alternative embodiment, the predicted available time of the sub-battery is calculated based on the actual output current of the sub-battery. Specifically, the method comprises the following steps:
and calculating the average current Iaverage of the auxiliary battery in the statistical period. Since the instantaneous current output by the sub-battery is pulsating, which results in a calculated expected available time that is also pulsating and does not characterize the actual use of the terminal by the user, it is often necessary to calculate the average current over a period of time.
In an alternative embodiment, the statistical period is a fixed time period, for example, 5 minutes, and the predicted available time of the current sub-battery is calculated according to the average current of the sub-battery within 5 minutes before the current time.
In another optional embodiment, the statistical period is a non-fixed time period, for example, a time period during which the electric quantity decreases by a preset threshold. In some implementations, the period of time for the charge to drop by 1% is set as the statistical period. For example, assuming that the current percentage of the remaining capacity of the sub-battery is 66%, the expected available time of the current sub-battery needs to be calculated based on the average current of the sub-battery during the period in which the percentage of the remaining capacity of the sub-battery decreases from 67% to 66%.
Calculating a remaining capacity EQ2 of the sub-battery, specifically EQ2= X2% by Y2, from the remaining capacity percentage X2% of the sub-battery and the capacity Y2 of the sub-battery;
and calculating the predicted available time BT2 of the auxiliary battery according to the average current Iaverage of the auxiliary battery and the residual capacity EQ2, and specifically, BT2=EQ 2/Iaverage.
For example, assuming that the average current Iaverage of the sub-battery is 80mA, the capacity Y2 of the sub-battery is 3400mAh, and the percentage X2% of the remaining capacity of the sub-battery is 60%, the remaining capacity EQ2 of the sub-battery can be calculated as 60% 3400mAh =2040mAh, and the expected available time BT2 of the sub-battery is 2040mAh/80mA =25.5h, i.e., the expected available time of the sub-battery is 25.5 hours.
In the above embodiment, since the average current of the slave battery cannot be counted in the first statistical period from when the trigger condition is satisfied, the expected available time of the slave battery can be calculated using the expected available time of the master battery in the first statistical period. In other words, the estimated available time of the sub-battery is calculated with reference to the estimated available time of the main battery in the first statistical period, and then the estimated available time of the sub-battery is calculated based on the output current of the sub-battery.
In an optional implementation mode, the power consumption situations of the application program installed in the terminal on the main battery and the auxiliary battery respectively are counted.
In some implementations, the state changes of the hardware modules in the terminal are all transmitted from the unified battery usage information interface module. When the main battery supplies power to the host, recording power consumption of each hardware module and power consumption conditions caused by using the hardware modules by each application program into a main battery use information recording module; when the sub battery supplies power to the host, the power consumption of each hardware module and the power consumption of each application program caused by using the hardware modules are recorded in the sub battery use information recording module.
In an optional embodiment, the statistical method includes: at a terminal having one or more processors, memory, an input unit, and a display unit:
1401, determining a target application program to start;
step 1402, if it is determined that the main battery supplies power to the host, calculating a first power consumption of the target application program;
in an optional embodiment, during the time when the main battery supplies power to the host, the power consumption of the target application program on the main battery, that is, the first power consumption, is calculated according to the usage duration of the target application program on each hardware module and the power consumption of each hardware module per unit time.
For example, the main battery supplies power to the host, and the user calls the camera module and the bluetooth module during the use of the application a, so that the first power consumption of the application a = CPU usage time × CPU unit time power consumption + camera usage time × camera unit time power consumption + bluetooth usage time × bluetooth unit time power consumption. In this embodiment, the power consumption of the application a on the main battery is the sum of the power consumption of the application a on three hardware modules, namely the CPU, the camera module, and the bluetooth module.
And step 1403, if the secondary battery is determined to supply power to the host, recording second power consumption of the target application program.
In an alternative embodiment, during the time period when the secondary battery supplies power to the host, the power consumption of the target application on the secondary battery, that is, the second power consumption, is calculated according to the usage duration of the target application on each hardware module and the power consumption per unit time of each hardware module.
In an alternative embodiment, the power consumption of the application on the primary battery and the power consumption of the application on the secondary battery are presented to the user in the user interface.
Fig. 22 shows a flowchart of the dual battery mobile phone terminal.
Step 2101, monitoring of the loading and unloading of the sub-battery.
The auxiliary battery is connected with the mobile phone in an external contact mode, the mobile phone can detect the loading and unloading states of the auxiliary battery through high and low level signals of GPIO, when the mobile phone receives the low level of GPIO, the auxiliary battery is detected to be in the loading state, and when the mobile phone receives the high level of GPIO, the auxiliary battery is detected to be in the unloading state.
In some embodiments, the loading and unloading states of the secondary battery are processed by the CPU of the mobile phone through GPIO signals, for example, in the circuit design of the mobile phone, the default state is that the GPIO pin signal is high, when the secondary battery is loaded, the state GPIO pin signal is pulled low to become low, and when the secondary battery is unloaded, the state GPIO pin returns to the default high state. Therefore, the CPU of the mobile phone judges whether the auxiliary battery is in the loading or unloading state at present according to the current signal state of the GPIO.
The electric energy output switch of the auxiliary battery can be controlled by a control GPIO signal on the CPU side of the mobile phone, for example, when the main circuit in the mobile battery detects that the signal for controlling the GPIO is high level, the electric energy output of the mobile battery can be opened; when the main circuit in the mobile battery detects that the signal for controlling the GPIO is in a low level, the power output of the mobile battery is closed.
Atstep 2102, it is determined whether a sub battery is loaded. If no,step 2103 is executed, and if yes,step 2104 is executed.
The mobile phone recognizes the loading and the dismounting of the auxiliary battery, and can give a prompt to a user in an image interface of a display screen of the mobile phone.
And 2103, recovering the state of the mobile phone without the auxiliary battery.
If not, the mobile phone is in a state of only the main battery without the auxiliary battery in order to detect that the auxiliary battery is in an unloaded state.
Step 2014, the user is prompted to select the operating mode of the sub-battery. If the user selects the charging mode,step 2105 is executed, if the user selects the smart mode,step 2109 is executed, if the user does not select, the mobile phone executesstep 2109 by default, that is, the mobile phone enters the smart mode.
If the auxiliary battery is loaded, the user is prompted to select the working mode of the auxiliary battery after the auxiliary battery is loaded, and after the auxiliary battery is loaded on the mobile phone, the electric energy of the main battery can be effectively stored, because the electric energy of the auxiliary battery can be preferentially utilized by the mobile phone.
The mobile phone is also provided with two working modes of the auxiliary battery in the set application: the charging mode and the intelligent mode can be selected and switched by a user.
Instep 2105, the phone enters a charging mode.
The concept of the "charging mode" is to always set the sub-battery to a charging state in which the electric energy of the sub-battery is divided into two parts and a part of the electric energy of the sub-battery is transferred to the main battery, that is, the sub-battery is used to charge the main battery; from the interface of the mobile phone screen, the auxiliary battery can be shown to continuously charge the main battery by using images or animation. The other part of the electric energy of the auxiliary battery is supplied to the electric energy loss of the mobile phone system for the operation and the work of the mobile phone system.
In this mode, the electric power of the auxiliary battery is consumed faster, and the electric power of the main battery is continuously increased.
Atstep 2106, the secondary battery is set to a charged state.
Instep 2107, the charging type is modified to "Motion _ charge",
according to the two operation modes provided by the sub-battery, two corresponding charging types are added to the L inux power management system, so that the L inux power management system uses a charger to perform charging and also uses the sub-battery to perform charging, for example, the charging type of the charging state of the sub-battery can be defined as "Motion _ charge",
step 2108, the charging function of the mobile phone charging chip is started.
And the power management system of the mobile phone performs corresponding configuration on the charging management chip according to the current charging type. If the mobile battery is currently in a charging state, namely the charging type is 'Motion _ charge', the input current of the charging management chip is configured at the moment, the charging function of the charging chip is started, the charging current allowed to enter the main battery is configured according to the charging specification, at the moment, part of the electric energy of the mobile battery is transferred into the main battery, namely the mobile battery is used for charging the main battery, and the other part of the electric energy provided for the mobile phone system is consumed.
Step 2109, Smart mode
The other working state of the auxiliary battery of the mobile phone is a power supply state, in which the electric energy of the auxiliary battery is only supplied to the electric energy loss of the mobile phone system, but the electric energy is not transferred to the main battery, and in the power supply state, the electric energy of the mobile battery can be maintained for a long time. For the "intelligent mode" in the mobile phone, the working mechanism is to switch the secondary battery between the charging state and the power supply state according to the electric quantity of the primary battery as the judgment basis, and in some embodiments, the switching principle is as follows: when the electric quantity of the main battery is more than 20%, the auxiliary battery is set to work in a power supply state; when the electric quantity of the main battery is lower than 15%, the auxiliary battery is set to work in a charging state until the main battery reaches more than 20% again, and then the main battery is switched to a power supply state. This mode is the "smart mode".
Step 2110, monitoring the main battery charge.
Step 2111, determine whether the main battery capacity is greater than 20%.
If not, it is not greater than 20%, then go to step 2112, and set the secondary battery to a charged state.
If the current value is 20% or more, the routine proceeds to step 2115, where the sub-battery is set to a power supply state.
Step 2112, set the secondary battery to a charged state.
Instep 2113, the charging type is modified to "Motion _ charge".
Step 2114, the charging function of the mobile phone charging chip is started.
Step 2115, set the secondary battery to a powered state.
Instep 2116, the charging type is modified to "Motion _ dis _ charge".
In the L inux power management system, the charging type of the power supply state may be defined as "Motion _ dis _ charge".
Step 2117, the charging function of the mobile phone charging management chip is closed, and only the power supply function of the secondary battery is reserved.
And the power management system performs corresponding configuration on the charging management chip according to the current charging type. If the mobile phone is currently in a power supply state, namely the charging type is "Motion _ dis _ charge", the input current of the charging management chip is configured at the moment, the charging function of the charging management chip is closed, the charging current allowed to enter the main battery is configured to be 0, and the electric energy of the mobile battery is only supplied to the electric energy loss of the mobile phone system at the moment, but the electric energy is not transferred to the main battery.
In some embodiments, in a state that the secondary battery of the mobile phone is powered, the following steps are performed:
step 2117, monitor the screen status of the mobile phone.
Step 2118, judge whether the mobile phone screen is extinguished. If yes, the process proceeds to step 2119, and if no, the process proceeds to step 2120.
And step 2119, closing the electric energy output of the auxiliary battery, and supplying power to the mobile phone system by using the main battery of the mobile phone.
Atstep 2120, the secondary battery is powered by electrical energy.
Because partial electric energy loss exists in the circuit of the secondary battery, and partial electric energy is lost in the power supply circuit in the electric energy output process of the secondary battery, in order to ensure the maximum utilization of the power supply efficiency of the secondary battery and avoid the invalid loss of the secondary battery as much as possible, the system electric energy consumption of the mobile phone is low under the condition that the screen of the mobile phone is extinguished, and therefore, the electric energy output of the secondary battery is turned off by using the control GPIO signal under the screen extinguishing scene.
Therefore, even if the current working state of the auxiliary battery is a power supply state, based on the reason, the electric energy consumption of the system is very low under the condition that the screen of the mobile phone is turned off, in the scene, the electric energy output of the auxiliary battery is closed by controlling the GPIO signal, and when the situation that the screen of the mobile phone is turned on again is detected, the electric energy output of the auxiliary battery is opened by controlling the GPIO signal.
It should be understood that, in various embodiments of the present invention, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided by the present invention, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g., from one website, computer, server, or data center, by wire (e.g., coaxial cable, fiber optics, Digital Subscriber line (Digital Subscriber line) L ine, DS L) or wirelessly (e.g., infrared, wireless, microwave, etc.) to another website, computer, server, or data center, may be transmitted from one website, computer, server, or data center to another website, computer, or data center via a wired (e.g., Digital Subscriber line (Digital Subscriber line) L ine, DS L) or wireless (e.g., infrared, wireless, microwave, etc.) medium, which may be any Solid State storage medium (e.g., a Solid State Disk, optical Disk, magnetic Disk, optical Disk.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.