Electronic equipment and control method
By outputting different signals in the electronic device and simulating the battery's presence using the power supply control module, combined with external charger detection and battery cover status monitoring, the problem of needing to shut down the electronic device when replacing the battery is solved, enabling hot-swapping of the battery while it is powered on, thus improving user experience and device stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-27
- Publication Date
- 2026-03-17
AI Technical Summary
Existing electronic devices require the device to be turned off when the battery is replaced, resulting in a degraded user experience and making it impossible to replace the battery without interrupting the device's operation.
By outputting different signals when the battery is in place and not in place, the power supply control module and detection module realize the battery hot-swap function, ensuring that the battery can be replaced when the device is powered on. This includes using a first switch and grounding resistor to simulate the battery being in place, combined with power supply detection of the external charger and battery cover status monitoring, to provide intelligent prompts and power consumption control.
It enables hot-swapping of the battery while the device is powered on, improving user experience and device availability, avoiding device interruptions due to battery replacement, and enhancing the convenience and stability of the device.
Smart Images

Figure CN121689342A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of control technology, and in particular to an electronic device and a control method. Background Technology
[0002] Electronic devices typically rely on batteries for power to maintain normal operation, and battery installation and replacement are common operations during device use. For electronic devices with removable batteries, replacing the battery requires turning the device off first and then turning it back on after the replacement is complete, which is cumbersome and degrades the user experience. With the increasing demand for device convenience and usability, how to perform battery replacement without interrupting device operation has become an important issue. Summary of the Invention
[0003] This application provides an electronic device and a control method.
[0004] The technical solution of this application embodiment is implemented as follows: This application provides an electronic device, including: The first circuit is used to output a first signal indicating that the battery is in place when the battery is in place, and to output a second signal simulating that the battery is in place when the battery is not in place. The power supply control module is used to supply power to the electronic device to enable the electronic device to be powered on when a first signal is received; and to maintain power supply to the electronic device to enable hot-swapping of the battery while it is powered on when a second signal is received.
[0005] In the aforementioned electronic device, the first circuit includes a first switch and a grounded first resistor; when the battery is present, the first switch is controlled to be in a high-resistance state so that the power supply control module can supply power to the electronic device based on the detected internal resistance of the battery; when the battery is not present, the first switch is connected to the grounded first resistor so that the power supply control module can simulate the presence of the battery and maintain power supply to the electronic device based on the detected first resistance; wherein, the resistance value of the grounded first resistor matches the internal resistance value of the battery.
[0006] The aforementioned electronic device also includes: a first detection module, used to detect the power supply supported by the external charger when the battery is not in place; and a power supply control module, used to maintain the electronic device in the powered-on state based on the target power provided by the external charger when the power supply meets the target power required for the power-on state.
[0007] The aforementioned electronic device further includes: a second detection module, including a detection pin for detecting whether the battery is in place; a first circuit connected to the detection pin for responding to a third signal output by the detection pin indicating that the battery is in place, controlling a first switch to be in a high-resistance state so that the battery and the power supply control module form a detection loop; and responding to a fourth signal output by the detection pin indicating that the battery is not in place, controlling the first switch to be connected to a first resistor so that the grounded first resistor and the power supply control module form a detection loop.
[0008] The aforementioned electronic device also includes: a third detection module, used to detect whether the battery cover is in place when the battery is in place; and a prompting module, used to output indication information indicating that the electronic device supports battery hot-swap mode or battery-free mode when the battery cover is not in place and the power supply meets the target power required for the power-on state.
[0009] In the aforementioned electronic devices, the prompting module is also used to output a prompt message indicating that the electronic device does not support battery hot-swap mode or battery-free mode when the battery cover is not in place and the power supply does not meet the target power required for the power-on state.
[0010] The aforementioned electronic device also includes a power limiting module, which, in response to a second signal or a fourth signal, controls the electronic device to reduce its power consumption to a target power consumption, wherein the target power consumption is less than the maximum power that the external charger can provide.
[0011] This application provides a control method applied to the aforementioned electronic device. The electronic device includes a first circuit and a power supply control module. The method includes: controlling the first circuit to output a first signal indicating that the battery is in place when the battery is in place, and outputting a second signal simulating that the battery is in place when the battery is not in place; the power supply control module to supply power to the electronic device to enable the electronic device to be powered on when the first signal is received; and maintaining power supply to the electronic device when the second signal is received to enable hot-swapping of the battery while the device is powered on.
[0012] The control method described above further includes: when the battery is in place, controlling the first switch of the first circuit to be in a high-resistance state so that the power supply control module can supply power to the electronic device based on the detected internal resistance of the battery; when the battery is not in place, controlling the first switch to be connected to the grounded first resistor of the first circuit so that the power supply control module can simulate the battery being in place and continue to supply power to the electronic device based on the detected first resistance; wherein the resistance value of the grounded first resistor matches the internal resistance value of the battery.
[0013] In the above control method, the electronic device includes a second detection module for detecting whether the battery is in place; a first circuit connected to the detection pin of the second detection module; the method further includes: responding to the detection pin outputting a third signal indicating that the battery is in place, controlling a first switch to be in a high-resistance state so that the battery and the power supply control module form a detection loop; responding to the detection pin outputting a fourth signal indicating that the battery is not in place, controlling the first switch to be connected to a first resistor so that the grounded first resistor and the power supply control module form a detection loop. Attached Figure Description
[0014] Figure 1 This is a schematic diagram of the structure of an exemplary electronic device provided in an embodiment of this application. Figure 1 ; Figure 2 This is a schematic diagram of the structure of an exemplary electronic device provided in an embodiment of this application. Figure 2 ; Figure 3 This is a schematic diagram of the structure of an exemplary electronic device provided in an embodiment of this application. Figure 3 ; Figure 4 This is a schematic diagram of the structure of an exemplary electronic device provided in an embodiment of this application. Figure 4 ; Figure 5 This is a schematic diagram of the structure of an exemplary electronic device provided in an embodiment of this application. Figure 5 ; Figure 6 This is a schematic diagram of the structure of an exemplary electronic device provided in an embodiment of this application. Figure 6 ; Figure 7 This is a flowchart illustrating an exemplary control method provided in an embodiment of this application.
[0015] It should be noted that the terms "first" and "second" mentioned above are only used to distinguish between different options and do not represent the degree of superiority or inferiority of the options or their priority in the implementation process. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0017] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0018] The terms “first / second / third” are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that “first / second / third” may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used herein is for descriptive purposes only and is not intended to limit the scope of this application.
[0020] like Figure 1 As shown, a schematic diagram of an exemplary electronic device is provided. The electronic device 100 includes: a first circuit 101, configured to output a first signal indicating that the battery 102 is in place when the battery 102 is in place, and to output a second signal simulating that the battery 102 is in place when the battery 102 is not in place; and a power supply control module 103, configured to supply power to the electronic device 100 to enable the electronic device 100 to be powered on when the first signal is received, and to maintain power supply to the electronic device 100 to enable hot-swapping of the battery in the powered-on state when the second signal is received.
[0021] like Figure 1 The input terminal of the first circuit 101 is connected to the negative terminal of the battery 102, and the output terminal of the first circuit 101 is connected to the internal resistance of the battery 102. The output terminal is also connected to the power supply control module 103. When the battery 102 is in position, the input terminal of the first circuit 101 is connected to the negative terminal of the battery 102, receiving a low-level signal from the negative terminal of the battery 102, causing the first circuit 101 to output a first signal. When the battery 102 is not in position, the input terminal of the first circuit 101 is disconnected from the negative terminal of the battery 102, resulting in no input signal. Simultaneously, the battery 102 is disconnected, allowing the output terminal of the first circuit 101 to be directly connected to the power supply control module 103, thereby enabling the first circuit 101 to output a second signal. The first circuit 101 can output a signal to the power supply control module 103 regardless of whether the battery 102 is in or out of position.
[0022] In the embodiments of this application, if the battery 102 is in place, the first circuit 101 can output a first signal. If the battery 102 is not in place, the first circuit 101 can output a second signal simulating that the battery 102 is in place. In this way, regardless of whether the battery 102 is in place or not, the signal received by the power supply control module 103 is a signal that the battery 102 is online, thereby avoiding the shutdown problem caused by replacing the battery 102.
[0023] For example, the first circuit 101 can simulate the presence of the battery 102 and output a corresponding signal through a grounding resistor or an analog circuit. Furthermore, the first circuit 101 may also include switching elements, such as MOSFETs, relays, etc., for switching the signal output path under different states.
[0024] In the embodiments of this application, when the power supply control module 103 receives a first signal indicating that the battery 102 is in place, the power supply control module 102 can start the charging mode, turn on the power to supply power to the electronic device 100, and maintain the power-on state of the electronic device 100. For example, when the electronic device 100 is operating normally and the battery 102 is in place, the power supply control module 103 will ensure sufficient current and voltage supply to key components on the electronic device 100, such as the main control chip, screen, and communication module.
[0025] In the embodiments of this application, the power supply control module 103 can be integrated into the main control chip or it can be a separate power management unit. Integrating the power supply control module 103 into the main control chip or using it as a separate power management unit can maintain a stable power supply when the battery is detected, ensuring the normal operation of the electronic device.
[0026] In the embodiments of this application, when the power supply control module 103 detects a second signal indicating that the analog battery 102 is present (i.e., the battery 102 is not present but the system still needs to maintain power), the power supply control module 103 will continue to supply power to the system. At this time, the electronic device 100 can still operate normally, so that the user can replace the battery without turning off the device.
[0027] Thus, the first circuit outputs a second signal simulating the presence of the battery when the battery is not in place, and the power supply control module determines whether to maintain power supply based on this signal, thereby realizing the function of hot-swapping the battery in the power-on state.
[0028] like Figure 2 As shown, the first circuit 101 includes a first switch 1011 and a grounded first resistor 1012. When the battery 102 is in place, the first switch 1011 is controlled to be in a high-resistance state so that the power supply control module can supply power to the electronic device based on the detected internal resistance of the battery 102. When the battery 102 is not in place, the first switch 1011 is connected to the grounded first resistor 1012 so that the power supply control module can simulate the presence of the battery 102 and continue to supply power to the electronic device based on the detected first resistance. The resistance value of the grounded first resistor 1012 matches the internal resistance value of the battery 102.
[0029] In the embodiments of this application, the first switch 1011 is an electronic switching element used to achieve flexible switching of the circuit. The state of the first switch 1011 determines whether the grounding first resistor 1012 is connected to the detection circuit. When the battery 102 is in place, the first switch 1011 is in a high-resistance state, i.e., it is not conducting, thereby preventing the grounding first resistor 1012 from affecting the detection of the internal resistance of the battery 102; while when the battery 102 is not in place, the first switch 1011 is switched to the conducting state, so that the first switch 1011 is connected to the grounding first resistor 1012 to simulate the resistance characteristics when the battery 102 is in place. Exemplarily, the first switch 1011 can be a single-pole double-throw (SPDT) switch, a relay, etc.
[0030] In the embodiments of this application, the grounding first resistor 1012 refers to a resistor device with one end connected to ground (GND) and the other end connected to the detection input terminal of the power supply control module. The function of the grounding first resistor 1012 is to provide an impedance path simulating the presence of the battery 102 when the battery 102 is not in place, thereby misleading the power supply control module into believing that the battery 102 still exists. By selecting an appropriate resistance value, the impedance of the grounding first resistor 1012 is matched to the internal resistance of the battery 102 when it is in place, ensuring that the power supply control module can continue to operate normally and will not interrupt power supply due to the detection of the battery 102's absence.
[0031] In the embodiments of this application, when the battery 102 is present, the first switch 1011 is in a high-resistance state, and the power supply control module can directly read the internal resistance of the battery 102. Based on this, the power supply control module determines that the battery 102 is present and allows the device to operate normally. When the battery 102 is not present, the first switch 1011 is switched to the on state, and the grounding first resistor 1012 is connected to the detection circuit to replace the internal resistance of the actual battery 102. Since the resistance value of the grounding first resistor 1012 matches the internal resistance of the battery 102, the power supply control module will mistakenly believe that the battery 102 is still present, thereby continuing to maintain the power supply state and preventing the device from shutting down or losing power due to the failure to detect the battery 102.
[0032] In the embodiments of this application, by using a method to smoothly transition the power supply state during the hot-swapping of battery 102, the electronic device can achieve continuous control of the power supply process, thereby ensuring that the device continues to operate normally during battery 102 replacement. Users do not need to perform a shutdown operation, which significantly improves the user experience and enhances the availability of the device.
[0033] Thus, by setting up a combination of a first switch and a grounding first resistor, stable power supply can be maintained during battery hot-swapping, allowing the battery to be replaced while the device is powered on, thereby significantly improving the ease of use and user satisfaction of the terminal device.
[0034] like Figure 3 As shown, the electronic device 100 also includes a first detection module 104, which is used to detect the power supply supported by the external charger 1041 when the battery 102 is not in place; the power supply control module 103 is also used to maintain the electronic device 100 in the power-on state based on the target power provided by the external charger 1041 when the power supply meets the target power required for the power-on state.
[0035] In the embodiments of this application, the first detection module 104 of the electronic device 100 is a hardware or software component used to evaluate the power supply capability of the external charger 1041 when the battery 102 is not in place. The core function of the first detection module 104 is to obtain the output power information of the external charger 1041 through a communication interface (such as Power Delivery in the USB-C protocol) and determine whether the output power information meets the minimum power requirements required for device operation. For example, after the battery 102 is removed, the electronic device 100 still needs to maintain a certain power consumption to maintain basic operations (such as screen display, background processes, etc.). If the external charger 1041 cannot provide sufficient power, the electronic device 100 cannot enter the battery-free 102 mode or perform a hot-plug operation. The control chip 105 (SOC) in the electronic device 100 performs the judgment on whether the output power meets the minimum power requirements for operation.
[0036] In the embodiments of this application, the power supply refers to the electrical energy output that the external charger 1041 can provide, typically measured in watts (W). The power supply determines whether the external charger 1041 can support the continuous operation of the electronic device 100 in the absence of the battery 102.
[0037] In the embodiments of this application, electronic devices can only support battery-free or battery hot-swappable operation under certain conditions. First, the type and power supported by the external charger 1041 must meet certain requirements. For example, in battery-free mode, the product must support QC and PD charging and the power must not be lower than a certain amount (such as 18W, 27W, 36W, etc.). At the same time, the software will also limit the system power consumption to not exceed the specified power in battery-free mode or before the battery is removed. The specific amount of this specified charging power can be determined according to the actual situation of the product.
[0038] For example, if the target power required for the electronic device 100 to be powered on is 27W, and the power supply can support 18W, 27W, and 36W, it indicates that there is a power in the power supply that exceeds the target power. In this case, the electronic device 100 allows itself to enter a battery-free mode 102 or perform a battery 102 hot-swap operation, thereby ensuring stability and user experience. The target power can be the minimum power required for the device to operate normally in the powered-on state. The target power is generally determined by the device's hardware architecture, operating system requirements, and current load. For example, in battery-free mode 102, if the system is running multiple applications, the target power may be higher; while in standby or light-load conditions, the target power is lower. The power supply control module 103 dynamically determines the target power based on the current system load and compares it with the power supply detected by the first detection module 104. Of course, the target power can also be a preset power that can maintain the electronic device 100 in the powered-on state, consistent with the minimum power requirement for operation discussed above.
[0039] In the embodiments of this application, by setting a first detection module 104 to detect the power supply, it can be ensured that when the battery 102 is not in place, the system is only allowed to continue operating or perform hot-swapping operations when the external charger 1041 has sufficient power supply capacity. In this way, sudden power outages or restarts caused by insufficient power from the external charger 1041 can be avoided, thereby improving stability and the continuity of user operation, and thus significantly improving the user experience of the terminal device.
[0040] In the embodiments of this application, when the power supply meets the target power required for the power-on state, the power supply control module 103 switches the main power source from the built-in battery 102 to the external charger 1041 by switching the power path, while keeping the electronic device 100 in the power-on state. The power supply control module 103 needs to coordinate electronic components such as the DC-DC converter to ensure stable voltage and sufficient current, and prevent problems such as overvoltage and undervoltage. The power supply control module 103 also needs to implement a power path management (PPM) strategy to ensure smooth power switching during the hot-swapping of the battery 102, without causing interruption of the electronic device 100.
[0041] For example, such as Figure 3As shown, the power supply control module 103 also includes a buck charger 1031, a buck DC-DC converter 1032, and a first diode 1033. When the battery 102 is present, the electronic device 100 uses the buck charger 1031 to charge the battery 102 and supplies power to the system of the electronic device 100 via the first diode 1033. When the battery 102 is not present, the electronic device 100 is supplied power via the buck DC-DC converter 1032.
[0042] In the embodiments of this application, the power supply control module 103 maintains power supply when the power supply power meets the target power, allowing the electronic device 100 to continue operating even when the battery 102 is not in place. This supports hot-swapping of the battery and continuous operation in battery-free mode. The technical solution of maintaining power supply by the power supply control module 103 when the power supply power meets the target power to support hot-swapping and battery-free operation effectively avoids the traditional operation process of having to shut down and replace the battery 102. This technical solution improves user convenience and efficiency, and consequently significantly enhances product competitiveness and market acceptance.
[0043] Therefore, whether the power supply control module performs the action of maintaining power supply depends on whether the power supply detected by the first detection module meets the target power requirement. Thus, these two steps constitute a closed-loop control, ensuring that power switching and system operation can only be safely performed when the conditions are met, thereby guaranteeing the stability and safety of the entire system.
[0044] like Figure 4 As shown, the electronic device 100 further includes: a second detection module 106, including a detection pin 1061 for detecting whether the battery 102 is in place; a first circuit 101, connected to the detection pin 1061, for responding to the third signal output by the detection pin 1061 indicating that the battery 102 is in place, controlling the first switch 1011 to be in a high-resistance state so that the battery 102 and the power supply control module 103 form a detection loop; and responding to the fourth signal output by the detection pin 1061 indicating that the battery 102 is not in place, controlling the first switch 1011 to be connected to the grounding first resistor 1012 so that the grounding first resistor 1012 and the power supply control module 103 form a detection loop.
[0045] In the embodiments of this application, the detection pin 1061 is used to detect whether the battery 102 is in place, and to determine in real time whether the battery 102 is installed in the electronic device 100. The second detection module 106 typically consists of one or more detection pins 1061, and the second detection module 106 identifies the presence of the battery 102 by voltage changes.
[0046] In the embodiments of this application, the second detection module 106 includes a first pull-up resistor 1062 and a second diode 1063.
[0047] For example, the detection pin (BAT_DET pin) 1061 is connected to GND (ground) at the battery end, and pulled up to a high level (1.8V) at the motherboard end via the first pull-up resistor 1062. The input terminal of the first circuit 101 is connected to the negative terminal GND of the battery 102. When the battery 102 is in place, the detection pin 1061 is grounded at the battery end, the second diode 1063 is turned on, and the general-purpose input / output interface 1051 of the control chip 105 reads a low level (0). At this time, since the input terminal of the first circuit 101 is also connected to the GND of the battery when the battery 102 is in place, the third signal of being in place (low-level signal) can be detected. Here, the first switch 1011 of the first circuit 101 is in a high-impedance state so that the battery 102 and the power supply control module 103 form a detection loop, that is, the power supply control module 103 outputs the internal resistance of the battery 102.
[0048] For example, when the battery 102 is not in place, the motherboard is pulled up to a high level (1.8V) through the first pull-up resistor 1062, and the general input / output interface 1051 reads the high level (1). At this time, the input of the first circuit 101 is pulled up to the fourth signal, i.e., high level, when the battery 102 is not in place. Here, the first switch 1011 of the first circuit 101 is connected to the grounding first resistor 1012 so that the grounding first resistor 1012 and the power supply control module 103 form a detection loop, i.e., the power supply control module 103 outputs the resistance value of the grounding first resistor 1012.
[0049] For example, as shown in Table 1, the logic table for battery hot-swapping is as follows: Table 1
[0050] As shown in Table 1, if the battery is present, the detection pin 1061 detects a low level (0), and if the battery is absent, the detection pin 1061 detects a high level (1).
[0051] Accordingly, as shown in Table 2, the control logic table for the first switch 1011 is as follows: Table 2
[0052] As shown in Table 2, when the detection pin 1061 detects a low level (0), the battery is in place, and the first switch 1011 is controlled to be in a high resistance state (NC). When the detection pin 1061 detects a high level (1), the battery is not in place, and the first switch 1011 is controlled to be connected to the grounded first resistor 1012.
[0053] For example, such as Figure 4 As shown, the battery NTC resistance (100K) (grounded first resistor 1012) can be checked through the battery temperature detection (BATT_THERM PIN). When battery 102 is present, the detection pin 1061 (BAT_DET) is connected to GND and is low, the first switch 1011 is switched to NC (high resistance), and the BATT_THERM PIN detects the battery NTC resistance. When battery 102 is not present, BAT_DET is pulled up to 1.8V and is high, the first switch 1011 is switched to NO, and the BATT_THERM PIN detects the 100K resistor on the motherboard (corresponding to a temperature of approximately 25℃), which meets the conditions for battery presence detection in the power-on software.
[0054] In the embodiments of this application, the control chip 105 receives a third signal indicating that the battery 102 is in place, and receives a fourth signal indicating that the battery 102 is not in place. The design of the second detection module 106 enables the control chip 105 to dynamically detect the actual insertion or removal status of the battery 102 when the power is on.
[0055] In the embodiments of this application, the control chip 105 can know whether the battery 102 is actually in place or not by the signal output from the detection pin 1061, and then the control chip 105 sends a signal to the power supply control module 103 to start the step-down DC converter 1032 in the power supply control module 103 to supply power to the electronic device.
[0056] Thus, when the control chip knows whether the battery is actually in place or not, the power supply control module can select different power supply types to power the electronic devices, thereby improving the accuracy of control.
[0057] like Figure 5 As shown, the electronic device 100 also includes: a third detection module 107, used to detect whether the battery cover of the battery 102 is in place when the battery 102 is in place; and a prompting module 108, used to output indication information indicating that the electronic device 100 supports battery hot-swap mode or battery-free mode when the battery cover is not in place and the power supply meets the target power required for the power-on state.
[0058] In the embodiments of this application, the third detection module 107 is a hardware circuit module used to detect whether the battery cover is installed correctly. The third detection module 107 is typically implemented using a switch (such as a mechanical or magnetic switch) 1071. When the battery cover is removed, the switch 1071 is open, outputting a high-level signal to the control chip 105; when the battery cover is installed correctly, the switch 1071 is closed, outputting a low-level signal. The low-level or high-level signal can be connected to the general purpose input / output (GIPO) interface of the control chip 105 for status identification.
[0059] For example, as shown in Table 3, the logic table for battery cover insertion and removal is as follows: Table 3
[0060] As shown in Table 3, when the battery cover is removed, switch 1071 is open and outputs a high-level signal to control chip 105. When the battery cover is in place, switch 1071 is closed and outputs a low-level signal to control chip 105.
[0061] For example, such as Figure 5 As shown, the third detection module 107 also includes a third diode 1072 and a second pull-up resistor 1073. When the battery cover is removed, the switch 1071 is open, and the second pull-up resistor 1073 pulls the output voltage (BATT Cover_DET) of the third detection module 107 to a high level to output a high-level signal to the control chip 105. When the battery cover is in place, the switch 1071 is closed, the third diode 1072 is turned on, and the output voltage of the third detection module 107 is pulled to ground to output a low-level signal to the control chip 105.
[0062] In the embodiments of this application, the third detection module 107 functions to detect in advance whether the user intends to remove the battery. Since hot-swapping of the battery places strict requirements on power management, removing the battery without adequate charger power support may cause the device to lose power or damage the system. By detecting the state of the battery cover, a judgment can be made before the user is about to remove the battery, and corresponding power management measures can be implemented.
[0063] Table 4 shows the control logic table for the enable terminal of the step-down DC-DC converter 1032: Table 4
[0064] As shown in Table 4, there is no requirement only when both the battery and the battery cover are in place. In other cases, it indicates that the battery supports hot-swapping and will request to meet the system's maximum power consumption level.
[0065] In the embodiments of this application, the hot-swapping of the battery requires advance knowledge of the battery removal behavior; otherwise, the boosting and dynamic response of the external charger 1041 and the charging integrated chip will not be timely. Therefore, a third detection module 107 is provided. For example, when the battery cover is removed, the battery cover switch is open, and the battery cover (BATT Cover_DET) is high (1). At this time, the charger needs to be boosted to the specified power (or higher) level, and the DC-DC converter (EN is high) (enable terminal is high) can be turned on. The battery can be removed. If the power requested by the external charger 1041 does not meet the requirements, a pop-up window will indicate that the battery removal or no-battery mode is not met. When the battery cover is in place, the switch is closed, and BATT Cover_DET is low (0). At this time, the battery is in place and can proceed with normal charging.
[0066] In the embodiments of this application, the prompting module 108 is a functional unit that works in conjunction with software and hardware, responsible for outputting prompt information to the user under specific conditions. The prompt information can be presented through a graphical interface, pop-up windows, sound, vibration, etc. The core logic of the prompting module 108 is: when it detects that the battery cover is not in place (i.e., the user may be preparing to remove the battery), and the power provided by the current charger is greater than or equal to the minimum power required to maintain operation (target power), it is considered that the electronic device 100 is ready for hot-plugging the battery or operating without a battery, and a prompt information is output to inform the user that the device supports the relevant mode.
[0067] For example, the prompt message may include: the device has entered battery-free operation mode, the battery can be safely removed, and please ensure the charger has sufficient power to avoid power loss. This prompt message helps users understand the current system operating status and avoid accidental shutdowns or performance degradation caused by misoperation.
[0068] The workflow of the prompt module includes the following steps: detecting whether the battery cover 1071 is in the installation position; detecting whether the power supply of the current external charger 1041 meets the target power. If both conditions are met, the prompt mechanism is activated and the corresponding prompt information is output. The user can decide whether to perform the battery hot-swapping operation based on the prompt.
[0069] Thus, by introducing a third detection module and a prompt module, real-time monitoring of the battery cover status is achieved when the battery is in place. Combined with charging power conditions, intelligent judgment is made to provide support prompts for hot-plugging the battery or battery-free mode. This can improve the safety and convenience of user operation, thereby reducing the risk of equipment failure due to incorrect operation, and significantly improving user experience and product competitiveness.
[0070] In some embodiments, the prompt message 108 is also used to provide a prompt message indicating that the output electronic device does not support the battery hot-swap mode or the battery-free mode when the battery cover is not in place and the power supply does not meet the target power required for the power-on state.
[0071] In the embodiments of this application, when it is detected that the battery cover is not in place, and the power supplied by the external charger 1041 is insufficient to meet the minimum target power required for the electronic device 100 to start and operate, the prompting module 108 will provide the user with a clear prompt message. This prompt message indicates that the current conditions do not meet the requirements for entering the battery hot-swap mode or the battery-free mode. The presentation format of the prompt message is the same as described above and will not be repeated here. The prompt message can help the user adjust the external charger 1041 or power configuration in a timely manner to avoid system malfunctions or functional limitations due to insufficient power supply.
[0072] In the embodiments of this application, the prompting module 108 can ensure that the user can clearly understand whether the current electronic device 100 has the prerequisites to perform these operations before attempting to perform a battery hot-swap operation or enable a battery-free mode. This can effectively prevent user misoperation and thus improve system stability and user experience.
[0073] For example, when a user attempts to remove the battery cover and start the electronic device, if the power supply of the external charger 1041 is lower than a set target threshold (e.g., 18W), the prompt module 108 will display a message indicating insufficient power supply from the external charger, preventing entry into battery-free mode. The user can then choose to replace the charger with one offering higher power or adjust the system power consumption settings to meet the power-on requirements based on the prompt message displayed by the prompt module.
[0074] In this way, by monitoring the power supply and battery cover status in real time, and combining the prompting mechanism of the user interface, the prompting module realizes intelligent judgment and feedback on the user's operating conditions, thereby enhancing the availability and safety of electronic devices in special usage scenarios.
[0075] In some embodiments, such as Figure 6 As shown, the electronic device 100 may also include a power limiting module 109, which, in response to a second signal or a fourth signal, controls the electronic device 100 to reduce its power consumption to a target power consumption, wherein the target power consumption is less than the maximum power that the external charger 1041 can provide.
[0076] In the embodiments of this application, the power limiting module 109 refers to a hardware or software component. The function of the power limiting module 109 is to limit the power consumption of the electronic device under specific conditions to ensure that the electronic device 100 does not exceed the maximum power provided by the external charger 1041 during operation. The power limiting module 109 is typically implemented by a power management unit (PMU) or a system controller, and achieves power consumption control by dynamically adjusting the central processing unit (CPU) frequency, shutting down unnecessary peripherals, adjusting screen brightness, etc.
[0077] In the embodiments of this application, when the battery 102 is detected to be out of place (e.g., the user is removing the battery or switching the electronic device 100 to a battery-free mode), or when a hot-plugging action is detected to be about to occur, the power limiting module 109 performs a power limiting operation based on the type and power capability of the current external charger 1041, limiting the power consumption of the electronic device 100 to a safe range. For example, if the maximum output power supported by the external charger 1041 is 18W, the power limiting module 109 ensures that the power consumption of the electronic device 100 in a battery-free state does not exceed 18W, thereby avoiding the problem of overloading the external charger or sudden power loss of the electronic device due to excessive power consumption.
[0078] For example, if the maximum output power supported by the external charger 1041 is 36W, and the power consumption of the currently acquired electronic device 100 is 24W, the power limiting module 109 can also maintain the current power consumption of the electronic device 100 and not perform power limiting processing.
[0079] In the embodiments of this application, when a user prepares to remove the battery, the electronic device first checks whether the currently connected external charger meets the minimum power requirement (e.g., 18W or higher). If the condition is met, the power limiting module will start and gradually reduce the load on the electronic device; if the condition is not met, the electronic device will display a pop-up message prompting the user that it cannot enter the battery-free mode or perform a hot-plug operation.
[0080] Thus, by introducing a power-limiting module, intelligent control of electronic device power consumption is achieved when the battery is not in place or during hot-swapping. This control method can effectively prevent electronic device crashes or data loss caused by power consumption exceeding the power supply capacity of the external charger, thereby enabling electronic devices to maintain higher stability and reliability in complex power supply environments, further improving the user experience, especially in devices with removable batteries, achieving seamless hot-swapping functionality.
[0081] This application provides an exemplary control method for an electronic device. The electronic device includes a first circuit and a power supply control module. The exemplary control method includes: controlling the first circuit to output a first signal indicating that the battery is in place when the battery is in place, and outputting a second signal simulating that the battery is in place when the battery is not in place; the power supply control module to supply power to the electronic device to enable the electronic device to be powered on when the first signal is received; and maintaining power supply to the electronic device when the second signal is received to enable hot-swapping of the battery while the device is powered on.
[0082] In one embodiment of this application, the electronic device may further perform the following steps: when the battery is in place, controlling the first switch of the first circuit to be in a high-resistance state, so that the power supply control module can supply power to the electronic device based on the detected internal resistance of the battery; when the battery is not in place, controlling the first switch to be connected to the grounded first resistor of the first circuit, so that the power supply control module can simulate the battery being in place and maintain power supply to the electronic device based on the detected first resistance; wherein the resistance value of the grounded first resistor matches the internal resistance value of the battery.
[0083] In one embodiment of this application, the electronic device may further perform the following steps: when the battery is not in place, detect the power supply supported by the external charger; if the power supply meets the target power required for the power-on state, maintain the electronic device in the power-on state based on the target power provided by the external charger.
[0084] In one embodiment of this application, the electronic device includes a second detection module for detecting whether a battery is present; a first circuit connected to the detection pin of the second detection module; the electronic device may further perform the following steps: responding to the detection pin outputting a third signal indicating that the battery is present, controlling a first switch to be in a high-resistance state so that the battery and the power supply control module form a detection loop; responding to the detection pin outputting a fourth signal indicating that the battery is not present, controlling the first switch to be connected to a first resistor so that the grounded first resistor and the power supply control module form a detection loop.
[0085] In one embodiment of this application, the third detection module is used to detect whether the battery cover is in place when the battery is in place; the electronic device can also perform the following steps: when the battery cover is not in place and the power supply meets the target power required for the power-on state, output indication information indicating that the electronic device supports battery hot-swap mode or battery-free mode.
[0086] In one embodiment of this application, the electronic device may further perform the following steps: when the battery cover is not in place and the power supply does not meet the target power required for the power-on state, output a prompt message indicating that the electronic device does not support the battery hot-swap mode or the battery-free mode.
[0087] In one embodiment of this application, the electronic device may further perform the following steps: in response to a second signal or a fourth signal, controlling the electronic device to reduce power consumption to a target power consumption, wherein the target power consumption is less than the maximum power that the external charger can provide.
[0088] like Figure 7 The diagram illustrates an exemplary control method. The exemplary control method includes the following steps S701 to S711: Step S701: Insert the charger.
[0089] Here, the electronic device will first be plugged into the charger (the same as the external charger mentioned above).
[0090] Step S702: Check if the battery is in place.
[0091] Here, the electronic device will detect whether the battery is in place. If the battery is not in place, step S703 can be executed. If the battery is in place, step S706 can be executed.
[0092] Step S703: Check whether the charger type and power meet the requirements.
[0093] Here, the electronic device can detect whether the charger type and power support hot-swapping. Different charger types have different power ratings (consistent with the power supply power mentioned above). If the charger type and power meet the requirements, step S704 is executed; otherwise, step S705 is executed.
[0094] Step S704: Turn on the DC-DC converter, the charger requests the required power, and the system limits power consumption according to the requirements.
[0095] Here, if the charger type and power meet the requirements, the electronic device can turn on the DC-DC converter (corresponding to the buck DC converter mentioned above), and the charger requests the required power, for example, at least greater than the target power. Then, if the current power consumption of the system is greater than the required power consumption or can be reduced to below the required power consumption, power reduction processing is implemented.
[0096] Step S705: Cannot power on.
[0097] This indicates that the electronic device does not support battery-free mode or battery hot-swappable mode, therefore the electronic device cannot be powered on.
[0098] Step S706: Is the battery cover in place?
[0099] Here, when the electronic device detects that the battery is in place, it can continue to monitor whether the battery cover is in place so as to predict whether the user will remove the battery. If the battery cover is detected to be in place, step S707 is executed; if the battery cover is detected to be out of place, step S708 is executed.
[0100] Step S707: Follow the normal battery charging process.
[0101] If the battery cover is in place, it means the battery is in place, and the electronic device can proceed with the normal battery charging process.
[0102] Step S708: Check whether the charger type and power meet the requirements.
[0103] Here, the electronic device can detect whether the charger type and power support hot-swapping of the electronic device. If the charger type and power do not meet the requirements, step S709 is executed; if the charger type and power meet the requirements, step S710 is executed.
[0104] Step S709: A pop-up window prompts that the battery removal or no-battery mode is not met.
[0105] Here, a pop-up window on the electronic device indicates that the current electronic device does not meet the requirements for battery removal or no-battery mode (corresponding to the above-mentioned unsupported battery hot-swap mode or no-battery mode).
[0106] Step S710: Turn on the DC-DC converter, the charger requests the required power, and the system limits power consumption according to the requirements.
[0107] Here, the content is the same as that performed in step S704 above, and will not be repeated here.
[0108] Step S711: The battery can be removed.
[0109] Here, if the electronic device supports battery removal, it means that the current electronic device meets the requirements of battery removal or no-battery mode (corresponding to the above-mentioned support for hot-swappable battery mode or no-battery mode).
[0110] This application provides a control method applied to an electronic device. The electronic device includes a first circuit and a power supply control module. The method includes: controlling the first circuit to output a first signal indicating that the battery is present when it is in place, and outputting a second signal simulating that the battery is present when it is not in place; the power supply control module, upon receiving the first signal, supplies power to the electronic device to keep it powered on; and upon receiving the second signal, maintains power supply to the electronic device to enable hot-swapping of the battery while it is powered on. This control method, through the first circuit outputting a first signal when the battery is in place and a second signal simulating that the battery is present when it is not in place, and the power supply control module determining whether to maintain power supply based on these signals, enables the device to remain powered on even when the battery is not in place, supports hot-swapping of the battery, solves the problem of traditional devices requiring shutdown for battery replacement, and improves user experience and product competitiveness.
[0111] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above steps / processes do not imply a sequential order of execution; the execution order of each step / process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above embodiments of this application are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0112] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0113] The above are merely embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. An electronic device, comprising: a first circuit configured to output a first signal indicating that a battery is in place when the battery is in place, and output a second signal simulating that the battery is in place when the battery is not in place; a power supply control module configured to supply power to the electronic device to enable the electronic device to be in a powered-on state when the first signal is obtained, and maintain the power supply to the electronic device to enable the powered-on state for battery hot swapping when the second signal is obtained. 2.The electronic device of claim 1, wherein the first circuit comprises a first switch and a first ground resistor; when the battery is in place, the first switch is controlled to be in a high-impedance state to enable the power supply control module to supply power to the electronic device based on detecting an internal resistance of the battery; in the case that the battery is not in place, connecting the first switch to the ground first resistance, so that the power supply control module can simulate that the battery in place remains to supply power to the electronic device based on detecting the first resistance; wherein, a resistance value of the first ground resistor matches the internal resistance value of the battery. 3.The electronic device of claim 1 or 2, further comprising: a first detection module configured to detect a power supply power supported by an external charger when the battery is not in place; the power supply control module is further configured to maintain the electronic device in the powered-on state based on the external charger providing a target power required by the powered-on state when the power supply power meets the target power. 4.The electronic device of claim 2, further comprising: a second detection module comprising a detection pin configured to detect whether the battery is in place or not; the first circuit is connected to the detection pin and configured to output a third signal indicating that the battery is in place in response to the detection pin, control the first switch to be in a high-impedance state to enable the battery and the power supply control module to form a detection loop, and output a fourth signal indicating that the battery is not in place in response to the detection pin, control the first switch to be connected to the first ground resistor to enable the first ground resistor and the power supply control module to form the detection loop. 5.The electronic device of claim 4, further comprising: a third detection module configured to detect whether a battery cover of the battery is in place or not when the battery is in place; a prompt module configured to output indication information indicating that the electronic device supports a battery hot swapping mode or a battery-less mode when the battery cover is not in place and the power supply power meets a target power required by the powered-on state. 6.The electronic device of claim 5, wherein: the prompt module is further configured to output prompt information indicating that the electronic device does not support the battery hot swapping mode or the battery-less mode when the battery cover is not in place and the power supply power does not meet the target power required by the powered-on state. 7.The electronic device of claim 4, further comprising: a power consumption limiting module configured to control the electronic device to reduce power consumption to a target power consumption in response to the second signal or the fourth signal, wherein the target power consumption is less than a maximum power that can be provided by an external charger. 8.A control method applied to an electronic device, the electronic device comprising a first circuit and a power supply control module, the method comprising: The first circuit is controlled to output a first signal indicating that the battery is in place when the battery is in place, and output a second signal simulating that the battery is in place when the battery is not in place; The power supply control module supplies power to the electronic device to make the electronic device in a powered-on state when the first signal is obtained, and maintains to supply power to the electronic device to realize the powered-on state for battery hot plug when the second signal is obtained.
9. The control method of claim 8, further comprising: controlling the first switch of the first circuit to be in a high resistance state when the battery is in place, so that the power supply control module can supply power to the electronic device based on detecting the internal resistance of the battery; controlling the first switch to be connected to a ground first resistance of the first circuit when the battery is not in place, so that the power supply control module can simulate that the battery is in place to keep supplying power to the electronic device based on detecting the first resistance; wherein the resistance value of the ground first resistance matches the internal resistance value of the battery.
10. The control method of claim 9, wherein the electronic device comprises a second detection module for detecting whether the battery is in place or not; the first circuit is connected to a detection pin of the second detection module, and the method further comprises: controlling the first switch to be in a high resistance state to make the battery form a detection loop with the power supply control module in response to the detection pin outputting a third signal indicating that the battery is in place; and controlling the first switch to be connected to the first resistance to make the ground first resistance form a detection loop with the power supply control module in response to the detection pin outputting a fourth signal indicating that the battery is not in place.