CN108121431B - Power supply control method and electronic equipment - Google Patents

Power supply control method and electronic equipment Download PDF

Info

Publication number
CN108121431B
CN108121431B CN201711407758.7A CN201711407758A CN108121431B CN 108121431 B CN108121431 B CN 108121431B CN 201711407758 A CN201711407758 A CN 201711407758A CN 108121431 B CN108121431 B CN 108121431B
Authority
CN
China
Prior art keywords
power supply
power
supply module
module
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711407758.7A
Other languages
Chinese (zh)
Other versions
CN108121431A (en
Inventor
郭宇婕
李�权
叶志伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201711407758.7A priority Critical patent/CN108121431B/en
Publication of CN108121431A publication Critical patent/CN108121431A/en
Application granted granted Critical
Publication of CN108121431B publication Critical patent/CN108121431B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/30Means for acting in the event of power-supply failure or interruption, e.g. power-supply fluctuations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/28Supervision thereof, e.g. detecting power-supply failure by out of limits supervision

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)
  • Power Sources (AREA)

Abstract

The invention discloses a power supply control method and electronic equipment, wherein the method is applied to the electronic equipment which can be accessed to a plurality of power supply modules and comprises the following steps: acquiring first information of each power supply module; determining the type of the connected power supply module based on the first information; and executing power supply control on the electronic equipment according to a preset strategy based on the determined type of the power supply module. The invention can improve the data security of the equipment and realize the reasonable application of the power supply.

Description

Power supply control method and electronic equipment
Technical Field
The embodiment of the invention relates to the field of power management, in particular to a power supply control method and electronic equipment.
Background
In order to meet the requirement of customers on higher and higher system operation reliability, redundant power supply units (redundant PSUs) are designed and applied more and more. In general, the design form of the redundant power supply is an N +1 form, that is, when one of the power supplies fails, the other power supplies can be used for supplying power to the system, and the system can still continue to work normally.
However, in the prior art, the electronic device cannot know the type of the connected redundant power supply, and cannot perform corresponding operations based on the type of the connected power supply. For example, when the power source is a battery, the power supply time may be short and the power may be suddenly cut off due to limited power supplied by the battery, and the electronic device may not respond in time, resulting in data loss and the like.
Disclosure of Invention
The embodiment of the invention provides a power supply control method and electronic equipment which can conveniently acquire the type of an accessed power supply and make a corresponding response.
In order to solve the above technical problem, an embodiment of the present invention provides the following technical solutions:
a power supply control method is applied to electronic equipment which can be accessed to a plurality of power supply modules, and comprises the following steps:
acquiring first information of each power supply module;
determining the type of the connected power supply module based on the first information;
and executing power supply control on the electronic equipment according to a preset strategy based on the determined type of the power supply module.
Wherein, the first information of each power supply module of obtaining the access includes:
and acquiring the voltage value of the connecting end connected with each power supply module.
Wherein the determining the type of the connected power supply module based on the first information comprises:
when the voltage value of the connecting end is a first voltage, determining that the type of the power supply module is a battery module; and
and when the voltage value of the connecting end is a second voltage, determining that the type of the power supply module is a power supply module, wherein the first voltage is different from the second voltage.
Wherein the executing of the power supply control of the electronic device according to a preset strategy based on the determined type of the power supply module comprises:
when the type of each power supply module connected with the electronic equipment meets a first condition, generating a first instruction which does not allow the electronic equipment to execute a starting-up program; otherwise, generating a second instruction allowing the electronic equipment to execute the starting program;
the first condition includes: the connected power supply modules only comprise a battery module.
Wherein the executing of the power supply control of the electronic device according to a preset strategy based on the determined type of the power supply module comprises:
when the type of each power supply module connected with the electronic equipment meets a second condition, determining the maximum power value of a power supply module in the power supply modules as an over-power protection value;
wherein the second condition comprises: the connected power supply modules only comprise one power supply module.
Wherein the executing of the power supply control of the electronic device according to a preset strategy based on the determined type of the power supply module comprises:
when the type of each power supply module connected with the electronic equipment meets a third condition, power supply mode information of a power supply module in the power supply modules is acquired;
determining an over-power protection value based on the power mode information;
wherein the third condition comprises: the power supply module at least comprises two power supply modules.
Wherein the determining an over-power protection value based on the power mode information comprises:
when the power supply mode of the power supply modules is a first mode, determining the maximum power value of each power supply module as an over-power protection value;
and when the power supply mode of the power supply module is the second mode, determining the maximum power value of all the power supply modules as an over-power protection value.
Wherein the method further comprises: and executing data saving operation when the power supply of the power supply module is disconnected.
An embodiment of the present invention further provides an electronic device, which includes:
at least one power supply module;
the processor is configured to acquire first information of each power supply module which is accessed; determining the type of the connected power supply module based on the first information; and executing power supply control on the electronic equipment according to a preset strategy based on the determined type of the power supply module.
The processor is further configured to generate a first instruction which does not allow the electronic equipment to execute a boot program when the type of each power supply module connected with the electronic equipment meets a first condition; otherwise, generating a second instruction allowing the electronic equipment to execute the starting program; the first condition includes: the connected power supply modules only comprise a battery module.
Based on the embodiments disclosed above, it can be seen that the embodiments of the present invention can have the following beneficial effects:
the embodiment of the invention can execute corresponding power supply control according to the type of the accessed power supply, on one hand, the data loss can be avoided because the corresponding response can be made according to the type of the connected power supply, on the other hand, the reasonable use of the power supply can be realized, and meanwhile, the safety of equipment can be ensured.
Drawings
FIG. 1 is a schematic flow chart of a power control method in an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a power supply module connected to a power backplane of an electronic device according to an embodiment of the present disclosure;
fig. 3 is a flowchart of a method for controlling power supply to an electronic device according to a predetermined policy in an embodiment of the present invention;
fig. 4 is a schematic configuration diagram of an electronic apparatus in the embodiment of the present invention.
Detailed Description
The following detailed description of specific embodiments of the present invention is provided in connection with the accompanying drawings, which are not intended to limit the invention.
It will be understood that various modifications may be made to the embodiments disclosed herein. Accordingly, the foregoing description should not be construed as limiting, but merely as exemplifications of embodiments. Other modifications will occur to those skilled in the art within the scope and spirit of the disclosure.
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the disclosure and, together with a general description of the disclosure given above, and the detailed description of the embodiments given below, serve to explain the principles of the disclosure.
These and other characteristics of the invention will become apparent from the following description of a preferred form of embodiment, given as a non-limiting example, with reference to the accompanying drawings.
It should also be understood that, although the invention has been described with reference to some specific examples, a person of skill in the art shall certainly be able to achieve many other equivalent forms of the invention, having the characteristics as set forth in the claims and hence all coming within the field of protection defined thereby.
The above and other aspects, features and advantages of the present disclosure will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.
Specific embodiments of the present disclosure are described hereinafter with reference to the accompanying drawings; however, it is to be understood that the disclosed embodiments are merely examples of the disclosure that may be embodied in various forms. Well-known and/or repeated functions and structures have not been described in detail so as not to obscure the present disclosure with unnecessary or unnecessary detail. Therefore, specific structural and functional details disclosed herein are not to be interpreted as limiting, but merely as a basis for the claims and as a representative basis for teaching one skilled in the art to variously employ the present disclosure in virtually any appropriately detailed structure.
The specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," which may each refer to one or more of the same or different embodiments in accordance with the disclosure.
The present invention provides a power supply control method and an electronic device, which can obtain the type information of a connected power module and make a targeted response in time, thereby preventing data loss due to sudden power failure or other factors, and simultaneously realizing reasonable use of a power supply and ensuring the safety of the device.
Specifically, as shown in fig. 1, a schematic flow chart of a power supply control method in an embodiment of the present invention is provided, where the method may be applied to an electronic device capable of being connected to a plurality of power supply modules, where the power supply module may be a battery module that provides power through power stored in the power supply module, or a power supply module that provides power provided by an external power supply to the electronic device through power conversion. The battery module may include a battery pack capable of storing electric power, such as a secondary battery or a rechargeable battery, which is powered by its own stored electric power. The power module may include a power supply component of a power conversion device, such as an adapter, that is capable of continuously providing power when the external power source is normally supplying power. The embodiment of the invention executes the corresponding response just by judging the type of the connected power supply module. The electronic device may be, for example, a mobile phone, a computer device, a server device, or other electronic devices that can include a plurality of power supply modules, which is not limited herein.
As shown in fig. 1, the power supply control method in the embodiment of the present invention may include:
acquiring first information of each power supply module;
determining the type of the connected power supply module based on the first information;
and executing power supply control on the electronic equipment according to a preset strategy based on the determined type of the power supply module.
In the embodiment of the invention, the electronic equipment can detect the access state of the power supply modules in real time, each accessed power supply module can be connected to the power supply back plate of the electronic equipment, and the power supply back plate can be provided with a Micro Control Unit (MCU), so that the real-time monitoring of each power supply module can be executed and the power supply control of the electronic equipment can be realized through the MCU.
Specifically, the micro control unit may determine whether the power supply module is connected by detecting a register value of a specific pin at a port connected to the power supply module, and if the register value is a high level, determine that the power supply module is connected, and if the register value is a low level, determine that the port is not connected to the power supply module, or may determine that the power supply module is not connected when the register value is a low level, and determine that the port is connected to the power supply module when the register value is a low level. In other embodiments of the present invention, the access of the power supply module may be determined through other embodiments.
In addition, when detecting the access of the power supply module, the electronic device (such as the above-mentioned micro control unit) may further obtain first information of each accessed power supply module, where the first information may be used to at least determine the type of the power supply module, for example, may be used to determine that the type of the power supply module is the above-mentioned battery module or the power supply module. Further, after determining the type of the power supply module connected to the electronic device, the electronic device may execute a corresponding power supply policy.
The power supply capability of the power supply module can be further determined according to the type of the power supply module, and the electronic equipment can further control the system operation of the electronic equipment according to the power supply capability, specifically, the power supply control of a corresponding strategy is executed on the system operation.
Specifically, in the embodiment of the present invention, a manner for the electronic device to obtain the first information of each power supply module that is accessed may include: receiving first information sent by a power supply module, wherein the first information may include type information or an identifier corresponding to the type information. The electronic device can acquire the type of the accessed power supply module after receiving the type information or the identifier corresponding to the type information. For example, the micro control unit may store a corresponding relationship between the identifier and the type information, or a memory of the electronic device may store a corresponding relationship between the identifier and the type information, and when receiving the first information transmitted by the power supply module, the micro control unit may query the type information corresponding to the identifier according to the identifier, so as to determine the type of the power supply module.
In addition, the embodiment of the invention can also determine the type of the power supply module by acquiring the voltage value of the connecting end connected with each power supply module. Different connecting ends (such as input terminals) of the micro control unit can be respectively used for connecting different power supply modules, the type of the power supply module can be determined by judging the voltage value of each connecting end, for example, when the voltage value of the connecting end is a first voltage, the type of the power supply module can be determined to be a battery module; and when the voltage value of the connecting end is a second voltage, determining that the type of the power supply module is a power supply module, wherein the first voltage is different from the second voltage. The specific values of the first voltage and the second voltage can be determined according to the circuit settings on the power supply module and the power supply backboard, and different first voltages and second voltages can be provided for different circuit structures.
Fig. 2 is a schematic structural diagram of the power supply module connected to the power backplane of the electronic device in the embodiment of the present disclosure.
The power supply module comprises two power supply modules (a module A and a module B) which are connected to a power supply backboard, namely, connected to a micro control unit. The module A and the module B are connected to the power supply back plate through the gold finger output PIN. Each module has an ID PIN (module identification PIN). The ID PIN (ID1 terminal) voltage of module a is equal to Vref R2/(R1+ R2), and the ID PIN (ID2 terminal) voltage of module B is equal to Vref R3/(R1 '+ R3'). The Vref of the two modules is the same, and may be set to 5V or 3.3V, or may be other voltage values. The R2 and R3 on the backplate are the same resistance. As long as the resistance values of the pull-up resistors R1 and R1' in the power supply module and the battery module are set to be different, the voltage of the ID PIN plugged into the power supply backboard is different, and the MCU on the power supply backboard can distinguish whether the power supply module or the battery module is plugged into the system.
For example, the resistor R2 on the power backplane is equal to R3 is equal to 1k Ω, and the pull-up reference voltage Vref inside both the power module and the battery module is 5V. The internal pull-up resistor of the power module is 4k omega, and the internal pull-up resistor of the battery module is 1k omega. Then the power module ID PIN voltage plugged into the power backplane is 1V and the battery module ID PIN voltage is 2.5V. When no module is inserted, the ID PIN voltage is 0V, as shown in table 1.
TABLE 1
ID PIN voltage Module identification
0V Non-connected power supply module
1V Power supply module
2.5V Battery module
In other embodiments of the present invention, the values of the first voltage and the second voltage may be configured to be different voltage values according to different circuit designs, and those skilled in the art can set the values according to requirements.
Through the configuration, the embodiment of the invention can realize the judgment of the type of the accessed power supply module, and after the type information is judged, the electronic equipment can execute the power supply control of the system.
As shown in fig. 3, a flowchart of a method for performing power supply control on an electronic device according to a preset policy in the embodiment of the present invention is shown, where the method may include:
when the type of each power supply module connected with the electronic equipment is judged to meet a first condition, the system starting operation is not allowed to be executed, and a first instruction which does not allow the electronic equipment to execute a starting program is generated at the moment; otherwise, generating a second instruction allowing the electronic equipment to execute the starting program; wherein the first condition comprises: the connected power supply modules only comprise battery modules or are not connected with any power supply module.
In the embodiment of the invention, because the battery module provides the power consumption power for the electronic equipment through the stored power, the power supply time of the battery module is limited, and in order to prevent the situation of sudden power failure and the like of the electronic equipment caused by insufficient power of the battery module, when the connected power supply module only comprises the battery module or is not connected with any power supply module, the electronic equipment can be controlled not to execute the startup operation, and the first instruction which does not allow the electronic equipment to execute the startup program is generated. For example, at this time, the mcu of the electronic device may pull up the level value of the system boot signal terminal, that is, the mcu switches the level values of the system boot signal terminals (PSON1 and PSON2) to high level 1. When the electronic device receives the boot instruction, it may first detect the level value of the system boot signal end, if the high level value is detected, the boot operation will not be executed, otherwise, the boot program will be executed.
When the connected power supply module comprises at least one power supply module, the power supply module can allow the execution of the boot operation, and at the moment, a second instruction which allows the electronic equipment to execute the boot program can be generated. For example, at this time, the mcu of the electronic device may pull down the level value of the system boot signal terminal, that is, the mcu switches the level values of the system boot signal terminals (PSON1 and PSON2) to high level 0. When the electronic device receives the boot instruction, it may first detect the level value of the system boot signal end, if the low level value is detected, the boot operation will be executed, otherwise, the boot program will not be executed.
Through the configuration, the situation that the power-off data of the electronic equipment is lost suddenly due to the fact that the power supply module connected with the power supply module only comprises the battery module is insufficient can be prevented, and the safety is higher.
Further, when the electronic device determines that the connected power supply modules include at least one power supply module, the electronic device may be allowed to execute a boot program, and meanwhile, the maximum power consumption of the system of the electronic device may be limited based on the maximum power provided by each power supply module, that is, an over-power protection value (OPP) of the system is set.
Specifically, when the type of each power supply module connected to the electronic device satisfies a second condition, the maximum power value of a power supply module in the power supply modules may be determined as an over-power protection value; wherein the second condition comprises: the connected power supply modules only comprise one power supply module.
That is, when it is determined that only one power module is included in the power supply modules connected to the power backplane of the electronic device, the electronic device may use the maximum power value that can be provided by the power module as the over-power protection value, thereby protecting the electronic device.
When the first information of the power supply module is obtained, the first information can also include the voltage information corresponding to the type of the power supply module, and the maximum output power value of the power supply module can also be obtained. Specifically, the power supply module may transmit the maximum output power value to a micro control unit disposed on the power backplane through electrical connection with the power backplane, or may be connected to an output pin (in which the maximum output power value is stored) of a connection port of the power supply module through a connection terminal on an input side of the micro control unit, so as to obtain the maximum output power value of the micro control unit. Through the method, the maximum output power of the power supply module can be obtained, and the rated voltage, the rated power or the real-time provided power parameter information of the power supply module can be obtained in the same way.
When only one power module is included in the connected power supply module, the maximum output power of the power module can be determined to be the overpower protection value of the system, so that the power supply module is prevented from being unmatched with the power supply requirement of the system, and damage to electronic equipment or the power supply module is avoided.
In addition, in the embodiment of the present invention, when the accessed power modules include at least two power modules, the over-power protection value may be further determined based on the power supply modes of the at least two power modules.
Specifically, when the type of each power supply module connected to the electronic device meets a third condition, power supply mode information of a power supply module in the power supply modules is acquired;
determining an over-power protection value based on the power mode information; wherein the third condition comprises: the power supply module at least comprises two power supply modules. Wherein the determining an over-power protection value based on the power mode information comprises: when the power supply mode of the power supply modules is a first mode, determining the maximum power value of each power supply module as an over-power protection value; and when the power supply mode of the power supply module is the second mode, determining the maximum power value of all the power supply modules as an over-power protection value.
In the embodiment of the present invention, when it is detected that at least two power modules are connected to the electronic device, configuration information about power supply modes of the at least two power modules may be further obtained, the power supply modes of the power modules are configured based on the configuration information, and meanwhile, a corresponding system overpower protection value is set.
The power supply mode may include at least a first mode and a second mode, where the first mode may be a redundant mode, that is, the electronic device may be first powered by the selected at least one power module, and when the selected at least one power module fails or cannot provide power due to other factors, the electronic device is powered by at least one power module of the remaining power modules. The second mode may be a parallel mode, i.e. all power modules provide power to the electronic device.
Specifically, in the embodiment of the present invention, acquiring configuration information about power supply modes of the at least two power modules may include:
receiving first selection information, wherein the first selection information at least comprises power supply modes of at least two power supply modules;
when the power supply mode determined by the first selection information is the first mode, second selection information is further received, and the second selection information comprises information of a power supply module which supplies power preferentially or information of a power supply module which supplies power in a standby mode, so that which power supply modules are preferentially used for supplying power to the electronic equipment and which power supply modules can be used as a standby power supply to execute power supply operation when the power supply module which supplies power preferentially cannot supply power normally.
In addition, when the power supply mode determined by the first selection information is the second mode, the power supply operation is directly executed on the electronic equipment through all the power supply modules.
Through the above, the specific power supply mode of the power supply module and the specific configuration corresponding to the power supply mode can be obtained, and the micro control unit can correspondingly configure the power supply module after receiving the first selection information and the second selection information.
For example, when the received power supply mode is the first mode, the micro control unit may establish a power supply connection between the power module that preferentially supplies power and the electronic device based on the second selection information, and when at least one of the power modules fails, select at least one of the standby power modules to replace the failed power module to perform power supply of the electronic device. At this time, the micro control unit may further set a sum of maximum output powers of the power modules selected to supply power to the electronic device as an over-power protection value of the system, or determine a maximum power value of each power module as the over-power protection value of the system. As shown in table 2, when only two power modules are included, in the first mode, the maximum output power of the power module in which power is supplied is determined as the over-power protection value of the system. When the received power supply mode is the second mode, the micro control unit can supply power to the electronic equipment through all the power supply modules, and at the moment, the micro control unit can set the sum of the maximum output power of all the power supply modules for supplying power to the electronic equipment as the overpower protection value of the system.
TABLE 2
Figure BDA0001520681740000101
Through the configuration, the system overpower protection value can be set when the power modules are connected, and the safe operation of the electronic equipment and the safe use of the power supply module are further ensured.
In a preferred embodiment of the present invention, when the power supply module accessed by the electronic device includes both the power supply module and the battery module, the micro control unit preferentially selects the power supply module to supply power to the electronic device, and when it is detected that the power supply of the power supply module is cut off, the battery module may perform power supply to the electronic device, and meanwhile, the micro control unit may further generate a data storage instruction, so that the electronic device stores system data of the electronic device, thereby preventing data loss due to power supply time limitation of the battery module, and ensuring data security of the device.
In summary, the embodiment of the present invention can perform corresponding power supply control according to the type of the power source connected, on one hand, data loss can be avoided because corresponding response can be made according to the type of the connected power source, on the other hand, reasonable use of the power source can be realized, and meanwhile, the safety of the device can be ensured.
The embodiment of the invention also provides electronic equipment, which can realize reasonable use of a power supply and data safety of the electronic equipment by applying the power supply control method in the embodiment.
Specifically, as shown in fig. 4, a schematic structure diagram of an electronic device in the embodiment of the present invention is shown, where the schematic structure diagram may include:
at least one power supply module 1;
a processor (such as the above micro control unit) 2 configured to obtain first information of each power supply module 1 that is accessed; determining the type of the connected power supply module 1 based on the first information; and based on the determined type of the power supply module 1, executing power supply control on the electronic equipment according to a preset strategy.
The power supply module in the embodiment of the invention may include a battery module for providing power through the power stored in the power supply module, or may include a power supply module for converting the power provided by the external power supply into power to be provided to the electronic device. The battery module may include a battery pack capable of storing electric power, such as a secondary battery or a rechargeable battery, which is powered by its own stored electric power. The power module may include a power supply component of a power conversion device, such as an adapter, that is capable of continuously providing power when the external power source is normally supplying power. The embodiment of the invention executes the corresponding response just by judging the type of the connected power supply module. The electronic device may be, for example, a mobile phone, a computer device, a server device, or other electronic devices that can include a plurality of power supply modules, which is not limited herein.
In the embodiment of the present invention, the processor (such as the above micro control unit) 2 may detect the access state of the power supply module 1 in real time, each accessed power supply module 1 may be connected to a power backplane of the electronic device, and the power backplane may be provided with a Micro Control Unit (MCU), and the micro control unit may perform real-time monitoring of each power supply module and implement power supply control of the electronic device.
Specifically, the processor 2 may determine whether a power module is connected by detecting a register value of a specific pin at a connection port connected to the power module 1, and determine that the power module is connected if the register value is high, and determine that the connection port is not connected to the power module if the register value is low, or may determine that the power module is not connected if the register value is low, and determine that the connection port is connected to the power module if the register value is low. In other embodiments of the present invention, the access of the power supply module may be determined through other embodiments.
In addition, when detecting the access of the power supply module, the processor 2 (such as the above-mentioned micro control unit) may further obtain first information of each accessed power supply module, where the first information may be at least used to determine the type of the power supply module 1, for example, may be used to determine that the type of the power supply module 1 is the above-mentioned battery module or power supply module. Further, after the electronic device determines the type of the power supply module 1 connected to the electronic device, the processor 2 may execute a corresponding power supply policy.
The power supply capability of the power supply module can be further determined according to the type of the power supply module, and the electronic equipment can further control the system operation of the electronic equipment according to the power supply capability, specifically, the power supply control of a corresponding strategy is executed on the system operation.
Specifically, in the embodiment of the present invention, a manner of acquiring the first information of each power supply module accessed by the processor 2 may include: receiving first information sent by a power supply module, wherein the first information may include type information or an identifier corresponding to the type information. The electronic device can acquire the type of the accessed power supply module after receiving the type information or the identifier corresponding to the type information. For example, the processor 2 may store a corresponding relationship between the identifier and the type information, or a memory of the electronic device may store a corresponding relationship between the identifier and the type information, and when receiving the first information transmitted by the power supply module, the processor 2 may query the type information corresponding to the identifier according to the identifier, so as to determine the type of the power supply module.
In addition, the embodiment of the invention can also determine the type of the power supply module by acquiring the voltage value of the connecting end connected with each power supply module. Different connection ends (such as input terminals) of the processor 2 may be respectively used to connect different power supply modules, and the type of the power supply module may be determined by determining the voltage value of each connection end, for example, when the voltage value of the connection end is the first voltage, the type of the power supply module may be determined as a battery module; and when the voltage value of the connecting end is a second voltage, determining that the type of the power supply module is a power supply module, wherein the first voltage is different from the second voltage. The specific values of the first voltage and the second voltage can be determined according to the circuit settings on the power supply module and the power supply backboard, and different first voltages and second voltages can be provided for different circuit structures.
Fig. 2 is a schematic structural diagram illustrating a power supply module connected to a power backplane of an electronic device according to an embodiment of the present disclosure.
The power supply system comprises two power supply modules 1 (a module A and a module B) which are connected to a power supply backboard, namely, connected to a processor (micro control unit MCU) 2. The module A and the module B are connected to the power supply back plate through the gold finger output PIN. Each module has an ID PIN (module identification PIN). The ID PIN (ID1 terminal) voltage of module a is equal to Vref R2/(R1+ R2), and the ID PIN (ID2 terminal) voltage of module B is equal to Vref R3/(R1 '+ R3'). The Vref of the two modules is the same, and may be set to 5V or 3.3V, or may be other voltage values. The R2 and R3 on the backplate are the same resistance. As long as the resistance values of the pull-up resistors R1 and R1' in the power supply module and the battery module are set to be different, the voltage of the ID PIN plugged into the power supply backboard is different, and the MCU on the power supply backboard can distinguish whether the power supply module or the battery module is plugged into the system.
For example, the resistor R2 on the power backplane is equal to R3 is equal to 1k Ω, and the pull-up reference voltage Vref inside both the power module and the battery module is 5V. The internal pull-up resistor of the power module is 4k omega, and the internal pull-up resistor of the battery module is 1k omega. Then the power module ID PIN voltage plugged into the power backplane is 1V and the battery module ID PIN voltage is 2.5V. When no module is inserted, the ID PIN voltage is 0V, as shown in table 1.
In other embodiments of the present invention, the values of the first voltage and the second voltage may be configured to be different voltage values according to different circuit designs, and those skilled in the art can set the values according to requirements.
Through the configuration, the embodiment of the invention can realize the judgment of the type of the accessed power supply module, and after the type information is judged, the electronic equipment can execute the power supply control of the system.
The processor in the embodiment of the present invention may be further configured to generate a first instruction that does not allow the electronic device to execute a boot program when the type of each power supply module connected to the electronic device satisfies a first condition; otherwise, generating a second instruction allowing the electronic equipment to execute the starting program; the first condition includes: the connected power supply modules only comprise a battery module.
When the type of each power supply module connected with the electronic equipment meets a first condition, the system startup operation is not allowed to be executed, and a first instruction which does not allow the electronic equipment to execute a startup program is generated; otherwise, generating a second instruction allowing the electronic equipment to execute the starting program; wherein the first condition comprises: the connected power supply modules only comprise battery modules or are not connected with any power supply module.
In the embodiment of the present invention, in order to prevent the occurrence of situations such as sudden power failure of the electronic device caused by insufficient power of the battery module, when it is determined that the connected power supply module includes only the battery module or is not connected to any power supply module, the processor 2 may control the electronic device not to perform the power-on operation and generate the first instruction that does not allow the electronic device to perform the power-on program, because the battery module provides power for the electronic device through the power stored in the battery module, and the power supply time of the battery module is limited. For example, at this time, the processor 2 of the electronic device may pull up the level value of the system boot signal terminal, that is, the processor 2 switches the level value of the system boot signal terminals (PSON1 and PSON2) on the output side to high level 1. When the electronic device receives the boot instruction, it may first detect the level value of the system boot signal end, if the high level value is detected, the boot operation will not be executed, otherwise, the boot program will be executed.
When the connected power supply module includes at least one power supply module, the processor 2 may generate a second instruction that allows the electronic device to execute the boot program. For example, at this time, the processor 2 of the electronic device may pull down the level value of the system boot signal terminal, that is, the processor 2 switches the level value of the system boot signal terminals (PSON1 and PSON2) on the output side to high level 0. When the electronic device receives the boot instruction, it may first detect the level value of the system boot signal end, if the low level value is detected, the boot operation will be executed, otherwise, the boot program will not be executed.
Through the configuration, the situation that the power-off data of the electronic equipment is lost suddenly due to the fact that the power supply module connected with the power supply module only comprises the battery module is insufficient can be prevented, and the safety is higher.
Further, when the processor 2 determines that the connected power supply modules include at least one power supply module, the electronic device may be allowed to execute a boot program, and meanwhile, the maximum power consumption of the system of the electronic device may be limited based on the maximum power provided by each power supply module, that is, an over power protection value (OPP) of the system is set.
Specifically, when the type of each power supply module connected to the electronic device satisfies a second condition, the maximum power value of a power supply module in the power supply modules may be determined as an over-power protection value; wherein the second condition comprises: the connected power supply modules only comprise one power supply module.
That is, when it is determined that only one power module is included in the power modules connected to the power backplane of the electronic device, the processor 2 may use the maximum power value that can be provided by the power module as the over-power protection value, thereby protecting the electronic device.
When the first information of the power supply module is obtained, the first information can also include the voltage information corresponding to the type of the power supply module, and the maximum output power value of the power supply module can also be obtained. Specifically, the power supply module may transmit the maximum output power value to the processor 2 disposed on the power backplane through electrical connection with the power backplane, or may also be connected to an output pin (in which the maximum output power value is stored) of a connection port of the power supply module through a connection terminal at an input side of the processor 2, so as to obtain the maximum output power value of the processor 2. Through the method, the maximum output power of the power supply module can be obtained, and the rated voltage, the rated power or the real-time provided power parameter information of the power supply module can be obtained in the same way.
When judging that only include a power module in the power module of connection, processor 2 then can confirm the overpower protection value for the system with the maximum output power of this power module to prevent the mismatching of power module and system power supply demand, cause the damage of electronic equipment or power module.
In addition, in the embodiment of the present invention, when the accessed power modules include at least two power modules, the over-power protection value may be further determined based on the power supply modes of the at least two power modules.
Specifically, when the type of each power supply module connected to the electronic device meets a third condition, power supply mode information of a power supply module in the power supply modules is acquired;
determining an over-power protection value based on the power mode information; wherein the third condition comprises: the power supply module at least comprises two power supply modules. Wherein the determining an over-power protection value based on the power mode information comprises: when the power supply mode of the power supply modules is a first mode, determining the maximum power value of each power supply module as an over-power protection value; and when the power supply mode of the power supply module is the second mode, determining the maximum power value of all the power supply modules as an over-power protection value.
In the embodiment of the present invention, when it is detected that at least two power modules are connected to the electronic device, the processor 2 may further obtain configuration information about power supply modes of the at least two power modules, configure the power supply modes of the power modules based on the configuration information, and set corresponding system overpower protection values.
The power supply mode may include at least a first mode and a second mode, where the first mode may be a redundant mode, that is, the electronic device may be first powered by the selected at least one power module, and when the selected at least one power module fails or cannot provide power due to other factors, the electronic device is powered by at least one power module of the remaining power modules. The second mode may be a parallel mode, i.e. all power modules provide power to the electronic device.
Specifically, in the embodiment of the present invention, the obtaining, by the processor 2, configuration information about power supply modes of the at least two power modules may include:
receiving first selection information, wherein the first selection information at least comprises power supply modes of at least two power supply modules;
when the power supply mode determined by the first selection information is the first mode, second selection information is further received, and the second selection information comprises information of a power supply module which supplies power preferentially or information of a power supply module which supplies power in a standby mode, so that which power supply modules are preferentially used for supplying power to the electronic equipment and which power supply modules can be used as a standby power supply to execute power supply operation when the power supply module which supplies power preferentially cannot supply power normally. In addition, when the power supply mode determined by the first selection information is the second mode, the power supply operation is directly executed on the electronic equipment through all the power supply modules. The receiving mode of the first selection information and the second selection information may be to receive user selection information detected by the touch screen, or to read pre-stored configured power supply mode information and pre-configured priority information of the power supply mode.
Through the above, the specific power supply mode of the power supply module and the specific configuration corresponding to the power supply mode can be obtained, and the processor 2 can correspondingly configure the power supply module after receiving the first selection information and the second selection information.
For example, when the received power supply mode is the first mode, the processor 2 may establish a power supply connection between the power modules that preferentially supply power and the electronic device based on the second selection information, and when at least one of the power modules fails, select at least one of the standby power modules to replace the failed power module to perform power supply of the electronic device. In this case, the processor 2 may set the sum of the maximum output powers of the power modules selected to supply power to the electronic device as the over-power protection value of the system, or determine the maximum power value of each power module as the over-power protection value of the system. As shown in table 2, when only two power modules are included, in the first mode, the maximum output power of the power module in which power is supplied is determined as the over-power protection value of the system. When the received power supply mode is the second mode, the processor 2 may supply power to the electronic device through all the power modules, and at this time, the processor 2 may set the sum of the maximum output powers of the power modules that supply power to the electronic device as the over-power protection value of the system.
Through the configuration, the system overpower protection value can be set when the power modules are connected, and the safe operation of the electronic equipment and the safe use of the power supply module are further ensured.
In a preferred embodiment of the present invention, when the power supply module accessed by the electronic device includes both the power supply module and the battery module, the processor 2 preferentially selects the power supply module to supply power to the electronic device, and when it is detected that the power supply of the power supply module is cut off, the battery module may execute the power supply to the electronic device, and meanwhile, the processor 2 may further generate a data storage instruction, so that the electronic device stores system data of the electronic device, thereby preventing data loss due to power supply time limitation of the battery module, and ensuring data security of the device.
In summary, the embodiment of the present invention can perform corresponding power supply control according to the type of the power source connected, on one hand, data loss can be avoided because corresponding response can be made according to the type of the connected power source, on the other hand, reasonable use of the power source can be realized, and meanwhile, the safety of the device can be ensured.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the electronic device to which the data processing method described above is applied may refer to the corresponding description in the foregoing product embodiments, and details are not repeated herein.
The above embodiments are only exemplary embodiments of the present invention, and are not intended to limit the present invention, and the scope of the present invention is defined by the claims. Various modifications and equivalents may be made by those skilled in the art within the spirit and scope of the present invention, and such modifications and equivalents should also be considered as falling within the scope of the present invention.

Claims (7)

1. A power supply control method is applied to electronic equipment which can be accessed to a plurality of power supply modules, and comprises the following steps:
acquiring first information of each power supply module;
determining the type of the connected power supply module based on the first information;
executing power supply control on the electronic equipment according to a preset strategy based on the determined type of the power supply module;
wherein the executing of the power supply control of the electronic device according to a preset strategy based on the determined type of the power supply module comprises:
when the type of each power supply module connected with the electronic equipment meets a first condition, generating a first instruction which does not allow the electronic equipment to execute a starting-up program; otherwise, generating a second instruction allowing the electronic equipment to execute the starting program;
the first condition includes: the connected power supply modules only comprise a battery module;
wherein, the first information of each power supply module of obtaining the access includes: and acquiring the voltage value of the connecting end connected with each power supply module.
2. The method of claim 1, wherein the determining the type of the connected power module based on the first information comprises:
when the voltage value of the connecting end is a first voltage, determining that the type of the power supply module is a battery module; and
and when the voltage value of the connecting end is a second voltage, determining that the type of the power supply module is a power supply module, wherein the first voltage is different from the second voltage.
3. The method of claim 1, wherein the performing power supply control of the electronic device according to a preset policy based on the determined type of the power supply module comprises:
when the type of each power supply module connected with the electronic equipment meets a second condition, determining the maximum power value of a power supply module in the power supply modules as an over-power protection value;
wherein the second condition comprises: the connected power supply modules only comprise one power supply module.
4. The method of claim 1, wherein the performing power supply control of the electronic device according to a preset policy based on the determined type of the power supply module comprises:
when the type of each power supply module connected with the electronic equipment meets a third condition, power supply mode information of a power supply module in the power supply modules is acquired;
determining an over-power protection value based on the power mode information;
wherein the third condition comprises: the power supply module at least comprises two power supply modules.
5. The method of claim 4, wherein the determining an over-power protection value based on the power mode information comprises:
when the power supply mode of the power supply modules is a first mode, determining the maximum power value of each power supply module as an over-power protection value;
and when the power supply mode of the power supply module is the second mode, determining the maximum power value of all the power supply modules as an over-power protection value.
6. The method according to any one of claims 3-5, further comprising:
and executing data saving operation when the power supply of the power supply module is disconnected.
7. An electronic device, comprising:
at least one power supply module;
the processor is configured to acquire first information of each power supply module which is accessed; determining the type of the connected power supply module based on the first information; executing power supply control on the electronic equipment according to a preset strategy based on the determined type of the power supply module; wherein the executing of the power supply control of the electronic device according to a preset strategy based on the determined type of the power supply module comprises: when the type of each power supply module connected with the electronic equipment meets a first condition, generating a first instruction which does not allow the electronic equipment to execute a starting-up program; otherwise, generating a second instruction allowing the electronic equipment to execute the starting program; the first condition includes: the connected power supply modules only comprise a battery module;
wherein, the first information of each power supply module of obtaining the access includes: and acquiring the voltage value of the connecting end connected with each power supply module.
CN201711407758.7A 2017-12-22 2017-12-22 Power supply control method and electronic equipment Active CN108121431B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711407758.7A CN108121431B (en) 2017-12-22 2017-12-22 Power supply control method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711407758.7A CN108121431B (en) 2017-12-22 2017-12-22 Power supply control method and electronic equipment

Publications (2)

Publication Number Publication Date
CN108121431A CN108121431A (en) 2018-06-05
CN108121431B true CN108121431B (en) 2021-04-13

Family

ID=62231240

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711407758.7A Active CN108121431B (en) 2017-12-22 2017-12-22 Power supply control method and electronic equipment

Country Status (1)

Country Link
CN (1) CN108121431B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110286731A (en) * 2019-06-30 2019-09-27 联想(北京)有限公司 A kind of information processing method and electronic equipment
CN114327024A (en) * 2021-12-30 2022-04-12 联想(北京)有限公司 Control method and device and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102055219A (en) * 2009-11-02 2011-05-11 索尼公司 Information processing apparatus, power supply control method, program and power supply control system
CN104657188A (en) * 2015-03-24 2015-05-27 联想(北京)有限公司 Startup control method and device and electronic equipment
CN107147290A (en) * 2017-06-07 2017-09-08 联想(北京)有限公司 Power module and power-supply system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7415631B2 (en) * 2006-01-12 2008-08-19 Zippy Technology Corp. Backup-type power supply system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102055219A (en) * 2009-11-02 2011-05-11 索尼公司 Information processing apparatus, power supply control method, program and power supply control system
CN104657188A (en) * 2015-03-24 2015-05-27 联想(北京)有限公司 Startup control method and device and electronic equipment
CN107147290A (en) * 2017-06-07 2017-09-08 联想(北京)有限公司 Power module and power-supply system

Also Published As

Publication number Publication date
CN108121431A (en) 2018-06-05

Similar Documents

Publication Publication Date Title
US8321620B2 (en) Computer system for supplying electric power to external apparatus and control method thereof
US20150143138A1 (en) System for detecting universal serial bus (usb) device and method thereof
US9312745B2 (en) Universal power supply system
US20150091499A1 (en) Charger, terminal, charging system, and charging control method
US20130254580A1 (en) Method and System for Supplying Power to USB Device
TW201331744A (en) USB hub for supplying power and method thereof
US20130119959A1 (en) Voltage adjusting device for solid state drive
US11715960B2 (en) Dual-battery charging and discharging method and apparatus, terminal, and storage medium
CN108121431B (en) Power supply control method and electronic equipment
US20130166896A1 (en) Management system for network card
US11809251B2 (en) Power control device, display device, and power control method
CN115576406A (en) Power failure detection and power supply maintaining function circuit and electronic equipment
US9401626B2 (en) Battery, power supply apparatus and electronic apparatus
US9116678B2 (en) I/O module with power-uninterruptible USB port
US20200117257A1 (en) Method and device for power control
CN111045506B (en) Control method and electronic equipment
CN104868509B (en) A kind of control method and external battery
CN108984447B (en) Control method of electronic equipment and electronic equipment
KR20110015742A (en) Method for power supply using usb interface and portable terminal using the same
US20150339909A1 (en) Battery protection system and battery protection method
US20140117766A1 (en) Electronic device and power supplying control method thereof
US20240146076A1 (en) Electronic device and charging method thereof
CN210405082U (en) Electronic equipment
WO2016045350A1 (en) Rechargeable battery, method for using rechargeable battery, and charging system
CN112332513B (en) Electronic equipment and power control method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant